首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >startx无法启动

startx无法启动
EN

Ask Ubuntu用户
提问于 2014-03-23 16:31:34
回答 4查看 72.3K关注 0票数 7

我运行了软件管理器,现在startx不再启动了。启动我的笔记本电脑并登录后,屏幕就会停留在登录页面上(我尝试了gdm和lightdm)。

切换到控制台并手动启动startx,我得到以下错误:

代码语言:javascript
运行
复制
mktemp: failed to create file via template ‘/tmp/serverauth.XXXXXXXXXX’: Permission denied
xauth:  file  does not exist
xauth:  unable to link authority file , use -n
use: X [:<display>] [option]
-a #                   default pointer acceleration (factor)
-ac                    disable access control restrictions
-audit int             set audit trail level
-auth file             select authorization file
...
Initializing built-in extension DRI2
Loading extension GLX
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Error:            Cannot open "/tmp/filegRxhGH" to write keyboard description
>                   Exiting
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Error:            Cannot open "/tmp/fileb9Lgzg" to write keyboard description
>                   Exiting
XKB: Failed to compile keymap
Keyboard initialization failed. This could be a missing or incorrect setup of xkeyboard-config.
(EE) 
Fatal server error:
(EE) Failed to activate core devices.(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.1.log" for additional information.
(EE) 
(II) AIGLX: Suspending AIGLX clients for VT switch
(EE) Server terminated with error (1). Closing log file.
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: unexpected signal 2

我发现了多个类似的问题,并尝试了不同的东西。

确保我有足够的空间磁盘:这里有一个df输出,这似乎不是问题所在。

代码语言:javascript
运行
复制
root@blackbox:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda6        22G   18G  2.9G  87% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
udev            1.9G  4.0K  1.9G   1% /dev
tmpfs           376M  1.2M  374M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            1.9G  4.0K  1.9G   1% /run/shm
none            100M  4.0K  100M   1% /run/user

我的.Xauthority文件的权限在启动时出错:

代码语言:javascript
运行
复制
root@blackbox:~# ls /home/florian/.Xauthority -al
-rw------- 1 root root 155 Mar 23 17:10 /home/florian/.Xauthority

然而,如果我chown文件和重新启动,我仍然有同样的问题。

我已经卸载(用purge)并重新安装了xserver-xorg并运行了dpkg-reconfigure xserver-xorg,但是没有任何进展。

如果在重新尝试启动startx之前停止显示管理器,请进行更新,将得到以下错误:

代码语言:javascript
运行
复制
xauth:  timeout in locking authority file /home/florian/.Xauthority
...
Loading extension GLX
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Type "ONE_LEVEL" has 1 levels, but <RALT> has 2 symbols
>                   Ignoring extra symbols
Errors from xkbcomp are not fatal to the X server
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Type "ONE_LEVEL" has 1 levels, but <RALT> has 2 symbols
>                   Ignoring extra symbols
Errors from xkbcomp are not fatal to the X server
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Compat map for group 2 redefined
>                   Using new definition
> Warning:          Compat map for group 3 redefined
>                   Using new definition
> Warning:          Compat map for group 4 redefined
>                   Using new definition
Errors from xkbcomp are not fatal to the X server
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Type "ONE_LEVEL" has 1 levels, but <RALT> has 2 symbols
>                   Ignoring extra symbols
Errors from xkbcomp are not fatal to the X server
(II) AIGLX: Suspending AIGLX clients for VT switch
xinit: connection to X server lost
^M
waiting for X server to shut down (EE) Server terminated successfully (0). Closing log file.

xinit: unexpected signal 2
xauth:  timeout in locking authority file /home/florian/.Xauthority

我找到的唯一解决方案是以根用户身份运行startx,然后它就能工作了,但是我不需要这样做!

更新2到目前为止我找到的最好的解决方案是切换到虚拟终端,删除.Xauthority文件,然后运行“startx”。但我每次开机都得这么做。

EN

回答 4

Ask Ubuntu用户

发布于 2014-03-23 19:50:05

然后删除Xauthority:

然后alt + ctrl + F1

然后sudo pkill -9 Xorg

startx

希望这能帮上忙

票数 4
EN

Ask Ubuntu用户

发布于 2014-03-23 16:38:11

尝试删除.Xauthority文件:

代码语言:javascript
运行
复制
sudo rm /home/florian/.Xauthority

并重新启动系统(使用您的普通用户帐户)

票数 3
EN

Ask Ubuntu用户

发布于 2016-11-16 09:07:26

修正了以下问题:

代码语言:javascript
运行
复制
sudo chmod 1777 /tmp /var/tmp
票数 2
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/438137

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档