![以用户身份启动失败](https://linux22.com/image/884742/%E4%BB%A5%E7%94%A8%E6%88%B7%E8%BA%AB%E4%BB%BD%E5%90%AF%E5%8A%A8%E5%A4%B1%E8%B4%A5.png)
在 Ubuntu 16.04 上:
gz@gcomputer:~$ startx
X.Org X Server 1.18.3
Release Date: 2016-04-04
X Protocol Version 11, Revision 0
Build Operating System: Linux 3.13.0-86-generic x86_64 Ubuntu
Current Operating System: Linux gcomputer 4.4.0-31-generic #50-Ubuntu SMP Wed Jul 13 00:07:12 UTC 2016 x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.4.0-31-generic root=UUID=56fc92d2-1903-4263-b88e-d09bc15ef1d3 ro quiet splash
Build Date: 18 May 2016 01:07:07AM
xorg-server 2:1.18.3-1ubuntu2.2 (For technical support please see http://www.ubuntu.com/support)
Current version of pixman: 0.33.6
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: "/home/gz/.local/share/xorg/Xorg.1.log", Time: Sat Jul 30 18:12:37 2016
(==) 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 "/home/gz/.local/share/xorg/Xorg.1.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.
^Cxinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: unexpected signal 2
Couldn't get a file descriptor referring to the console
为什么?
我发现这个相关问题根据其接受的答案,我应该进行/etc/X11/Xwrapper.config
如下编辑:
allowed_users=anybody
needs_root_rights=yes
我这样做了,但这对我来说并没有什么改变。
评论似乎表明这startx
在 Ubuntu 中是错误的。为什么会这样?如果是这样,也许我最初的问题的答案是“startx 不再可能,因为......”,或者“使其成为可能会有......缺点”之类的?
root@gcomputer:~# dpkg-reconfigure x11-common
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
insserv: warning: script 'S04powernowd.early' missing LSB tags and overrides
insserv: warning: script 'powernowd.early' missing LSB tags and overrides
不确定这是什么意思。
答案1
您可以尝试重新配置dpkg-reconfigure x11-common
来源:3 个不同的 14.04 LTS 系统上未修改的 /etc/X11/Xwrapper.config 文件。请注意,16.04 没有此文件。
附注:我的系统上的同一源包含以下行:allowed_users=console
而不是allowed_users=anybody
答案2
对于最新版本,这重新配置操作不起作用。您应该安装旧版包:
sudo apt-get install --no-install-recommends xserver-xorg xserver-xorg-legacy xinit xterm
并且您应该运行重新配置操作来授予权限:
sudo dpkg-reconfigure xserver-xorg-legacy
在控制台菜单中请选择任何人
您还应该检查用户是否属于权限组,例如视频组为例。