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 [:] [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  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  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  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’。 但是我每次启动时都需要这样做。

尝试删除.Xauthority文件:

 sudo rm /home/florian/.Xauthority 

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

删除Xauthority然后:

alt + ctrl + F1那么:

sudo pkill -9 Xorg那么:

startx

希望这可以帮助

解决了这个问题:

 sudo chmod 1777 /tmp /var/tmp 

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

 chmod 755 /tmp -R