Page 1 of 1

How To: Use the "Open as Root" Context Menu in Nemo

Posted: Thu Nov 07, 2019 6:52 pm
by Daisuke
I am new to Linux having come from a Windows environment.
I am using Linux Mint Cinnamon 19.2 and really think it is great, once you learn about some of its niftier features.

Today, I wanted to backup (copy) some files which were generated by an application which I run as root using sudo.
I found that Nemo out-of-the-box would not let me access the files directly since they were owned by root, even though I have root privileges. And it is not recommended to run Nemo with sudo. It generates errors and this warned me off.

But here is one way to do it using a built-in feature of Nemo, a very handy context menu for "Open as Root".

Find the folder which you want to copy but is owned by root. Highlight its parent folder in the left hand tree view of the Nemo File Manager. The folder will now appear as an icon in the right hand directory view. (In the image below, the parent folder is Photos which in not shown in the tree view in this image.) Right click on the desired folder icon to display the context menu. One of the options is "Open as Root" with a little key icon. Select this and enter the root password as required. A new Nemo window will open with a warning banner colored red saying Elevated Privileges. Use this new Nemo window to copy as usual and paste to the destination directory. When the copy completes, close the elevated privileges window so you do not inadvertently do something unintended as root in the file system.

One other handy little feature of Nemo is the ability to show "hidden" files, that is files which start with a . as in .bashrc. You can do this by toggling Ctrl-h while looking at the directory of interest, or in the View Menu by checking the option to Show Hidden Files.

Re: How To: Use the "Open as Root" Context Menu in Nautilus

Posted: Fri Nov 08, 2019 3:17 am
by smurphos
Nice tutorial, but one little niggle - Cinnamon's File Manager is called Nemo not Nautilus. The latter is the the Gnome 3 desktop environments file manager.

Re: How To: Use the "Open as Root" Context Menu in Nautilus

Posted: Sun Nov 10, 2019 4:50 pm
by BG405
smurphos wrote:
Fri Nov 08, 2019 3:17 am
Cinnamon's File Manager is called Nemo
This .. and it's really not a good idea to install a second full-blown file manager as this can (and apparently has) lead to serious borkage of your operating system. :wink:

Re: How To: Use the "Open as Root" Context Menu in Nautilus

Posted: Tue Nov 12, 2019 4:06 pm
by Daisuke
To Smurfos,
Thanks for the encouragement! Also, for clearing up my confusion over the use of Nautilus and Nemo. As my image shows, I am using Nemo!

To BG405,
Thanks for the comment. My error was in calling the Mint-Cinnamon File Manager Nautilus, not its correct name of Nemo. A rose by any other name may smell as sweet, but a File Manager should always be named properly!

I have edited the tutorial to show the correct file manager application (Nemo) for this tutorial but which I was calling by a different name.

As an interesting piece of trivia, both Nautilus and Nemo come from the famous novels by Jules Verne, Twenty Thousand Leagues Under the Sea (1870) and The Mysterious Island (1874). Nautilus is the fictional submarine which was captained by Nemo in the novels. In thinking about the file system as the below the surface region on which Linux, or any OS, is built, both Nemo and Nautilus, as underwater explorers, make for a good metaphor!

Re: How To: Use the "Open as Root" Context Menu in Nautilus

Posted: Tue Nov 12, 2019 4:24 pm
by absque fenestris
So to speak I "grew up" with Gnome 2 and Ubuntu & Debian and for me the file browser is still "Nautilus"
At least I change the icon to the Nautilus shell...

Nautilus.png

Re: How To: Use the "Open as Root" Context Menu in Nautilus

Posted: Wed Nov 13, 2019 2:48 pm
by BG405
Daisuke wrote:
Tue Nov 12, 2019 4:06 pm
In thinking about the file system as the below the surface region on which Linux, or any OS, is built, both Nemo and Nautilus, as underwater explorers, make for a good metaphor!
Yes, indeed! That might well have been the idea behind these names & also in KDE we have Dolphin as the file manager, also marine related.

By the way, it would be a good idea to change the title of your opening post accordingly. :wink:

Re: How To: Use the "Open as Root" Context Menu in Nemo

Posted: Thu Nov 14, 2019 5:10 pm
by Daisuke
Thank you BG405! Great catch - you are observant and kind enough to remind me in a friendly way! Done!

Re: How To: Use the "Open as Root" Context Menu in Nemo

Posted: Thu Nov 14, 2019 10:10 pm
by BG405
@Daisuke: No worries, thanks. This sort of thing is easily missed/overlooked etc. & I've with little or no doubt done it myself on numerous occasions. It's great that you are contributing good stuff to our great community and it's really appreciated. :D .. as an aside I don't get it why some people seemingly want to do nothing other than complain .. there are Forums for that too! (Not necessarly Linux ones, but it happens). :mrgreen: