M
M
Mosapi2020-07-17 16:43:24
linux
Mosapi, 2020-07-17 16:43:24

How can I add root access to the nautilus context menu?

In older versions of Linux (before ubuntu 18), it was possible to add Nautilus to the default explorer, in the context menu, the item - open a folder / file with Root rights.
This could be done by creating a script file with the commands:

sudo su
gedit .gnome2/nautilus-script/Open\ as\ root

with content like this:
for uri in $NAUTILUS_SCRIPT_SELECTED_URIS; do

gksudo "gnome-open $uri" &

And then execute the command in the terminal, which actually adds the script to the menu context:
sudo chmod +x .gnome2/nautilus-script/Open\ as\ root

But in Ubuntu 20.4 It doesn't work. Naturally, after all, according to the assurances of gksudo, it was cut up to version 18 of Ubuntu. I don’t find anything sensible and fresh on the network, mb experts will tell you?
The solution by using the terminal or by pressing Alt+f2 is not satisfactory. How do I change the contents of the included script so that it correctly runs nautilus as root?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
U
ubuntu_lts, 2020-07-17
@Mosapi

sudo apt install nautilus-admin

S
SOTVM, 2020-07-17
@sotvm

you can use such a script, or you can replace gksudo with sudo in yours

#!/bin/bash
sudo nautilus [email protected]

add yourself to the sudo group and allow execution without entering a password (
uncomment / add a line in /etc/sudoers) Threat
%sudo ALL=(ALL:ALL) NOPASSWD:ALL
in
version 20 of mint this is organized at the plugin level for caja (nautilus fork)
you can open the directory and edit the file
so look in the settings nautilus plug/install the plugin (if they are in bubuntu)))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question