exclusive content published on May 10, 2006
The Nautilus program in GNOME is not only the default file manager, it
creates and manages the desktop. While it looks simple on the surface,
there is a lot of hidden power under the shell. The latest version of
Nautilus is 2.14.0, which is included in Fedora Core 5. That's the one
I poked with a stick.
GNU/Finder?
Nautilus has something of a colorful past. It was created by a company
called Eazel, staffed by ex-Apple programmers that wanted to bring ease
of use to the Linux desktop. A noble goal. I remember the early
versions were beautiful, buggy and dog slow. Eazel burned through it's
VC money and closed shop, but set the Nautilus code free. GNOME adopted
the code and morphed it into the Nautilus of today. It is still
beautiful, but now solid and reasonably quick.
You can still see vestiges of the Mac Finder in Nautilus from the
rotating triangles that open a folder in tree view, the meta information
that is stored about each directory, and the hidden trash directories
that are created on each volume where you dare move a file to the trash.
The visual touches are appealing; the droppings not so much. On with
the list...
One: Adding Delete
The ~/.Trash directory is where files are moved if you
delete local files. On mounted volumes, Nautilus will create a hidden
.Trash-uid directory if you move a file to the trash, as long as
you have the file permissions.
I'd rather have Nautilus simply delete files on mounted volumes instead
of creating hidden trash folders. To add a true delete option, go to
Edit > Preferences, Behavior tab and select the "Include a delete
command that bypasses Trash" option. This adds a delete option to the
menus. If you delete a file with the delete option, Nautilus won't
create a hidden trash folder on a mounted volume.
Two: Emblems and Notes
Emblems are small icons that can be added to a directory or file to give
it additional meaning. You can assign an emblem to a file by selecting
the file and choosing File > Properties. From there, select the Emblems
tab and choose the emblem(s) you want. They are only visible in
Nautilus and don't modify the actual file in any way. Since
Nautilus creates and manages the desktop, files dragged to the desktop
retain their emblems.
Notes are free form text that can be assigned to a file on the
Properties, Notes tab. Like emblems, they do not modify the actual
file in any way. When you assign notes to a file, the file gets a
note emblem.
Three: Multiple emblems
Nautilus can display up to four emblems
|
|
on the same directory or file
(in icon view), one in each corner. In list view, it only displays one.
If multiple emblems are assigned to a file in list view, the first one
assigned is displayed.
|
If you have an emblem and a note assigned, the note emblem appears to
override the others in list view.
Four: Metafiles
Both emblems and notes are stored in XML files, one per directory, in
~/.nautilus/metafiles/. To be more accurate, a reference to
the emblems is stored in the XML file
|
The emblem icons are in
/usr/share/pixmaps/nautilus/Bluecurve/ (in Fedora Core 5).
In each XML file, there is a tag called <keyword> and emblems are
stored in the "name" property. Each emblem assigned creates a new
<keyword> tag. Notes are stored in the <file> tag in the
"annotation" property. Here is a snippet of a metafile with the cool
emblem and a note:
<file name="workfile.txt" timestamp="1147178708" annotation="this is
a note added to the workfile.txt file."><keyword
name="cool"/></file>
In addition to information about emblems and notes, the metafiles store
things like window size, location, view mode, and backgrounds.
Five: View Modes
Two view modes are available, spatial and browser. Nautilus uses the
spatial mode by default, which opens a new window for each folder. The
browser mode offers a left pane tree view and opens each folder in the
same window.
To switch the default to browser mode, go to Edit > Preferences, then
the Behavior tab and check the "Always open in browser windows" box.
Note: the menu options change slightly in browser mode. New options are
available and some options disappear.
Six: Triple slashes and Special URIs
Nautilus uses uniform
resource identifier (URI) syntax. For example, local files can be
referenced in the location bar using the file:// prefix. The URI for
the local root directory becomes file:/// (file:// + /), while the /etc/
directory is file:///etc/. The triple slash looks strange at first
until you get used to it.
A number of special URIs are recognized. These include:
- computer:/// - objects for each mounted device, plus the network
- network:/// - available networks to browse
- burn:/// - a virtual folder for burning data CDs/DVDs
- smb:/// - available windows/samba network resources
- x-nautilus-desktop:/// - desktop objects and icons
- file:/// - local files
- trash:/// - local trash directory
Each of these URIs can be abbreviated by eliminating the triple slashes.
For example, computer: and trash:.
The start-here:/// special URI that was available in older versions has
been removed.
Each special URI has an associated XML file in
~/.nautilus/metafiles/
just like real directories. Since the forward slash is a shell special
character, the metafile names use "%2F", the ASCII code for forward
slash. So, the name of the burn:/// metafile is
"burn:%2F%2F%2F.xml". This makes directory listings hard on the eyes.
Seven: The burn:/// illusion
|
If you select Go > CD/DVD Creator from the menu, or Go > Location > burn:///,
you see the CD/DVD Creator folder with a "Write to Disc" button.
You can drag directories or files into the burn folder and it looks like
they are copied somewhere. A clever illusion. The truth is that a
reference to each directory or file name is tracked by the
mapping-daemon. Nautilus uses these references to determine
what gets burned to disc.
|
|
Eight: Nautilus Scripts
You can create scripts to run on a selection of files using any scripting
language including shell, Perl, PHP, etc. This feature won't appear in
the Nautilus menus until you install at least one executable script in
~/.gnome2/nautilus-scripts/.
After installing a script, navigate to the
nautilus-scripts directory, then a Scripts option will appear in
the File menu and in the right click menu. You can execute any script
against files you have selected in Nautilus. This is a
powerful way to customize Nautilus using your favorite scripting
language.
Nine: Bookmarks and History
When you bookmark a directory, the location is saved in a hidden file
called ~/.gtk-bookmarks. Bookmarks are stored using the URI syntax.
A bookmark to the /tmp directory is stored like this:
file:///tmp
Nautilus saves a history of the last 10 directories you have visited.
When you browse the eleventh directory, the oldest one drops off
the list. The history is not saved between sessions and is not written
to any file. It lives in the Nautilus process memory and is
lost when you logout.
History is not lost if you close all file manager windows because
Nautilus manages the desktop. It continues to run and will preserve the
history list until it ends, usually when you logout of GNOME.
Living with Nautilus
GNOME has come a long way in the last few years and so has Nautilus.
Most of the original complaints about it have been rectified, though the
switch to spatial view (long ago) caused some dissent. I have
found the latest version of Nautilus pleasant to work with and a
competent file manager.

This work is licensed under a
Creative Commons Attribution-NonCommercial 2.5 License.