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

Write tutorials here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Please don't add support questions to tutorials,start your own thread in the appropriate sub-forum instead. Before you post please read this
Post Reply
Daisuke
Level 1
Level 1
Posts: 26
Joined: Fri Jun 21, 2019 6:29 pm

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

Post by Daisuke » Thu Nov 07, 2019 6:52 pm

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.
Attachments
Open As Root Context Menu.png
Last edited by Daisuke on Thu Nov 14, 2019 5:08 pm, edited 2 times in total.

User avatar
smurphos
Level 13
Level 13
Posts: 4814
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher
Contact:

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

Post by smurphos » Fri Nov 08, 2019 3:17 am

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.
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.

User avatar
BG405
Level 7
Level 7
Posts: 1928
Joined: Fri Mar 11, 2016 3:09 pm
Location: England

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

Post by BG405 » Sun Nov 10, 2019 4:50 pm

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:
Dell Inspiron 1525 - LM17.3 CE 64-------------------Lenovo T440 8GB - Manjaro KDE with Mint VMs
Toshiba NB250 - Manjaro KDE------------------------K7S5A AMD 1.2GHz - LM17.3 Xfce 32 & WinXP-Pro
Acer Aspire E11 ES1-111M - LM18.2 KDE 64 ----Dell PII 350 64MB - Puppy 4.3 & Win98-SE

Daisuke
Level 1
Level 1
Posts: 26
Joined: Fri Jun 21, 2019 6:29 pm

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

Post by Daisuke » Tue Nov 12, 2019 4:06 pm

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!

User avatar
absque fenestris
Level 6
Level 6
Posts: 1308
Joined: Sat Nov 12, 2016 8:42 pm
Location: Confoederatio Helvetica

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

Post by absque fenestris » Tue Nov 12, 2019 4:24 pm

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
Linux Mint 18.3 Sylvia (Mate) 32-bit - Acer D250 Netbook (Intel Atom N270, 2 GB RAM, 120 GB SSD)
Linux Mint 17.3 Rosa (Mate) 64-bit - MacBook Pro 15" (Intel Core2 Duo, 8 GB RAM, 240 GB SSD) - with some separation difficulties...

User avatar
BG405
Level 7
Level 7
Posts: 1928
Joined: Fri Mar 11, 2016 3:09 pm
Location: England

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

Post by BG405 » Wed Nov 13, 2019 2:48 pm

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:
Dell Inspiron 1525 - LM17.3 CE 64-------------------Lenovo T440 8GB - Manjaro KDE with Mint VMs
Toshiba NB250 - Manjaro KDE------------------------K7S5A AMD 1.2GHz - LM17.3 Xfce 32 & WinXP-Pro
Acer Aspire E11 ES1-111M - LM18.2 KDE 64 ----Dell PII 350 64MB - Puppy 4.3 & Win98-SE

Daisuke
Level 1
Level 1
Posts: 26
Joined: Fri Jun 21, 2019 6:29 pm

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

Post by Daisuke » Thu Nov 14, 2019 5:10 pm

Thank you BG405! Great catch - you are observant and kind enough to remind me in a friendly way! Done!

User avatar
BG405
Level 7
Level 7
Posts: 1928
Joined: Fri Mar 11, 2016 3:09 pm
Location: England

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

Post by BG405 » Thu Nov 14, 2019 10:10 pm

@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:
Dell Inspiron 1525 - LM17.3 CE 64-------------------Lenovo T440 8GB - Manjaro KDE with Mint VMs
Toshiba NB250 - Manjaro KDE------------------------K7S5A AMD 1.2GHz - LM17.3 Xfce 32 & WinXP-Pro
Acer Aspire E11 ES1-111M - LM18.2 KDE 64 ----Dell PII 350 64MB - Puppy 4.3 & Win98-SE

Post Reply

Return to “Tutorials”