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.
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.
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.)
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.
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.)
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.
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.
File manipulation operations. These commands apply to the file pane.
This menu provides some commands which are analogous to those of the File menu, but apply to the currently selected shelf.
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:
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:
The remaining options only apply to the current directory (but are inherited by subdirectories when these are opened initially):
Submenu of the Options menu containing global options which control the behaviour of various commands.
Most of the online documentation is in HTML format. In order to display these files you must have a suitable browser installed.
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.
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:
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:
In a Type or Magic section, as well as in the Default section, the following fields are recognized:
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.
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.)
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.
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.
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.
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.
Table of Contents