如何在单独的 TTY 上启动 LXC(linux 容器)X 服务器?

如何在单独的 TTY 上启动 LXC(linux 容器)X 服务器?

除了我运行的默认 X 服务器之外,tty1我还想从 Linux 容器中启动另一个服务器。

终端2(Ctrl+Alt+F2) 我登录,然后运行sudo lxc-start -n c --foreground​​.

然后,从我执行的容器内DISPLAY=:2 startx -- :2获取这些消息/错误:

_XSERVTransSocketCreateListener: failed to bind listener            
_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed                                                                   
_XSERVTransMakeAllCOTSServerListeners: failed to create listener for unix                                                               

X.Org X Server 1.19.5                                               
Release Date: 2017-10-12          
X Protocol Version 11, Revision 0                                   
Build Operating System: Linux 4.9.54-1-lts x86_64                   
Current Operating System: Linux c 4.13.12-1-ARCH #1 SMP PREEMPT Wed Nov 8 11:54:06 CET 2017 x86_64                             
Kernel command line: BOOT_IMAGE=../vmlinuz-linux root=/dev/sda1 rw 
initrd=../initramfs-linux.img
Build Date: 12 October 2017  09:59:53PM

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.2.log", Time: Mon Dec  4 16:22:11 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.2.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error
Couldn't get a file descriptor referring to the console

(注意,它指的是/dev/tty0)

如何运行容器 X 服务器(在单独的 tty 上)?

相关内容