Difference between revisions of "Nemo"

From ArchWiki
Jump to navigation Jump to search
(The page changed to reflect that the default-application.terminal setting is used for both the context menu and for running shell scripts from Nemo.)
 
(39 intermediate revisions by 18 users not shown)
Line 2: Line 2:
 
[[ar:Nemo]]
 
[[ar:Nemo]]
 
[[ja:Nemo]]
 
[[ja:Nemo]]
{{Article summary start}}
+
{{Related articles start}}
{{Article summary text|This article covers installation, configuration, and general usage tips for Nemo.}}
+
{{Related|Cinnamon}}
{{Article summary heading|Related}}
+
{{Related|File manager functionality}}
{{Article summary wiki|Cinnamon}}
+
{{Related|GNOME Files}}
{{Article summary end}}
+
{{Related|Thunar}}
 +
{{Related|PCManFM}}
 +
{{Related articles end}}
  
[https://github.com/linuxmint/nemo Nemo] is a fork of [[Nautilus]]. It is also the file manager of the [[Cinnamon]] desktop.
+
[https://github.com/linuxmint/nemo Nemo] is a fork of [[GNOME Files]] (formerly known as Nautilus). It is also the default file manager of the [[Cinnamon]] desktop. Nemo is based on the Files 3.4 code. It was created as a response to the changes in Files 3.6 which saw features such as type ahead find and split pane view removed.
  
 
== Installation ==
 
== Installation ==
  
[https://wiki.archlinux.org/index.php/Pacman Install] {{Pkg|nemo}} from the [[official repositories]].
+
[[Pacman|Install]] {{Pkg|nemo}} from the [[official repositories]].
  
 
=== Extensions ===
 
=== Extensions ===
Line 18: Line 20:
 
Some programs can add extra functionality to Nemo. Here are a few packages that do just that:
 
Some programs can add extra functionality to Nemo. Here are a few packages that do just that:
  
* {{App|Nemo File Roller|Integrate File Roller into Nemo.|https://github.com/linuxmint/nemo-extensions/tree/master/nemo-fileroller|{{Pkg|nemo-fileroller}}}}
+
* {{App|Nemo File Roller|File archiver extension for Nemo.|https://github.com/linuxmint/nemo-extensions/tree/master/nemo-fileroller|{{Pkg|nemo-fileroller}}}}
* {{App|Nemo Seahorse|Allows encryption and decryption of OpenPGP files using GnuPG.|https://github.com/linuxmint/nemo-extensions/tree/master/nemo-python|{{AUR|nemo-seahorse}}}}
+
* {{App|Nemo Compare|An utility which compares two files using {{Pkg|meld}}.|https://github.com/linuxmint/nemo-extensions/tree/master/nemo-compare|{{AUR|nemo-compare}}}}
* {{App|RabbitVCS Nemo|Integrate RabbitVCS into Nemo.|http://www.rabbitvcs.org|{{AUR|rabbitvcs-nemo}}}}
+
* {{App|Nemo Preview|GtkClutter and Javascript-based quick previewer for Nemo.|https://github.com/linuxmint/nemo-extensions/tree/master/nemo-preview|{{Pkg|nemo-preview}}}}
 +
* {{App|Nemo Seahorse|PGP encryption and signing extension for Nemo.|https://github.com/linuxmint/nemo-extensions/tree/master/nemo-seahorse|{{Pkg|nemo-seahorse}}}}
 +
* {{App|Nemo Share|Samba extension for Nemo.|https://github.com/linuxmint/nemo-extensions/tree/master/nemo-share|{{Pkg|nemo-share}}}}
 +
* {{App|Nemo Terminal|Embedded terminal window for Nemo|https://github.com/linuxmint/nemo-extensions/tree/master/nemo-terminal|{{Pkg|nemo-terminal}}}}
 +
* {{App|RabbitVCS Nemo|Integrate RabbitVCS into Nemo.|http://www.rabbitvcs.org/|{{AUR|rabbitvcs-nemo}}}}
  
See [https://github.com/linuxmint/nemo-extensions nemo-extensions github repo] for all extensions.
+
See [https://aur.archlinux.org/packages/?O=0&K=nemo- AUR] and [https://github.com/linuxmint/nemo-extensions nemo-extensions github repo] for all extensions.
  
 
== Configuration ==
 
== Configuration ==
  
Nemo is simple to configure graphically, but not all potential configurations can be done via the preferences menu in nautilus. More options are available with {{Pkg|dconf-editor}} under {{ic|org.nemo}}.
+
Nemo is simple to configure graphically but not all options are in the preferences screen in Nemo. More options are available in the ''dconf-editor'' under {{ic|org.nemo}}.  
 +
 
 +
=== Set Nemo as default file browser ===
 +
 
 +
To set Nemo as the default file browser, execute the following:
 +
 
 +
$ xdg-mime default nemo.desktop inode/directory application/x-gnome-saved-search
  
 
=== Show / hide desktop icons ===
 
=== Show / hide desktop icons ===
Line 34: Line 46:
 
  $ gsettings set org.nemo.desktop show-desktop-icons false
 
  $ gsettings set org.nemo.desktop show-desktop-icons false
  
=== Make Nemo your default file browser ===
+
This fixes the console warning <code>WARNING **: Can not determine workarea, guessing at layout</code> for tiling window managers (such as i3).
 +
 
 +
=== Change the default terminal emulator for Nemo ===
 +
 
 +
{{Pkg|gnome-terminal}} is set as the default, if it is not installed, neither the "Open in terminal" context menu entry feature will not work, nor shell scripts or terminal applications won't run from Nemo.
 +
 
 +
You can change the default setting with {{ic|gsettings}} to the preferred terminal application.
 +
 
 +
$ gsettings set org.cinnamon.desktop.default-applications.terminal exec <terminal-name>
 +
 
 +
To be able to run shell scripts from Nemo, make sure you set up the proper argument for the preferred  terminal application (the default is {{ic|-x}} for {{Pkg|gnome-terminal}}).
 +
 
 +
$ gsettings set org.cinnamon.desktop.default-applications.terminal exec-arg <argument>
 +
 
 +
{{tip|
 +
To use {{Pkg|rxvt-unicode}} as the default terminal emulator, use the following:
 +
$ gsettings set org.cinnamon.desktop.default-applications.terminal exec urxvt
 +
$ gsettings set org.cinnamon.desktop.default-applications.terminal exec-arg -e
 +
}}
 +
 
 +
=== Set keyboard shortcut for "Open in terminal" ===
  
Add the following line to the Default Applications section of the file {{ic|~/.local/share/applications/mimeapps.list}}
+
Edit or create {{ic|~/.gnome2/accels/nemo}} and add the following line (replacing "F4" with the desired key combination):
[Default Applications]
 
inode/directory=nemo.desktop
 
  
=== Change application for "Open in terminal" context menu entry ===
+
{{hc|~/.gnome2/accels/nemo|
 +
(gtk_accel_path "<Actions>/DirViewActions/OpenInTerminal" "F4")}}
  
$ gsettings set org.cinnamon.desktop.default-applications.terminal exec terminal-name
+
{{ic|<Alt>}}, {{ic|<Primary>}}, and {{ic|<Shift>}} can be used as key modifiers (for example, {{ic|<Primary><Shift>t}}).
  
 
== Tips and tricks ==
 
== Tips and tricks ==
Line 48: Line 79:
 
=== Nemo Actions ===
 
=== Nemo Actions ===
  
Nemo allows the user to add new entries to the context menu. The file {{ic|[https://github.com/linuxmint/nemo/blob/master/files/usr/share/nemo/actions/sample.nemo_action /usr/share/nemo/actions/sample.nemo_action]}} contains an example of a Nemo action. Places where to put custom action files:
+
Nemo allows the user to add new entries to the context menu. The file {{ic|[https://github.com/linuxmint/nemo/blob/master/files/usr/share/nemo/actions/sample.nemo_action /usr/share/nemo/actions/sample.nemo_action]}} contains an example of a Nemo action. Directories to place custom action files:
 
* {{ic|/usr/share/nemo/actions/}} for system-wide actions
 
* {{ic|/usr/share/nemo/actions/}} for system-wide actions
* {{ic|$HOME/.local/share/nemo/actions/}} for user actions
+
* {{ic|~/.local/share/nemo/actions/}} for user actions
Pay attention to the name convention. Your file has to preserve the file ending {{ic|.nemo_action}}.
+
 
 +
Action files must have the {{ic|.nemo_action}} file extension.
  
 
==== Clam Scan ====
 
==== Clam Scan ====
  
{{hc|$HOME/.local/share/nemo/actions/clamscan.nemo_action|
+
{{hc|clamscan.nemo_action|
 
2=[Nemo Action]
 
2=[Nemo Action]
 
Name=Clam Scan
 
Name=Clam Scan
 
Comment=Clam Scan
 
Comment=Clam Scan
  
Exec=gnome-terminal -x sh -c "clamscan -r %F <nowiki>|</nowiki> less"
+
Exec=gnome-terminal -x sh -c "clamscan -r %F {{!}} less"
  
 
Icon-Name=bug-buddy
 
Icon-Name=bug-buddy
Line 71: Line 103:
 
==== Moving files ====
 
==== Moving files ====
  
{{hc|$HOME/.local/share/nemo/actions/archive.nemo_action|
+
{{hc|archive.nemo_action|
 
2=[Nemo Action]
 
2=[Nemo Action]
 
Active=true
 
Active=true
Line 81: Line 113:
 
}}
 
}}
  
{{hc|$HOME/.local/share/nemo/actions/archive.py|
+
{{hc|archive.py|
 
2=#! /usr/bin/python2 -OOt
 
2=#! /usr/bin/python2 -OOt
 
import sys
 
import sys
Line 101: Line 133:
 
==== Meld compare ====
 
==== Meld compare ====
  
{{hc|$HOME/.local/share/nemo/actions/compare-save-for-later.nemo_action|2=
+
{{hc|compare-save-for-later.nemo_action|2=
 
[Nemo Action]
 
[Nemo Action]
 
Active=true
 
Active=true
Line 112: Line 144:
 
}}
 
}}
  
{{hc|$HOME/.local/share/nemo/actions/compare-with-saved.nemo_action|2=
+
{{hc|compare-with-saved.nemo_action|2=
 
[Nemo Action]
 
[Nemo Action]
 
Active=true
 
Active=true
Line 123: Line 155:
 
}}
 
}}
  
{{hc|$HOME/.local/share/nemo/actions/compare.sh|2=
+
{{hc|compare.sh|2=
 
#!/bin/bash
 
#!/bin/bash
 
savedfile=/var/tmp/compare-save-for-later.$USER
 
savedfile=/var/tmp/compare-save-for-later.$USER
Line 133: Line 165:
 
fi
 
fi
 
}}
 
}}
 +
 +
==== Filenames containing spaces ====
 +
 +
By default, Nemo does not escape filenames. This means that actions for multiple files with some names containing spaces are broken. To fix this, use {{ic|1=Quote=double}}.
 +
 +
== Troubleshooting ==
 +
 +
=== Thumbnail generation errors shown in the console ===
 +
 +
By default, nemo does not generate thumbnails for certain video files due to licensing or patent problems (AVC encoded mp4 and mkv files for example). As such, you might see errors similar to the following in the console:
 +
CinnamonDesktop-WARNING **: Error creating thumbnail for file:///home/username/video.mp4: Unrecognized image file format
 +
for mp4 and other video files.
 +
 +
To fix this, ensure that you have a thumbnailer for video files installed - see [[File manager functionality#Thumbnail previews]] - and also ensure you have the necessary [[GStreamer]] packages installed that will allow the video file to be played.
 +
 +
{{Tip|Once thumbnail generation for video files is working, you can use {{ic|nemo-preview}} to preview video files.}}
 +
 +
=== Desktop icons not shown ===
 +
 +
Since Nemo v3.4.2, the desktop is managed by `nemo-desktop`. This can be configured to auto start by copying the file {{ic|/usr/share/applications/nemo-autostart.desktop}} to {{ic|~/.config/autostart/nemo-autostart.desktop}} and removing the line "OnlyShowIn=X-Cinnamon;".

Latest revision as of 15:26, 15 June 2019

Nemo is a fork of GNOME Files (formerly known as Nautilus). It is also the default file manager of the Cinnamon desktop. Nemo is based on the Files 3.4 code. It was created as a response to the changes in Files 3.6 which saw features such as type ahead find and split pane view removed.

Installation

Install nemo from the official repositories.

Extensions

Some programs can add extra functionality to Nemo. Here are a few packages that do just that:

  • Nemo File Roller — File archiver extension for Nemo.
https://github.com/linuxmint/nemo-extensions/tree/master/nemo-fileroller || nemo-fileroller
  • Nemo Compare — An utility which compares two files using meld.
https://github.com/linuxmint/nemo-extensions/tree/master/nemo-compare || nemo-compareAUR
  • Nemo Preview — GtkClutter and Javascript-based quick previewer for Nemo.
https://github.com/linuxmint/nemo-extensions/tree/master/nemo-preview || nemo-preview
  • Nemo Seahorse — PGP encryption and signing extension for Nemo.
https://github.com/linuxmint/nemo-extensions/tree/master/nemo-seahorse || nemo-seahorse
  • Nemo Share — Samba extension for Nemo.
https://github.com/linuxmint/nemo-extensions/tree/master/nemo-share || nemo-share
  • Nemo Terminal — Embedded terminal window for Nemo
https://github.com/linuxmint/nemo-extensions/tree/master/nemo-terminal || nemo-terminal
  • RabbitVCS Nemo — Integrate RabbitVCS into Nemo.
http://www.rabbitvcs.org/ || rabbitvcs-nemoAUR

See AUR and nemo-extensions github repo for all extensions.

Configuration

Nemo is simple to configure graphically but not all options are in the preferences screen in Nemo. More options are available in the dconf-editor under org.nemo.

Set Nemo as default file browser

To set Nemo as the default file browser, execute the following:

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

Show / hide desktop icons

To enable/disable desktop icons rendering feature in nemo, change the following setting true or false (false to hide, true to show):

$ gsettings set org.nemo.desktop show-desktop-icons false

This fixes the console warning WARNING **: Can not determine workarea, guessing at layout for tiling window managers (such as i3).

Change the default terminal emulator for Nemo

gnome-terminal is set as the default, if it is not installed, neither the "Open in terminal" context menu entry feature will not work, nor shell scripts or terminal applications won't run from Nemo.

You can change the default setting with gsettings to the preferred terminal application.

$ gsettings set org.cinnamon.desktop.default-applications.terminal exec <terminal-name>

To be able to run shell scripts from Nemo, make sure you set up the proper argument for the preferred terminal application (the default is -x for gnome-terminal).

$ gsettings set org.cinnamon.desktop.default-applications.terminal exec-arg <argument>
Tip:

To use rxvt-unicode as the default terminal emulator, use the following:

$ gsettings set org.cinnamon.desktop.default-applications.terminal exec urxvt
$ gsettings set org.cinnamon.desktop.default-applications.terminal exec-arg -e

Set keyboard shortcut for "Open in terminal"

Edit or create ~/.gnome2/accels/nemo and add the following line (replacing "F4" with the desired key combination):

~/.gnome2/accels/nemo
(gtk_accel_path "<Actions>/DirViewActions/OpenInTerminal" "F4")

<Alt>, <Primary>, and <Shift> can be used as key modifiers (for example, <Primary><Shift>t).

Tips and tricks

Nemo Actions

Nemo allows the user to add new entries to the context menu. The file /usr/share/nemo/actions/sample.nemo_action contains an example of a Nemo action. Directories to place custom action files:

  • /usr/share/nemo/actions/ for system-wide actions
  • ~/.local/share/nemo/actions/ for user actions

Action files must have the .nemo_action file extension.

Clam Scan

clamscan.nemo_action
[Nemo Action]
Name=Clam Scan
Comment=Clam Scan

Exec=gnome-terminal -x sh -c "clamscan -r %F | less"

Icon-Name=bug-buddy

Selection=Any

Extensions=dir;exe;dll;zip;gz;7z;rar;

Moving files

archive.nemo_action
[Nemo Action]
Active=true
Name=Archive %N
Comment=Archiving %N will add .archive to the object.
Exec=<archive.py %F>
Selection=S
Extensions=any;
archive.py
#! /usr/bin/python2 -OOt
import sys
import os
import shutil

filename = sys.argv[0]
print "Running " + filename
print "With the following arguments:"
for arg in sys.argv:
    if filename == arg:
        continue
    else:
        print arg
        #os.rename('%s','%s.archive') % (arg,arg)
        shutil.move(arg, arg+".archive")

Meld compare

compare-save-for-later.nemo_action
[Nemo Action]
Active=true
Name=Compare later
Comment=Save file for comparison later.
Exec=<compare.sh save %F>
Icon-Name=meld
Selection=S
Extensions=any
compare-with-saved.nemo_action
[Nemo Action]
Active=true
Name=Compare with saved element
Comment=Compare %F saved file or directory.
Exec=<compare.sh compare %F>
Icon-Name=meld
Selection=S
Extensions=any
compare.sh
#!/bin/bash
savedfile=/var/tmp/compare-save-for-later.$USER
comparator=meld
if [ "$1" == "save" ]; then
	echo "$2" > "$savedfile"
else
	"$comparator" $(cat "$savedfile") "$2"
fi

Filenames containing spaces

By default, Nemo does not escape filenames. This means that actions for multiple files with some names containing spaces are broken. To fix this, use Quote=double.

Troubleshooting

Thumbnail generation errors shown in the console

By default, nemo does not generate thumbnails for certain video files due to licensing or patent problems (AVC encoded mp4 and mkv files for example). As such, you might see errors similar to the following in the console:

CinnamonDesktop-WARNING **: Error creating thumbnail for file:///home/username/video.mp4: Unrecognized image file format 

for mp4 and other video files.

To fix this, ensure that you have a thumbnailer for video files installed - see File manager functionality#Thumbnail previews - and also ensure you have the necessary GStreamer packages installed that will allow the video file to be played.

Tip: Once thumbnail generation for video files is working, you can use nemo-preview to preview video files.

Desktop icons not shown

Since Nemo v3.4.2, the desktop is managed by `nemo-desktop`. This can be configured to auto start by copying the file /usr/share/applications/nemo-autostart.desktop to ~/.config/autostart/nemo-autostart.desktop and removing the line "OnlyShowIn=X-Cinnamon;".