warnings when running sudo under kubuntu

Bug #53845 reported by John Batt
10
Affects Status Importance Assigned to Milestone
sudo (Ubuntu)
Confirmed
Wishlist
Unassigned
xorg (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

When running KDE apps from konsole I get the following:

Link points to "/tmp/ksocket-root"
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

kdeinit: Can't connect to the X Server.
kdeinit: Might not terminate at end of session.
Link points to "/tmp/kde-root"
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

kded: cannot connect to X server :0.0
kded: ERROR: KUniqueApplication: Registering failed!
kded: ERROR: Communication problem with kded, it probably crashed.
ScimInputContextPlugin()
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

knotify: cannot connect to X server :0.0
DCOP aborting call from 'anonymous-5120' to 'knotify'
ERROR: Communication problem with knotify, it probably crashed.
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

kio_uiserver: cannot connect to X server :0.0
DCOP aborting call from 'kate-5105' to 'kio_uiserver'
ERROR: KUniqueApplication: Registering failed!
ERROR: Communication problem with kio_uiserver, it probably crashed.
QObject::disconnect: Unexpected null parameter
~ScimInputContex

Although the apps don't crash and appear to function normally
something is wrong. Again this happens when running KDE apps from Kubuntu 6.0.6.

Revision history for this message
John Batt (jbatt) wrote :

This happen with ALL KDe apps. This particular instance was from running:

sudo kate

it also happens when running Kate as normal user.

Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote :

guessing package

Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote :

Up to "Failed to open device" this is a duplicate of bug #42553 , however, as for the other messages, I am not sure at all.

Could you do any of the following:

1) Update to Edgy.

2) comment out in /etc/X11/xorg.conf:

        InputDevice "stylus" "SendCoreEvents"
        InputDevice "cursor" "SendCoreEvents"
        InputDevice "eraser" "SendCoreEvents"

3) Post the output of "kate", "sudo kate" and "kdesu kate".

Thanks in advance.

description: updated
Revision history for this message
Freddy Martinez (freddymartinez9) wrote :

Than you for this bug report. Unfortunetly, this happens for all applications because applications are to be run as "kdesu <app> in the run command (in the K menu). This is the proper way to run the command as super user graphically.

Changed in xorg:
status: Unconfirmed → Rejected
Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote :

Freddy, I am not sure with which authority you close the bug, so I am not going to reopen it again but I completely disagree with your analysis. Yes, a workaround is to use kdesu but it is cumbersome and actually most KDE applications work nicely even if you use sudo directly (althougth they print a lot of nonsensical warning messages).

At the very least, the warnings are more scarier and unhelpful than they should be. If kdesu is truly the only way, then the warnings should say so. Otherwise, this is a bug with an easy workaround (use kdesu) but still something that could be improved.

Thanks and please reconsider re-opening it so perhaps someone will decide to work on improving the situation.

Revision history for this message
Rich Johnson (nixternal) wrote :

manu, you are correct. I am reopening this, confirming it, and adding it as a wishlist item at this time. I think there should be more helpful warnings as well, at least a message that says "Since you are opening a GUI application in KDE, you should utilize the 'kdesu' command instead (i.e., kdesu $command)"

Changed in sudo:
importance: Undecided → Wishlist
status: Unconfirmed → Confirmed
Revision history for this message
Freddy Martinez (freddymartinez9) wrote :

On closing the bug, I realized that the output should be as Richard suggested. However, I assumed it was a known issue that was being worked on so I went ahead and closed it. Hopefully that clears up why I closed it.

Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote :

Anyway, I still think there is a better solution to giving a better warning message.

Kdeinit should be sudo-aware. Kdesu is an ugly hack to the problem that KDE applications are not intelligent enough to realise that they are running under sudo. I don't say it is a simple problem to fix, but if sudo is the future, then it would need to be fixed eventually.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.