[kde-linux] Dolphin opening a text file as root with Kwrite.

James Tyrer jrtyrer at earthlink.net
Thu Feb 18 18:35:32 UTC 2010


Anne Wilson wrote:
> On Thursday 18 February 2010 10:30:51 Dale wrote:
>> I have Dolphin, the replacement for Konqueror, set up to run as root.
>> When I go to the "K menu" and select Dolphin, it asks for the root
>> password and I enter it in.  Dolphin opens fine, no problems.  The
>> problem starts when I go somewhere that requires root privileges.  If
>> I try to enter the /root directory, I get this error at the bottom of
>> Dolphin:
>>
>> "Can not start process.  Can not talk to Klauncher.  The name
>> org.kde.klauncher was not provided by any service files."
> 
> It's intended behaviour.  Apparently running a gui for text-editing has some 
> possible security issues - don't ask me for details, I don't know them - so 
> it's discouraged.  I'm sure there will be ways of side-stepping this, but 
> since I don't know whether I'd then be opening a can of worms I've accepted 
> that and come up with work-arounds.
> 
> If I know the path of the file to edit,  I open a root konsole and type 
> 'kwrite path/to/file'.  If I don't, I start dolphin in a root konsole - which 
> doesn't bring that error message.  Either way, I accept that there could be 
> some vulnerability, so I close the session as soon as I have finished.
> 
Anne:

This is not intended behavior.  You have to stop telling people that 
everything is OK when there is a problem.

You problem is that your root session has not been initialized.  A KDE 
session must be initialized for things like starting an application from 
a file to work.  If you started Dolphin with KDESU, then initialization 
is supposed to work.  However, I have had problems with previous 
versions so I have been starting the file manager with the "Run Command" 
pop up and the command "kdesu konqueror", but I just tried it and the 
same should work for Dolphin with "kdesu dolphin".

If this is the problem, you should be able to fix it in your already 
Dolphin by:

	Tools -> Open Terminal

and then executing:

	kdeinit4

to initialize the root session.  If it now works, the question is how to 
start it from the menu.  With KDE4.4, it should work fine to have:

Exec=kdesu dolphin %i -caption "%c" %u

in a 'desktop' file.

-- 
James Tyrer

Linux (mostly) From Scratch



More information about the kde-linux mailing list