Root Actions Servicemenu

Dolphin Service Menus

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

49
Score 86.2%
Description:

Version: 2.9.1
***KNOWN ISSUES***
KDE Applications 17.04 release has disabled running kate (and dolphin) as root.

I'm looking into using sudoedit in the menu, but unfortunately it's a bit trickier than I would have thought mainly because it's not trivial to use a graphical password dialog with sudoedit within the menu script (without external helpers).

Hopefully I'll come up with a workable solution, but cannot give a definite time line.

And there's nothing I can do about dolphin (there's currently no work arounds for it like there is for kate).

***IMPORTANT***
- You need to have "ruby" installed for Automatic installation to work
- Make sure you get the latest version, the automatic download from dolphin seems to download a really old version (2.7.3) for some mysterious reason. Manual download from kde-apps/kde-look will guarantee you'll get the latest version.
****

***NOTES***
- From version 2.8 onwards, Root Actions only supports KDE4 or later...Files from version 2.7.3 are included in the package for KDE3 users.
- My mail address can be found in the README file in the package if you wish to contact me for translations or feedback (You can of course also post a comment here)
- I can't test the menu on KDE3 anymore, so I can't guarantee the menu works 100% on KDE3
- Full Kf5 support is work in progress, but the menu should work on kf5 as is.

*************

Root Actions servicemenu provides a convenient way to perform several actions 'as root', from the right-click context menu in KDE filemanagers.

It aims to be distribution agnostic, if you experience issues in your distribution, drop me an email describing the issue.

The menu needs a properly configured kdesu/kdesudo to work (kdesudo is preferred, for some added functionality, like remembering password for a period of time...timeout is configurable by sudo settings)

Any comments, criticism and improvement suggestions welcomed :)

Included in the download are .desktop file versions for KDE3 konqueror, KDE3 dolphin, KDE4 and KF5 (both konqueror and dolphin) and an importable user action xml file for krusader KDE4...see installation for details.

README:

I've dropped version 1.x from the package since 2.x is stable and can do a lot more than 1.x. If you're still interested in the 1.x version, drop me a mail and I'll send it to you.

Thanks to:
Stefan Majewsky - German translation (1.1.x and 2.x)
Pierre Buard - French translation (1.1.x)
Guillaume Millet &
Jean-Marc Detourmignies - French translation (2.x)
Alessio - Italian translation (1.1.x)
Massimo Pissarello - Italian translation (2.x)
João Pedro Gomes - Portuguese translation (2.x)
Viruscg - Brazilian Portuguese translation (1.1.x amd 2.x partial)
Eduardo Grau - Spanish translation (1.1.x and 2.x)
Kenny Verstraete - Dutch translation (1.1.x and 2.x)
Paul Körössy - Hungarian translation (2.x)
nikt_taki - Polish translation (2.x)
Andreas Nordal - Norwegian translation (2.x)
Jakub Matas - Czech translation (2.x)
Donatas Glodenis - Lithuanian translation (2.x)
Mladen Pejaković - Serbian translation (2.x)
Netrebin Alexey - Russian translation (2.x)
Cihat Imamoglu - Turkish translation (2.x)
Manuel Tortosa Moreno - Catalan translation (2.x)
Neo Tet - Greek translation (2.x)
Adrián Chaves Fernández - Galician translation (2.x)
Mihael Simonič - Slovene translation (2.x)
Niklas Åkerström - Swedish translation (2.x)
Maz_1 - Simplified Chinese (2.x)

----Requirements:-----------------------------------------------------
Essential: (these should already be installed on a standard KDE installation)
perl -the script is written in perl
kdesu | kdesudo -to gain administrative privileges
kdialog -to show dialogs
kreadconfig -to read kde configuration
dolphin | konqueror -filemanager
kwrite | kate -editor
ark -handles compression

Optional:
krename -for multiple file (batch) renaming
krusader -to use the included krusader actions
xdg-utils -for default application support (2.5.x-)

----Installation:-----------------------------------------------------

Some distributions have packages available in either their main repos or community repos. For easy installation and possible distro specific patches you can use them if available. Manual installation instructions below:

Version 2.3 ->
1. Uncompress the rootactions-servicemenu.pl script in Root_Actions_2.x to a directory in your $PATH. /usr/local/bin or /usr/bin are two valid options. Make the script executable (if it's not).

2a. (Konqueror for KDE3) Uncompress the three .desktop files in /konqueror-KDE3 to ~/.kde/share/apps/konqueror/servicemenus (This will enable the menu for individual users, if you wish to enable the menu for all users, copy the files to /usr/share/apps/konqueror/servicemenus instead).

2b. (Dolphin for KDE3) Uncompress the two .desktop files in /dolphin-KDE3 to ~/.kde/share/apps/d3lphin/servicemenus (This will enable the menu for individual users, if you wish to enable the menu for all users, copy the files to /usr/share/apps/d3lphin/servicemenus instead).

2c. (Dolphin and Konqueror for KDE4) Uncompress the two .desktop files in /dolphin-KDE4 to your kde4 servicemenu folder (possibly ~/.kde/share/kde4/services/ServiceMenus...although $KDEHOME [".kde"] can be something else in your distribution). If you wish to use konqueror instead of dolphin as your filemanager, edit 10-rootactionsfolders.desktop by changing 'dolphin' to 'konqueror'.

2d. (Dolphin and Konqueror for Kf5) Copy the two .desktop files in /dolphin-KDE4 to your kf5 servicemenu folder (likely ~/.local/share/kservices5/ServiceMenus). If you wish to use konqueror instead of dolphin as your filemanager, edit 10-rootactionsfolders.desktop by changing 'dolphin' to 'konqueror'.

2e. (Krusader for KDE4) Import krusader_rootactions.xml file in /krusader-KDE4 with krusader's action manager.

----Available Actions----------------------------------------------------------------

Version 2.x
- Open Terminal Here (folders) - open a root terminal session in chosen folder
- Open in File Manager (folders) - open chosen folder(s) in file manager
- Open as Text (files) - open chosen folder(s) in text editor
- Open With ... (both) - open chosen items in a program of your choice

- Copy (both) - copy a single file or folder (ADDED in 2.1)
- Move/Rename (both) - if multiple items selected and a batch renamer installed (default is krename) start renamer, otherwise use a simple move/rename dialog
- Compress (both) - Compress selected files/folders (ADDED in 2.7)
- Delete (both) - Completely removes chosen items (as this is potentially hazardous, there is an extra confirmation dialog), handy for removing back-up files etc.

- Ownership to Root (both) - change ownership of chosen items to root:root
- Ownership to Active User (both) - change ownership of chosen items to current user
- Ownership to ... (both) - change ownership of chosen items to UID:GID of your choice

- Change Permissions (both) - change permissions of chosen items
If only a single folder is selected, permissions/ownership can be set recursively. If changing permissions recursively, files are only set executable if they already are executable (Otherwise all files in a directory would be set executable if the parent folder is set executable, which is necessary for the folder to be accessible)


----Translating and customizing:-----------------------------------------------------

Read the README file in the package for instructions on translating and customizing the menu


----Disclaimer-------------------------------------------------------

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
Last changelog:

2.9.1 Translation and bugfix release 2 years ago

- Rename install script to avoid confusion (remove "KDE4" part)
- Bugfix for Chinese localization support (thanks to maz_1)
- Added simplified chinese translation (thanks to maz_1)

(Full changelog available within the package)

C

kubicle

8 years ago

On closer inspection, I'll likely use ark for this.

This would add ark as a dependancy, but the ark compression dialog should handle different formats and file naming nicely.

Report

C

kubicle

8 years ago

"Compress" menu option uploaded for testing (version 2.6.90)

Report

snowhog

8 years ago

Thank you. This adds to the incredible usefulness of this servicemenu. Utilizing Ark in the Compress option was what I had in mind.

Report

srog

9 years ago

Hi !

(KDE 4.4.2, does the KDE version matter ?)

Here the Root Actions 2.5.90 copy/move/rename is dying with the:

kde-cp: Unknown option 'overwrite'.
kde-cp: Use --help to get a list of available command line options.
Died at /usr/local/bin/rootactions-servicemenu.pl line 854.

and

kde-mv: Unknown option 'overwrite'.
kde-mv: Use --help to get a list of available command line options.
Died at /usr/local/bin/rootactions-servicemenu.pl line 854.

Do you need more information ?

Report

srog

9 years ago

This seems to be a KDE 4.4 vs KDE 4.5

KDE 4.4, kde-cp --help:

Options:
--noninteractive Non-interactive use: no message boxes


KDE 4.5, kde-cp --help:

Options:
--noninteractive Non-interactive use: no message boxes
--overwrite Overwrite destination if it exists (for copy and move)

Report

C

kubicle

9 years ago

Thanks for reporting Rog,

Works ok in KDE SC 4.5, so it's probably a new option that's isn't available in 4.4...you can check whether it's listed on "kde-cp --help" in 4.4 (it probably isn't).

I'll remove the option for now (in the next release)...or make a check for the KDE version.

Report

birdflesh

9 years ago

Only a minor bug: On dolphin (kde 4.5.1) the "open terminal here" menu item is a "?" and not the terminal icon. This is easily fixed by changing the "terminal" icon references to "utilities-terminal" in *.desktop files. Maybe you would like to include this on a new release.

Report

C

kubicle

9 years ago

Thanks for reporting, will fix in the next release.

Report

C

kubicle

9 years ago

Should be fixed in 2.4.11

Report

srog

9 years ago

Hi,

There seems to be a typo in the rootactions-servicemenu.pl (missing comma ?).

Konsole:
rootactions-servicemenu.pl open_with kate /home/rog/Templates/Monitor.txt

Error:
String found where operator expected at /usr/local/bin/rootactions-servicemenu.pl line 266, near ""en_US""
(Missing semicolon on previous line?)
syntax error at /usr/local/bin/rootactions-servicemenu.pl line 266, near ""en_US""
Execution of /usr/local/bin/rootactions-servicemenu.pl aborted due to compilation errors.

Line 265 is:
"el" => "Εφαρμογή αλλαγών επαναλαμβανόμενα;"

If i add a comma:
"el" => "Εφαρμογή αλλαγών επαναλαμβανόμενα;",
then the rootactions-servicemenu.pl is working.


PS.
Is the mail address (README) current ?

Hotmail told:
Delivery to the following recipients failed.

Report

C

kubicle

9 years ago

Thanks for the report Rog, I'll upload a fixed version later today.

And I'll look into the email issue.

Report

C

kubicle

9 years ago

Should be fixed in 2.4.9.1

Report

C

kubicle

9 years ago

The gmail address in the readme works (gawab address seems to be dead...probably deactivated because I haven't logged into the account for a good while).

I'll probably change the readme file and remove the gawab address to avoid confusion.

Report

tetris4

9 years ago

Thank you for this!!

Here is the Greek translation:

http://rapidshare.com/files/350718967/Root_Actions_Greek__el__Translation.tar.gz

keep up the g00d w0rk =)

Report

C

kubicle

9 years ago

Thanks,

your Greek translation has been added (2.4.9)

Report

gubuuu

9 years ago

I would like to ask what this "kreadconfig" is? Is it really a requirement? It doesn't exist as a package on openSUSE but your script seems to work anyway.

Report

v6lur

9 years ago

kreadconfig is part of kdebase-bin, not a separate package. It is used to read the value of given setting from specified KDE configuration file.

Report

gubuuu

9 years ago

Thank you for the clarification

Report

snowhog

9 years ago

kubicle -

Kubuntu Jaunty 9.04 KDE 4.3.2

Just installed this most wonder service menu - again. It's been awhile, and I haven't had in Intrepid or Jaunty. Opted to keep the default 'dolphin' as the file manager with the Root Actions. Works great (did I expect otherwise?).

The suggested path for installation of the 'two' files is still incorrect in your README and on this site. It 'might' still be valid if anyone still has an upgraded KDE 3 to KDE 4 system, where both, a .kde and a .kde4 folder existed in the users /Home. But if a 'clean' installation of a current OS release utilizing KDE 4, then it is just .kde that exists in the users /Home.

Thanks again for a truly exceptional addition to the community.

Report

C

kubicle

9 years ago

I edited the description in an attempt to make it clearer, I'll try to remember to change the README as well in the next upload.

Thanks for the comments.

Report

konquefox

10 years ago

Great thanks for this work, it is complete, it works fine and it is very useful ! The RPM for MAndirva 2009 works fine too.

Report

bdjnk

10 years ago

Ditto. This is fantastic. I am also using it with Mandriva 2009.1 and I couldn't be happier. Thank You!

Report

pipaceliny

10 years ago

Is it possible to add Your root servicemenu to be visible also in krusader?
Very useful servicemenu - thanks!

Report

C

kubicle

10 years ago

I see no immediately apparent technical reason why not (although some of the actions could probably be implemented straight with the krusader user actions...and not needind the perl script).

Anyway, you should get a port of the actions in krusader by saving the lines below (lines between '---' marks) into an xml file and importing it in krusader's action manager:

NOTES:
1. Haven't tested it extensively, so I can't promise it'll behave correctly under all circumstances
2. Icon names are for KDE4, so if you use KDE3, you'll need to change them (you can do it with the action manager).

---
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE KrusaderUserActions>
<KrusaderUserActions>

<action name="rootactions_open_as_text" >
<title>Open as Text</title>
<tooltip>Open in a text editor as root</tooltip>
<icon>accessories-text-editor</icon>
<category>Root Actions</category>
<description>Edit a file as root in a text editor</description>
<command>rootactions-servicemenu.pl open_with kate %aList("Selected")%</command>
<defaultshortcut></defaultshortcut>
</action>
<action name="rootactions_open_with_custom" >
<title>Open with ...</title>
<tooltip>Open with a program of your choice as root</tooltip>
<icon>system-run</icon>
<category>Root Actions</category>
<description>Edit a file as root in a program if your choice</description>
<command>rootactions-servicemenu.pl custom_open_with %aList("Selected")%</command>
<defaultshortcut></defaultshortcut>
</action>
<action name="rootactions_open_in_filemanager" >
<title>Open in File Manager</title>
<tooltip>Open in a file manager as root</tooltip>
<icon>system-file-manager</icon>
<category>Root Actions</category>
<description>Open a directory as root in a file manager</description>
<command>rootactions-servicemenu.pl open_with krusader %aList("Selected")%</command>
<defaultshortcut></defaultshortcut>
</action>
<action name="rootactions_open_in_terminal" >
<title>Open Terminal Here</title>
<tooltip>Open in a terminal as root</tooltip>
<icon>terminal</icon>
<category>Root Actions</category>
<description>Open a root terminal in the directory</description>
<command>rootactions-servicemenu.pl root_konsole_here konsole %aList("Selected")%</command>
<defaultshortcut></defaultshortcut>
</action>
<action name="rootactions_copy" >
<title>Copy</title>
<tooltip>Copy target as root</tooltip>
<icon>edit-copy</icon>
<category>Root Actions</category>
<description>Copy target files/directories as root</description>
<command>rootactions-servicemenu.pl root_copy %aList("Selected")%</command>
<defaultshortcut></defaultshortcut>
</action>
<action name="rootactions_rename" >
<title>Move/Rename</title>
<tooltip>Move or rename target as root</tooltip>
<icon>edit-rename</icon>
<category>Root Actions</category>
<description>Move or rename target files/directories as root</description>
<command>rootactions-servicemenu.pl root_rename krename %aList("Selected")%</command>
<defaultshortcut></defaultshortcut>
</action>
<action name="rootactions_delete" >
<title>Delete</title>
<tooltip>Delete target as root</tooltip>
<icon>edit-delete</icon>
<category>Root Actions</category>
<description>Delete target files/directories as root</description>
<command>rootactions-servicemenu.pl root_delete %aList("Selected")%</command>
<defaultshortcut></defaultshortcut>
</action>
<action name="rootactions_change_root" >
<title>Ownership to Root</title>
<tooltip>Change target ownership to root:root</tooltip>
<icon>preferences-desktop-user-password</icon>
<category>Root Actions</category>
<description>Change ownership of target files/directories to root:root</description>
<command>rootactions-servicemenu.pl root_ownership %aList("Selected")%</command>
<defaultshortcut></defaultshortcut>
</action>
<action name="rootactions_change_user" >
<title>Ownership to Active User</title>
<tooltip>Change target ownership to current user and primary group</tooltip>
<icon>preferences-desktop-user</icon>
<category>Root Actions</category>
<description>Change ownership of target files/directories to current user and primary group</description>
<command>rootactions-servicemenu.pl user_ownership %aList("Selected")%</command>
<defaultshortcut></defaultshortcut>
</action>
<action name="rootactions_change_custom" >
<title>Ownership to ...</title>
<tooltip>Change target ownership to user and group of your choice</tooltip>
<icon>user-properties</icon>
<category>Root Actions</category>
<description>Change ownership of target files/directories to user and group of your choice</description>
<command>rootactions-servicemenu.pl custom_ownership %aList("Selected")%</command>
<defaultshortcut></defaultshortcut>
</action>
<action name="rootactions_change_permissions" >
<title>Change permissions</title>
<tooltip>Change target permissions</tooltip>
<icon>folder-locked</icon>
<category>Root Actions</category>
<description>Change permissions of target files/directories</description>
<command>rootactions-servicemenu.pl root_permissions %aList("Selected")%</command>
<defaultshortcut></defaultshortcut>
</action>

</KrusaderUserActions>
---

Report

Montblanc

10 years ago

Thank you very much for this useful service menu!

Report

2.9.1 Translation and bugfix release 2 years ago

- Rename install script to avoid confusion (remove "KDE4" part)
- Bugfix for Chinese localization support (thanks to maz_1)
- Added simplified chinese translation (thanks to maz_1)

(Full changelog available within the package)

12345678910
1491
product-maker Nano-Ocelot Jul 23 2019 10 the best
10 the best
product-maker alex1701c Apr 13 2019 9 excellent
+
product-maker m0ji Feb 02 2019 9 excellent
+
product-maker alekksander Dec 28 2018 9 excellent
thanks!
product-maker emplate430 May 19 2018 9 excellent
TY!
product-maker zav444 Nov 02 2017 9 excellent
product-maker floorek Aug 06 2017 9 excellent
product-maker ubo Jun 20 2017 9 excellent
product-maker mockroot Apr 25 2017 9 excellent
product-maker alex-l Mar 17 2017 3 bad
product-maker mirkogennari Jan 25 2017 9 excellent
product-maker Henri Oct 17 2015 9 excellent
product-maker paulus3005 Sep 21 2015 9 excellent
product-maker tomXx Aug 20 2015 9 excellent
product-maker fadnix Aug 19 2015 9 excellent
product-maker gericom Feb 27 2015 9 excellent
product-maker Ironclad Feb 25 2015 9 excellent
product-maker Landis Feb 11 2015 9 excellent
product-maker tanzer Dec 29 2014 9 excellent
product-maker eliaskousk Dec 10 2014 9 excellent
product-maker n-k Aug 25 2014 9 excellent
product-maker roentgen May 18 2014 9 excellent
product-maker evgom May 15 2014 9 excellent
product-maker Meteorrock Apr 29 2014 9 excellent
product-maker Pafrape Apr 07 2014 9 excellent
product-maker bibins Jan 06 2014 9 excellent
product-maker alpvonkri Mar 10 2013 9 excellent
product-maker vatsok Dec 30 2012 9 excellent
product-maker Sweyn78 Sep 10 2012 9 excellent
product-maker RAIDENSUB Aug 15 2012 9 excellent
product-maker lionhater May 18 2012 9 excellent
product-maker JustFoxy May 07 2012 9 excellent
product-maker MountainX Mar 11 2012 9 excellent
product-maker roctheme Jan 27 2012 9 excellent
product-maker aspotashev Nov 19 2011 9 excellent
product-maker glewik Nov 18 2011 9 excellent
product-maker gjk Oct 07 2011 9 excellent
product-maker karton Jul 21 2011 9 excellent
product-maker v01t May 29 2011 9 excellent
product-maker mywereld May 03 2011 9 excellent
product-maker Brutus180 Apr 28 2011 9 excellent
product-maker momonster Apr 12 2011 9 excellent
product-maker rangerGR Mar 26 2011 9 excellent
product-maker steveke Feb 10 2011 9 excellent
product-maker jorssoftware Feb 09 2011 9 excellent
product-maker srog Jan 29 2011 9 excellent
product-maker ubuntuku Jan 04 2011 9 excellent
product-maker cjann Dec 29 2010 9 excellent
product-maker bugmenot1234 Dec 02 2010 9 excellent
product-maker snowhog Oct 31 2010 9 excellent
product-maker dequire Sep 23 2010 9 excellent
product-maker Count: 4 Rating: 5.0

alex1701c

Apr 13 2019

m0ji

Feb 02 2019

Nano-Ocelot

Sep 07 2018

GiuseppeBenigno

Apr 25 2018

SapperStew

Feb 09 2018

jasonwert

Feb 03 2016

fadnix

Aug 11 2015

mopened

Jun 07 2015

HATRED

Feb 27 2015

gericom

Feb 27 2015

Landis

Feb 11 2015

n-k

Aug 25 2014

ksolsim

Aug 22 2014

roentgen

May 18 2014

Meteorrock

Apr 29 2014

janet

Feb 09 2014

Chuck56

Feb 05 2014

alpvonkri

Mar 10 2013

sunbergzach

Jan 05 2013

atenrok

Dec 05 2012

krzywda

Apr 05 2012

MountainX

Mar 11 2012

evgom

Feb 19 2012

aspotashev

Nov 19 2011

devport

Oct 27 2011

obelix

Mar 26 2011

ubuntuku

Jan 04 2011

cjann

Dec 29 2010

hantsy

Nov 24 2010

AngelBlue01

Sep 14 2010

tetris4

Apr 22 2010

pvt14

Mar 24 2010

mxttie

Jan 12 2010

Flavianoep

Jan 09 2010

floorek

Jan 06 2010

mgranet

Jan 01 2010

michalm

Dec 28 2009

lestek

Nov 04 2009

Yggdrasill

Nov 01 2009

oshunluvr

Oct 19 2009

jihemd

Jul 13 2009

Murz

Jul 07 2009

markwege

May 28 2009

Montblanc

Apr 07 2009

JMB

Apr 01 2009

hurikhan77

Mar 11 2009

snowhog

Feb 07 2009

SeaJey

Jan 04 2009
File (click to download) Version Description Downloads Date Filesize DL OCS-Install MD5SUM
*Needs ocs-url or ocs-store to install things
Pling
Details
license
version
2.9.1
updated Aug 06 2017
added Nov 08 2006
downloads 24h
24
page views 24h 36
System Tags addon