| Chapter 6. Nautilus File Manager |
6.13.a. 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 |
(Next: Nautilus Extensions)
...................................................................................
Chapter 6. Nautilus File Manager
Table of Contents
6.1. Introduction
6.1.a. File
Manager Functionality
6.1.b. File
Manager Presentation
6.2. Spatial Mode
6.2.a. Spatial
Windows
6.2.b. Spatial
Window Components
6.2.c. Displaying
Your Home Folder in a Spatial Window
6.2.d. Displaying
a Parent Folder
6.2.e. Closing
Folders
6.2.f. Displaying
a Folder in a Browser Window
6.2.g. Opening
a Location
6.3. Browser Mode
6.3.a. The
File Browser Window
6.3.b. Showing
and Hiding File Browser Window Components
6.3.c. Using
the Location Bar
6.3.d. Displaying
Your Home Folder
6.3.e. Displaying
a Folder
6.3.f. Displaying
a Parent Folder
6.3.g. Using
the Tree From the Side Pane
6.3.h. Using
Your Navigation History
6.4. Opening Files
6.4.a. Executing
the Default Action
6.4.b. Executing
Non-Default Actions
6.4.c. Adding
Actions
6.4.d. Modifying
Actions
6.5. Searching For Files
6.5.a. Saving
Searches
6.6. Managing Your Files and Folders
6.6.a. Using
Views to Display Your Files and Folders
6.6.b. Selecting
Files and Folders
6.6.c. Drag-and-Drop
in the File Manager
6.6.d. Moving
a File or Folder
6.6.e. Copying
a File or Folder
6.6.f. Duplicating
a File or Folder
6.6.g. Creating
a Folder
6.6.h. Templates
and Documents
6.6.i. Renaming
a File or Folder
6.6.j. Moving
a File or Folder to Trash
6.6.k. Deleting
a File or Folder
6.6.l. Creating
a Symbolic Link to a File or Folder
6.6.m. Viewing
the Properties of a File or Folder
6.6.n. Changing
Permissions
6.6.o. Adding
Notes to Files and Folders
6.6.p. Using
Bookmarks For Your Favorite Locations
6.6.q. Using
Trash
6.6.r. Hidden
Files
6.7. Item Properties
6.8. Modifying the Appearance of Files
and Folders
6.8.a. Icons
and Emblems
6.8.b. Changing
the Icon for a File or Folder
6.8.c. Adding
an Emblem to a File or Folder
6.8.d. Creating
a New Emblem
6.8.e.
Changing Backgrounds
6.9. Using Removable Media
6.9.a. To
Mount Media
6.9.b. To
Display Media Contents
6.9.c. To
Display Media Properties
6.9.d. To
Format a Floppy Disk
6.9.e. To
Eject Media
6.10. Writing CDs or DVDs
6.10.a. Creating
Data Discs
6.10.b. Copying
CDs or DVDs
6.10.c. Creating
a Disc from an Image File
6.11. Navigating Remote Servers
6.11.a. To
Access a remote server
6.11.b. To
Access Network Places
6.11.c. Accessing
Special URI Locations
6.12. Nautilus Preferences
6.12.a. Views
Preferences
6.12.b. Behavior
Preferences
6.12.c. Display
Preferences
6.12.d. List
Columns Preferences
6.12.e. Preview
Preferences
6.13. Extending Nautilus
6.13.a. Nautilus Scripts (you are here)
6.13.b.Nautilus
Extensions

