Assuming you are using a distro logged in to desktop as a normal user. Here is way to help admin it painlessly.
The following allows you to quickly open thunar as root user for admin purposes. Can then open root terminals from there via right click action.
This method is more convenient than opening terminal and entering sudo thunar command.
Modify to pcmanfm if that is what you use.
The following assumes logged in to desktop as normal user and normal user is member of sudoers.
If normal user is in wheel group, such that no sudoer user password is asked for, you can modify below to Terminal=false.
Otherwise, a terminal will pop up and you need to enter that normal user password at prompt.
Put the following in /usr/share/applications/rootfm.desktop or in ~/.local/share/applications/rootfm.desktop
and the launch icon will appear under Desktop Start Menu -> System category.
You may need to change the Icon to whatever is on your system you prefer.
Code: Select all
[Desktop Entry]
Version=1.0
Type=Application
Name=rootfm
Comment=root Thunar File Manager
Exec=sudo thunar
Icon=utilities-root-terminal
Terminal=true
StartupNotify=false
Categories=System;
The other important matter to set up when running from normal user desktop (such as user 'weedog') is to create directories with user:group ownership permissions weedog:weedog.
That allows you to then use, for example, your internet browser to store downloads into any such directories that have weedog:weedog ownership permissions even when not using above "run filemanager as root mechanism". For example, I often arrange for my usb stick or some directories on that, or some other partition, to have normal user weedog:weedog ownership (whether weedog is a sudoer member or not). You can change a directories permissions from user:group being root:root to weedog:weedog via commandline:
Code: Select all
chown -R weedog:weedog directory_path
After that your normal user logged in desktop system becomes pretty painless to use and administer with advantage of no more issues with those many apps nowadays that don't like being run as user root! So that is an alternative to using scripts like run-as-weedog or run-as-spot.