[lxc-users] xserver inside lxc

U.Mutlu for-gmane at mutluit.com
Fri Jan 23 23:34:39 UTC 2015


Alex Mestiashvili wrote, On 01/16/2015 12:07 PM:
> Hi All,
>
> trying to start the xorg server in the container I receive the following
> messages:
>
>
> [ 61645.425] (II) NVIDIA dlloader X Driver  340.65  Tue Dec  2 08:47:36 PST 2014
> [ 61645.425] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
> [ 61645.425] (--) using VT number 2
>
> [ 61645.426] (WW) xf86OpenConsole: VT_GETSTATE failed: Inappropriate ioctl for
> device
> [ 61645.426] (EE)
> Fatal server error:
> [ 61645.426] (EE) xf86OpenConsole: VT_ACTIVATE failed: Inappropriate ioctl for
> device
>
>
> startx /usr/bin/startx -- :10 vt10
>
> fails as we do not have /dev/tty10 yet:
>
> Fatal server error:
> (EE) xf86OpenConsole: Cannot open virtual console 10 (No such file or directory)
>
> mknod -m 666 /dev/tty10 c 4 10
>
> startx /usr/bin/startx -- :10 vt10
>
> gives again:
>
> Fatal server error:
> (EE) xf86OpenConsole: VT_ACTIVATE failed: Inappropriate ioctl for device
>
> the lxc config has lxc.cgroup.devices.allow = c 4:10 rwm
>
>
> one difference between the container and the host system is that major numbers
> for tty devices are different:
>
> inside container:
>   ls -l /dev/tty*
> crw-rw-rw- 1 root root   5, 0 Jan 16 11:44 /dev/tty
> crw------- 1 root tty  136, 1 Jan 16 12:06 /dev/tty1
> crw--w---- 1 root tty  136, 2 Jan 16 11:44 /dev/tty2
> crw--w---- 1 root tty  136, 3 Jan 16 11:44 /dev/tty3
> crw--w---- 1 root tty  136, 4 Jan 16 11:44 /dev/tty4
>
> where on the host system they have MAJOR number 4.
>
>
> I've tried templates with ubunty trusty, debian jessie and wheezy with no
> luck, the startx fails on xf86OpenConsole.
>
> LXC version on the host system: 1:1.0.7-1
> System Debian Jessie, kernel verision: 3.16.0-4-amd64
>
> Any hints will be greatly appreciated.
>
> Alex

Have you tried to use a login-shell (ie. /bin/bash -l)?:
   lxc-execute -n vm3 -f vm3/lxc.conf -- /bin/bash -l
In this case /etc/profile will be executed.
And there one can export some needed environment variables.

I'm not sure if the following can be relevant in your case, but it was for me:

For example in my case (GUI desktop with LXDE already running on host)
I must after each starting of a container do "export TERM=xterm"
to be able to use other text editors than vi (for example joe, nano),
because w/o this, TERM gets set to "dumb" or "unknown" and the said editors 
cannot start.

cu
Uenal




More information about the lxc-users mailing list