startx 启动失败

startx 启动失败

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

切换到控制台并startx手动启动时出现以下错误:

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输出,它似乎不是问题。

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 文件的权限在启动时是错误的:

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我会收到以下错误:

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

我发现的唯一解决方案是以 root 身份运行startx,然后它就可以工作了,但我不需要这样做!

更新 2到目前为止我发现的最佳解决方案是切换到虚拟终端,删除 .Xauthority 文件,然后运行“startx”。但我每次启动时都需要这样做。

答案1

删除 Xauthority 然后:

alt + ctrl + F1然后 :

sudo pkill -9 Xorg然后:

startx

希望这可以帮助

答案2

尝试删除您的.Xauthority文件:

sudo rm /home/florian/.Xauthority

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

答案3

修复了这个问题:

sudo chmod 1777 /tmp /var/tmp

答案4

您收到此错误是因为您的用户没有权限访问您的 /tmp 文件夹。更改您的 /tmp 文件夹的权限,它应该可以正常工作。

chmod 755 /tmp -R

相关内容