Linux and in particular KDE are so customizable that you’ll have hard time to find a feature that you like which isn’t already present or easily add-able as an extension.
However, on the rare occasions where the given supply isn’t quite to your satisfaction, there’s always the good old method of paving your own road, so to speak.
In the following, I shall demonstrate how to create a custom action (as per Xfce) that will let you launch a root-privileged Dolphin from within a non-privileged one.
- Dolphin file manager (obviously).
- kdesu – if it’s not installed by default, install it.
[Update 15/05/2017]: users with KDE Applications 17.04 and above may not be able to launch Dolphin as root anymore, please see: KDE Plasma Canceling “Run As Root” Is Now Taking Effect – for more details. (but before you do, please read the line below)
[Update 27/08/2017]: The above mentioned limit can be bypassed, read here how.
Create The Entry
In KDE 5 there are basically two places where Plasma, your desktop environment, will “look” for custom actions by default:
The difference is that the first one will only apply to a specific user whereas the latter will apply to all users.
Note: if any of the above paths does not exist on your system –
- Make sure that your distribution doesn’t use a customized path.
- Create the path.
Now, navigate into the location you wish to create the custom action in. (Remember, use location #1 for only your user and #2 if you want the custom action to be available for evryone that uses the system!)
Create a text file and name it an easily to remember name with the suffix “.desktop”, like this: root_dolphin.desktop.
Copy paste the following text inside it:
[Desktop Action openRootDolphinHere]
Name=Open Root Dolphin Here
Exec=kdesu dolphin %U
Save and close the file.
Restart Dolphin, right click and check whether your newly created entry is inside Actions.
If not, click Control on the top bar > Configure Dolphin… > Services > check Open Root Dolphin Here then click OK.
Right click, and there you have it inside Actions item.