使用root用户登录Ubuntu用户界面

  • 使用记事本打开文件
gedit /usr/share/lightdm/lightdm.conf.d/50-unity-greeter.conf
  • 在原有内容中添加下面三行
user-session=ubuntu
greeter-show-manual-login=true
all-guest=false

这里写图片描述

  • 关机重启,使用root用户登录系统
  • 如果出现“读取/root/.profile时发现错误”,登录进去后修改配置文件
gedit /root/.profile
  • 修改文件
tty -s && mesg n || true

这里写图片描述

猜你喜欢

转载自blog.csdn.net/wei242425445/article/details/79324965