You are not logged in.
Running KDE 3.5.8, I can open Konqueror, and click any text or openOffice fileand open it. Everything pretty much works as expected.
If I open File Manager - Superuser Mode, and try to open these same files, it fails with errors like <KDEInit could not launch 'kwrite'.> I can open these files with nano from the konsole window, so I can tell that it only happens in KDE.
I did some searching and did not find anything that helped so far. Anyone have an idea where I should look?
Last edited by Wilson Phillips (2008-01-20 13:52:14)
Guarantee does not cover shark bite, bear attack, or children under 5.
Offline
Try to su to root in a terminal and then open the same document using "kwrite /home/user/bla.odf". If you get an error concerning $DISPLAY, use "xhost +" as a normal user and afterwards retry opening the document as root.
A bus station is where a bus stops.
A train station is where a train stops.
On my desk I have a workstation.
Offline
I get a No Protocol Specified error when I do that.
[root@deathstar wilson]# kwrite /home/wilson/.bashrc
No protocol specified
kwrite: cannot connect to X server :0.0
Same with .txt and .odt, but I can still use nano to edit these same files.
Guarantee does not cover shark bite, bear attack, or children under 5.
Offline
As FUBAR said: this is perfectly normal. You try to run an app that is not meant to be run in an X environment, as root.
Either adjust your settings (e.g. with xhost) or learn to master nano/vi/emacs/whatever to edit stuff in a command line environment .
If you configure sudo the right way you might be able to use it to run kwrite and similar (graphical) apps with root powers.
Last edited by B (2008-01-15 14:01:24)
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
kwrite: cannot connect to X server :0.0
root (as mentioned already) does not have (should not have) rights to run X apps
you can "fix" this by issuing as user from command line
#xhost +
this will disable temporary acls (reboot will automatically reverse this or you can issue (again as user) #xhost - ) and root will be able to use X
next su to root and play with X
Last edited by broch (2008-01-15 13:59:09)
Offline
Dammit, listen to me!!
A bus station is where a bus stops.
A train station is where a train stops.
On my desk I have a workstation.
Offline
Thanks guys. I will test this when I get home tonight.
I was not aware that root should not have the permissions to run X applications. I have been using openSUSE and it works there, so that was all I knew.
Guarantee does not cover shark bite, bear attack, or children under 5.
Offline
You can also use kdesu to run graphical apps as root:
$ kdesu kwrite
Offline
I do use nano to edit files if I am in a console window, but if I am already in Konqueror's Superuser mode and can simply click on a file to open it in kwrite, I find that to be a time saver and a nice convenience.
Guarantee does not cover shark bite, bear attack, or children under 5.
Offline
I've had the same problem. Here's what I've found:
Started after upgrading to xorg-xinit-1.0.7-3 today.
I edit a file with vim, get "No protocol specified" message.
I see "... X: client 9 rejected from local host ..." messages ( I boot to level 3, login as a default user, then startx to X and fluxbox, then su - to other users. The message is seen in the default user startx term. )
I can't open the display:
(firefox-bin:8400): Gtk-WARNING **: cannot open display: :0.0
[1]+ Exit 1 /opt/mozilla/bin/firefox
xorg-xinit-1.0.7-3 has a new file: /etc/X11/xinit/xserverrc which has a single line:
exec /usr/bin/X -nolisten tcp
From previous experience I know that with my setup, this will prevent me from opening Firefox, etc.
As broch said, xhost+ will "fix" it. I was using xhost +localhost, but that no longer works.
Overall, this is a better setup, as netstat -tap no longer shows any X listeners. And I have shorewall running on the box. Still I'd like to find something a little less "blunt force" than xhost+.
Snork
I don't want to be the Go-To Guy. I want to be the Go-Past Guy. He's
the guy you rush past on your way to bother the first guy.
Me, 08/05
Offline
Try to su to root in a terminal and then open the same document using "kwrite /home/user/bla.odf". If you get an error concerning $DISPLAY, use "xhost +" as a normal user and afterwards retry opening the document as root.
I was not getting the $DISPLAY errors, but yes, xhost + worked and then I could open kwrite from the command line. I can also open items in kwrite from konqueror. Thanks for the answer.
Still I'd like to find something a little less "blunt force" than xhost+.
Same here. This seems like a bit of overkill. I would prefer to allow root without allowing everyone.
Last edited by Wilson Phillips (2008-01-16 02:10:00)
Guarantee does not cover shark bite, bear attack, or children under 5.
Offline