Bug 173697 - It is not possible with kdesu opened konsole opening X-Programs
Summary: It is not possible with kdesu opened konsole opening X-Programs
Alias: None
Product: konsole
Classification: Unclassified
Component: general (show other bugs)
Version: 2.1
Platform: Debian testing Linux
: NOR normal with 10 votes (vote)
Target Milestone: ---
Assignee: Konsole Developer
: 186017 (view as bug list)
Depends on:
Reported: 2008-10-27 20:01 UTC by Kai Herlemann
Modified: 2011-08-08 06:38 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Note You need to log in before you can comment on or make changes to this bug.
Description Kai Herlemann 2008-10-27 20:01:38 UTC
Version:           2.1 (using KDE 4.1.2)
Compiler:          4.3.2 3.4.6, 4.1.2.
OS:                Linux
Installed from:    Debian testing/unstable Packages

It is not possible in a konsole with  kdesu opened X-Programs.
With konsole 1.6.6 is that possible.
Comment 1 Jan Essert 2009-04-15 10:48:59 UTC
I can confirm this behaviour on gentoo using kde 4.2.2 and qt 4.5.

In KDE3.5, "kdesu -u joe konsole" opens a konsole as joe, allowing me to start other X/kde programs out of this konsole.

In KDE4, this is no longer possible.

This bug might be related/a duplicate of bugs #189450, #189267 and #186017. It is certainly related to #165268, even though it starts out completely differently
Comment 2 Kurt Hindenburg 2009-10-20 02:22:01 UTC
It works here on my kde 4.3.2 system.

Re-open if you have issues with this or later version.
Comment 3 Jan Essert 2009-10-20 19:02:19 UTC
This does still not work for me on kde 4.3.2 on gentoo.

Launching gwenview in a konsole opened with

kdesu -u joe konsole


No protocol specified
gwenview: cannot connect to X server :0

I cannot reopen the bug since I am not the reporter.
Comment 4 Kurt Hindenburg 2009-10-20 21:03:30 UTC
Reopen - need to find out why it works on mine system.
Comment 5 Jan Essert 2009-10-21 19:22:27 UTC
One additional note:

kdesu -u joe xterm

produces an xterm which _can_ open X programs (such as gwenview) as joe.
This is really a konsole-problem and not a kdesu-problem, apparently.
Comment 6 Jekyll Wu 2011-07-29 00:46:23 UTC
I can reproduce the problem described in comment #3 with KDE-4.7.0.

xterm, gnome-terminal and xfce4-terminal do not have this problem.
Comment 7 Jekyll Wu 2011-07-29 11:32:18 UTC
I think the problem is caused by the 'fork itself and run in background by default' feature of konsole. 

'kdesu -u joe konsole --nofork' will work as expected.
Comment 8 Kai Herlemann 2011-07-29 12:07:03 UTC
(In reply to comment #7)
> 'kdesu -u joe konsole --nofork' will work as expected.

Yes, that works! But I don't know what's the use of the function that you named and I'd like it know.
konsole --help-all isn't a help.
Comment 9 Jekyll Wu 2011-07-30 14:10:50 UTC
*** Bug 186017 has been marked as a duplicate of this bug. ***
Comment 10 Kurt Hindenburg 2011-07-31 19:17:47 UTC
Git commit 43ff8c48a7a0fd0086845f6aab8ecace51448732 by Kurt Hindenburg.
Committed on 31/07/2011 at 21:11.
Pushed by hindenburg into branch 'master'.

Add --nofork to the --help output.

--nofork is under --help-kde which is often overlooked by users.
Placing a comment under --help should cause less problems for users.
CCBUG: 217357
CCBUG: 262169
CCBUG: 173697

M  +1    -0    src/main.cpp

Comment 11 Jan Essert 2011-08-08 06:38:16 UTC
Since this is now closed as 'FIXED', I would like to know why it is even necessary to use --nofork in this case..
I now know what to do, but there are certainly many users which never search for this and just use some other terminal emulator when opening a terminal as a different user.