📜 ⬆️ ⬇️

How to open a file or folder by right-clicking as root

Sometimes you need to open a file or folder with root rights. To save time, you can add Scripts -> Open as root to the context menu.

To do this, open the command line and paste:
sudo su

gedit .gnome2/nautilus-scripts/Open\ as\ root

In the document that opens, add:
for uri in $NAUTILUS_SCRIPT_SELECTED_URIS; do

gksudo "gnome-open $uri" &


Save the document

Paste into the command line:
sudo chmod +x .gnome2/nautilus-scripts/Open\ as\ root

CHECK:
Right click on any file or folder, find Scripts -> Open as root
')
If not working, reboot.

Source: https://habr.com/ru/post/37262/


All Articles