Configuring Nautilus

Nautilus is the file browser used in Ubuntu Linux, and is a standard part of the Gnome desktop. As a computer programmer, it is probably the most fundamental program in my toolset. It is automatically started when I log in and I use it repeatedly until I log out. It’s how I view, access and modify the elements of my computer world, the files. I want it to display a lot of information in a small area and I want it to be easy to use. More than any other, it is my “home” program. So I want it to be configured just right.

I also create new machines on a regular basis, especially virtual machines. And the first tool I use on these new machines is Nautilus. So I want it be easy and quick, preferrably trivial, to configure it the way I want it.

It turns out that all of the settings for Nautilus are stored in the configuration database (the GConf project), another standard part of the Gnome desktop. This database can be accessed with two standard tools, the GUI based gconf-editor (press Alt-F2 and enter gconf-editor), and the command line based gconftool-2. It can also be accessed indirectly through the Preferences windows of the programs that use it, like Nautilus.

Since a script using the command line tool is the easiest and fastest way to configure a new machine, that’s what I created:
[sourcecode language=”bash”]
gconftool-2 –set –type bool /apps/nautilus/preferences/start_with_toolbar False
gconftool-2 –set –type bool /apps/nautilus/preferences/always_use_location_entry True

gconftool-2 –set –type string /apps/nautilus/preferences/side_pane_view NautilusTreeSidebar
gconftool-2 –set –type bool /apps/nautilus/sidebar_panels/tree/show_only_directories True
gconftool-2 –set –type int /apps/nautilus/preferences/sidebar_width 300

gconftool-2 –set –type string /apps/nautilus/preferences/default_folder_viewer list_view
gconftool-2 –set –type list –list-type string /apps/nautilus/list_view/default_visible_columns [name,size,permissions,date_modified]
gconftool-2 –set –type string /apps/nautilus/preferences/date_format iso
gconftool-2 –set –type int /apps/nautilus/icon_view/thumbnail_size 160

gconftool-2 –set –type string /apps/nautilus/preferences/click_policy double
gconftool-2 –set –type string /apps/nautilus/preferences/executable_text_activation launch
gconftool-2 –set –type bool /apps/nautilus/preferences/enable_delete True
Basically, I just want a file system tree on the left, a list of files on the right, and a current path text field above them. Simple really. It only takes about a dozen settings to get it just right.

Lines 1 and 2 configure the top area of the Nautilus window. I don’t have much use for the toolbar because most of the buttons apply to moving around the file system, and I do that with the tree. Mostly I just want a text field with the current path in it so I can type the path, do file searches, and copy and paste the text. It would be convenient to have a few toolbar buttons to the right of the location, but I won’t waste an entire toolbar row for them. The ones I would like to see there are:

  • Up Folder to move up to the current folder’s parent,
  • Search Files to switch between showing the current path and a search mask,
  • Change View (without the text) to switch the current list view.

Lines 4 to 6 configure the size and view of the left panel. All I want here is a tree view of the file system (and other special folders). I don’t want to see file names in the tree, just folders, and I want the tree to be wide enough to view most parts of the file system without using scrollbars. I roam around this tree all the time, with several subtrees open at the same time, so I need it to be as simple and uncluttered as possible.

Lines 8 to 11 configure the view of the right panel. Here I just want to see a list of file names along with the most important properties of each file. For me that’s the size, permissions, and and a short and sweet date/time. Others may also want the owner and group names, making it exactly like an ls -l listing. I almost never use any other view, but when I do it’s the icon view, and that’s mostly for viewing image thumbnails. In which case I want the thumbnails to be big enough for my middle aged eyes to see, so I use 160×160.

Lines 13 to 15 configure how actions are handled in the list of files. I want double-click to make things happen, including launching executable files, and I want a “real delete” item on the context menu.

Comments are closed.