1/4/2024 0 Comments Open terminal ubuntu as root~/.local/share/applications/sktop (If you can't find it there, make a duplicate of the one found in /usr/share/applications/, and save it to this new location) - The menu option will only be available for the specified user, and is considered "better practice".Note that you may need to re-edit this file, adding the option if an update to Nautilus occurrs that overwrites your changes. /usr/share/applications/sktop (requires root access to edit) - The menu option will be added for all users.You will need to edit a *.desktop file in order to add the menu option, and you have two choices: If you find yourself opening nautilus as root often, I would recommend adding the option to the right-click menu in Unity: (it uses the same command as the top answer, gksu nautilus). Use the following command instead of gksu or gksudo: pkexec nautilus Related question: "Open in terminal" not working on nautilus as rootįinally, installing nautilus-admin also allows opening nautilus as root from the command line. If you right click on a text file editable by Gedit you will see: To install Nautilus Admin in Ubuntu, open a terminal by pressing Ctrl+ Alt+ T and use the following command: sudo apt-get install nautilus-adminĪnd to restart Nautilus use either of the following commands:Īfter this when you right click on a folder you will see: Nautilus admin adds PolicyKit files for both Nautilus and Gedit and it allows opening a file or folder from Nautilus as root, via PolicyKit: In fact, Ubuntu no longer ships with gksu by default (though it may be installed for many of you, because some apps still depend on it) and it may even be completely removed at some point. Gksu hasn't been updated since 2009 and is not recommended any more. Ubuntu will switch back to Xorg by default in 18.04 LTS and the workarounds will not be needed then. How do you switch from Wayland back to Xorg in Ubuntu 17.10? Other alternatives are described in Why don't gksu/gksudo or launching a graphical application with sudo work with Wayland? The following method does not work with Wayland by default. To open the /usr/ directory as root in Nautilus.įrom Nautilus opened in this way, if you click on a text file that needs admin privileges, you will be prompted for password again, before it opens in your default editor such as Gedit. When you click on such a bookmark later you may be prompted for the admin password again.Īlternatively, from the Terminal open nautilus with the argument admin:///usr/: nautilus admin:///usr/ You may bookmark a folder that is opened with admin:/// prefix. Open Nautilus the usual way and press Ctrl+ L to enable typing in the address-bar, and then enter for example admin:///usr/ to open the /usr/ directory.Įnter your admin password when prompted and you will see something like this:Īt this point clicking on the folders with locks will open with admin privileges. Use the GVfs admin backend, just add admin:// to the beginning of the full path to your preferred directory. How to run Gedit AND Nautilus as administrator with pkexec instead of gksu or gksudo GVfs method tested in Ubuntu 18.04
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |