Skip to content

Instantly share code, notes, and snippets.

@cosmic76
Created February 17, 2017 12:16
Show Gist options
  • Save cosmic76/e548203d96db029ed815a3df369d9ee1 to your computer and use it in GitHub Desktop.
Save cosmic76/e548203d96db029ed815a3df369d9ee1 to your computer and use it in GitHub Desktop.
Open a new window Nemo File Manager as root.
#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).
#You will need to edit a *.desktop file in order to add the menu option, and you have two choices:
/usr/share/applications/nautilus.desktop
#(requires root access to edit) - The menu option will be added for all users. !!!Note that you may need to re-edit this file, adding the option if an update to Nautilus occurrs that overwrites your changes.
~/.local/share/applications/nautilus.desktop
#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 if you already have it docked to your Unity bar, you will need to choose Unlock from Launcher on your existing Nautilus icon (by default shows up as named Files), then re-add your "custom" version. These changes should stay even if Nautilus gets an update.
#Edit the text file nautilus.desktop, adding the following block of code (you can use the existing two blocks as a template):
[Desktop Action RootWindow]
Name=Open a Root Window
Exec=gksu nemo
OnlyShowIn=Unity;
#Next, add the new action to the list (should be at around line 18 of the text file):
Actions=Window;RootWindow;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment