Cannot start some apps as root
While running KDE 3.4, if I start a shell and su then if I try to run, say, kwrite or kdar I get:
Code:
Xlib: connection to ":0.0" refused by server If, as su, I run vim it runs OK but when I exit I see the following between my invocation and the new prompt: Code:
Xlib: connection to ":0.0" refused by server |
As user, not root, try this:
Code:
kdesu kwrite |
Your problem is that those apps are Graphical applications and as a user you have X-window running blocking other users application from connecting to the X-server, including root 's applications. Do what cybrog told you. It should work.
|
anyone have an idea on how to solve the problem instead of the workaround?
|
kdesu is not a workaround, it is made for this! :)
Otherwise, after you ve logged in , you could do: $su - #ln -s ~user/.Xauthority #exit this will be permanent! |
Thanks to all. Both methods worked. Anybody else coming on this thread please note:
They may already be a .Xauthority file in /Root. you need to rename or remove it. I agree with nx5000 that Quote:
Thanks. |
apt-get install sux and use it instead of su. kdesu is ok of course for kde apps. Don't much use the filemanager so I don't know how to fix that.
|
Quote:
|
sux is more secure than xhost though, and iirc you'd need to export DISPLAY once root. That said, it's what I often use as well ;)
|
I thought I was coming off the steep part of the learning curve but now I have my doubts.
The previous 2 posts are food for thought and testing. I've got my system more or less how I like it (although I haven't yet managed to install my NVIDIA card on the new kernel - consider this as advance warning of another question :) ) but I will certainly have a look at the suggestions. Thanks. |
Well, another way is to add the following lines to roots ~/.profile
export XAUTHORITY=/home/your_username/.Xauthority export DISPLAY=:0.0 but then use "su -" instead of "su" so the env gets set for root or /root/.profile won't get read. You can check the right display as user with: echo $DISPLAY |
Ran into this problem with deb testing KDE 7.0 tried alsorts that didn't work.
gksu gparted or whatever app worked. Then found this thread , the post by nx5000 about using ln -s ~user/.Xauthority worked without me even ahving to reboot. Thankyou davetesc |
davetesc
are you aware that the last post before you was in 2005 things have changed a lot in 8 years A lot of os's now will not allow root GUI logging in ( some do ) for deb based OS's sudo is normally used to start a gui based program as root |
All times are GMT -5. The time now is 01:36 AM. |