Bug 186017 - konsole unable to start X applications when run as different user
Summary: konsole unable to start X applications when run as different user
Status: RESOLVED DUPLICATE of bug 173697
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-03 09:32 UTC by Heinz Wiesinger
Modified: 2011-07-30 14:10 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Heinz Wiesinger 2009-03-03 09:32:56 UTC
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.
Comment 1 Kurt Hindenburg 2009-03-08 15:46:35 UTC
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.
Comment 2 Heinz Wiesinger 2009-03-08 18:22:58 UTC
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.
Comment 3 Kurt Hindenburg 2009-03-08 18:39:20 UTC
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
Comment 4 Luke-Jr 2009-09-23 01:58:36 UTC
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.
Comment 5 Jekyll Wu 2011-07-30 02:20:58 UTC
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).
Comment 6 Jekyll Wu 2011-07-30 14:10:50 UTC

*** This bug has been marked as a duplicate of bug 173697 ***