Subject: Re: [vserver] VServer + Xorg + Xfce4 = ~almost~ working !
From: Richard Lamboj <richard.lamboj@bilcom.at>
Date: Thu, 28 Jan 2010 14:57:45 +0100

 Thu, 28 Jan 2010 14:57:45 +0100

Am Thursday 28 January 2010 11:38:37 schrieb Shinkan:
> Hi everyone !
>
> I'm trying to run a Xorg server (X.Org X Server 1.6.5) with Xfce4 on it,
> through a Gentoo host / Gento guest VServer.
> I followed and adapted that (http://linux-vserver.org/Vservers and X) and
> it kinda work :
> I can "startx" in VServer and Xfce4 pops up but : I've no mouse, no
> keyboard (I can't control anything, so that it's like "freezed").
>
> I suspected hald to be the bad guy, as (according to what I understand), it
> is responsible for bringing keyboard and mouse to Xorg ?
> Unfortunately, hald can't start on the VServer.
>
> Any hints on how I could proceed ?

Hello!

Solution 1:
Use XDMCP and connect with Xnest, or Xephyr.

You can run another X11 Server on the  Host  (or on another Computer and 
Connect over the Network) and Connect from there to the VServer.

This works without any Problem. You also can use FreeNX

Solution 2:
Running an X11 Server inside a VServer Guest. Set the "CAP SYS RAWIO" 
capabilities and copy the necessary Device Files from the  HOST  to the 
 GUEST .

This  should  work. I don't have tested it. But the same concept worked for 
VirtualBox in a Guest.

From the Link you posted in your Mail:
    * Allow capability CAP SYS RAWIO. It can be set in the capabilities file 
or the vserver config depending on your util-vserver.
    * Set up a mouse device, such as /dev/psaux or /dev/input/mice
    * Set up a vc/tty device, such as /dev/tty7 or /dev/vc/7 (major 4, minor 
same as device). If you are running a main X server you might need to use 8 
or 9 for the vc/tty device
    * Set up /dev/kmem (not 100% sure this is needed, don't think X has to 
have it to run) (note: Xorg on debian sid require a /dev/mem -- 
NebuchadnezzaR?)
    * Now just switch to a console, log in as root, enter your vserver and 
startx, a caveat on newer versions of vserver when switching between a 
vserver X server and the main server's X server you need to switch :to a 
console first or you can lose access to the main server's X server.
    * You'll also need pts/pty devices to run things like xterm, but if you 
have ssh set up you probably already have them. 

Kind Regards, Richi