Subject: Re: [vserver] VServer + Xorg + Xfce4 = ~almost~ working !
From: Shinkan <shinkan@gmail.com>
Date: Thu, 28 Jan 2010 15:05:36 +0100
Thu, 28 Jan 2010 15:05:36 +0100
2010/1/28 Richard Lamboj <richard.lamboj@bilcom.at>

>
> 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
>

That will not be good to me, as I try to isolate the Xorg world from the
host as much as possible (ie I don't want Xorg in my host).


>
> 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_.
>

That's the target solution.


>
> From the Link you posted in your Mail:
>

That's what I tried, but I was not successful at it.


>    * Allow capability CAP_SYS_RAWIO. It can be set in the capabilities file
> or the vserver config depending on your util-vserver.
>

This is now "SYS_RAWIO", and should be set in "bcapabilities" file of the
VServer.


>    * Set up a mouse device, such as /dev/psaux or /dev/input/mice
>

I proceed with "mkdir -p /vservers/myguest/dev/input && cp -a
/dev/input/mice /vservers/myguest/dev/input/"


>    * 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
>

I did the same way : "cp -a /dev/tty7 /dev/tty8 /dev/tty9
/vservers/myguest/dev/"


>    * 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?)
>

Cped /dev/mem and /dev/kmem.

Then played with xorg.conf.

I'm successfully seeing my Xfce4 desktop with "startx" (.xinitrc contains
"exec start-xfce4" or something like that).
The problem is that I can't move the mouse or type to the keyboard : nothing
happens.

Thanks anyway.

-- 
Pierre.
"Sometimes when I'm talking, my words can't keep up with my thoughts. I
wonder why we think faster than we speak. Probably so we can think twice." -
Bill Watterson




2010/1/28 Richard Lamboj <richard.lamboj@bilcom.at>

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

That will not be good to me, as I try to isolate the Xorg world from the host as much as possible (ie I don't want Xorg in my host).
 

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 .

That's the target solution.
 

From the Link you posted in your Mail:

That's what I tried, but I was not successful at it.
 
   * Allow capability CAP SYS RAWIO. It can be set in the capabilities file
or the vserver config depending on your util-vserver.

This is now "SYS RAWIO", and should be set in "bcapabilities" file of the VServer.
 
   * Set up a mouse device, such as /dev/psaux or /dev/input/mice

I proceed with "mkdir -p /vservers/myguest/dev/input && cp -a /dev/input/mice /vservers/myguest/dev/input/"
 
   * 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

I did the same way : "cp -a /dev/tty7 /dev/tty8 /dev/tty9 /vservers/myguest/dev/"
 
   * 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?)

Cped /dev/mem and /dev/kmem.

Then played with xorg.conf.

I'm successfully seeing my Xfce4 desktop with "startx" (.xinitrc contains "exec start-xfce4" or something like that).
The problem is that I can't move the mouse or type to the keyboard : nothing happens.

Thanks anyway.

--
Pierre.
"Sometimes when I'm talking, my words can't keep up with my thoughts. I wonder why we think faster than we speak. Probably so we can think twice." - Bill Watterson