I'm trying to get X to pass through from an lxc container. Slack 14.2
host and container. Has anyone had any luck?
In my container config I've added:
#Pete, fox X
#lxc.cgroup.devices.allow = c 226:0 rwm
#lxc.cgroup.devices.allow = c 226:64 rwm
#lxc.cgroup.devices.allow = c 226:128 rwm
#lxc.cgroup.devices.allow = c 29:0 rwm
lxc.mount.entry = tmpfs tmp tmpfs defaults
lxc.mount.entry = /dev/dri dev/dri none bind,optional,create=dir
lxc.mount.entry = /dev/snd dev/snd none bind,optional,create=dir
lxc.mount.entry = /tmp/.X11-unix tmp/.X11-unix none bind,optional,create=dir
lxc.mount.entry = /dev/video0 dev/video0 none bind,optional,create=file
#lxc.mount.entry = /dev/tty0 dev/tty0 none bind,optional,create=file
#lxc.mount.entry = /dev/tty10 dev/tty10 none bind,optional,create=file
(note the line wrap is not in the config file and the commented out bits
that I've tried but did not help)
root@slackx:/etc/rc.d# X
X.Org X Server 1.18.3
Release Date: 2016-04-04
X Protocol Version 11, Revision 0
Build Operating System: Slackware 14.2 Slackware Linux Project
Current Operating System: Linux slackx 4.8.5 #1 SMP Sun Oct 30 11:30:27
GMT 2016 x86_64
Kernel command line: auto BOOT_IMAGE=Main_14.2 ro root=802
root=/dev/sda2 rootflags=subvol=_r_sl14.2
Build Date: 15 April 2016 11:05:21AM
Current version of pixman: 0.34.0
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.0.log", Time: Mon Jan 2 09:51:48 2017
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(EE)
Fatal server error:
(EE) parse_vt_settings: Cannot open /dev/tty0 (No such file or directory)
(EE)
(EE)
Please consult the The X.Org Foundation support
at
http://wiki.x.org
for help.
(EE) Please also check the log file at "/var/log/Xorg.0.log" for
additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.
root@slackx:/etc/rc.d#
There is no more useful information in the log file.
. . . .
Looking in /dev I get this:
root@slackx:/etc/rc.d# ls -al /dev
total 0
drwxr-xr-x 5 root root 480 Jan 2 09:45 ./
drwxr-xr-x 1 root root 150 Jan 2 09:45 ../
c--x--x--x 1 root tty 136, 0 Jan 2 09:45 console
drwxr-xr-x 2 root root 100 Dec 27 15:41 dri/
lrwxrwxrwx 1 root root 13 Jan 2 09:45 fd -> /proc/self/fd/
crw-rw-rw- 1 root root 1, 7 Jan 2 09:45 full
prw------- 1 root root 0 Jan 2 09:45 initctl|
srw-rw-rw- 1 root root 0 Jan 2 09:45 log=
crw-rw-rw- 1 root root 1, 3 Jan 2 09:45 null
lrwxrwxrwx 1 root root 13 Jan 2 09:45 ptmx -> /dev/pts/ptmx
drwxr-xr-x 2 root root 0 Jan 2 09:45 pts/
crw-rw-rw- 1 root root 1, 8 Jan 2 09:45 random
drwxr-xr-x 3 root root 240 Dec 27 15:41 snd/
lrwxrwxrwx 1 root root 15 Jan 2 09:45 stderr -> /proc/self/fd/2
lrwxrwxrwx 1 root root 15 Jan 2 09:45 stdin -> /proc/self/fd/0
lrwxrwxrwx 1 root root 15 Jan 2 09:45 stdout -> /proc/self/fd/1
crw-rw-rw- 1 root root 5, 0 Jan 2 09:45 tty
crw--w---- 1 root tty 136, 0 Jan 2 09:53 tty1
crw--w---- 1 root tty 136, 1 Jan 2 09:45 tty2
crw--w---- 1 root tty 136, 2 Jan 2 09:45 tty3
crw--w---- 1 root tty 136, 3 Jan 2 09:45 tty4
crw-rw-rw- 1 root root 1, 9 Jan 2 09:45 urandom
crw-rw----+ 1 root video 81, 0 Dec 31 20:07 video0
crw-rw-rw- 1 root root 1, 5 Jan 2 09:45 zero
I've tried creating devices with mknod but that fails. I tried creating
/dev/tty0 with the following in the config file:
lxc.mount.entry = /dev/tty0 dev/tty0 none bind,optional,create=file
But that does not work.
Has anyone had any luck doing this?
I have similar messages with both slack and ubuntu as guests.
Motivation is to run X on distros in containers at native speed.
Pete