December 29, 2013

Install Nemo With Unity Patches (And Without Cinnamon Dependencies) In Ubuntu

As the default Gnome Nautilus file manager gets slimed down for tablets, the need for a traditional file manager is becoming more important. This is why Nemo was forked and developed.


Nemo, the default Cinnamon file manager, needs Cinnamon to be installed, even if you want to use it in some other desktop environment such as GNOME/Unity. That's not the only issue that makes using the latest Nemo under Unity difficult - Cinnamon 2.0 breaks Unity in Ubuntu 13.10, Nemo no longer draws the desktop icons and so on.

nemo file manager ubuntu unity

I wanted to use the latest Nemo under Unity, but without Cinnamon dependencies so I used the Nautilus Unity patches modified for Nemo by Jacob Zimmermann, which I updated to work with the latest Nemo 2.0.3, and I also added some extra patches to remove the Cinnamon dependencies (except for cinnamon-translations but that shouldn't be an issue), re-enable Nemo to handle the desktop icons and allow Nemo to use GNOME Control Center to change the desktop background or set a picture as wallpaper via context menu.

Since some of you might want to use this modified Nemo in Unity, I uploaded  it along with its extensions to a PPA, so you can easily install and use it under Unity (Ubuntu 14.04, 13.10, 13.04, 12.10 and 12.04).

With these changes, you can completely replace Nautilus with Nemo in Unity, without having to install Cinnamon. Why use Nemo? Well, Nemo comes with a huge number of features that no longer exist in Nautilus as well as some new ones:
  • Extra Pane feature (can be enabled via View menu or using the F3 key) as well as an option to always start in split-pane mode;
  • Unified, configurable toolbar: you can add/remove the following: up icon, refresh icon, toggle button for the location bar / path bar, home icon, computer icon and search icon;
  • Treeview sidebar option;
  • Detachable tabs;
  • Re-worked statusbar with zoom controls as well as options to toggle displaying the places sidebar, treeview or completely hide the sidebar;
  • The  main toolbar, menubar and statusbar can be hidden;
  • Option to show the full path in the titlebar and tab bars;
  • Displays an "elevated privileges" banner when running as root;
  • Built in "Open as root" context menu item which uses pkexec instead of gksu;
  • Built in "Open in terminal" context menu item;
  • Added GTK bookmarks to the MoveTo/CopyTo context menus;
  • Added "Set as Wallpaper" to the context menu;
  • Switch view buttons on the toolbar (Grid, List and Compact views);
  • Drag and drop support for the bookmarks in the sidebar;
  • Sidebar: indicators under each drive, displaying the free/used space;
  • Type-ahead find feature similar to the one removed from Nautilus starting with version 3.6;
  • Collapsable sidebar categories;
  • List view:
    • columns are now re-orderable by drag and drop;
    • you can now right-click a column heading to add or remove visible columns quickly;
  • Improved the Open With dialog - you can now add custom mime-type handlers on the fly;
  • Much more!

nemo file manager ubuntu unity
Nemo dual pane and an "elevated privileges" banner displayed when running Nemo as root
nemo file manager ubuntu unity
Toolbar options

Thanks to the changes mentioned above, you'll also get Unity integration similar to Nautilus: quicklists, Unity Launcher progress bar when copying files, etc.:

nemo file manager ubuntu unity
Nemo Unity integration

Nemo comes with quite a few extensions ported from Nautilus, such as: Fileroller (File Roller integration), Compare (context menu comparison extension), Dropbox (Dropbox integration for Nemo), Media Columns (displays PDF and audio - mp3, WAV and FLAC - tags as well as EXIF metadata to the Nemo list view), Pastebin (extension to send files to pastebin), RabbitVCS (extension for RabbitVCS integration, a tool that provides access to version control systems such as SVN), Seahorse (extension for Seahorse encryption in GNOME) and Share (extension to share folders using Samba).

nemo file manager ubuntu unity
Nemo Media Columns extension adds new audio and image tags to the List View

All these extensions are available in the Nemo WebUpd8 PPA. One extension is missing though: Sushi (a port of the GNOME Sushi extension to Nemo), because I didn't have time to remove its Cinnamon dependencies.


Install Nemo file manager in Ubuntu (Unity)


Warning: do not use this PPA if you're using Linux Mint or you've installed Cinnamon from the stable or nightly PPAs! Also, if you've added one of these two PPAs, remove it before using the WebUpd8 Nemo PPA even if you didn't install Cinnamon, or else the Nemo version in the WebUpd8 Nemo PPA might be overwritten.

1. Install Nemo

The WebUpd8 Nemo PPA is available for Ubuntu 14.04, 13.10, 13.04, 12.10 and 12.04. Add the PPA and install the latest Nemo (version 2.0.3 at the time I'm writing this post) with Unity tweaks/fixes by using the commands below:
sudo add-apt-repository ppa:webupd8team/nemo
sudo apt-get update
sudo apt-get install nemo nemo-fileroller
To launch Nemo, search for "Nemo" in Dash - no application called "Nemo" will show up but instead an application called files should be displayed - that's the app you need to launch. Don't search for "Files" because that will also find Nautilus (which is also called "Files").

2. Optional: install Nemo extensions

To install all the Nemo extensions (remove the extensions you don't want to use from the command below!) use the following command:
sudo apt-get install nemo-compare nemo-dropbox nemo-media-columns nemo-pastebin nemo-seahorse nemo-share
If you're having a problem installing nemo-dropbox, see THIS fix.

For RabbitVCS Nemo integration, install the following package (requires the RabbitVCS PPA):
sudo apt-get install nemo-rabbitvcs

nemo file manager ubuntu unity
Nemo Terminal extension

You can also install Nemo Terminal, an extension new, unreleased extension ported from Nautilus-Terminal that embeds a terminal into the Nautilus window:
sudo apt-get install nemo-terminal
Tip: the embedded Nemo terminal can be hidden using F4. You can disable it on Nemo startup and change various settings via Dconf Editor ("sudo apt-get install dconf-tools"), under org > nemo > extensions > nemo-terminal.

If you want an embedded terminal for Nautilus, see: Nautilus Terminal 1.0 Released With Support For Nautilus 3.x

After installing the extensions, I suggest restarting Nemo using the commands below (instead of "nemo -q" which prevented Nemo-Dropbox from working properly in my test for instance):
killall nemo
nemo

3. Fix issue with python-nemo (required by some extensions such as Nemo Terminal, Nemo Media Columns, Nemo RabbitVCS, etc.)

There's an issue in Ubuntu (Raring and newer only I believe) that prevents python-nemo from working. Fix it by using the following command:
- 32bit:
sudo ln -s /usr/lib/i386-linux-gnu/libpython2.7.so.1 /usr/lib/libpython2.7.so.1
sudo ln -s /usr/lib/libpython2.7.so.1 /usr/lib/libpython2.7.so.1.0
- 64bit:
sudo ln -s /usr/lib/x86_64-linux-gnu/libpython2.7.so.1 /usr/lib/libpython2.7.so.1
sudo ln -s /usr/lib/libpython2.7.so.1 /usr/lib/libpython2.7.so.1.0



Optional: Set Nemo as the default file manager


1. To prevent Nautilus from handling the desktop icons (and use Nemo instead), use the commands below:

- install dconf-tools:
sudo apt-get install dconf-tools
- disable Nautilus from drawing the desktop icons:
gsettings set org.gnome.desktop.background show-desktop-icons false
(Nemo is enabled by default to draw the desktop icons so there's no need to change anything else)
Then, start Nemo and it should draw the desktop icons instead of Nautilus.

If you change your mind and want to use Nautilus for drawing the desktop icons instead of Nemo, use the commands below:
gsettings set org.nemo.desktop show-desktop-icons false
gsettings set org.gnome.desktop.background show-desktop-icons true
(the first command disables Nemo from showing desktop icons and the second re-enables Nautilus)

2. Set Nemo as the default file manager (replacing Nautilus) by running the following command:
xdg-mime default nemo.desktop inode/directory application/x-gnome-saved-search


Revert the changes


If you want to revert the changes and set Nautilus back as the default file manager, firstly let Nautilus draw the desktop icons:
gsettings set org.gnome.desktop.background show-desktop-icons true

Then, set Nautilus as the default file manager:
xdg-mime default nautilus.desktop inode/directory application/x-gnome-saved-search

Next, remove Nemo (including all the installed Nemo extensions) and the WebUpd8 Nemo PPA:
sudo apt-get remove nemo nemo-*
sudo rm /etc/apt/sources.list.d/webupd8team-nemo-*.list

Source: http://www.webupd8.org/2013/10/install-nemo-with-unity-patches-and.html