Table of Contents

Name

xplore - yet another Motif file manager

Synopsis

xplore [options ...]

Description

Xplore is a powerful and highly configurable Motif file manager with an Explorer-like user interface. Besides the usual tree and file views, xplore also has a "shelf", a kind of clipboard inspired by the NeXT file manager, and a "log" pane for capturing output from launched programs. The builtin automounter allows you to access special devices in a transparent manner. Files can be moved and copied using simple mouse operations, and you can execute type-specific shell commands when a file is opened, used as the target of a drag and drop operation, or manipulated using popup menus. File types can be defined in terms of arbitrary filename and MIME type patterns. Full keyboard navigation is also supported, including an incremental filename search facility. Last not least, xplore speaks all standard X11 session management protocols and thus integrates nicely with most popular desktop environments.

Options

Besides the standard toolkit options (see X(1) ), the following command line switches are recognized:
-C
Redirect output streams to /dev/console.
-c config-dir
Specify the name of the configuration directory (~/.xplore by default), in which xplore looks for the user's private configuration and resource files (see CUSTOMIZATION).
-clone session-id
Clone the given session (see SESSION MANAGEMENT).
-help
Print a short help message and exit.
-nosm
Disable X11R6 session management features (see SESSION MANAGEMENT).
-o cpp-options
Specify the options to pass to the C preprocessor when parsing the xplorerc configuration file (see CUSTOMIZATION).
-p directory
Specify the name of the directory to be displayed on startup (default is usually the current directory, i.e., the directory in which xplore is started).
-s shelf
Specify the name of the shelf to be selected initially (see USING THE SHELF).
-session session-id
Start or continue the given session, and restore the previously recorded application state (see SESSION MANAGEMENT).
-tree -file -shelf -log
Specify the panes to be shown at startup (see USAGE below).
-version
Print version information and exit.

Startup

You can invoke xplore by just typing the command xplore in an xterm, or directly from your window manager or desktop environment, provided that you created a corresponding desktop icon or menu entry. When starting up for the first time, xplore asks you whether you want to run the local setup script which installs some configuration files and a preconfigured shelf directory in your home directory. Depending on your local setup, the script may also perform other site-specific initialization. You can bail out at this time if you do not want to do this, but you need to go ahead if you want to use xplore. Next xplore runs the startup script which is there to perform some other initializations each time xplore is invoked. After the first-time setup you will find your personal copies of the configuration files and the startup script in the ~/.xplore directory so that you can modify them according to your needs (see CUSTOMIZATION below).

Usage

Most of this should be fairly obvious. It is assumed that you are familiar with the basic principles of using Motif applications (if not please refer to the OSF/Motif User's Guide).

The main window of xplore is divided into up to four "panes:" the shelf, which is used as a kind of clipboard; the tree pane which shows the directory tree; the file pane which shows the contents of the current directory (the name of which is displayed in the title bar of the xplore window); and the log pane which captures the output from programs launched from xplore.

At the bottom of the main window you find a status line which displays useful information about the current directory and automounted devices. The status line is also used temporarily to give feedback for some operations. In particular, when a copy or delete operation is in progress, the name of the current file is shown in the status line, and it is possible to abort the operation at any time by typing Ctrl+C.

Files in the file pane are selected using the left mouse button (using any of the selection techniques described in the Motif User's Guide), or the Select, Select all and Invert all options of the File menu. The Filter command allows you to restrict the set of files shown in the file pane to files matching a given pattern. The Select and Filter commands accept a space-delimited list of filename patterns. The usual wildcards, i.e., *, ? and character classes, are recognized. As one expects, the remaining operations in the File menu (Move, Copy, Link, Delete, etc.) apply to the list of selected files in the file pane.

Selected files can be dragged from the file pane with the middle mouse button to the background of the file pane, as well as a directory in the file or tree pane, to perform move, copy (press Ctrl while dragging) or link (press Shift + Ctrl) actions. In an analogous manner you can also drag a directory from the tree pane. Valid drop sites are indicated by showing the name of the corresponding item in the status line. Dropping selected files on another (non-directory) file executes the drop action of that file, as configured in the xplorerc file (see CUSTOMIZATION below). If the file has no associated drop action, but is an executable, it is invoked on the selected files through the shell. Of course, files can also be transferred between different xplore windows.

Pressing the right mouse button on a file in the file pane pops up a menu with operations for that file (including type-specific commands as configured in the xplorerc file). A double click with the left mouse button on a directory icon in the file pane shows that directory in the file pane. Double clicking on another file invokes the push action of the file. In any case, double clicking on a file is equivalent to the Open command in the File menu. If a file has no associated push action, but is an executable, it is invoked through the shell.

In the tree pane, a single click with the left mouse button is used to select the current directory to be shown in the file pane. To expand/collapse a subdirectory shown in the tree pane, click on the outline (arrowhead) symbol in front of the corresponding directory icon.

Xplore automatically updates the display of the panes in regular intervals whenever directory contents change. To force such an update immediately, use the Update option of the Options menu. Automatic updates can also be inhibited using the Automatic updates option of the Options menu.

Using the Shelf

The shelf provides a kind of work area where the user can place (links to) directories, applications and other files. It is also useful as a clipboard for moving and copying files. Xplore allows you to set up multiple shelves for different purposes. The shelf is associated with a fixed directory (usually ~/shelf) which is created automatically at startup if it does not yet exist. Inside the shelf directory there are different subdirectories which correspond to the different shelves configured in the xplorerc file. You can switch between shelves using a strip of tabs, which is usually located right above the shelf pane.

The shelf functions pretty much like the file pane. A restricted set of file commands is available in the Shelf menu. The file popup menu can be used on shelf items as usual. Furthermore, files can be double-clicked, selected and dragged from the shelf, and the shelf can also be used as a drop site for items dragged from the tree or file pane. The shelf differs from the file pane in that directories, executables and symbolic links are treated specially. When double-clicking on a directory in the shelf, the contents of that directory are shown in the file pane. Executables in the shelf are normally executed in the current directory shown in the file pane. Furthermore, when a push, drop or menu action is invoked on a symbolic link, the action applies to the directory or file pointed to rather than the link itself.

These features turn the shelf into a useful repository for shortcuts to frequently used files, directories and applications. For instance, you can link the directories and documents you are currently working with to the shelf and then open these items by simply double-clicking on the corresponding icon in the shelf. Or you can add links to frequently used commands and then run these command in the current directory with a single double-click.

Using the Log

As already mentioned, the log pane is used to capture output from programs started by xplore. It is usually not visible at program startup, but will pop up as soon as there is something interesting to show. You may also invoke xplore with the -C option if you prefer to watch xplore's output streams in your console window, e.g., xterm -C. But note that this only works if you have access to the /dev/console device, which is not available to ordinary users on some systems.

The contents of the log are not editable, but you can select text in the log pane with the left mouse button and paste it to other applications, like a text editor. Double clicks select words, triple clicks lines and quadruple clicks the entire contents of the log pane.

The log pane also has a popup menu accessible with the right mouse button. The menu offers a single option, Locate, which allows you to quickly locate a file or directory listed in the log. This is useful, in particular, with the Find command, see STANDARD SETUP below. The Locate command operates on the text in the current line or, if the menu was invoked over the selection, the currently selected text. It is checked that the selected text is a valid filename; if so, the directory containing the file is shown in the file pane with the file selected. (If the selected text ends in a slash /, it is assumed that it denotes a directory which will be opened in the file pane.)

Keyboard Traversal and Shortcuts

Many menu commands can also be activated using keyboard shortcuts. The shortcut for a command is shown in the corresponding menu, with the notations Shift+X, Ctrl+X and Alt+X meaning that you should press key X along with the Shift, Ctrl or Alt modifier, respectively. The shortcuts can be configured in xplore's application defaults file.

If keyboard traversal is enabled (i.e., the keyboardFocusPolicy is XmEXPLICIT, which is the default), then you can also traverse the tab strip and the panes with the keyboard. In this case the current focus item is indicated with a borderline. You can use Tab and Shift+Tab to cycle through the different panes and the tab strip, and the cursor keys to travel through a pane or the tab strip. In the tab strip and the tree pane, a selection can be made with the Space key. This is equivalent to selecting the corresponding item with the mouse. Directories in the tree pane can be expanded and collapsed using Ctrl + cursor right/left. In the shelf and the file pane, selection of a single item is made implicitly by traversing the pane with the cursor keys, and the push action of the current item can be invoked with the Return key. To select more than one item, you can switch to "add mode" (indicated by a dashed borderline around the focus item) using Shift+F8 and then select/deselect individual items with the Space key. Pressing Shift+F8 again reverts to the normal selection mode. In detail view (see the VIEW SUBMENU below), contiguous groups of items can be selected in the file pane using Shift together with the cursor keys, and in add mode it is also possible to specify a contiguous range by selecting the first element, traversing to the last element using the cursor keys and then pressing Shift+Space.

If keyboard traversal is enabled, xplore also provides an incremental filename search facility, which can be used to quickly locate a file in the shelf or the file pane. With the input focus either in the shelf or the file pane, simply start typing the prefix of a filename, and xplore will give focus to the first matching icon gadget (or ring the bell if the given prefix cannot be found). To give a visual feedback of incremental search mode, the filename prefix accepted so far is shown in the status line. The incremental search ends as soon as you type some keyboard command like Space or Return (which selects/opens the current item), or perform an analogous mouse action. You can also explicitly terminate the search by hitting the Esc key.

Devices

Xplore includes an automounting facility which allows you to access special "devices" in a transparent manner. For this purpose, mount and unmount commands for the corresponding mount points can be configured in the xplorerc file (see CUSTOMIZATION). Whenever such a mount point is accessed (e.g., by opening a directory contained in it, or by executing a copy or move operation), xplore automatically carries out the corresponding mount action for the device. When the device is no longer needed (e.g., after having carried out the requested operation, after closing the last directory on the device, or when exiting xplore), it is unmounted automatically.

Mount and unmount commands are always executed in the directory in which xplore was started. Thus you should make sure that this directory exists through the entire xplore session (otherwise xplore will complain that it cannot chdir to the startup directory and will be unable to execute those commands). The best idea is to start xplore from your home directory which presumably will exist for a long time.

Automounted devices are usually represented by corresponding icon gadgets in a tiny panel on the right end of the status line, which provides a convenient means to quickly check the status of these devices. The xplorerc file specifies which devices will be represented, and which icons and labels are used to indicate the devices. Unmounted devices are indicated by a stippled label. Furthermore, "premounted" devices (i.e., devices which have already been mounted by another program or the system, see below) are shown using a special foreground color.

Note that xplore cannot automatically detect that the user changes removable media like floppies and cdroms. Therefore, before removing such media, you have to make sure that the corresponding device is unmounted. For this purpose, xplore provides the Unmount (Ctrl+G) and Unmount all (Shift+Ctrl+G) commands in the Options menu which can be used to explicitly unmount the file system currently shown in the file pane, or all devices which have been automounted by xplore, respectively. After changing media, you can remount the device by simply reopening the corresponding mount point (e.g., by reselecting the directory in the tree pane). You can also use the Reread (Ctrl+R) command of the Options menu to remount all devices and reread the contents of the panes. The Unmount all command is also useful to quickly unmount all mounted file systems before exiting X.

Xplore keeps track of the system's mount table, and will only mount those devices which have not already been mounted by other programs in general or other xplore windows in particular. Furthermore, each instance of xplore will only try to unmount those file systems which it has actually mounted successfully. If a mount or unmount operation fails, you are given the option to retry, ignore or cancel the failed operation. If you ignore the failed operation, xplore will pretend that the operation has succeeded. You can then try to carry out the failed operation manually. In particular, if you ignore a failed unmount operation, the corresponding file system becomes "premounted" which means that you will have to unmount it manually. You can also entirely turn off the checking of mount/unmount operations, using the Check mounts option of the Options menu. (Disabling this option should be a last resort, since without mount checking xplore may get confused about the state of the file systems it manages.)

Customization

After the first-time setup, your ~/.xplore directory contains some files which you can edit according to your needs. These are your personal startup script and the xplorerc and magic configuration files. Initially these files are simply copies of the system-wide configuration files which are located in the xplore library directory (usually /usr/X11/lib/X11/xplore). If you delete any of these files, the corresponding system-wide defaults will be used instead.

As already mentioned, the startup script is run each time an instance of xplore is started. Options given on the xplore command line are passed on to the script so that the script can decide which actions to perform. The distributed startup script just makes sure that you have a console window when xplore has been invoked with the -C option. You can edit your personal copy of the startup script if you need to perform other kind of initializations.

File types, automounted devices, shelves and the contents of the command menu are configured in the xplorerc (or the system-wide system.xplorerc) file. The syntax of this file is described in Section CONFIGURATION FILE below. You'll probably want to edit this file to reflect your local setup and preferences. In particular, take a look at the device descriptions at the beginning of the file. And if you have CDE, GNOME or KDE installed, you might wish to uncomment the corresponding #define at the beginning of the xplorerc file, which replaces vanilla X11 programs with applications from the corresponding desktop environment.

To determine file types, xplore uses both filename patterns and MIME types derived from magic byte sequences at the beginning of a file. The latter are specified in the magic file. This file has the same general format as the UNIX magic(4) file used by the file(1) command, with some xplore-specific extensions for handling special kinds of files like symbolic links and directories (see the xploretype(1) manual page for details).

If you do not like editing configuration files, you can configure file types using the File type dialog in the File and Shelf menus (see CHANGING FILE TYPES AT RUNTIME for details). This is also quite useful for quickly changing or adding a file type "on the fly".

In general, xplore looks for your personal startup, xplorerc and magic files in the directory specified with the -c option; ~/.xplore is only the default. By specifying different directories with the -c option, you can manage different private setups with ease.

A lot of other options can be set by means of standard X11 resources. System-wide defaults for these are in xplore's application defaults file (usually /usr/X11/lib/X11/app-defaults/Xplore). The system-wide defaults can be overridden with a defaults file in your personal configuration directory. Frequently-used options can also be changed using the View and Preferences submenus of the Options menu. Use the Save defaults command to save all global options, including the size of the main window, the layout of the panes and the color scheme selected with the Color scheme command, to your defaults file. (The defaults can also be saved automatically when xplore exits, if you enable the Autosave defaults option in the Preferences menu. But this can cause undesirable effects if you work with several different xplore windows simultaneously, and hence is disabled by default.)

The defaults file is an ordinary resource file which is read by xplore automatically when it starts up, and is merged with the resource settings in the application defaults file (as well as other global resource settings, such as, e.g., settings in your .Xresources or .Xdefaults file). You can also edit this file using any text editor. The settings modified by xplore reside in a special section which is overwritten each time the Save defaults command is used. The remaining contents of the file are left unaltered, so that you can add other resource settings yourself. Just make sure that you do not edit the lines marking the beginning and end of xplore's special sections in the file.

Session Management

Xplore also provides its own session management functionality which is controlled with the -session command line option, the Save session and Clear session commands in the Options menu, and the Autosave session option in the Preferences submenu. This does not rely on any particular session management protocol, and hence should work on any type of X11 system, as long as your environment is set up to read and record the WM_COMMAND property, and restart applications accordingly.

If your environment does support X11R5 or R6 session management, and the Autosave session option is enabled (which it usually is by default), then no special actions are needed to save your current xplore sessions. Xplore responds to the appropriate requests from the session or window manager by saving its current state in such a manner that the session is restored the next time the application is restarted. This should work out of the box if you are running clients like xsm(1) or xtoolplaces(1) , or any desktop environment which supports X11R5 or R6 session management, like OpenLook, CDE, KDE and GNOME. Other desktop flavours might need some tweaking.

If your environment only has X11R4 session management (i.e., it just uses the WM_COMMAND property to restart applications), you will have to save the state of your application manually with the Save session command.

This is probably all you ever need to know about xplore's session management, but if you want to learn about all the gory details, then read ahead.

In xplore's session management, each session has its own unique session id, and the state of the application is stored in an associated session file. Session files are ordinary resource files named hostname-session-id, which are kept in the user's configuration directory. An existing session can be restarted by specifying the corresponding session id with the -session command line option. Usually, this will be taken care of by your desktop environment, which records the command lines of running applications when saving the desktop state or when logging out, and restarts these applications when you log in again. You can also "clone" a given session by specifying the session id with the -clone option; the new instance will then get its own session id, but will use the initial settings from the cloned session.

A session file exists until an xplore instance continuing the session is exited, at which point the session is terminated and the corresponding session file is deleted. You can also delete the current session without exiting xplore, with the Clear session command. (Note, however, that to make sure that your session will not be auto-saved at a later time, you will also have to disable the Autosave session option.)

The Save session command saves the current state of the application in the current session file. It uses whatever session id was specified with the -session option on the command line, or generates a new session id if no -session option was given. In the latter case, the actual session id chosen by xplore is recorded in the command line which will be used by your environment to restart the application. In any case, the restart command is also updated to reflect the current window geometry (-geometry toolkit option) and, if a directory and/or shelf was specified with -p/-s, then those options are also modified according to the current state. (This is necessary because command line options always take precedence over resource values in the defaults files.)

If the Autosave session option is enabled then xplore also automagically saves the current session whenever it receives an appropriate message from the session or window manager. This works with both the X11R5 WM_SAVE_YOURSELF and the X11R6 protocol. The support for X11R6 session management features is triggered by the presence of the SESSION_MANAGER variable in the environment in which xplore is started. You can also forcibly disable X11R6 session management with the -nosm command line option or the nosm resource, in which case xplore falls back to the X11R5 protocol. This might be useful to work around X11R6 session managers which do not work correctly with xplore.

If your system does not provide session management, you can make your own with the xtoolplaces(1) program. This programs saves the state of running applications in the ~/.xtoolplaces file, which can then be executed from your X session (~/.xsession) or init script (~/.xinitrc). If you don't have xtoolplaces either, you can still start several different xplore sessions from your session or init script, by specifying the session ids yourself, like so:


xplore -session 1 &
xplore -session 2 &

You will then have to save each of your sessions manually with the Save session command. Obviously, if you do this you should be careful not to use the same session id twice.

Menu Commands

The following pulldown menus can be accessed through the menu bar in the main window. Note that all these menus have tear-off controls (the dashed lines at the beginning of the menus) which allow you to keep the menus as separate windows on the screen, where they remain posted until they are closed explicitly. This is particularly useful if a submenu, such as the Command or View menu, is accessed frequently.

FILE MENU

File manipulation operations. These commands apply to the file pane.

Open

Open the selected file (i.e., execute its push action).
Command

Pops up a menu of global commands as configured in the xplorerc file. (Clicking on the tear-off control at the top of the menu gives you a kind of toolbar which is convenient if the command menu is accessed frequently.)
Rename...

Rename the selected file. (In fact this is nothing but a specialized form of the Move command - see below - in which the current name of the file is displayed as a default for the new name.)
Move...
Copy...
Link...

Move, copy or link the selected files to the specified target. If multiple files are selected then the target must be a directory. The target may denote an absolute path or a relative path w.r.t. the current directory; ~ denotes the user's home directory. Existing files of the same name are overwritten or renamed, depending on the current status of the Backups option (see OPTIONS MENU below). If the Confirm overwrite option is enabled, the user is prompted for confirmation before an existing file is overwritten or renamed.
Delete

Remove the selected files. The user is prompted for confirmation if the Confirm delete option is set. Confirmation for the deletion of individual directories and files can be requested using the Confirm delete dir and Confirm delete file options. Please note that this operation is destructive, i.e., there is no provision for recovering the deleted files later. As a safer alternative, you can use the trashcan shelf included in the standard setup (see STANDARD SETUP below).
Properties...

Pops up the Properties dialog which allows you to view and change attributes of the selected files (owner, group, permissions and such). Note that changes to properties simultaneously apply to all selected files. This allows you to change owner, permissions etc. for a whole collection of files with one command. Also note that the permission toggles cycle through three states: set, unset and indeterminate. The indeterminate state is used to indicate permissions which should be left unchanged; it is also used initially for permissions which take on different values for different files in the selection.
File type...

Pops up the File type dialog which allows you to add new and edit existing file types "on the fly". It is also useful for viewing the action bindings of a file. The dialog allows you to edit the patterns, comment, icons and the action list (push, drop and menu actions) of the file type associated with the selected file. The Add button adds a new type with the given specifications, the Replace button changes the specifications of the current type, and the Delete button can be used to remove the current type. (The Replace and Delete operations are only available for the "user-defined" types, i.e., the types defined with this dialog. "Predefined" types, i.e., types defined in the xplorerc file, can only be replaced or deleted by editing the xplorerc file accordingly. You can still add a new type overriding the predefined type, however.) Please refer to Section CHANGING FILE TYPES AT RUNTIME below for a closer description of this option.
Select...

Select a set of files in the file pane by specifying a filename pattern. The usual wildcards (*, ?, character classes) are recognized, and multiple patterns can be specified by delimiting the different patterns with whitespace. The Replace button is used to define a new selection. With the Add and Remove buttons, you can add files to or remove them from the current selection, respectively.
Select all

Select all files in the file pane (except the parent directory).
Invert all

Invert the set of selected files in the file pane.
Filter...

Specify a pattern of files to be shown in the file pane. The format of the filename pattern is the same as that of the Select command. This operation allows you to restrict the set of files shown in the file pane; the current filter pattern is shown in the status line. Use the Clear button in the Filter dialog to remove the current filter pattern.
Quit

Terminate xplore.

DIRECTORY MENU

Directory operations.

Make directory...

Create a new directory.
Change directory...

Change the current directory shown in the file pane. The new path may be specified using an absolute path or a relative path w.r.t. the current directory; ~ denotes the user's home directory.
Parent

Go up one level to the parent of the current directory.
Home

Go to the user's home directory.

SHELF MENU

This menu provides some commands which are analogous to those of the File menu, but apply to the currently selected shelf.

OPTIONS MENU

Options and commands to control the display of the panes and the behaviour of various commands. This menu contains two submenus, the View and the Preferences menu (described below), as well as the following commands:

Update

Force an immediate update of the panes.
Reread

Force the contents of the panes to be reread. This command also remounts and rereads the contents of directories which have previously been unmounted with the Unmount and Unmount all commands (see below).
Unmount

Unmount the file system currently shown in the file pane and update the panes accordingly. Note that this only works for those "automounted" file systems which are managed by xplore (see Section DEVICES).
Unmount all

Unmount all automounted file systems and update the panes accordingly.
Clear log

Clear the log pane.
Color scheme...

Set colors from a resource file. Some nice color schemes are included in the distribution and can be found in the schemes subdirectory of the xplore library directory.
Save defaults

Save the current settings in the View and Preferences menus (see below), as well as the size of the main window and the layout of the panes in the user's defaults file.
Save session
Clear session

Save or clear the current session (see SESSION MANAGEMENT).
Reload configuration file

Reloads both the xplorerc and the magic file and updates the panes accordingly.

VIEW SUBMENU

Submenu of the Options menu containing options to control the display of the panes. The following options are global, i.e., they affect the display of all directories:

Large icons
Small icons
Detail

Switch between icons and detail view in the file pane. In large and small icons view, the files are represented using large or small icons, respectively, while in detail view a list is shown which consists of small icons and file attributes similar to ls -l.
Shelf pane
Tree pane
File pane
Log pane

Select the panes to be shown in the main window.

The remaining options only apply to the current directory (but are inherited by subdirectories when these are opened initially):

Sort by name

Sort files in the current directory by name, with lexicographically smaller files first.
Sort by size

Sort files by size, with larger files first.
Sort by date

Sort files by date, with newer files first.
Reverse order

Sort files in reverse order.
Directories first

Specify whether directories should be listed first.
Show hidden files

Specify whether hidden files (i.e., the "dot" files) should be displayed.
Show files
Show directories

Specify whether files and/or directories should be displayed.
Show parent dir

Specify whether to show the parent directory.
Rescan files

If enabled then rescan directory contents in order to determine if a directory has been changed. Some devices (like, e.g., msdos filesystems under Linux) require that this option is set, otherwise directory contents may not be updated properly.
Magic headers

Use magic headers to determine file types. This option must be set for detecting the MIME type of a file. However, disabling this option on slow devices may considerably increase performance.

PREFERENCES SUBMENU

Submenu of the Options menu containing global options which control the behaviour of various commands.

Absolute paths

Determine whether paths in arguments to drop actions or in symbolic links should be absolute or relative w.r.t. the directory in which the command is invoked.
Push in current dir

If enabled then push actions on (links to) executables in the shelf are executed in the current directory instead of the shelf directory (or the directory of the executable).
Drop in target dir

If enabled then drop actions are executed in the directory containing the target file. Otherwise they are executed in the directory containing the dropped files.
Echo commands

Echo commands in push, drop and mount actions which are invoked through the shell. This allows you to trace the shell commands executed by xplore which is particularly useful when debugging new configuration entries.
Check mounts

This option controls whether xplore should report an error when a mount or unmount action fails (indicated by a nonzero return code of the action).
Backups

If this option is enabled then xplore creates numbered backups of files and directories which are to be replaced during a Move, Copy or Link operation, in a manner similar to GNU mv with options -b -V numbered.
Show splash screen

Enable/disable the display of the splash screen at startup. Note that this option will take effect only after you save the defaults.
Autopopup log

If enabled then the log pane automatically pops up when there is new output to show.
Autosave defaults

If enabled then xplore automatically save defaults in the defaults file when exiting.
Autosave session

If enabled then xplore automatically saves the current session in response to a corresponding request from the session or window manager (see SESSION MANAGEMENT).
Confirm drop
Confirm move
Confirm copy
Confirm link
Confirm delete

Request confirmation for the corresponding operations.
Confirm delete dir
Confirm delete file

Request extra confirmation when a directory or ordinary file is to be deleted. The Cancel button is used to abort the operation, while the All button allows to proceed without further confirmation.
Confirm overwrite

Request extra confirmation when a file is to be overwritten or renamed (depending on the status of the Backups option) in the course of a Move, Copy or Link operation.
Confirm quit

Request confirmation for the Quit command in the File menu.
Automatic updates

Enables or disables automatic updates of the panes.

HELP MENU

Most of the online documentation is in HTML format. In order to display these files you must have a suitable browser installed.

Xplore manual

Display the xplore manual.
Xplore FAQ

Display frequently asked questions with answers.
Xplore WWW page

Display the xplore website (http://www.musikwissenschaft.uni-mainz.de/~ag/xplore).
About xplore

Display version and copyright information.

File Popup Menu

As already mentioned, this menu pops up when pressing the right mouse button on a file in the file or shelf pane. It provides operations on a single file. The supported options from the File menu are Open, Rename thru Delete, Properties and File type. The remaining options in the menu are file type-specific commands which are configured in the xplorerc file.

Log Popup Menu

This menu pops up when pressing the right mouse button in the log pane. It provides a single option, Locate, to locate a file or directory listed in the log; see USING THE LOG for details.

Configuration File

The xplorerc configuration file consists of a sequence of sections in the format described below. Whitespace outside of strings is ignored except if it serves to delimit different keywords. Strings follow C-like syntax, including the common escape conventions and the possibility to specify a whitespace-delimited sequence of strings which is interpreted as the concatenation of the given strings. The usual C preprocessor directives are recognized as well, and comments may be specified using C syntax.
Device string [ , string ] { device-fields }
Defines a device that is to be mounted on the directory given by the first string argument. If specified, the second string denotes a label for the device which is used for representing the device in the status line (see DEVICES). Only devices whose mount points exist at the time xplore is started will be added to the devices table, and among those only the devices for which a label is specified will be shown in the status line. The commands to be executed for mounting and unmounting the file system as well as other options are specified in the device-fields list.
Shelf { shelf-fields }
Specifies the different shelves which can be accessed using the tabs above the shelf pane. Each item specifies the name of a shelf and (optionally) the corresponding subdirectory of the shelf directory.
Type pattern-list { type-fields }
Specifies a file type. The MIME type of the file (as specified in the magic file) and the filename itself are matched against the given comma-separated list of pattern strings. The icons and actions defined for the type are given in the type-fields list.

Each pattern consists of an optional MIME type pattern (enclosed in < >) and a filename pattern. The usual wildcards, i.e., *, ? and character classes, are recognized. Note that MIME types can only be recognized if the current directory has magic headers enabled. Otherwise only patterns containing a nonempty filename pattern are considered, and the MIME type pattern is ignored. The filename pattern can also start with a path specification, meaning that the file only matches if it is contained in the specified directory. No wildcards are recognized in the path specification, but the tilde ~ may be used as an abbreviation for the user's home directory.

Magic pattern-list { type-fields }
Same as the Type section, but patterns containing a MIME type specification are only matched when the current directory has magic headers enabled. Note that to ensure consistent behaviour between the magic and the non-magic mode of operation, xplore enforces that special files (directories, device files, etc.) can only be matched by a Magic pattern with nonempty MIME type part.
Default { type-fields }
Specifies the icons and actions for all files which do not match any of the Type and Magic sections.
Command { command-fields }
Specifies the contents of the Command submenu.

The sections are considered in the order in which they are specified. In particular, more specific file type patterns should come before more general ones.

The following fields are recognized in a device specification:

Icon string
Specifies the name of a file in XPM format which denotes the icon used to denote the device in the status line.
Mount string
Unmount string
Specifies the command used to mount and unmount the device. As a special case, if both these commands are empty or omitted, the entry denotes a "pseudo device" which is ignored by the Unmount all command. Such pseudo devices are used for the sole purpose of overriding general option settings for some special directories.
Options [+|-]option [ , [+|-]option ... ]
Specifies the default view options used for the device. The following option keywords are recognized, with the equivalent options in the View submenu given in parentheses (cf. MENU COMMANDS above): SortByName (Sort by name), SortBySize (Sort by size), SortByDate (Sort by date), Reverse (Reverse order), DirsFirst (Directories first), Hidden (Show hidden files), Files (Show files), Dirs (Show directories), Updir (Show parent dir), Rescan (Rescan files), Magic (Magic headers).

Option keywords prefixed with + or - denote options to be added to or removed from the current option set, respectively; if more than one entry for a given option is present, the last entry for that option in the list takes precedence. It is possible to specify only prefixed options; in this case the settings are taken relative to the current option settings (which are usually inherited from the parent directory). For instance, an option list of the form Options +Hidden enforces that hidden files are displayed while retaining all other option settings from the parent directory.

In the Shelf section, the following fields are recognized:

Item string [ , string ]
Specifies a shelf and its associated directory. The first string denotes the label displayed on the corresponding tab, and the second string the subdirectory of the shelf directory which is to be associated with this shelf. If the second string is omitted, the directory name and label are assumed to be identical.
Default string [ , string ]
Like the Item field, but denotes the shelf to be selected initially (this setting can be overridden with the -s option or by setting the curshelf resource accordingly).

In a Type or Magic section, as well as in the Default section, the following fields are recognized:

Description string
Specifies a description to be displayed in the properties dialog for files of this type. (For backward compatibility, this field can also be denoted with the Comment keyword instead of Description.)
LargeIcon string
Specifies the name of a file in XPM format which denotes the large icon used to display the file.
SmallIcon string
Specifies the name of a file in XPM format which denotes the small icon used to display the file.
Push string [ , string ]
Specifies the push action associated with the file. The second string argument is optional; if it is present, it denotes the directory in which the command is to be invoked.
Drop string [ , string ]
Specifies the drop action associated with the file. The second string argument is optional; if it is present, it denotes the directory in which the command is to be invoked.
Item string, string [ , string ]
Specifies a type-specific item in the popup menu for files belonging to the type. The first string argument denotes the label to display in the popup menu. The second string argument specifies the action to execute. The third string argument is optional; if it is present, it denotes the directory in which the command is to be invoked.
Separator
Adds a separator to the popup menu for the file type.

The Command section is like a file type section, but only Item and Separator fields are allowed. Each item specifies an entry of the Command submenu of the File menu.

A sample configuration making use of the features described above (including the extensive use of C preprocessor directives) can be found in the distributed system.xplorerc file. You will probably like to edit this file to reflect your system configuration and preferences.

Actions

Commands invoked through push and drop actions, mount actions, the Command submenu and the file popup menu are executed using the shell (as given by the shell resource or the SHELL environment variable). Xplore waits for the command to finish and then updates the display, unless the command is executed in the background (using the shell's & operator). The command is echoed when the Echo commands option of the Options menu is enabled. Commands are generally invoked with an empty stdin file while output goes to the log pane (unless xplore was invoked with the -C option in which case output goes to /dev/console).

Mount actions are invoked in the directory in which xplore was started. Commands from the Command submenu and the file popup menu are executed in the current directory, with positional parameters $1, $2, ... set to the currently selected files. $* may be used to denote the list of all selected files.

Push actions on executables in the shelf are invoked in the current directory (instead of the shelf directory) when the Push in current dir option is enabled, which is the default. In the case of a drop action, the command is executed in the directory containing the target file, if the Drop in target dir option is enabled, and in the directory containing the dropped files otherwise. The latter is the default setting. For the default drop action on an executable, the positional parameters are simply set to the list of dropped files. Otherwise, the first positional parameter is set to the target of the drop action (i.e., the name of the file onto which the selection was dropped), and the remaining parameters are set to the list of dropped files.

The directory in which a command is invoked can be overridden with an appropriate setting in the corresponding action in the xplorerc file. The selected files are specified using absolute pathnames if the Absolute paths option is enabled, and using pathnames relative to the directory in which the command is executed otherwise. This is true for Link commands as well; thus a link action will produce links to absolute or relative pathnames, depending on the status of the Absolute paths option.

For all types of actions the environment variables CURDIR and CURSHELF are set to the pathnames of the current directory and the current shelf, respectively. This is useful, e.g., if you set up actions which have to access these directories explicitly.

Xplore lets you prompt the user for additional parameters when a command is invoked. In such a case a dialog form appears with one field for each parameter, into which the user can enter the required arguments. Currently, no checking is done on the supplied parameters; in fact, the user can simply leave all fields empty. Parameters are specified in action strings using the format %parameter-name% where parameter-name is an arbitrary text not containing the % character. The given text will be displayed in the dialog form, and the parameter will be replaced with the corresponding value entered by the user. (A literal % character can be escaped with two backslashes.)

A default value for a parameter can be specified using the notation %parameter-name--default-value%. The given value will be used as the initial contents of the corresponding input field. Furthermore, there are two special constructs for denoting non-input fields. The notation %--% inserts a separator in the parameter dialog, and the construct %-label% adds a label with the given text on a line by itself. These constructs are simply replaced by empty strings during parameter substitution.

Note that passing arguments in push and drop actions the "quick and dirty" way, e.g.,


Push "exec emacs $1 &"

will split arguments containing whitespace. Therefore the recommended way is to quote the positional parameters as follows:


Push "exec emacs \"$1\" &"

To quote each individual parameter in the $* variable, you should use the $@ variable instead (Bourne-compatible shells only):


Drop "(tar cvfz \"$@\"; echo '*** tar done ***') &"

A similar effect can be achieved by using the $* variable with the :q modifier of the C shell, see csh(1) .

Xplore should work with most popular kinds of shells, as long as the shell understands the -c option for passing a command with parameter substitution. You can determine the shell which should be used by xplore with the shell resource or the SHELL environment variable. (Note, however, that the distributed system.xplorerc file assumes a Bourne-compatible shell.)

Changing File Types At Runtime

The File type dialog allows you to add new and edit existing file types at runtime. This provides a convenient alternative to editing and reloading the xplorerc file, but is also less versatile, as the dialog does not support C preprocessor directives. Xplore distinguishes between "predefined" types (i.e., types specified in the xplorerc file), and the "user-defined" types created with the File type dialog. The user-defined types are stored in the types resource in the defaults file. This is done automatically each time the user adds, changes or deletes a type, and the setup is restored automatically whenever xplore is restarted.

When the File type dialog is invoked, it displays the current type of the file. (Be aware that this type can depend on whether magic headers are enabled in the current directory or not.) You can edit the type definition and store it as a new type with the Add button, replace the existing type with the new definition (Replace button), or delete the present type (Delete button). The Replace and Delete operations are only available for user-defined types. Furthermore, the Delete operation is disabled as soon as the type has been edited. Please note that, although the File type dialog does not allow you to change or delete the predefined types (you will have to edit the configuration file to accomplish this), you can still add new types overriding these entries.

Most fields of the File type dialog are in a close correspondence to the fields of a Type or Magic section in the configuration file, as described in Section CONFIGURATION FILE above, using a somewhat simplified input format. The patterns are specified as a space-delimited sequence of individual patterns, therefore literal blanks in patterns must be escaped using the backslash. (This is not necessary if blanks occur in the MIME type part of a pattern where they are enclosed in < >.) The backslash itself has to be escaped in this field as well. The Magic toggle below the patterns lets you specify whether the defined type requires magic headers to be enabled. Switching this button on and off corresponds to the Magic and Type keywords introducing a type definition in the configuration file. The Action list field is a multi-line input field whose value is a sequence of Push, Drop, Item and Separator fields in the same format as in the configuration file. The Description, Large icon and Small icon fields are simple, literal string fields, which are in one-to-one correspondence with the Description, LargeIcon and SmallIcon fields in the configuration file.

The Exclusive toggle on the Options line below the patterns is used to change the contents of the Pattern list field, by switching between the pattern list as specified by the file type, and the single pattern describing the file itself on which the dialog was invoked. More precisely, the exclusive pattern consists of the MIME type and the absolute pathname of the file, and thus only matches this specific file and nothing else. Hence this toggle comes in handy if you want to define a new type for just the file on which the File type dialog was invoked. This option is enabled automatically when the current type of a file is the default type (as specified in the Default section of the configuration file), or if the file has no type at all. (This can happen, e.g., if no default type is defined in the configuration file, or if magic headers are disabled in the current directory and the current file is special, i.e., a directory or an executable. In the latter case you must turn on magic headers before the user-defined type can take effect.)

The Priority field is used to determine the position, and thereby the priority, of the type in the current list of all predefined and user-defined types. It can be used both to set the priority of a new type to be added with the Add command, and to change the priority of an existing user-defined type with the Replace command. Most of the time you can safely ignore this field, but if the patterns of different types overlap you should make sure that a more specific type has higher priority than a more general one, so that the former is not shadowed by the latter. By default, the Priority field is set to the current type of the file, which means that the new type will take precedence over all existing types matching the same file. This is appropriate in most cases. You can change the priority of the type being edited or defined by choosing an item from the drop down list associated with the Priority field, which lists all currently defined types in the order of decreasing precedence. Choose the first (i.e., uppermost) type in this list over which the new type should take precedence. The item "(Default)" at the end of the list indicates that the new type will have the lowest possible priority, just above the default type.

A note about error handling: When a type definition is submitted with the Add or Replace button, it is checked that at least one pattern has been specified and that the action list is syntactically correct. If this is not the case, xplore will complain and redisplay the File type dialog, with the cursor set to the offending line. Moreover, if the edited type does not match the file on which the dialog was invoked (which could be due to a typo in the pattern list), then xplore issues a warning message and asks the user to confirm that he really wants to add the type. If the answer is negative, then the dialog is redisplayed to allow the user to correct the definition.

Standard Setup

As already indicated, the distribution includes a sample configuration which you can customize according to your needs. The distributed system.xplorerc file contains some sample device descriptions, a shelf setup, a lot of useful file type definitions, and a command menu with common operations. The distribution also includes a preconfigured shelf directory which contains a Desk shelf which provides some links to devices, a Programs shelf with links to applications, a clipboard and a trashcan. Both the clipboard and the trashcan are simply links to other shelves which can also be accessed with the Clipboard and Trash tabs. Thus no special built-in operations are needed to implement these facilities. The options of the command menu, as it is defined in the distributed system.xplorerc file, are described below.
Bookmark

Put a symbolic link to the current directory into the current shelf.
Program shortcut...

Locate an application (given by the name of the program) using which(1) and put a symbolic link to it into the current shelf. This option provides a convenient method to quickly install a shortcut for an application on the shelf.
URL shortcut...

Create an URL shortcut in the current shelf. You are prompted for the URL and the name of the shortcut file. The standard setup allows you to open these shortcuts in your web browser (netscape by default) with a double-click. (The shortcut files are plain ASCII files in the same format that is also understood by some of the GNOME tools.)
Editor

Invoke the editor (emacs(1) by default) in the current directory.
Calculator

Invoke the calculator (xcalc(1) ).
Manual

Read manual pages (xman(1) by default).
Terminal

Start an xterm(1) in the current directory.
Xplore

Invoke another instance of xplore in the current directory.
Find...

Invoke the find(1) program in the current directory. You are prompted to specify the filename pattern denoting the files to search for, and an optional regular expression to perform content-based searches. (If the latter is specified, the command only searches for regular files.) The results are shown in the log pane. You can use the Locate command in the log popup menu to show a listed file in the file pane, see USING THE LOG.
Grep...

Run grep(1) on the selected files, for the given regular expression.
Diff

Run diff(1) on two selected files.
Shell command...

Invoke a shell command in the current directory, with the positional parameters set to the currently selected files.
Make...

Invoke make(1) on the specified target in the current directory.
Tar...
Tar gzipped...
Tar bzipped...
Tar compressed...

Create a new tar(1) file (with compression using gzip(1) , bzip2(1) or compress(1) ) from the selected files.
Zip...

Create a zip(1) archive from the selected files.
Gzip
Bzip2
Compress

Compress the selected files using gzip(1) , bzip2(1) or compress(1) .
Uuencode

Encode the selected files using uuencode(1) .

Icons

A collection of file and application icons is included in the distribution; it is installed in the xplore library directory. The icon files are located using the search path given by the iconpath resource in the Xplore application defaults file. Note that xplore currently only supports icons in Arnaud Le Hors' XPM format. However, most other image formats can easily be converted to XPM using the ImageMagick tools; see convert(1) .

Interface to Other Applications

As a Motif application, xplore provides ICCCM-compliant drag and drop, which makes it possible to interface with other applications. The currently supported targets are FILES (xplore-specific), FILE_NAME (standard ICCCM target used to transfer a single file name) and text/uri-list (standard file list target for XDND-compatible applications). The latter is an export-only target which is provided for compatibility with KDE and GNOME; it enables you to drag files from xplore to KDE and GNOME applications and desktop (but not vice versa). The FILES target uses an xplore-specific format which encodes the selection of a set of files in an xplore window. The encoded string has the following syntax:


dirname filename1 filename2 ...

As indicated, the directory and file names are separated by blanks (blanks and other special characters inside the directory or file names are escaped with a backslash).

As I become aware of other targets which should be supported I will add them as well; if you have any ideas, please let me know.

Environment

Xplore depends on the proper setting of the HOME environment variable which denotes the user's home directory. Furthermore, if the shell resource is not set then the SHELL environment variable indicates the shell to be used for executing commands. When a command is invoked through the shell, the environment variables CURDIR and CURSHELF are set to the pathnames of the current directory and the current shelf, respectively.

In addition, the XPLORELIBDIR environment variable can be used to denote an alternative path to the xplore library directory, which is convenient for the purpose of testing alternative setups or for relocating the library directory without having to recompile the program. If this variable is not set in xplore's environment, xplore sets it to the built-in library path. Thus actions in the configuration file can rely on the proper setting of this variable, which is useful, e.g., if actions access scripts in the library directory. Similarly, the XPLORECONFIGDIR environment variable is set to the user's config directory, as specified by the -c command line option or the configdir resource.

Other environment variables may be used by your local setup. For instance, the standard xplorerc file lets you specify your preferred editor, text viewer and terminal program with the XPLORE_EDITOR, XPLORE_VIEWER and XPLORE_TERM variables.

Files

Following is a typical list of files and directories used by xplore according to the standard setup. Please note that the path to the X library directory may be different on your system, and that the actual name of the personal shelf and configuration directories can be changed with the appropriate command line options and resources.
/usr/X11/lib/X11/xplore/system.xplorerc
System-wide configuration file.
/usr/X11/lib/X11/xplore/magic
System-wide magic file.
/usr/X11/lib/X11/xplore/shelf
Template shelf directory.
/usr/X11/lib/X11/xplore/icons
Standard location for icons in XPM format used by xplore.
~/shelf
Personal shelf directory.
~/.xplore
Personal configuration directory. Contains the user's defaults, startup, xplorerc, magic and session files.

Bugs

Probably quite a few. Here are the ones that I know about:

It is not possible to drag the root directory from the tree pane. This is actually a feature. :)

Devices, shelf and the command menu should be configurable using dialogs as well.

Motif bugs. This varies from system to system, and encompasses things like slow or garbled container views when the views get very large, occasional rejection of valid drop sites (SUN Motif), and segfaults on editres requests (OpenMotif 2.1). If you suffer from one of those, please check your software vendor for available patches.

The automounter has only been tested on Linux, but hopefully works on most other UNIX flavours as well. If all else fails, you can always disable this feature (by commenting out the Device sections in the xplorerc file) and try running a more comprehensive utility like AMD or autofs instead.

Since parameter passing conventions depend on the shell, xplore performs an automatic test at startup which tries to determine whether your shell passes its name as the zeroth argument to a command invoked using the -c option. (Bourne and C shell differ in this respect.) This test may fail, e.g., if your shell's initialization files write to standard output. If this happens, you should set the bourneShells resource in the application defaults file to a list of Bourne-compatible shells on your system.

See Also

moxfm(1) , xfm(1) , xploretype(1) , magic(4) , http://www.musikwissenschaft.uni-mainz.de/~ag/xplore

Author

Albert Graef, with portions of code from xfm (written by Simon Marlow and Albert Graef, with contributions from numerous other people), moxfm (written by Oliver Mai, based on xfm), and xfsm (the X file system monitor, written by Robert Gasch). The magic type detection and shell auto detection features have been written for xfm by Juan D. Martin and Robert Vogelgesang, respectively.


Table of Contents