用户登录后错误地输入了“startx”,然后立即退出

用户登录后错误地输入了“startx”,然后立即退出

这个问题与本网站上的其他几个问题非常相似,但我认为并不完全相同;请听我说完。

我已经安装 Xubuntu 几个星期了,但是今天我在 XFCE 下登录工作时不小心按了Ctrl+ Alt+ 。F6这让我进入了终端环境这让我很惊讶。我以前从来没有见过这种情况。

惊慌失措的我匆忙输入命令sudo startx以返回 X 会话,结果却进入了 root 会话。出于某种原因,这也让我很震惊,于是我关闭了计算机。

重新启动并尝试像往常一样登录我的 XFCE 会话时,我登录时屏幕变黑了,一瞬间就退出了,回到了 XFCE 登录屏幕。无论执行多少次完全重启,都会重复此行为。

我认为这是 XFCE 当前配置方式的问题,但我不知道该怎么办。我对处理 X 会话配置的经验很少。有人知道这里可能发生了什么吗?

编辑:我已经尝试删除~/.Xauthority文件并重新启动。没有改善,问题仍然存在。

编辑2:我正在运行 Xubuntu 18.04。输出~/.xsession-errors

dbus-update-activation-environment: setting DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
dbus-update-activation-environment: setting DISPLAY=:0
dbus-update-activation-environment: setting XAUTHORITY=/home/neil/.Xauthority
dbus-update-activation-environment: setting QT_ACCESSIBILITY=1
dbus-update-activation-environment: setting LANG=en_US.UTF-8
dbus-update-activation-environment: setting GDM_LANG=en_US
dbus-update-activation-environment: setting DISPLAY=:0
dbus-update-activation-environment: setting XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/neil
dbus-update-activation-environment: setting USER=neil
dbus-update-activation-environment: setting DESKTOP_SESSION=xfce
dbus-update-activation-environment: setting PWD=/home/neil
dbus-update-activation-environment: setting HOME=/home/neil
dbus-update-activation-environment: setting QT_ACCESSIBILITY=1
dbus-update-activation-environment: setting XDG_SESSION_TYPE=x11
dbus-update-activation-environment: setting XDG_DATA_DIRS=/usr/share/xfce4:/usr/local/share:/usr/share:/var/lib/snapd/desktop
dbus-update-activation-environment: setting XDG_SESSION_DESKTOP=xfce
dbus-update-activation-environment: setting SHELL=/bin/bash
dbus-update-activation-environment: setting XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
dbus-update-activation-environment: setting IM_CONFIG_PHASE=1
dbus-update-activation-environment: setting XDG_CURRENT_DESKTOP=XFCE
dbus-update-activation-environment: setting GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1
dbus-update-activation-environment: setting SHLVL=1
dbus-update-activation-environment: setting LANGUAGE=en_US
dbus-update-activation-environment: setting GDMSESSION=xfce
dbus-update-activation-environment: setting LOGNAME=neil
dbus-update-activation-environment: setting DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
dbus-update-activation-environment: setting XDG_RUNTIME_DIR=/run/user/1000
dbus-update-activation-environment: setting XAUTHORITY=/home/neil/.Xauthority
dbus-update-activation-environment: setting XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
dbus-update-activation-environment: setting XDG_CONFIG_DIRS=/etc/xdg/xdg-xfce:/etc/xdg
dbus-update-activation-environment: setting PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
dbus-update-activation-environment: setting _=/usr/bin/dbus-update-activation-environment
xfce4-session: Unable to access file /home/neil/.ICEauthority: Permission denied

答案1

啊,就是这样!谢谢@steeldriver 提供的调试提示。如下~/.xsession-errors

xfce4-session: Unable to access file /home/neil/.ICEauthority: Permission denied

删除后~/.ICEauthority,登录又能正常工作了。我怀疑我之前删除该~/.Xauthority文件对解决这个问题也至关重要,尽管最初看起来并非如此。

相关内容