夏天/isummer

Sun of my life !Talk is cheap, Show me the code! 追风赶月莫停留,平芜尽处是春山~

博客园 首页 新随笔 联系 管理

Ubuntu再图形登录中以root的身份进入???

  这样做的需求,应该就是,可以再图形页面以root的身份进行图形化操作,比较方便更改配置文件

 1. 可以实现,但是不建议这么做,之后会出现一个警告提示。

   (1)安装完成如需使用root身份登录,可打开终端输入以下命令:
  #设置root密码
  sudo passwd root
  #切换到root用户
  sudo -s

  (2)在terminal下输入
  sudogedit /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf

  添加一下内容:  

[SeatDefaults]
autologin-user=root
user-session=ubuntu
greeter-show-manual-login=true

  重启,即可实现以root的身份登录。但是出现一下警告提示:

 

  http://ubuntuforums.org/showthread.php?t=2270923

  没有给出解决方案

  提到,在terminal下輸入
  gedit/root/.profile

  在打开的编辑文件狂框中:

 

  将mesg n 修改为:tty  -s && mesg  n

  重启。

  但仍然异常提示。

2. 是不建议以root的身份进行图形页面登录的,因为如果误操作,示致命的。

  可以通过其他指令转换为root身份

  If you want to run a graphical application as root, the correct procedure would be:

  Code:
ALT+F2 (this lets you enter a command in Unity)
gksudo <application>

 

posted on 2016-01-15 16:40  夏天/isummer  阅读(367)  评论(0编辑  收藏  举报