FS#51026 - [dbus] kde apps running via kdesu cannot connect to dbus socket

Attached to Project: Arch Linux
Opened by Tomasz Przybył (FadeMind) - Wednesday, 28 September 2016, 19:02 GMT
Last edited by Jan de Groot (JGC) - Monday, 25 December 2017, 23:16 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Jan Alexander Steffens (heftig)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 8
Private No

Details

dbus 1.10.10-3

Launch any app with kdesu. App will not launched due dbus socket issue.

Main sample

kdesu systemsettings5

does not work at all.

After Launch

kdesu kate

and launch OPEN window is not usable due socket dbus connection issue.
This task depends upon

Closed by  Jan de Groot (JGC)
Monday, 25 December 2017, 23:16 GMT
Reason for closing:  Won't fix
Additional comments about closing:  If you want to run applications as root, make sure the dbus session is setup for root yourself.
More and more GUI applications refuse to run as root anyways.
Comment by Antonio Rojas (arojas) - Thursday, 29 September 2016, 15:57 GMT
This is broken due to the latest dbus changes, not much we can do from the kde side...
Comment by Doug Newgard (Scimmia) - Thursday, 29 September 2016, 16:07 GMT
The changes in dbus are fine, the problem is that kdesu isn't preserving the information it needs to use it.
Comment by Jan Alexander Steffens (heftig) - Thursday, 29 September 2016, 16:10 GMT
It couldn't use it even if it did preserve the environment, since a session dbus-daemon will not let any other user connect, even root.

The proper thing to do would be to ensure root's user systemd is around and set the environment correctly. pam_systemd will do that.
Comment by Maksim (DragonX256) - Thursday, 20 October 2016, 05:42 GMT
From https://bugs.archlinux.org/task/51453.

Starting from dbus version 1.10.10 I can't run GTK applications, like mousepad, with sudo. Application can't change it setting, and console spamming with one warning message.

dbus latest version on this moment - 1.10.12-1 (I'm on testing, but package with bug is in core repo).

Steps to reproduce:
1. Run 'sudo mousepad' or 'sudo gedit' or etc. in terminal emulator.
2. Try to change any settings and preferences.
3. Console will start spamming with message like:

(mousepad:5866): dconf-WARNING **: failed to commit changes to dconf: Error spawning command line 'dbus-launch --autolaunch=de61eefaab024df39c960ff6b4067f9b --binary-syntax --close-stderr': Child process exited with code 1

I determined that the package must be configured through ./configure with the option --enable-x11-autolaunch, and mousepad or gedit can start and work properly through sudo.

AND

If I will type this command in terminal, it says:

1 dx37@Archey ~ % dbus-launch --autolaunch=de61eefaab024df39c960ff6b4067f9b --binary-syntax --close-stderr
Autolaunch requested, but X11 support not compiled in.
Cannot continue.
Comment by Alberto (agm28011997) - Monday, 14 November 2016, 19:06 GMT
how can we fix this? the problem is here since a lot of time how i can see...
Comment by Ed Shockley (darkwingbuck13gmail.com) - Thursday, 16 February 2017, 21:29 GMT
Seems to still be prevalent. KDE's partition manager will not work through KDE su. Trying to open any window to browse to a path, for example, throws a dbus error. The problem seems to be packages being built without --enable-x11-autolaunch.

https://bugs.kde.org/show_bug.cgi?id=376189
Comment by Leceaba (Lecea) - Sunday, 19 March 2017, 11:41 GMT Comment by patrick (potomac) - Saturday, 29 April 2017, 20:52 GMT
I notice that kdesu doesn't work,

for example if I type :
kdesu kate

then there is no window, and no error message, even in dmesg,

it means that I can not run GUI programs in root mode with kdesu,

what is the alternative if kdesu doesn't work ?
Comment by Antonio Rojas (arojas) - Saturday, 29 April 2017, 20:57 GMT
@potomac that had nothing to do with this issue. Kate can't be run as root anymore since 17.04 by design
Comment by patrick (potomac) - Saturday, 29 April 2017, 21:24 GMT
@Antonio Rojas : even with kdesu ?

I tried also to run dolphin with kdesu : it doesn't work,

the fact that there is no error/information message is annoying, the user will think that kdesu is not working
Comment by Antonio Rojas (arojas) - Saturday, 29 April 2017, 21:28 GMT
Dolphin can't be run as root anymore either since 17.04

Loading...