[kde-china] kde4下为什么su到root用户后无法运行图形程序?
vvoody
wxj.g.sh在gmail.com
星期一 十一月 23 13:26:09 CET 2009
2009/11/23 John Smith <gmshcn在gmail.com>:
> 我的 openSUSE 可以这样启动 Kwrite
> su -
> dbus-launch kwrite
> 下面是控制台输出
> kdeinit4: Shutting down running client.
> klauncher: Exiting on signal 15
> kdeinit4: preparing to launch /usr/lib64/libkdeinit4_klauncher.so
> kdeinit4: preparing to launch /usr/lib64/libkdeinit4_kded4.so
> kdeinit4: preparing to launch /usr/lib64/libkdeinit4_kbuildsycoca4.so
> kbuildsycoca4 running...
> kdeinit4: preparing to launch /usr/lib64/libkdeinit4_kconf_update.so
> Loading simple Config module ...
> Creating backend ...
> Reading pinyin phrase lib failed
> Loading socket FrontEnd module ...
> Starting SCIM as daemon ...
> Loading socket Config module ...
> Creating backend ...
> Loading x11 FrontEnd module ...
> Failed to load x11 FrontEnd module.
>
我的不行
└─(130:20:25:%)── su -
──(Mon,Nov23)─┘
Password:
Peter's hungry, time to eat lunch.
root在slackware:~# dbus-launch kwrite
kwrite: cannot connect to X server
root在slackware:~#
> 2009/11/23 Grissiom <chaos.proton在gmail.com>:
>> 2009/11/23 翁学天 <wengxt在gmail.com>
>>>
>>> 如果是su操作的话,而不是su -,应该会继承环境变量的
>>>
>>> 其实我这里就算su -过去,也会得到以下结果,不知道为啥display也传过去了……可能和发行版有什么关系……
>>> No protocol specified
>>> kwrite: cannot connect to X server :0
>>> 这个才是错误
>>> 不过话说回来,我这里倒是无论kde,gtk程序都不能运行,错误相同,图形界面都要靠kdesu
>>
>> 试了一下:
>> ~% su
>> /home/grissiom# kate
>> No protocol specified
>> kate: cannot connect to X server :0.0
>> ~% su -
>> Password:
>> darkstar# kate
>> kate: cannot connect to X server
>> 两个的错误信息不一样哦~
>> 发行版是 Slackware ;P
>>
>>>
>>> 2009/11/23 vvoody <wxj.g.sh在gmail.com>
>>>>
>>>> 不对阿,普通用户su -之后root都不能运行X程序(无论gtk、kde)阿,因为DISPLAY没设置阿,会提示:
>>>> root在slackware:~# xeyes
>>>> Error: Can't open display:
>>>>
>>>> 或
>>>> root在slackware:~# firefox
>>>> Error: no display specified
>>>>
>>>> root得export DISPLAY=:0.0,普通用户xhost +后root才能运行X程序。lz su后能运行X程序是什么情况?
>>>>
>>
>> --
>> Cheers,
>> Grissiom
>>
>> _______________________________________________
>> kde-china mailing list
>> kde-china在kde.org
>> https://mail.kde.org/mailman/listinfo/kde-china
>>
>>
> _______________________________________________
> kde-china mailing list
> kde-china在kde.org
> https://mail.kde.org/mailman/listinfo/kde-china
>
--
Free as freedom, slack as Slackware.
vvoody
关于邮件列表 kde-china 的更多信息