7.4. Managing Files and Folders with Nautilus

Nautilus is GNOME's file manager and viewer. You can use Nautilus to create folders and documents, display and manage your files and folders, run scripts, write data to a CD, and open URIs. The following sections provide an overview of the basic functions of Nautilus and a few tips on its configuration. For more information, see the help pages for Nautilus. You can open Nautilus using the menu entry or by clicking the Computer or Home icon on the desktop.

7.4.1. Navigating in Nautilus

The standard window of Nautilus is shown in Figure 7.4, “Nautilus Standard Window”. The default view of a folder's content is the icon view featuring just an icon and the filename for each file. If configured accordingly, a preview of the file's content can be provided. When you double-click a folder icon, a new Nautilus window opens, displaying the folder's content.

Figure 7.4. Nautilus Standard Window

Nautilus Standard Window

To navigate between folders, use the drop-down menu in the bottom left corner of the Nautilus window. Here, find all parent folders for the current directory up to the root file system. Select the folder you want and open it in a new Nautilus window on top of the old one. Open just the immediate parent of the current folder by clicking File+Open Parent. To close these parent folders, click File+Close Parent Folders.

If you prefer a browser-like file navigation, switch to the Nautilus browser interface by right-clicking a folder then clicking Browse Folder. A new Nautilus window opens, providing the normal functionality but with a browser's look and feel.

To navigate folders and files, you can use the Back, Forward, and Up buttons as you would in a Web browser. The functionalities and configuration options described in Section 7.4.2, “File Management” also apply to the browser interface.

7.4.2. File Management

Perform several tasks in Nautilus by simply dragging and dropping. For example, you can drag any file from the desktop and drop it onto an open Nautilus window. If you have two Nautilus windows open, you can drag a file or folder from one window and drop it onto another. To copy an item, select the item, press and hold Ctrl, then drag the item to a new location. Dragging text from an application to a folder window creates a new text document.

To move files between directories, open the source directory containing the file to move, click File+Open Location, type the path to the target directory, click Open, then drag the files to the Nautilus window holding the target directory. Files and folders can be moved to and from an open Nautilus window and the desktop.

To create multiple copies of a file, click Edit+Duplicate. For a simple cut, copy, and paste of files, use the Edit menu or right-click the file icon then select the appropriate item from the context menu that appears. To rename a file, right-click it then click Rename.

Nautilus also supports file browsing across a network. To connect to a remote server, such as an FTP, SSH, HTTP, or Samba server, click File+Connect to Server. You are then prompted for the type of server and some additional information, such as the name of the folder you want to access, the port number, and a username. When you click Connect, the remote folder is displayed as part of the Places panel menu and appears as a desktop icon. For any future connections, select the appropriate item from the Places menu and provide the necessary authentication to log in to these network folders. To close these connections, right-click the desktop icon then click Unmount Volume.

Nautilus provides basic CD and DVD burning functionality. To copy data to CD or DVD, create a directory containing the data you want to burn, click Places+CD/DVD Creator, drag the folder holding the data onto the CD/DVD Creator window, then click File+Write to Disc.

7.4.3. Editing MIME Types

MIME types determine which application should open a file when clicked in a Web or file browser. The actual file type and the MIME type of a file are closely associated with each other. An HTML file has the html file type and would be registered to have a text/html MIME type. Nautilus has built-in support for most of the common MIME types and proposes the appropriate application when you choose to open a file. In this case, it would propose a Web browser.

To edit a MIME type:

  1. In a Nautilus window, right-click a file of the MIME type to change.

  2. Click Properties+Open With.

  3. Click Add to search for a suitable application.

  4. Select the application to use then click Add.

  5. Click Close to exit the dialog.

Figure 7.5. Editing the MIME Type

Editing the MIME Type

Even if a MIME type has not yet been registered, the procedure is the same. These modifications are applied globally, which means that any file of this type is subsequently opened by the defined application.