ubuntu23.04 lightdm卡登录页、向日葵远程访问

ubuntu23.04 lightdm重启后卡在登录界面,情况如下

旧主机无显示器、ubuntu23.04、安装了向日葵、安装了lightdm(向日葵必须使用这个)、ssh可正常访问

之前都是正常的,今天重启了几次,登录后就卡在加载页进不去桌面了(向日葵操作)但ssh正常

注意区分自己的情况

有的是显卡问题,有的是权限问题,还有让删除.Xauthority文件的,还有重装lightdm的。这些对我都没用。

可以查看 ~/.xsession-errors 中的错误信息。
我这里报如下错误:

/etc/X11/Xsession.d/30x11-common_xresources: line 16: has_option: command not found
/etc/X11/Xsession.d/75dbus_dbus-launch: line 9: has_option: command not found
/etc/X11/Xsession.d/90x11-common_ssh-agent: line 9: has_option: command not found

中文:
/etc/X11/Xsession.d/30x11-common_xresources: 行 16: has_option: 未找到命令
/etc/X11/Xsession.d/75dbus_dbus-launch: 行 9: has_option: 未找到命令
/etc/X11/Xsession.d/90x11-common_ssh-agent: 行 9: has_option: 未找到命令

如下链接解决了以上错误:
https://ubuntu-mate.community/t/xsession-d-errors-how-to-fix-line-has-option-command-not-found/25673/2

就是在终端执行以下代码:

cat <<\EOF | sudo tee /etc/X11/Xsession.d/20x11-add-hasoption
# temporary fix for LP# 1922414, 1955135 and 1955136 bugs
# read OPTIONFILE
OPTIONS=$(cat "$OPTIONFILE") || true

has_option() {
 if [ "${OPTIONS#*
$1}" != "$OPTIONS" ]; then
   return 0
 else
   return 1
 fi
}
EOF

虽然可以解决以上问题,但依然进不去系统。但我的 ~/.xsession-errors内容如下:

.xsession-errors内容

解决办法

1、修改 /etc/default/grub 的内容: "quiet splash" 改为 "quiet splash nomodeset"

修改之前,注意备份一下


修改grub
2、更新grub
sudo update-grub
3、reboot重启
4、重启后,设置lightdm为默认桌面
sudo dpkg-reconfigure lightdm

按tab选择lightdm,然后回车


设置默认
5、重启lightdm
sudo service lightdm restart
再次登录就可以进入桌面了

非常感谢文章:
https://blog.csdn.net/weixin_48404151/article/details/109369361

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容