Bug 190532 - Can't open files from dolphin opened in super user mode
Summary: Can't open files from dolphin opened in super user mode
Status: RESOLVED DOWNSTREAM
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 16.12.2
Platform: Compiled Sources Unspecified
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
: 185089 199650 217858 229051 232311 236184 278614 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-04-24 18:07 UTC by Ruchir Brahmbhatt
Modified: 2012-11-17 20:17 UTC (History)
13 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 Ruchir Brahmbhatt 2009-04-24 18:07:07 UTC
Version:           revision 958058 (using Devel)
Installed from:    Compiled sources

Steps to reproduce:
1. Login to kde4 installation using normal user.
2. Open dolphin in super user mode entering root password.
3. Try to open any file by clicking it(I have single click to open files).

Expected result:
File should be opened using respective information.

Actual result:
File not opened.

More information:
When I try to open text file, it show error "KDEInit could not launch '/usr/bin/kwrite'." 
My kde installation is in /home/kde-devel/kde4
Comment 1 Daniel Semblano 2009-07-24 22:51:21 UTC
Same problem here. I use "kdesu dbus-launch dolphin" through "Link to application" but cannot open most files (images, text, etc) and consequently cannot preview anything, which I would like to have. To have not to logon in a determined user or use bash shell to do some root tasks, I (would like to) use dolphin as super user privileges for it.

I remember in KDE3 I could use it.

I'm using KDE 4.3 RC2 (downloading right now RC3), Kubuntu amd64 OS.
Comment 2 Ruchir Brahmbhatt 2009-07-25 07:39:21 UTC
Doesn't it seem like a blocker for 4.3.0?
Comment 3 Daniel Semblano 2009-07-25 21:47:33 UTC
(In reply to comment #2)
> Doesn't it seem like a blocker for 4.3.0?

Like a blocker? What you mean?
Comment 4 Ruchir Brahmbhatt 2009-07-26 07:35:56 UTC
Blocker means stopping 4.3.0 to be released :)
Comment 5 Ruchir Brahmbhatt 2009-12-06 14:26:06 UTC
I'm on 4.4 beta1 now and I can reproduce it.
Comment 6 Frank Reininghaus 2009-12-09 16:18:14 UTC
*** Bug 217858 has been marked as a duplicate of this bug. ***
Comment 7 Peter Tselios 2009-12-11 14:39:21 UTC
I am on KDE 4.3.4 openSUSE 11.2. I can confirm the bug.
Comment 8 Peter Tselios 2009-12-11 14:40:56 UTC
By the way, there are one  related bug report: 185089
Comment 9 Peter Penz 2009-12-18 15:41:31 UTC
*** Bug 199650 has been marked as a duplicate of this bug. ***
Comment 10 Frank Reininghaus 2010-03-02 20:59:53 UTC
*** Bug 229051 has been marked as a duplicate of this bug. ***
Comment 11 Frank Reininghaus 2010-03-02 21:03:52 UTC
*** Bug 185089 has been marked as a duplicate of this bug. ***
Comment 12 Frank Reininghaus 2010-03-27 20:49:48 UTC
*** Bug 232311 has been marked as a duplicate of this bug. ***
Comment 13 Frank Reininghaus 2010-03-27 20:51:18 UTC
Additional information from the reporter of bug 232311 (I don't know if that is really the problem though):

> So i debug it and here is the problem:
> 
> (gdb) dolphin(28076)/kdeui (KNotification) KNotification::slotReceivedIdError:
> Error while contacting notify daemon "Message did not receive a reply (timeout
> by message bus)"
Comment 14 geoff 2010-04-05 06:17:51 UTC
Wilson_Phillips gives a simple solution to this problem here:

http://forums.opensuse.org/applications/434206-cannot-open-files-dolphin-superuser.html#post2129001

I can confirm that a file such as this:
[code]
#!/bin/bash
# Allows root to open windows on your display. Example: KWrite and Kate
xhost +local:0
[/code]

when made executable and placed in the user's ~/.kde4/Autostart directory, fixes the problem cited in this bug, plus that of any other program launching with root's permission.

Is there any problem with this script? For such a long-standing KDE problem, it seems strange that this has not been tried before in KDE. Can this function be embedded in KDE startup, rather than being put in a users Autostart directory? If not, can KDE make such a file part of the standard distribution?

Are there any reasons that this method should *not* be used?
Comment 15 Adrián Chaves (Gallaecio) 2010-04-05 20:27:34 UTC
In case geoff's script is ok, it would be cool to have a checkbox somewhere in KDE configuration or Dolphin's like "Allow launching applications as root from Dolphin", or similar. I mean, a friendly way to get this working.
Comment 16 2010-04-05 23:35:11 UTC
Thats a per distro problem, that should be resolved by msec, in mandriva we have /etc/X11/xinit.d/msec in wich sets INET localhost access,

So i have created the file /etc/X11/xinit.d/xhost_local wich haves:
/usr/bin/xhost local: 

This way the problem remains fixed until the distro handles it in next release.
Comment 17 geoff 2010-04-06 09:37:11 UTC
That's excellent information Zé. In openSUSE 11.2, the equivalent location is /etc/X11/xinit/xinitrc.d/. Transferring the above script from a user's Autostart directory to that directory (and making it root-owned, with permissions 755) also fixes this bug.

This makes it more appropriate for the distros to fix, as it seems that their X environment needs better preparation, rather than getting KDE to fix it. I'm going to suggest that to openSUSE Bugzilla (#450203).
Comment 18 Frank Reininghaus 2010-05-03 18:59:09 UTC
*** Bug 236184 has been marked as a duplicate of this bug. ***
Comment 19 Christopher Yeleighton 2010-05-04 08:16:03 UTC
I am not sure though that files opened from the administrator mode should be opened by applications running as root.  I need to know which window is root’s and which is mine, otherwise it is too easy to make a mistake.
File in administrator mode is OK; but I do not see a compelling reason to start e.g. image viewer as root.
Comment 20 Christopher Yeleighton 2010-05-04 08:17:25 UTC
I am not sure though that files opened from the administrator mode should be
opened by applications running as root.  I need to know which window is root’s
and which is mine, otherwise it is too easy to make a mistake.
File manager in administrator mode is OK; but I do not see a compelling reason to start e.g. image viewer as root.
Comment 21 Tanja Schulte 2010-07-10 18:28:54 UTC
> I need to know which window is root’s and which is mine, otherwise it is too easy to make a mistake.

Just by the way: It's easy to give the root windows another color theme or even other icons. I wonder why that'S not the default. Could avoid a lot of mistakes I guess.

It really is helpful to open a file in a text editor from root filemanager. Or something like kompare. That should be possible in an easy way. I agree, no need for a picture viewer in root mode.
Comment 22 geoff 2010-07-11 03:15:10 UTC
This has been fixed in openSUSE. See from Comment #31 onwards:

[url]https://bugzilla.novell.com/show_bug.cgi?id=450203[/url]
Comment 23 Frank Reininghaus 2011-07-27 16:08:37 UTC
*** Bug 278614 has been marked as a duplicate of this bug. ***
Comment 24 Lilian A. Moraru 2012-01-31 15:53:45 UTC
All works ok for me in Kubuntu 11.10, using KDE 4.8.0 with Dolphin 2.0.
I think that this bug should be marked as fixed if other distros using same KDE version don't have the problem.
Comment 25 Jeroen van Meeuwen (Kolab Systems) 2012-08-24 16:20:00 UTC
Resetting assignee to default as per bug #305719
Comment 26 Frank Reininghaus 2012-11-17 20:17:09 UTC
Thanks for the feedback, I'll close this report then (DOWNSTREAM because it seems to be a distro issue).