
Root Actions Servicemenu
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
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.
2.9.1 Translation and bugfix release 3 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)
2.9.1 Translation and bugfix release 3 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)
kubicle
5 years ago
Report
Caldazar
5 years ago
Now that there's a little itch, I wanna scratch!
However, taking backwards compatibility into consideration I did some Perl RTFM and came up with a little if clause that seems to do the job.
Keep in mind that I can't really write in Perl (more a PHP guy) so this solution might be a bit hacky:
# Fixed bug with qt5 applications not opening
# because they don't provide the kde-options like "--caption" any more
$TEST = system "$CPROGRAM --help-kde" ;
if ( $TEST eq 0 ) {
exec "$DBUSRUN $CPROGRAM --caption \"$APPNAME $ROOTREMINDER\" \'$TARGET\'" ; }
else {
exec "$DBUSRUN $CPROGRAM \'$TARGET\'" ; }
See full script in https://dl.dropboxusercontent.com/u/68298459/Scripts/rootactions-servicemenu.pl
Report
kubicle
5 years ago
I'll add it (with possible modifications) in 2.8.4...I'm delaying that for a while in case I can come up with a solution for the reminders in kf5/qt5 apps as well (-qwindowtitle doesn't seem to work).
If I can't find a way to get the reminders in kf5, I'll just use your test to get the reminders back in kde4 apps.
Report
Meteorrock
6 years ago
Kubuntu KDE 4.13.2 . I used $kdesudo dolphin to move that file as a root user. The directory was empty on mine. Using the dolphin file manager. Near fresh install.
As you extract those files, use the two rootactionfolders.desktop in this directory
~/rootactions_servicemenu_2.8.2/Root_Actions_2.8.2/dolphin-KDE4/
They are named *10-rootactionsfolders.desktop* and
*11-rootactionsfiles.desktop*
________________________________
I copied those two files into ~kde/share/kde4/services/ since there was no subfolder beyond that. It works fine for me. I looked over the README files and except for the authors of this fine script forgetting to include adding to move the rootactions-servicemenu.pl to a root directory, it runs fine. I thought I would come in and help everyone on how I got that script working on my linux box. Got tired of the gray boxes whenever I had to bring up the GUI in root to mod some of my files. BE CAREFUL. Thank you guys, nice work on this script. Very powerful script in the right click mode of KDE now in /root/.
Delete and open works along with moving files. Used this script to get some themes modified.
Report
kubicle
6 years ago
If the script doesn't run automatically, you can also run it manually, it will install the required files in the correct places.
Report
Meteorrock
6 years ago
Hope that helps anyone coming around.
Report
Meteorrock
6 years ago
Report
snowhog
7 years ago
Report
MountainX
7 years ago
kubuntu - KDEInit could not launch /usr/bin/kate - Ask Ubuntu
http://askubuntu.com/questions/348745/kdeinit-could-not-launch-usr-bin-kate/349093#349093
My question is, How do I upgrade from 2.7.1 to 2.8? Can I just install 2.8 on top of 2.7.a? Or do I have to uninstall the prior version?
Thanks!
Report
kubicle
7 years ago
> Here's the issue:
>
> kubuntu - KDEInit could not launch /usr/bin/kate - Ask Ubuntu
> http://askubuntu.com/questions/348745/kdeinit-could-not-launch-usr-bin-kate/
> 349093#349093
Yes, this should be fixed in 2.8
> My question is, How do I upgrade from 2.7.1 to 2.8? Can I just install 2.8
> on top of 2.7.a? Or do I have to uninstall the prior version?(I also asked
> this question at http://kde-look.org) Thanks!
Either should work (provided you installed with GHNS. If you are using packages from your distribution, it's better to wait for those packages to upgrade).
I seem to recall GHNS had some problems with some upgrades in the past, but they might have been fixed already.
You can try upgrading first, and if that doesn't work remove and reinstall.
Do note that it takes a while for GHNS to pick up upgraded packages, at the moment the automatic installation from dolphin seems to still offer version 2.7.3 (and unfortunately the dolphin preview doesn't show the version number for some mysterious reason, I'm going to add version information to the description)
Report
MountainX
7 years ago
Report
Rulatir
8 years ago
Report
kubicle
8 years ago
Dolphin needs ruby to run install scripts in servicemenu packages.
If you have ruby installed (or installing it doesn't help), report back and I'll help you troubleshoot.
Report
Sweyn78
8 years ago
Report
kubicle
8 years ago
If one is not found (or xdg-mime is not installed), it defaults to dolphin as a fallback if available and konqueror should only be the "last resort" (if dolphin is not available).
Can you elaborate a bit on when and how you see the behavior (opening konqueror instead of dolphin)
Report
Sweyn78
8 years ago
Many thanks. :)
Report
Xplorer4x4
8 years ago
Regardless, nice work. This is very useful!
Report
kubicle
8 years ago
To your question:
It might be possible (in theory), but there are a few obstacles to a clean implementation, like permissions (permission/ownership of files would have to be changed to the user or the trash could not be cleaned, but that wouldn't help restoring the files).
Moving to root's trash would be somewhat trivial, but I originally decided against that.
I might look into a trash option for the next version, possibly as a configurable option (I did plan to include more configurability in the long run), can't promise anything though.
Report
krzywda
8 years ago
(in kubuntu 11.10 )
Report
kubicle
8 years ago
GHNS installation (in dolphin settings) requires ruby to run the install script.
Report
grekpg
8 years ago
So is possible to check ruby state ? )or auto install before install plugin ?) - in default kubuntu distro users dont have instaled ruby so when try install have big error - big beacose there any error message- click install, script is show as instaled but not work. Thanks for script its very usefull !
Report
kubicle
8 years ago
I'll update the information on the top of the page to include the ruby requirement. The IMHO best solution would be to include ruby as a "recommended" dependency to dolphin (it's currently only a "suggested" dependency in kubuntu...which means it isn't installed by default)
Report
Brutus180
9 years ago
Report
Dominor
9 years ago
After that, the automated install process completes successfully and I can, for example, edit a root only text file through kdesu.
Report
kubicle
9 years ago
I'll add a test for the directory and create if necessary.
Report