21

I just installed Ubuntu and I want to replace nautilus with Nemo. I first installed Nemo by using the following commands:

sudo add-apt-repository ppa:embrosyn/cinnamon
sudo apt-get update
sudo apt-get install nemo

I then used the following commands to set Nemo as the default file manager:

xdg-mime default nemo.desktop inode/directory application/x-gnome-saved-search
gsettings set org.gnome.desktop.background show-desktop-icons false
gsettings set org.nemo.desktop show-desktop-icons true

I learned these commands from this post. However, I receive the following error:

> GLib-GIO-Message: 15:22:17.302: Using the 'memory' GSettings backend. 
> Your settings will not be saved or shared with other applications.

Edit:

I found a fix for this error which can be found in my answer below. The accepted answer provides an updated set of instructions to make Nemo the default file manager in recent versions of Ubuntu (18.04+ at the time of writing).

rasul
  • 405
  • 2
    We have had a discussion on community.ubuntu.com about Nemo in 18.04. You can search it for Nemo and try to get complete solution. I do not remember the result of using Nemo instead of Nautilus. Also I think that you can use nemo from official repositories (not PPA). But I do not use both, since I use MATE DE. I'm tired of all these unexpected changes in the behavior of the desktops. – N0rbert Aug 19 '18 at 09:32
  • 1
    Everything you did as far as those commands was wrong. Sudo is not needed and shouldn't have been used. You should rerun the gsettings with sudo to revert them (use opposite value). As far as the xdg-mime command root likely now owns ~/.config/mimeapps.list so delete that file as root. (plus check the rest of your home dir. for root owned files or folders..) If you saw any change in desktop icons from running those gsettings commands as root then you have additional issues as nothing should have happened.. The 3 commands should have been run as a user. – doug Aug 19 '18 at 12:18
  • As far as nemo handling the desktop, that's done with the nemo-desktop command, this should be done via a autostart file. (can be initially checked thru alt+F2 > enter nemo-desktop – doug Aug 19 '18 at 12:20
  • Your nemo package should install nemo-autostart.desktop to /etc/xdg/autostart/ , if not find it and copy there or to ~/.config/autostart/ In some cases a small delay is advisable, done thru line in the .desktop, i.e, X-GNOME-Autostart-Delay=2 for 2 sec. delay – doug Aug 19 '18 at 15:43
  • @doug Thanks. When I press alt+f2 and enter nemo-desktop nothing is shown. It does not run Nemo. – rasul Aug 20 '18 at 03:14
  • When I run nemo-desktop in terminal I see these messages:

    (nemo-desktop:4947): Gtk-WARNING **: 13:15:12.211: Failed to register client: GDBus.Error:org.gnome.SessionManager.AlreadyRegistered: Unable to register client

    ** (nemo-desktop:4947): WARNING **: 13:15:12.231: Desktop already managed by another application, skipping desktop setup. To change this, modify org.nemo.desktop 'ignored-desktop-handlers'.

    – rasul Aug 20 '18 at 03:16
  • When I run gsettings set org.nemo.desktop show-desktop-icons true I see this message: $ gsettings set org.nemo.desktop show-desktop-icons true GLib-GIO-Message: 13:17:45.162: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications. – rasul Aug 20 '18 at 03:19
  • I also don't see nemo-autostart.desktop in /etc/xdg/autostart/ or ~/.config/autostart/ directories. – rasul Aug 20 '18 at 03:26
  • Your ppa package installs it to usr/share/applications. Did you undo running those 3 commands as root as I suggested?? – doug Aug 20 '18 at 15:35
  • @doug Yes I did. Then I tried running those three commands without sudo. The xdg-mim command works without producing errors/warnings. The other two commands produce warnings. For example, running gsettings set org.gnome.desktop.background show-desktop-icons false gives the message:

    `GLib-GIO-Message: 09:18:17.627: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications.

    (process:5480): GLib-GIO-WARNING **: 09:18:17.627: unknown schema extension 'd'

    (process:5480): GLib-GIO-WARNING **: 09:18:17.627: unknown schema extension 'd'`

    – rasul Aug 20 '18 at 23:24
  • Try going to a tty, remove the .config/dconf/user file, then reboot from the tty. If no change have you altered any schemas files? Otherwise just do a fresh install and don't use sudo haphazardly or needlessly or edit system files improperly – doug Aug 21 '18 at 09:36
  • 2
  • 2
    @CeesTimmerman "Make nemo the default file browser" is already mentioned in the question, so this question can't be a duplicate of it. – karel Jun 17 '20 at 13:02

3 Answers3

38

If your problem is that you have Anaconda installed and it has changed some things in your ~/.bashrc file, read this answer by the OP.

Otherwise, here are my generic instructions on...

How to install Nemo and set it as the default file manager in Ubuntu 18.04 and 20.04 (for 22.04, see here):

  • Fully tested in:
    1. Ubuntu 18.04 running the default Gnome desktop.
    2. Ubuntu 20.04 on 8 Aug. 2020 running the default Gnome desktop.
  • Why use nemo over nautilus? See the several screenshots at the very end showing the great usage of space and features which nemo has!

The main source where I first learned most of these details, starting with Ubuntu 18.04, was this article by Abhishek Prakash: https://itsfoss.com/install-nemo-file-manager-ubuntu/

To use Nemo instead of Nautilus as your default file manager, including to manage desktop icons, do:

For Ubuntu 18.04 and 20.04 (for Ubuntu 22.04, see here)

We will install nemo, make it the default, let it control desktop icons too, and disable Nautilus's (the default Ubuntu file manager's) ability to control desktop icons.

Install nemo

sudo apt update
sudo apt install nemo
xdg-mime default nemo.desktop inode/directory application/x-gnome-saved-search
gsettings set org.nemo.desktop show-desktop-icons true
=gsettings set org.gnome.desktop.background show-desktop-icons false

Then also install these tools so we can adjust some settings next

sudo apt install dconf-editor

And install this on Ubuntu 18.04 or 20.04

sudo apt install gnome-tweak-tool

Start up the nemo desktop to allow nemo to control the desktop icons too

nemo-desktop& # We use & here to run it in the background

  1. If on Ubuntu 20.04, you must also do this:

    (I can't remember if this is required for Ubuntu 18.04 too or not, but I had to do it on Ubuntu 20.04)

    You must also change a setting in the new "Extensions" program which we just installed (or "activated", maybe?--I'm not sure) above with sudo apt install gnome-tweak-tool. Press your Super key (Windows key on a PC keyboard, or Command key on a Mac running Linux), then type in "extensions", and click the Extensions program:

    enter image description here

    Inside this program, click the slider to turn off "Desktop Icons", as shown below. This turns OFF the nautilus desktop icons so that we can just have the nemo desktop icons instead. If you don't do this, you'll get a weird desktop with unusable nautilus desktop icons covered up by usable nemo desktop icons, as shown a couple images down.

    enter image description here

    Here's a snapshot of my desktop:

    Before:
    (Shows the newly-activated nemo desktop superimposed on top of the now-unusable nautilus desktop):

    enter image description here

    After:
    (Now shows just the newly-activated nemo desktop, with the default Ubuntu gnome nautilus desktop icons now disabled, as I want):

    enter image description here

Now add the command nemo-desktop to your startup applications to turn on the nemo desktop icons at every boot.

enter image description here

Reboot (or just log out and then log back in) and run the following command to ensure it opens up your home folder in nemo now, and NOT in nautilus like it used to:

xdg-open $HOME

Set up nemo desktop icons:

If you want your Computer, Home, Trash, etc. icons on your desktop again (you can see some of these shown in a screenshot farther below), see Mark Greaves' answer here. In my own words: ensure dconf-editor is installed:

sudo apt install dconf-editor

Press your Super key (Windows key on a PC keyboard, or Command key on a Mac running Linux), then type in "dconf editor", and click the program:

enter image description here

Navigate to: org --> nemo--> desktop. You have options to show the following 5 things. Enable whichever ones you like. I recommend you don't change anything else unless you know exactly what you're doing:

  1. computer-icon-visile (I like to enable this one--shown in the screenshot just below)
  2. home-icon-visible (I like to enable this one--shown in the screenshot just below)
  3. network-icon-visible
  4. trash-icon-visible
  5. volumes-visible

To change the desktop icon size when using Nemo as your file manager:

In Ubuntu 18.04, simply right-click on the desktop and go to Desktop --> Icon Size, as shown here:

enter image description here

In Ubuntu 20.04, you'll have to right-click on the desktop and then go to "Customize". It brings up a new window as shown below. I've highlighted a few things you may want to customize. One of them is a drop-down menu for "Icon Size", for example. The sliders at the bottom and right can be used to adjust horizontal and vertical desktop icon grid spacing, respectively.

enter image description here

To go back to using Nautilus instead of Nemo:

xdg-mime default nautilus.desktop inode/directory application/x-gnome-saved-search
gsettings set org.gnome.desktop.background show-desktop-icons true

(optional) do NOT run if you want to keep nemo as an extra file manager

sudo apt purge nemo nemo*

(optional) do NOT run if you want to keep applications which were once

dependencies of other applications, but no longer are; see man apt for

details

sudo apt autoremove

Reboot to test, when done

reboot

And remove the nemo-desktop command from your startup applications.

To choose which desktop options to display in Nautilus:

For Ubuntu 18.04, first ensure the gnome-tweak-tool is installed:

sudo apt install gnome-tweak-tool

Then open it by searching for "Tweaks" in your start menu, and going to --> Desktop tab on left:

enter image description here

For Ubuntu 20.04, I believe the Nautilus desktop icons are just controlled by the "Extensions" GUI tool I've previously shown above.

Why use nemo over Ubuntu's default nautilus file manager?

This one's easy. Take a look at the beautiful use of space that nemo permits in Compact view. Look at all of the files you can see at once!

(Note that this view is NOT zoomed out all the way. You can still zoom out one more time while still seeing the file names, and one more time after that to see only tiny icons). I LOVE how compact you can see everything! Let this be a model for GUI file manager designers (Microsoft & Apple & Ubuntu/Nautilus, take note! :))

enter image description here

Versus the really user-unfriendly and space-wasting views available in the nautilus file manager (looking in the same directory in an identically-sized window):

  1. Icon view (zoomed all the way out):
    enter image description here
  2. Or, list view (zoomed all the way out): enter image description here

Aweful, in my opinion! I can't see hardly any files in comparison and it's much more difficult to find things!

Enough said. Notice the nice address bar you can easily type in in nemo too. In nautilus you have to use Ctrl + L to see the address bar to type in.

Troubleshooting:

If you can't get nemo to become your default file manager used by some tool like Dash to Panel, try the following (untested):

  1. Search the repo for nautilus and manually replace it with nemo. See the search for "nautilus" in the Dash to Panel source code here: https://github.com/home-sweet-gnome/dash-to-panel/search?q=nautilus. OR:

  2. Make your computer open nemo whenever nautilus is run, by making a symbolic link named "nautilus" in your ~/bin folder, but have it point to nemo!:

    mkdir -p ~/bin  # create ~/bin dir if it doesn't exist
    # see where the executable for nautilus is; sample output: `/usr/bin/nautilus`
    which nautilus  
    # see where the executable for nemo is; sample output: `/usr/bin/nemo`
    which nemo
    # create symlink to back nautilus path up; this allows running 
    # `nautilus_real` to run the real `nautilus`!
    ln -s /usr/bin/nautilus ~/bin/nautilus_real
    # create a new `nautilus` symlink to point to `nemo`; this means
    # that if you run `nautilus` it will actually run `nemo`!
    ln -s /usr/bin/nemo ~/bin/nautilus
    

    Log out and log back in. Now, running nemo will run nemo, running nautilus will run nemo, and running nautilus_real will run nautilus.

    To undo these aliases, simply delete those two symlinks you just created above:

    rm ~/bin/nautilus_real
    rm ~/bin/nautilus
    

References

  1. https://itsfoss.com/install-nemo-file-manager-ubuntu/
  2. How I learned how to change Ubuntu 22.04's latest settings: see both answers here: How can I hide the home folder icon from Ubuntu 22.04 desktop

Related:

  1. Note that this answer was moved to this location from here: Change default file manager Ubuntu 18.04
  2. How to change desktop icon size?
  3. How to display Trash and Home folder icons?

Other things you might want to change:

  1. [my answer] How can I add "Show desktop" to the GNOME dash or Ubuntu Dock?
  2. [my answer] How can I create launchers on my desktop?
  3. [my answer] How can I snap a window in a corner with 18.04?
  4. [my answer] Permanently fix Chrome scroll speed
  • 3
    Thanks a lot for this precise and amazing guide! – the_candyman Oct 12 '20 at 14:54
  • Thank you! It worked well (Ubuntu 20.04) except that in the panel (I use tweaks dash-to-panel) it still opens Nautilus when I click on Files. How do I change this? – Kvothe Nov 19 '20 at 14:06
  • The biggest downside I experienced is that it seems that something weird happens where the desktop is above other applications after clearing the desktop (using the panel button or key combination). Somehow I ended up seeing the applications but unable to click in them because I could only click on the desktop icons which were flying over the applications. – Kvothe Nov 19 '20 at 16:23
  • @GabrielStaples, if so that is great! I will look even closer. Note that I already removed the original desktop icons and added new ones using dconf-editor. It is those new ones that seem to be giving a problem. – Kvothe Nov 19 '20 at 16:35
  • @GabrielStaples, indeed perhaps the problem came from me adding an old style desktop application. How do I add a desktop application in the correct way with dconf. I mean if I want to add something besides the defaults to my desktop. I currently just used copy past from the application folder. I guess that is no longer ok with this setup? Actually I don't think this is the reason I deleted that one so that I only have the icons from dconf and I still have the same issue. – Kvothe Nov 19 '20 at 16:41
  • @Kvothe, I deleted my last comment, as you can see, because I realized I was probably mistaken. The Dash to Panel Gnome extension may interfere. 1) have you run the xdg-mime default and 2 gsettings set commands at the top of my answer? 2) have you done this step?: sudo apt install gnome-tweak-tool, then: "Inside this program, click the slider to turn off "Desktop Icons...If you don't do this, you'll get a weird desktop with unusable nautilus desktop icons covered up by usable nemo desktop icons, as shown a couple images down." – Gabriel Staples Nov 19 '20 at 17:06
  • @GabrielStaples, thanks, I did run that code. I had already installed gnome-tweak-tool (just did again to make sure and said already installed and newest version). Thanks for thinking along. Anyway thanks for an elaborate answer that unfortunately does not seem to work for me. (Perhaps due to dash-to-panel. I can check, although I would not do away with that I like it too much.) – Kvothe Nov 19 '20 at 17:10
  • @Kvothe, what features make you want to keep Dash to Panel? Perhaps remove it. I've added additional links to the bottom of my answer. If you need a "show desktop" button, see my answer here, & if you need to create application shortcuts on your desktop/in the launcher menu, see my answer here, as well as the links & tools in my repo at the very bottom of that answer. See also a few more links I like on my website here: Ubuntu 18 Post Install Steps. – Gabriel Staples Nov 19 '20 at 17:34
  • @Kvothe, also, you can go to the Dash to Panel source code on GitHub and try changing cmd: ['nautilus'] to cmd: ['nemo'] on line 1826 of appIcons.js. See my search for "nautilus" in the repo here: https://github.com/home-sweet-gnome/dash-to-panel/search?q=nautilus. – Gabriel Staples Nov 19 '20 at 17:39
  • @Gabriel, thanks for all the replies! I grew up on windows so if there is no taskbar at the bottom it feels wrong. I completely rely on it being there. – Kvothe Nov 19 '20 at 17:46
  • @Kvothe, press your Windows Key --> type "settings" --> open the Settings --> click "Appearance" on the left --> click the "Position on screen" dropdown & change from "Left" to "Bottom". Now the launcher/dock menu is at the bottom (although I prefer it on the left now). I grew up on Windows too. Now, I run every machine in the house on Ubuntu, & when I need Windows, I run a free Windows 10 virtual machine (downloaded from Microsoft directly) inside a free VirtualBox virtual machine--but that is very rare--only when I need to look at MRIs or something from the Dr's office, or play SimCity 2000. – Gabriel Staples Nov 19 '20 at 17:57
  • @Kvothe, see the new "Troubleshooting" section at the end of my answer. Let me know if it works. – Gabriel Staples Nov 19 '20 at 22:49
  • Would it work for 20.10? I also have Anaconda3 v4.9.2 ... – as5 Dec 29 '20 at 09:01
  • 1
    It works for me on 22.04. Now I can finally use type-ahead instead of putting up with Nautilus's disorenting automatic search when you type the first letters of a file. – laur34 Apr 28 '22 at 13:27
6

How to install Nemo and set it as the default file manager in Ubuntu 22.04 (for earlier versions, see here):

  • Fully tested in:
    1. Ubuntu 22.04 on 19 Dec. 2022 running the default Gnome desktop.
  • Why use nemo over nautilus? See the several screenshots at the very end of my other answer here showing the great usage of space and features which nemo has!

To use Nemo instead of Nautilus as your default file manager, including to open desktop icons, do:

For Ubuntu 22.04

We will install nemo and make it the default, but unlike the Ubuntu 18.04 and 20.04 instructions above, we will not let nemo control the desktop icons (mostly because I can't figure out how to disable the Gnome-controlled desktop icons once I do). Rather, we will simply tell Gnome to open up the desktop icons, which it controls, in nemo instead of in nautilus.

Install nemo

sudo apt update
sudo apt install nemo

Make xdg-open open up directories in nemo instead of nautilus

xdg-mime default nemo.desktop inode/directory application/x-gnome-saved-search

Make Gnome-controlled directories and icons on the desktop open up in nemo

now instead of in nautilus

gsettings set org.gnome.shell.extensions.ding use-nemo true

Install a configuration tool we will use below

sudo apt install dconf-editor

(Optional, in case we want to try using this tool to tweak settings too)

Note: gnome-tweaks on Ubuntu 22.04 replaces gnome-tweak-tool on Ubuntu

18.04 and 20.04

sudo apt install gnome-tweaks

Set up desktop icons:

Open the dconf-editor tool, and navigate to org --> gnome--> shell --> extensions --> ding.

Turn on the "use-nemo" option at the bottom in order to "Use Nemo to open folders".

Here are my current settings:

enter image description here

Note that you can also edit these settings at the command-line. Example:

gsettings set org.gnome.shell.extensions.ding use-nemo true
gsettings set org.gnome.shell.extensions.ding show-home true

...and some of these settings are accessible via your main "Settings" menus as well.

Example: press your Super key (Windows key on a PC keyboard, or Command key on a Mac running Linux), and type in "Settings". Open your "settings", and go to the "Appearance" tab. Toggle off the "Show Personal folder" option to hide your "Home" folder, or toggle it back on if desired, as shown here:

enter image description here

That setting is directly linked to gsettings set org.gnome.shell.extensions.ding show-home true at the command line and to the "show-home" setting in the dconf-editor.

Reboot to test, when done:

reboot

Test the changes:

# 1. Ensure `xdg-open` now opens up your home folder **in nemo**, and NOT in
# nautilus like it used to
xdg-open $HOME

2. double-click the Home dir or any folder icon on your desktop and ensure it

opens up in nemo now instead of in nautilus too.

Notes & Troubleshooting:

  1. If you can't find an expected icon, such as the "Home" folder after you have enabled it to show up on the desktop as described above, it may be on another monitor! Minimize all windows with Windowskbd + D and look for your lost icon on another monitor. You may need to right-click on the desktop and go to "Arrange By..." --> "Keep Arranged...", to auto-arrange them. Or, manually drag the icon back where you want it onto your main monitor.

  2. If your bookmarks at the left-hand side of your Nemo file manager window are broken and show yellow boxes with exclamation marks in them, like this:

    enter image description here

    ...then it means those bookmarks are broken. Fix them by going to "Bookmarks" --> "Edit Bookmarks...", then manually fix the "Location" (path) fields for each one. This will happen in particular if you have changed your username and home dir, as shown how to do here.

To change the desktop icon size:

Use the "Size" option under your regular Settings. It is found under Settings --> "Appearance" tab --> "Desktop Icons" section --> "Size" parameter, as shown in the last screenshot above. That is the recommended place to change it, but you can also access it via the dconf-editor at the screen shown above, or at the command-line via gsettings set org.gnome.shell.extensions.ding icon-size <size>, where size is apparently an enum value chosen from the range obtained by gsettings range org.gnome.shell.extensions.ding icon-size.

Other settings I like to set in Nemo:

Choose View --> Compact View. Also ensure View --> Statusbar is checked. This shows the status bar at the bottom of the window.

Then go to Edit --> Preferences --> Views tab --> change the "Default View" to "Compact View", and reduce the "Compact View Defaults" "Default zoom level" from 100% to 66%, so you can see more files and folders in your Compact View. Here are my settings in this tab:

enter image description here

Under the "Behavior" tab, check the box for "Ask before moving files to the Trash":

enter image description here

Turn on image thumbnail previews for larger images by going to the "Preview" tab and changing the file size from 1 MB to 100 MB or so:

enter image description here

Under the "Toolbar" tab, turn on the "Computer" icon (no screenshot shown).

Under the "Context Menus" tab, check the box for "Make Link" (see screenshot below). This adds a "Make Link" menu option to the right-click menu in order to quickly make a symlink to the file or folder you have selected.

enter image description here

To go back to using Nautilus instead of Nemo:

# Make `xdg-open` open up directories in nautilus instead of nemo
xdg-mime default nautilus.desktop inode/directory application/x-gnome-saved-search
# Make Gnome-controlled directories and **icons on the desktop** open up in
# nautilus now instead of in nemo
gsettings set org.gnome.shell.extensions.ding use-nemo false

(optional) do NOT run if you want to keep nemo as an extra file manager

sudo apt purge nemo nemo*

(optional) do NOT run if you want to keep applications which were once

dependencies of other applications, but no longer are; see man apt for

details

sudo apt autoremove

Reboot to test, when done

reboot

Test the changes:

# 1. Ensure `xdg-open` now opens up your home folder **in nautilus**, and NOT in
# nemo like it did before
xdg-open $HOME

2. double-click the Home dir or any folder icon on your desktop and ensure it

opens up in nautilus again now instead of in nemo.

References

  1. https://itsfoss.com/install-nemo-file-manager-ubuntu/
  2. How I learned how to change Ubuntu 22.04's latest settings: see both answers here: How can I hide the home folder icon from Ubuntu 22.04 desktop
  • Unfortunately Nemo does not have the same functionality in Ubuntu 22.04 as it does in Cinnamon. For example the feature that I personally miss the most is: "sorting folders by drag & drop", so arranging folders in the order I want (List View / Compact View). This feature works perfectly on my laptop running Linux Mint with Cinnamon, but it doesn't work on the laptop where I use Ubuntu 22.04. – Marius Feb 12 '23 at 06:13
  • @Marius, I'm not familiar with the "sort folders by drag and drop" concept. Can you demo it or point to a video of it? If you do, I'll see if I can make it work on Ubuntu 22.04 too. – Gabriel Staples Feb 12 '23 at 06:41
  • @Marius, what you probably want is the keep-arranged option which is shown in the dconf-editor GUI screenshot at the top of my answer. – Gabriel Staples Jun 01 '23 at 01:02
3

For those who are here because of the gsettings error mentioned in my question:

The cause of the error was Anaconda installation. I finally solved the problem as explained in this answer. To summarise, just comment the lines added by Anaconda to your .bashrc file, follow the instructions for setting Nemo as the default file manager (as per the accepted answer above), and after completing the instructions uncomment the lines in your .bashrc file.

rasul
  • 405