lxc容器中的startxfce4出错了

时间:2017-05-26 11:09:37

标签: linux lxc

我想在我的lxc容器中启动GUI。我使用ubuntu 14.04和xfce4的容器。

ubuntu@test1:/usr/lib/x86_64-linux-gnu/dri$ startxfce4
[1459480.127] 
X.Org X Server 1.15.1
Release Date: 2014-04-13
[1459480.127] X Protocol Version 11, Revision 0
[1459480.127] Build Operating System: Linux 3.2.0-76-generic x86_64 Ubuntu
[1459480.127] Current Operating System: Linux test1 3.13.0-24-generic #46-
Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64
[1459480.127] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-3.13.0-24-
generic root=UUID=ff746abe-8309-4531-9677-c9291ae0557e ro
[1459480.127] Build Date: 12 February 2015  02:49:29PM
[1459480.127] xorg-server 2:1.15.1-0ubuntu2.7 (For technical support please 
see http://www.ubuntu.com/support) 
...
...
[1459480.154]   ABI class: X.Org Video Driver, version 15.0
[1459480.154] (II) CIRRUS: driver for Cirrus chipsets: CLGD5430, CLGD5434-4, CLGD5434-8,
    CLGD5436, CLGD5446, CLGD5480, CL-GD5462, CL-GD5464, CL-GD5464BD,
    CL-GD5465, CL-GD7548, CL-GD7555, CL-GD7556
[1459480.154] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[1459480.154] (II) FBDEV: driver for framebuffer: fbdev
[1459480.154] (II) VESA: driver for VESA chipsets: vesa
[1459480.154] (EE) 
Fatal server error:
[1459480.154] (EE) xf86OpenConsole: Cannot open /dev/tty0 (No such file or directory)
[1459480.154] (EE) 
[1459480.154] (EE) 
Please consult the The X.Org Foundation support 
     at http://wiki.x.org
 for help. 
[1459480.154] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[1459480.154] (EE) 

我可以使用VNC连接到我的容器。但我需要的是直接启动GUI。有可能吗?

1 个答案:

答案 0 :(得分:0)

StackOverflow上有一个与此问题相关的线程现在已关闭。在该线程中,他们建议执行以下命令来启动X:

startx -- :1

请注意,您需要先确保容器内存在dev/tty0,如果上述内容无效,请发送/var/log/Xorg.0.log中可用的最后一行日志进行进一步分析。

希望这会对你有所帮助。