Version: (using KDE 4.2.0) OS: Linux Installed from: Compiled From Sources When I edit the konsole entry in kickoff to run it as different user (root), it starts up fine. It also works good while using only console apps, but when trying to launch X applications I get the error "cannot connect to X server :0.0". This works fine in kde3 so I would like to have that behaviour back.
I doubt this has anything to do with Konsole. Usually this error means the X env is not setup correctly to handle different users. Try with another program (xterm or anything else X). You can reopen this if it is truely just Konsole. You might include what Distro you are using as I'm not sure what 'kickoff' means.
Ok, forget about kickoff. I meant the entry in the KDE Startmenu, but I found an example that illustrates it better. If I type "kdesu xterm" or "kdesu rxvt" in krunner (Alt+F2) and then start kwrite from there, I get a kwrite window running as root. If I type "kdesu konsole" in krunner and again start kwrite from there, I get the "couldn't connect to X" like error. My Distribution is Slackware. I compiled kde (4.2.1 now) myself.
You are entirely correct. I tested with xterm. I'm surprised xterm works this way. Usually X doesn't automatically allow other users access to X display. % kdesudo konsole root@oldthor:~# kate No protocol specified kate: cannot connect to X server :0
It only works because the other user is root and, provided the environment variables are preserved, root can use the user's X authority information just fine.
The '-nofork' option for konsole should make it work in comment #2 Looks like a duplicate of #173697, or vice versa(this is already marked as new).
*** This bug has been marked as a duplicate of bug 173697 ***