Extending Nautilus

Nautilus can be extended in two main ways. Through nautilus extensions, and through scrips. This section explains the difference between the two and how to install.

Nautilus Scripts

Nautilus can run scripts. Scripts are typically simpler in operation than full Nautilus extensions and can be written in any scripted language capable of being executed on your computer. To run a script choose File->Scripts, then choose the script that you want to run from the submenu.

To run a script on a particular file, select the file in the view pane. Choose File->Scripts, then choose the script that you want to run on the file from the submenu. You can also select multiple files to run your scripts on.

You may also access scripts from the context menu.

Note

If you do not have any scripts installed, the script menu will not appear.

Installing File Manager Scripts

The file manager includes a special folder where you can store your scripts. All executable files in this folder will appear in the Scripts menu. The script folder is located at $HOME/.gnome2/nautilus-scripts.

To install a script, simply copy the script to the script folder and give it the user executable permission.

To view the contents of your scripts folder, if you already have scripts installed, choose File->Scripts->Open Scripts Folder. You will have to navigate to the scripts folder with the file manager if you do not yet have any scripts. You may need to show hidden files for this, use View->Show Hidden Files

A good source to download Nautilus scripts is from the G-Scripts website.

Writing File Manager Scripts

When executed from a local folder, scripts will be passed the selected file names. When executed from a remote folder (e.g. a folder showing web or ftp content), scripts will be passed no parameters.

The following table shows variables passed to the script :

Environment variable

Description

NAUTILUS_SCRIPT_SELECTED_FILE_PATHS

newline-delimited paths for selected files (only if local)

NAUTILUS_SCRIPT_SELECTED_URIS

newline-delimited URIs for selected files

NAUTILUS_SCRIPT_CURRENT_URI

URI for current location

NAUTILUS_SCRIPT_WINDOW_GEOMETRY

position and size of current window

Nautilus Extensions

Nautilus extensions are far more powerful than Nautilus scripts, allowing more freedom where and how they extend Nautilus. Nautilus extensions are typically installed by your system administrator.

Some popular Nautilus extensions include:

  1. nautilus-actions

    This extension allows you to easily assign actions based on file type

  2. nautilus-send-to

    This extension provides a simple way to send a file or folder to another using email, instant messaging, or Bluetooth.

  3. nautilus-open-terminal.

    This extension provides an easy way to open a terminal at the selected starting location.

Note

If you are looking for the Open Terminal command which used to exist in the Nautilus right click menu by default then you should install the nautilus-open-terminal extension.


Previous
Nautilus Preferences
Next
Tools and Utilities

About GNOME · Download · Support · Community · Developers · Foundation · Contact