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

James Tyrer jrtyrer at earthlink.net
Sat Feb 20 02:35:35 UTC 2010


Duncan wrote:
> Anne Wilson posted on Thu, 18 Feb 2010 20:01:32 +0000 as excerpted:
> 
>> On Thursday 18 February 2010 18:35:32 James Tyrer wrote:
>>> This is not intended behavior.  You have to stop telling people that
>>> everything is OK when there is a problem.
>>>
>> I was told specifically that it was intended behaviour, and the reason
>> was security.  I do not deny that problems exist.  I frequently point
>> out that the problem is in the user's setup, not the software.  If it
>> has been shown to be a bug, I say so.  Do not mis-represent me.
> 
> FWIW, I expect the lack of a shipped pre-configured kmenu and context menu 
> option is intended, due to deliberate (kde) choice, because yes, there are 
> certain security issues.
> 
> However, it should still work when started properly from the command line 
> (or if the user configures a menu item appropriately), provided all the 
> authorization stuff is in order.  If it's not working, then either 
> something's broken with the authorization, or the command wasn't formed 
> properly due to incomplete understanding of the required authorization, 
> etc.
> 
> So both of you are correct.  It's just that you're talking about slightly 
> different aspects of the same thing.  The choice not to ship the 
> preconfigured options was AFAIK deliberate and is intended behavior.  But 
> it should still work if the user issues the command or sets up the menu 
> options manually.  A breakage there would /not/ be intended behavior, 
> simply (deliberately) out of the scope of what's normally shipped.
> 
Actually, IIUC, I think that the original reason for having the SU KFM 
menu item not visible was that it didn't work with KDE-4.0.0.  I tried 
it and it didn't work.  It used:

	X-KDE-SubstituteUID=true

{like with "su", root is the default}

which worked in KDE-3.5.

Why this wasn't promptly fixed is an interesting question.  Perhaps it 
was going to be done with Policy-Kit, but that became a moving target as 
there are now 2 (Policy-Kit & PolKit) of them. :-\

IAC, this DeskTop icon worked for me:

------8<-----8<------8<-----8<------8<-----8<------8<-----8<------

[Desktop Entry]
Comment[en_US]=Root File Manager
Exec=kdesu 'konqueror --profile filemanagement "/"' -caption "SU Root KFM"
GenericName[en_US]=SU Root KFM
GenericName=SU Root KFM
Icon=folder-red
Name[en_US]=root
Name=root
StartupNotify=true
Terminal=false
Type=Application
X-KDE-SubstituteUID=false

------8<-----8<------8<-----8<------8<-----8<------8<-----8<------

{If: "kdesu" isn't on your path, you need the full path in the: "Exec" 
line.}

so, I didn't go back to it.

However, I also note that that 'desktop' file is still installed in KDE-4.4:

	$KDEDIR/share/applications/kde4/konquerorsu.desktop

{KDEDIR is the prefix where KDE is installed; probably: "/usr" if you 
installed binaries}

which still uses:

	X-KDE-SubstituteUID=true

and it now works.

You can go to that directory in Dolphin (as user account) and click on 
it to see if it works.

It has:

	NoDisplay=true

which makes it invisible on a plain stock system.  There are security 
issues running as root (you should have a firewall running or turn off 
your internet connection), but if you want to use it, just change that to:

	NoDisplay=false

and it should show up on your menu, although I would suggest that it has 
the wrong icon.  We should really have an icon: 
"system-file-manager-root".  Perhaps I should put that back on my to do 
list now that it works in KDE-4.4.

I emphasize that no matter how you open Dolphin or Konqueror as root, it 
should work to open files in applications as root.  If it doesn't, use the:

	Tools -> Open Terminal

to open a Konsole and run:

	kdeinit4

If it still doesn't work, there is something wrong on your system.

-- 
James Tyrer

Linux (mostly) From Scratch



More information about the kde-linux mailing list