Exploring the Gentoo File Manager

One for All

Hagen Höpfner

KDE users choose Konqueror, Gnomers use Nautilus, and command-line fans extol the virtues of Midnight Commander. Gentoo gives you the best of all these worlds – a desktop independent file manager.

Many Linux users primarily associate the name Gentoo with a popular do-it-yourself distribution. In fact, the distribution has nothing to do with the file manager of the same name. As the file manager’s homepage tells you [1], both projects are aware that they share a name, and neither of them minds. This would be unthinkable for commercial software, but it works fine for Gentoo. Both Gentoos have something in common, flexibility! The file manager gives you an enormous range of configuration options to meet your needs, and that makes it an indispensable companion on your desktop.

Installation

Many distributions, including Suse, Debian, or Mandrake Linux, have their own Gentoo packages, so you can use your distro’s package manager to install Gentoo. If your distribution does not have a binary, or if you prefer to use the latest Version 0.11.54, you will need to build from the source code. After downloading the archive from [2], unpack the file and change to the directory that this step creates. Gentoo is based on the Gimp Toolkit (gtk), version 1.2.x, so you will need the matching developer packages to build and install the file manager. Make sure the requirements are fulfilled, and then go on to build and install Gentoo with the normal three commands: ./configure, make, and su -c “make install”.

Figure 1: Gentoo displays a directory tree in the left and right-hand panels.

If the make install phase quits with an error message – and this is what happened in our lab with Suse Linux 9.1 – the makefile is probably to blame. To remedy the error, simply change the following line in the po/Makefile below the source code directory:

MKINSTALLDIRS = U
$(top_builddir)/./mkinstalldirs

to

MKINSTALLDIRS = mkinstalldirs

Then enter su -c “make install” once more, and all should be well.

Figure 2: Using regular expressions to select files.

Getting Started

You can launch your latest addition by typing gentoo & as a non-privileged user. Gentoo is security-aware and gives you an error message if you try to launch it as root. You can avoid the security mechanism by specifying --root-ok when you launch the program. This tells Gentoo to assume you know what you are doing and to sit back and relax.

After the launch, Gentoo gives you a two-panel display with a button bar (Figure 1). There is also a list of bookmarks in the lower left-hand corner of the window. If you want the right-hand panel to display your home directory, left click on the top line of the directory tree in that panel. This enables the right-hand panel; you can now click the Home button to move to your home directory.

A double click will take you to directories for which Gentoo does not give you a button. If you prefer, you can type the absolute pathname for the folder into the text box below the directory display. The box supports autocomplete to save you from wearing out your fingers; just press the Tab key to move to a folder. Gentoo also remembers folders it has seen before. Clicking on the icon left of the text box takes you up one level, and the button to the right of the box displays or hides hidden files.

The button bar also gives you point and click support for common file operations. Change to the source directory in the left-hand panel and to the target directory in the right-hand panel. Then select a file and click Copy to copy the file. In a similar way, Make Link creates a symbolic link and Move moves the selected file. If you use the Clone, Link Clone or Rename buttons instead, the action relates to the directory where the files are located. When you clone a file, Gentoo prompts you to enter a new name for the file before storing the copy under that name.

There are three buttons that make file selection easier: All, Toggle, and SelectRE. As the names suggest, All selects all files and directories, Toggle reverts the current selection, and SelectRE pops up the dialog shown in Figure 2, where you can enter a search pattern to select files that match that pattern. For example, typing rep*txt gives you any files that start with rep and end with txt.

Figure 3: This menu allows you to modify Gentoo’s behavior.

Tailored

When you double click a file, Gentoo performs a pre-defined action. For example, graphics files are linked to the xv viewer. If you prefer to use a different program, you can specify that program in the Gentoo configuration dialog (Figure 3).

Clicking ConfigureÖ takes you to the configuration. The tree on the left gives you the individual categories. When you select a category, Gentoo shows you the options for that category on the right. To modify the program assignment for graphics files, look for the Commands option. Modify the entry for view_image below Definitions. The default command here is External xv {Fup}, where External tells Gentoo that xv is an external executable to which it should pass the path to the file the user has double clicked, {Fup}. Select the command and replace the xv entry with a program of your choice, such as display.

Figure 4: Telling Gentoo which bookmarks to display in the bookmark bar.

There are a number of interesting options in the File Recognition section; this section is where you define the way various file types are displayed (icons, color, etc.) You can also modify the default behavior of action buttons and bookmarks below Buttons. For example, to create a bookmark for the directory /mnt/stick/, enter the folder name in the bookmark dialog (Figure 4.) You will find this below Buttons | Definitions after changing the Sheet entry from Default to Shortcuts.

Add row adds a new button bar that can contain multiple columns. As the bar is quite narrow, it does make much sense to use more than one column. If you opt to add a button bar, Gentoo first creates a new header and inserts two actions. Primary allows you to specify the action to perform on left clicking. Secondary does the same thing for the middle button on your mouse. However, Gentoo will not do anything unless you assign a name in Label. We chose USB Stick for our example. As we want to change to the mount directory for the USB stick on left clicking, we need the following Command entry DirEnter ‘dir=/mnt/stick’.

Conclusions

Gentoo is a highly configurable, GUI-based file manager. If you can do without drag and drop, and if are not too busy to spend a few minutes configuring the file manager, Gentoo will give you a tool you can tailor perfectly to your own environment. And if you need a help file to get you through the configuration jungle, the detailed (although incomplete) documentation in the docs subdirectory of the Gentoo source code will probably have the answers to most of your questions.

INFO

[1] Gentoo: http://www.obsession.se/gentoo/

[2] Gentoo source code: http://prdownloads.sourceforge.net/gentoo/