Failed to connect to the session manager: None of the authentication protocols specified are support

来源:互联网 发布:淘宝卖家在线培训 编辑:程序博客网 时间:2024/05/16 06:30

在更新系统后运行su gedit etc/apt/sources.list出现下面的出错,

root@ubuntu:/#  gedit etc/apt/sources.list


(gedit:2351): EggSMClient-WARNING **: Failed to connect to the session manager: None of the authentication protocols specified are supported

**
GLib-GIO:ERROR:/build/buildd/glib2.0-2.28.6/./gio/gdbusconnection.c:2279:initable_init: assertion failed: (connection->initialization_error == NULL)
Aborted

经查,是因为运行的命令是su,改成sudo就可以了,

备注:
su 和 sudo 的区别:
    1.共同点:都是root用户的权限;
    2.不同点:su仅仅取得root权限,工作环境不变,还是在切换之前用户的工作环境;sudo是完全取得root的权限和root的工作环境。

su切换用户身份,需要输入变成那个用户的密码,如果要切换到root,则要知道root密码,但多个人管理主机时,对系统安全性造成影响;

sudo切换用户身份,输入的是用户自己的密码,对系统不会有大的影响