Summary: | Applications are unable to launch as root | ||
---|---|---|---|
Product: | [Unmaintained] kdelibs | Reporter: | Steven Sroka <Sroka.Steven> |
Component: | kdecore | Assignee: | kdelibs bugs <kdelibs-bugs> |
Status: | RESOLVED DOWNSTREAM | ||
Severity: | normal | CC: | bruno, cruftremover, hugo.pereira.da.costa, ismail, martin.schlander, roger.luedecke, zander |
Priority: | NOR | ||
Version: | 4.0 | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Steven Sroka
2011-07-07 00:24:05 UTC
To be honest, I'll need a summary here. Pointing me to five long (sometimes inconsistent, sometimes incorrect, and sometimes partially redundant) bug report doesn't help, and I don't know where to start (not even sure that I actually understand the issue). Thx. OK, this is a little complicated to explain, so bear with me. Steven, myself and others have been having issues starting KDE applications as super-user. This seems to fail for some unexplained reason to do with DBUS/Oxygen, so this bug has been filed to try to amalgamate all the related reports. First, and most simply, opening up a bash terminal, becoming super-user and attempting to launch various KDE applications from the command line does NOT work. By way of illustration, consider the following behaviour on a system running openSuSE 12.1 Milestone 3 with KDE 4.6.5: Open a bash terminal and use the command "su" become super user. Supply password when prompted. Attempt to launch kwrite using the command "kwrite". The following feedback is given, and Kwrite crashes: -------------------- kwrite(5832): Session bus not found To circumvent this problem try the following command (with Linux and bash) export $(dbus-launch) KCrash: Application 'kwrite' crashing... KCrash: Attempting to start /usr/lib/kde4/libexec/drkonqi from kdeinit sock_file=/root/.kde4/socket-knet5/kdeinit4__0 [1]+ Stopped kwrite -------------------- Likewise, if using the command "su -" to become superuser instead, as suggested in KDE bug report 199209, similar system feedback is given, and Kwrite crashes: -------------------- kwrite(6044): Session bus not found To circumvent this problem try the following command (with Linux and bash) export $(dbus-launch) KCrash: Application 'kwrite' crashing... KCrash: Attempting to start /usr/lib/kde4/libexec/drkonqi from kdeinit sock_file=/root/.kde4/socket-knet5/kdeinit4__0 [1]+ Stopped kwrite -------------------- Kwrite is not the only application that fails to launch. Take Dolphin as a further example. Becoming super-user using the command "su" and then attempting to launch dolphin using the command "dolphin" yields the following feedback: -------------------- unnamed app(5869): KUniqueApplication: Cannot find the D-Bus session server: "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken." unnamed app(5868): KUniqueApplication: Pipe closed unexpectedly. -------------------- The only way to successfully launch Dolphin with super-user privileges is to use the link in KMenu provided by openSuSE, which issues the command: dbus-launch dolphin %i -caption "%c" "%u" On running this, Dolphin DOES launch, but first displays errors stating that the file dolphinrc is not writeable. When it launches, it also does NOT use the user-specified desktop theme. It appears to use a different "default" theme. The reason for this, as claimed by the openSuSE team is some "difficulties" (unspecified) that they had with Oxygen. In fact, all KDE applications launched as super-user appear to use a different theme from the user's desktop, including openSuSE's YaST configuration software. In any case, continuing with the behaviour of KDE, once Dolphin has been launched as super-user using the dbus-launch method described above, attempting to right-click on text files and select "Open With -> Kwrite" will often (but not always) fail. Sometimes the text file will open immediately, sometimes it will open after a long pause, and sometimes the operation will pause and then fail to open and display the error message: -------------------- KLauncher could not be reached via D-BUS. Error when calling start_service_bt_desktop_path: The name org.kde.klauncher was not provided by any .service files -------------------- As you can see, there appears to be a serious issue with KDE that has been present since the full launch of KDE4. The problem has plagued openSuSE users, but does not appear to be specific to that distro. Please let both Steven and I know if you need more information, Hugo. Notice that I can not confirm this bug; it seems to work the way its suppost to. All apps start just fine. I'm guessing that this is either a distro bug (dbus auto-start doesn't work) or a setup issue. Not a KDE issue. Hello, thanks for the summary. Now my experience is: 1/ running su, then kwrite, dolphin and others indeed crashes 2/ but it crashes whether oxygen or any other style (plastique, cleanlooks) 3/ it does *not* crash when using Qt only applications (e.g. qt designer, /usr/lib/qt4/bin/pixeltool, quassel), this whether you use oxygen or not. So that I fail to see how this is related to Oxygen in anyway. In fact I would tend to believe it is more related to kapplication (because of 3). To comment #3, well crashes also happen here, with Mageia 1. (and kde from trunk), with the limitations above. Maybe your distribution is the one that succesfully patched the issue :) Thus re-assigning. Thankyou Hugo. It was instructed to file this under Oxygen for some reason, though I do not recall why. Hopefully we can get to the bottom of this. I will do my best to test for you, though any code contributions by me would most likely be harmful rather than helpful. This is all quite confusing. SUSE employees crippled openSUSE, citing an upstream bug regarding Oxygen and d-bus when running applications as root. But obviously never bothered to report this alleged problem upstream. So the status is now that openSUSE packages are crippled, and noone seems to know why... Maybe Will Stephenson can shed some light on it when his parental leave ends about a month from now. As small patch is to place in /root/.bashrc (was given by Will) #Fix kde dbus things eval `dbus-launch --auto-syntax` I always start root jobs by using su -l in a konsole. I've also fix manually all root env to be set almost like my user env. Same win decoration, fonts etc. just a more red light theme to differentiate them. This is still a problem in 12.1. I had assumed for some time that it wasn't supposed to work in such a fashion, and that kdesu was the proper means. http://paste.opensuse.org/34742236 Dear Bug Submitter, This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond. Thank you for helping us make KDE software even better for everyone! The distribution version involved here are long time out of maintenance. So closing. |