在未切换到root用户时,用gedit 打开文档不会提示有错误出现,而当用su切换到root时则出现如下的错误:
(gedit:9204): EggSMClient-WARNING **: Failed to connect to the session manager: None of the authentication protocols specified are supported
GConf 错误:联系配置服务器失败;某些可能原因是需要为 ORBit 启用 TCP/IP 联网,或者由于系统崩溃,您的 NFS 锁定已失效。请访问 http://projects.gnome.org/gconf/ 了解详细信息。(详细信息 - 1: 获取到会话的连接失败:Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security
policy blocked the reply, the reply timeout expired, or the network connection was broken.)
这些错误信息会重复十几遍,
但可以打开文档,之前我对这个错误就忍了,后来感觉老这样也不好,就上网搜了一下,最终找到一个还算很合理的解释。下面我就说一下:
解决出错问题的方法就是:切换到root是用 su -,而不用su.
su - 会重新初始化环境变量,而su不会。
没有初始化root用户的环境变量自然会出差了。