Difference between revisions of "Nemo"

From ArchWiki
Jump to: navigation, search
(Nemo Actions)
(Extensions: Add reference to AUR)
 
(29 intermediate revisions by 12 users not shown)
Line 1: Line 1:
 
[[Category:File managers]]
 
[[Category:File managers]]
[[ar:Nemo]]  
+
[[ar:Nemo]]
[https://github.com/linuxmint/nemo Nemo] is the file manager of the [[Cinnamon]] desktop.
+
[[ja:Nemo]]
 +
{{Related articles start}}
 +
{{Related|Cinnamon}}
 +
{{Related|File manager functionality}}
 +
{{Related|GNOME Files}}
 +
{{Related|Thunar}}
 +
{{Related|PCManFM}}
 +
{{Related articles end}}
 +
 
 +
[https://github.com/linuxmint/nemo Nemo] is a fork of [[GNOME Files]]. 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 [https://wiki.archlinux.org/index.php/Official_repositories Official Repositories].
+
[[Pacman|Install]] {{Pkg|nemo}} from the [[official repositories]].
  
=== Make Nemo your default file browser ===
+
=== Extensions ===
  
Change from Nautilus to Nemo :
+
Some programs can add extra functionality to Nemo. Here are a few packages that do just that:
{{hc|/usr/share/applications/nautilus.desktop|
+
 
2=[...]
+
* {{App|Nemo File Roller|File archiver extension for Nemo.|https://github.com/linuxmint/nemo-extensions/tree/master/nemo-fileroller|{{Pkg|nemo-fileroller}}}}
#Exec=nautilus %U
+
* {{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}}}}
Exec=nemo %U
+
* {{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|RabbitVCS Nemo|Integrate RabbitVCS into Nemo.|http://www.rabbitvcs.org/|{{AUR|rabbitvcs-nemo}}}}
 +
 
 +
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 options are in the preferences screen in Nemo. More options are available in the ''dconf-editor'' under {{ic|org.nemo}}. To set Nemo as the default file browser, see [[Xdg-open#Set the default file-browser]].
  
 
=== Show / hide desktop icons ===
 
=== Show / hide desktop icons ===
# false to hide ; true to show
 
dconf write /org/nemo/desktop/show-desktop-icons false
 
  
== [https://github.com/linuxmint/nemo-extensions Extensions] ==
+
To enable/disable desktop icons rendering feature in nemo, change the following setting true or false (false to hide, true to show):  
* {{App|Nemo fileroller|Integrate File Roller into Nemo.|https://github.com/linuxmint/nemo-extensions/tree/master/nemo-fileroller|{{Pkg|nemo-fileroller}}}}
+
* {{App|RabbitVCS Nemo|Integrate RabbitVCS into Nemo.|http://www.rabbitvcs.org|{{AUR|rabbitvcs-nemo}}}}
+
* {{App|Python2 Nemo|Python bindings for the Nemo Extension API.|https://github.com/linuxmint/nemo-extensions/tree/master/nemo-python|{{AUR|python2-nemo}}}}
+
  
== Nemo Actions ==
+
$ gsettings set org.nemo.desktop show-desktop-icons false
It allows the user to add new entries to the Nemo context menu.<br/>
+
 
The file {{ic|/usr/share/nemo/actions/sample.nemo_action}} contains an example of a Nemo action.<br/>
+
This fixes the console warning <code>WARNING **: Can not determine workarea, guessing at layout</code> for tiling window managers (such as i3).
Places where to put custom action files :
+
 
* {{ic|$HOME/.local/share/nemo/actions/}}
+
=== Change application for "Open in terminal" context menu entry ===
* {{ic|/usr/share/nemo/actions/}}
+
 
 +
{{Pkg|gnome-terminal}} is set as the default, if it is not installed this feature will not work.
 +
 
 +
Alternatively, change the default setting with ''gsettings'' to the preferred terminal application.
 +
 
 +
$ gsettings set org.cinnamon.desktop.default-applications.terminal exec <terminal-name>
 +
 
 +
== Tips and tricks ==
 +
 
 +
=== 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. Directories to place custom action files:
 +
* {{ic|/usr/share/nemo/actions/}} for system-wide actions
 +
* {{ic|$HOME/.local/share/nemo/actions/}} for user actions
 
Pay attention to the name convention. Your file has to preserve the file ending {{ic|.nemo_action}}.
 
Pay attention to the name convention. Your file has to preserve the file ending {{ic|.nemo_action}}.
  
=== Clam Scan ===
+
==== Clam Scan ====
 +
 
 
{{hc|$HOME/.local/share/nemo/actions/clamscan.nemo_action|
 
{{hc|$HOME/.local/share/nemo/actions/clamscan.nemo_action|
 
2=[Nemo Action]
 
2=[Nemo Action]
Line 51: Line 74:
 
}}
 
}}
  
=== Moving files ===
+
==== Moving files ====
 +
 
 
{{hc|$HOME/.local/share/nemo/actions/archive.nemo_action|
 
{{hc|$HOME/.local/share/nemo/actions/archive.nemo_action|
 
2=[Nemo Action]
 
2=[Nemo Action]
 
Active=true
 
Active=true
 
 
# The name to show in the menu, locale supported with standard desktop spec.
 
# Use %N as an (optional) token to display the simple filename in the label.
 
# If multiple are selected, then the arbitrary first selected name will be used.
 
# Token is inactive for selection type of Multiple, None and Any (it will be treated literally)
 
# **** REQUIRED ****
 
 
 
Name=Archive %N
 
Name=Archive %N
 
 
# Tool tip, locale supported (Appears in the status bar)
 
# %N can be used as with the Name field, same rules apply
 
 
 
Comment=Archiving %N will add .archive to the object.
 
Comment=Archiving %N will add .archive to the object.
 
 
# What to run.  Enclose in < > to run an executable that resides in the actions folder.
 
# Use %U as a token where to insert a URL list, use %F as a token to insert a file list
 
# **** REQUIRED ****
 
#Exec=gedit %F
 
 
 
Exec=<archive.py %F>
 
Exec=<archive.py %F>
 
# What type selection: [S]ingle, [M]ultiple, Any, or None (background click)
 
# Defaults to Single if this field is missing
 
 
 
Selection=S
 
Selection=S
 
 
# What extensions to display on - this is an array, end with a semicolon
 
# Use "dir" for directory selection and "none" for no extension
 
# Use "any" by itself, semi-colon-terminated, for any file type
 
# Extensions are NOT case sensitive.  jpg will match JPG, jPg, jpg, etc..
 
# **** REQUIRED ****
 
 
 
Extensions=any;
 
Extensions=any;
 
}}
 
}}
Line 96: Line 88:
 
{{hc|$HOME/.local/share/nemo/actions/archive.py|
 
{{hc|$HOME/.local/share/nemo/actions/archive.py|
 
2=#! /usr/bin/python2 -OOt
 
2=#! /usr/bin/python2 -OOt
 
 
 
import sys
 
import sys
 
import os
 
import os
Line 112: Line 102:
 
         #os.rename('%s','%s.archive') % (arg,arg)
 
         #os.rename('%s','%s.archive') % (arg,arg)
 
         shutil.move(arg, arg+".archive")
 
         shutil.move(arg, arg+".archive")
 
 
 
}}
 
}}
  
=== Meld compare ===
+
==== Meld compare ====
  
 
{{hc|$HOME/.local/share/nemo/actions/compare-save-for-later.nemo_action|2=
 
{{hc|$HOME/.local/share/nemo/actions/compare-save-for-later.nemo_action|2=
Line 150: Line 138:
 
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 <code>Quote=double</code>.

Latest revision as of 07:47, 28 May 2016

Nemo is a fork of GNOME Files. 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
  • 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. To set Nemo as the default file browser, see Xdg-open#Set the default file-browser.

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 application for "Open in terminal" context menu entry

gnome-terminal is set as the default, if it is not installed this feature will not work.

Alternatively, change the default setting with gsettings to the preferred terminal application.

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

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
  • $HOME/.local/share/nemo/actions/ for user actions

Pay attention to the name convention. Your file has to preserve the file ending .nemo_action.

Clam Scan

$HOME/.local/share/nemo/actions/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

$HOME/.local/share/nemo/actions/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;
$HOME/.local/share/nemo/actions/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

$HOME/.local/share/nemo/actions/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
$HOME/.local/share/nemo/actions/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
$HOME/.local/share/nemo/actions/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.