转自:http://www.dedecms.com/knowledge/servers/linux-bsd/2012/0822/12157.html
刚才用su到root后,用命令gedit发现会出错:** (gedit:2976): WARNING **: 连接已关闭(gedit:2976): EggSMClient-WARNING **: Failed to connect to the session manager:None of the authentication protocols specified are supported** (gedit:2976): WAR
刚才用su到root后,用命令gedit发现会出错:** (gedit:2976): WARNING **: 连接已关闭(gedit:2976): EggSMClient-WARNING **: Failed to connect to the session manager:None of the authentication protocols specified are supported** (gedit:2976): WAR
刚才用su到root后,用命令gedit发现会出错: ** (gedit:2976): WARNING **: 连接已关闭 (gedit:2976): EggSMClient-WARNING **: Failed to connect to the session manager: None of the authentication protocols specified are supported ** (gedit:2976): WARNING **: Could not connect to session bus
原因是: su 只能切换到管理员用户权限,不使用管理员的登陆脚本和搜索路径
su - 不但能切换到管理员权限而且使用管理员登陆脚本和搜索路径解决方法:使用sudo gedit 或者su -后再gedit就没错误了!
本文介绍了解决gedit在通过su命令切换到root用户时出现的警告信息及连接问题。主要原因是su命令没有加载root用户的登录脚本和搜索路径。提供了两种解决方案:一是使用sudogedit命令;二是先执行su-再运行gedit。
2万+

被折叠的 条评论
为什么被折叠?



