You are not logged in.

#1 2009-11-15 02:17:21

corsakh
Member
Registered: 2009-11-08
Posts: 104

[SOLVED] Running VirtualBox on a second XServer

Hello,

I am trying to run VirtualBox on a second XServer. I bascially just copy-cutted the method described in the Steam wiki, and I am getting errors.

Basically I created two files, first vm.sh:

#!/bin/bash
VBoxManage startvm Windows

And second x.vm.sh:

#!/bin/bash 
DISPLAY=:1.0
xinit $HOME/vm.sh $* -- :1

When I run x.vm.sh from GNOME I get a black screen for a couple seconds and get back to desktop.

This is the out put that I get:

This is a pre-release version of the X server from The X.Org Foundation.
It is not supported in any way.
Bugs may be filed in the bugzilla at http://bugs.freedesktop.org/.
Select the "xorg" product for bugs you find in this release.
Before reporting bugs in pre-release versions please check the
latest version in the X.Org Foundation git repository.
See http://wiki.x.org/wiki/GitPage for git access instructions.

X.Org X Server 1.7.1.901 (1.7.2 RC 1)
Release Date: 2009-11-6
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.31-ARCH x86_64 
Current Operating System: Linux Computer 2.6.31-ARCH #1 SMP PREEMPT Tue Nov 10 19:01:40 CET 2009 x86_64
Kernel command line: root=/dev/disk/by-uuid/638b6309-2607-46ad-b560-49961f18c0a8 ro init=/sbin/bootchartd
Build Date: 08 November 2009  04:08:18PM
 
Current version of pixman: 0.16.2
    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.1.log", Time: Sun Nov 15 13:14:54 2009
(==) Using config file: "/etc/X11/xorg.conf"

record: RECORD extension enabled at configure time.
record: This extension is known to be broken, disabling extension now..
record: http://bugs.freedesktop.org/show_bug.cgi?id=20500
VirtualBox Command Line Management Interface Version 3.1.0_BETA1
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

Waiting for the remote session to open...
Remote session has been successfully opened.

waiting for X server to shut down

And I am back to bash. VB is not running, second XServer is not running.

When I execute the same file from a virtual terminal, same thing happens.

Just starting a second xterm like this works fine:

xinit -- :1

But it comes with all the GNOME stuff, I want absolutely nothing of that. Just the VM GUI.

Last edited by corsakh (2009-11-15 06:30:35)

Offline

#2 2009-11-15 03:15:52

pseup
Member
Registered: 2008-06-06
Posts: 103

Re: [SOLVED] Running VirtualBox on a second XServer

I start a 2nd X server like so:

DISPLAY=:1
X :1 -ac -terminate &
sleep 2
whateverapp

Offline

#3 2009-11-15 03:46:26

corsakh
Member
Registered: 2009-11-08
Posts: 104

Re: [SOLVED] Running VirtualBox on a second XServer

I changed to:

#!/bin/bash
DISPLAY=:1.0
#xinit $HOME/vm.sh $* -- :1
X :1 -ac -terminate &
sleep 2
VBoxManage startvm Windows

Now I get a black screen on CTRL-ALT-F8 without a cursor and this out put:

Waiting for the remote session to open...
ERROR: Virtual machine 'Windows' has terminated unexpectedly during startup
Details: code NS_ERROR_FAILURE (0x80004005), component Machine, interface IMachine, callee <NULL>

Running xterm instead works totally fine:

#!/bin/bash
DISPLAY=:1.0
#xinit $HOME/vm.sh $* -- :1
X :1 -ac -terminate &
sleep 2
xterm

Substituting VBoxManage line with $HOME/vm.sh gives the same error.

Last edited by corsakh (2009-11-15 03:52:53)

Offline

#4 2009-11-15 04:24:53

corsakh
Member
Registered: 2009-11-08
Posts: 104

Re: [SOLVED] Running VirtualBox on a second XServer

Ok, simply starting xterm this way and then typing the command works. Even using this code works just fine:

#!/bin/bash
DISPLAY=:1.0
#xinit $HOME/vm.sh $* -- :1
X :1 -ac -terminate &
sleep 2
xterm &
VBoxManage startvm Windows

I will assume its just some sort of VB bug. Is this setup supposed to be much slower than running VM on the first X cos of the extra XServer running?

Offline

#5 2009-11-15 05:27:28

some-guy94
Member
Registered: 2009-08-15
Posts: 360

Re: [SOLVED] Running VirtualBox on a second XServer

You can also use VBoxSDL --startvm Windows to start the vm

Offline

#6 2009-11-15 05:36:36

corsakh
Member
Registered: 2009-11-08
Posts: 104

Re: [SOLVED] Running VirtualBox on a second XServer

Whats the difference between those two?

Last edited by corsakh (2009-11-15 05:36:47)

Offline

#7 2009-11-15 05:49:44

some-guy94
Member
Registered: 2009-08-15
Posts: 360

Re: [SOLVED] Running VirtualBox on a second XServer

AFAIK, VBoxSDL is just a simple frontend without any menus (looks similar to qemu) and doesn't use Qt or any of it's libraries.

Offline

#8 2009-11-15 06:29:59

corsakh
Member
Registered: 2009-11-08
Posts: 104

Re: [SOLVED] Running VirtualBox on a second XServer

Ye thanks, I like it. Just went with openbox, works fine.

Offline

Board footer

Powered by FluxBB