Copyright © 2002 Thomas Leonard
Conditions
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA, 02111-1307, USA.
ROX-Filer is a graphical file manger for the X Window System. Its user interface is based on the RISC OS filer and it supports similar features such as application directories and drag-and-drop loading and saving of files. The filer can also act as a pinboard, allowing you to pin frequently used files onto the desktop background.
Table of Contents
ROX-Filer is a simple and easy to use graphical file manager for X11 — the windowing system used on Unix and Unix-like operating systems. It is also the core component of the ROX Desktop [ROX]. Many of the filer's features were inspired by RISC OS [RISC OS]. `ROX' stands for `RISC OS–On–X'.
A common drag-and-drop protocol used, for example, by the GNOME desktop[GNOME]. This allows data to be loaded into an application by dragging it from a filer window to a program. The full specification is given in [DND].
An extension to XDND that allows applications to save data by dragging an icon back to a filer window. The full specification is given in [XDS].
A simple, but flexible, system for managing user choices. See [Choices] for details.
Self contained relocatable applications, where installation is as simple as copying it to where you want it and uninstalling it is just a matter of deleting a directory. Described later in this documentation.
The filer can be made to display image files by using the image itself for the icon, instead of a generic `this-is-an-image' icon. Very useful for organising a directory full of photos! See [Thumbs] for details (spec is still in developement).
If you've just got hold of the filer by downloading the source archive then you'll need to compile it before you can use it. If you downloaded and installed a binary package, or if ROX-Filer was included with your system, then you can skip this section. If you got here by clicking on the `i' symbol in a filer window, or if typing rox at a shell prompt works, then you don't need to compile.
To compile, you will need the following:
The X Window system (supplied as standard on all modern systems),
GTK+ 1.2.0 or later (libraries and headers) — get the latest version from [GTK+],
$ gtk-config --version 1.2.8Due to bugs in earlier versions, GTK+ 1.2.8 is strongly recommended.
To compile:
The filer needs some shared files to work — icons for the various file types, rules for determining file types and default run actions. These are installed by the `rox-base' package. Install rox-base (from http://rox.sourceforge.net now if you haven't done so already.
Change to the directory containing the ROX-Filer subdirectory.
Run the install.sh script, like this:
$ ./install.sh
ROX-Filer will perform various checks to find out what kind of system it is being run on and will then compile. If it doesn't work then please e-mail me and complain! Tell me what kind of system you have and what errors were reported. If you manage to fix the problem yourself then please e-mail me the fix. The executable file is stored inside the ROX-Filer directory in a different subdirectory for each platform. Therefore, you can compile the same application on several different types of machine and then run it from any of them using the AppRun script. This is particularly useful in a network environment.
Once the filer has compiled you will be asked where you want to install it. If you want to do a system-wide installation as root, you may want to stop here, su to root and rerun the install script. If you don't have the root password then don't worry — just follow the instructions for installing into your home directory.
You can now run the filer by running the rox script without any options, like this:
$ roxA window should appear and display the contents of the current directory. If you installed the script into your home directory then you may need to set your PATH environment variable so that the shell can find it. For example, if you installed it into a directory called `bin' in your home directory, use this:
$ PATH=$HOME/bin:$PATH; export PATHor (if you are using the csh(1) shell):
$ setenv PATH $HOME/bin:$PATH $ rehash
By default, ROX-Filer will start by displaying the current directory. You can get it to display other directories instead by listing them after the command:
$ rox /home /usr /usr/localYou can also use it to open files, like this:
$ rox READMEThe filer supports various options; use -h for a list. All options have long and short forms (eg -h and --help) — although on some systems you can only use the short versions.
Note that if the same version of the filer is already running on this machine then, by default, it will be used to open the directories. You can override this (perhaps because the old copy has stopped responding for some reason) using the --new option.
For a complete list of command-line options, see Appendix A. Manual page
If you want the filer to manage your desktop background then you use the --pinboard option and supply a name for the pinboard, eg:
$ rox --pinboard=MyPinboardThe pinboard configuration is saved in `<Choices>/ROX-Filer/pb_MyPinboard' as soon as you change it in some way (for example, by dropping a file onto the background). You can have as many pinboards as you like and switch between them by running rox again, eg:
$ rox --pinboard=MyOtherPinboardTo turn off the pinboard again, set the name to an empty string:
$ rox --pinboard=See the window manager notes if you have trouble getting the icons to display correctly. The pinboard may also be turned on and off by locating `ROX-Filer' in a filer window and choosing `Enable pinboard' or `Disable pinboard' from the menu.
Panels work just like the pinboard. You can create a panel on any side of the screen by using the options --left, --right, --top and --bottom, depending on which side of the screen the panel should appear on. On some systems, the short (one letter) form of the options must be used. For example, to create a panel along the bottom edge of the screen:
$ rox -b=MyPanelThe panel should be displayed in a window without a title bar. If this does not work then see the window manager notes for some ideas. You can drag files onto either side of the panel to add them. Panel icons can be repositioned by dragging them with the middle mouse button. Changes to the panel are automatically saved to `<Choices>/ROX-Filer/pan_MyPanel' . As with the pinboard, you can switch between panel configurations simply by running rox again with a different panel name. Specify a blank name to remove the panel.
$ rox --bottom=MyOtherPanel $ rox --bottom=
You may have to play around with your window manager a bit to get the pinboard icons and panels to display correctly (eg, without borders and underneath all other windows). In particular, try setting the stacking level / depth to low (or a negative value). Make sure any 'Keep transients above other windows' type options are turned off! In order for the filer to receive mouse clicks on the background (used for the pinboard support) you need a GNOME-compliant window manager. To see if your window manager supports this, try clicking the right mouse button on an unused area of the background. If you get the pinboard menu, all is well.
Sawfish tries to guess whether you are using GNOME at start-up and only provides support if so. You may need to add the line
(require 'gnome)to your `.sawfishrc' file (see the sawfish manual for more details).
Paste these configuration settings into `~/.icewm/preferences' :
# Manage root window (EXPERIMENTAL - normally enabled!) GrabRootWindow=1 # 0/1 # Bitmask of root window button click to use in window manager UseRootButtons=3 # [0-255] # Desktop mouse-button click to show the menu DesktopWinMenuButton=1 # [0-20] # Desktop mouse-button click to show the window list DesktopWinListButton=2 # [0-5] # Desktop mouse-button click to show the window list menu DesktopMenuButton=0 # [0-20]Paste these into `~/.icewm/winoptions' :
# ROX-Filer pinboard and panel ROX-Filer.icon: folder ROX-Panel.layer: Dock ROX-Panel.doNotCover: 1 ROX-Panel.ignoreWinList: 1 ROX-Panel.ignoreTaskBar: 1 ROX-Panel.ignoreQuickSwitch: 1 ROX-Pinboard.layer: Below ROX-Pinboard.ignoreWinList: 1 ROX-Pinboard.ignoreTaskBar: 1 ROX-Pinboard.ignoreQuickSwitch: 1 ROX-Filer.layer: NormalRestart IceWM and the filer for the new settings to take effect.
Run the filer using rox -p=Default.
Press Control+Escape, or [RightButtonDown] on any window's titlebar. Choose from the menu.
The Attributes Inspector window appears. From the pulldown menu at the top, choose
(the top item).Press the Window Specification' frame should change their labels to include ROX-Pinboard.ROX-Filer as the first item. Select that radio button.
button. The cursor changes to a double crosshair. Select one of the ROX-Filer pinboard icons. The radio buttons in the `Choose Attributes' frame, choose the features you want the pinboard icons to have; I recommend the following:
from the pulldown menu. In the `Choose Advanced' frame, choose the advanced features you wish; I recommend the following:
from the pulldown menu. In the `When you're finished selecting window attributes, press the
button, and then close the Attributes Inspector window using the button in the titlebar.If you run the filer as the `root' user then the filer will display a message at the top of each window to remind you. The root user has permission to access or change any file in the system, so be very careful when using the filer like this. Normally, you should log in as an ordinary user and only change to root when you need to. You can create a simple script which runs the filer as root — something like this:
#!/bin/sh su -m -c "rox $*"Then, you can get a root filer window by simply running the script and entering the root password. Remember, any file operations you perform and any programs you run from these windows will run as root too! Be careful! You may find that the X server won't allow root (or other users) to connect. Reading the manual pages for xauth and xhost may give you some hints, but it varies between systems (which is why this isn't built in to the filer!).
Quick start:
Click the left [1] mouse button to open files and directories.
Click the right button to get a menu. Click over a file to perform an action on that file.
Drag files between windows with the left button to copy them, or with the middle button to get a menu of possible actions (copy, move, link, etc).
By default, the mouse button bindings are designed to fit in with X conventions. However, the behaviour is highly configurable — have a play in the Options window if you don't like the normal settings. The normal settings behave as follows:
Key or mouse button | Action |
---|---|
Left button click | Open the file or directory clicked on. Hold down Control to select things instead of opening them. Hold down Shift to look inside applications, treat files as text, follow symlinks or mount devices. |
Middle button click | Same as left click, but open a directory in a new window or close the viewer when opening a file. |
Right button click | Open the main menu. Hold down Control while clicking to go directly to the Selection submenu. Hold down Shift to get the Send To menu (see the Send To menu section). |
Drag an item (left mouse button) | Copy the file(s) to the destination (an application or another filer window). Hold down Shift to move the file, Control+Shift to create a symbolic link, or Alt to get a menu of possible actions. |
Drag an item (middle mouse button) | When you let go, display a menu of possible actions. There is an option to make this move the files rather than open the menu. |
Drag (not over an item) | Select a group of items by dragging a box around them. With the left mouse button, only the files in the box will be selected. If you hold down Control then the boxed items are added to the selection. If you use the middle button then the boxed items switch between being selected and unselected. |
Double-click background | Resize the window to a sensible size. |
Backspace | Change to viewing the parent directory. |
Cursor keys | Move the cursor around. |
Page Up, Page Down | Move the cursor up and down a page at a time. |
Home, End | Move to the first/last entry in the directory. |
Return | Acts like clicking on the file. You may hold down Shift for other effects, as with clicking. |
Spacebar | Toggles the item under the cursor between being selected and unselected, and moves to the next item. |
Tab, Shift+Tab | Moves the cursor to the next/previous selected item. |
Hold mouse over an item | Shows a tooltip containing a brief description of an application (if available), the target of a symbolic link, and the full name of a file, if it's too long to show in the main window. |
Other keys can easily be defined by opening the menu, moving the pointer over the item you want to use and pressing a key. The key will appear in the menu and can be used from then on. Key bindings are automatically saved when the filer quits.
[1] This documentation assumes that button–1 is the left button, button–2 is the middle button and button–3 is the right button. This is not always the case — for example, in a left-handed setup.
When you select items in a ROX-Filer window, the filer takes the primary selection. You can then paste into another window to get the pathnames of the selected files.
Note that clicking the middle mouse button in the main area of most web-browsers will open the selected file.
If you select something else (eg, some text in another program), the selected items in the filer window will be shown shaded (the filer no longer has the primary selection). Clicking on one of the shaded items will cause the filer to regain the primary selection.
It is sometimes useful to save the current selection for later. You can save the current selection to one of ten numbered groups by pressing Control+<number>. You can restore a saved group by pressing the group number on its own. You can do this from a different directory, or even a different filer window.
Saving is also useful even if there is no selection, since it still saves the current directory.
The groups are saved automatically for next time the filer is loaded.
By default, each window has a toolbar along the top. You can disable this (or make it larger) from the Options window, as well as set which tools appear on the toolbar. Normally, you should click with the left mouse button (1). However, many tools can perform a related function if clicked on with buttons 2 or 3 (middle or right).
Icon | Mouse button 1 | Other button |
---|---|---|
Cross | Close the window | Open a new window |
Up arrow | Change to parent directory | Show parent in a new window [1] |
House | Change to home directory | Show home in a new window [1] |
Looping arrows | Reread the directory contents | Open a new window |
Magnifying glass | Make icons bigger | Make icons smaller |
List | Hide or show extra details | Same |
Dot files | Toggle the display of hidden file (those with names starting with a dot) | Same |
Information | Show ROX-Filer's help files | Show help files and close window |
[1] If the 'New window on button 1' option is turned on then the default is to open a new window — clicking with the other button reuses the same window instead.
Dragging files to the Up or Home icons acts just like dragging them into the directory which the button leads to. The toolbar can also show the number of files in the directory, and information about the selection. This can be turned on or off in the Options box.
By default, you can open a menu by right clicking over a pinboard, panel or filer window. In filer windows, you may also press \ to open the menu. As a shortcut, you can open the File submenu directly by holding down the Control key when opening the menu. Here is a full description of each menu item:
Entry | Action |
---|---|
Change the display settings. | |
Operations on the selected items. | |
Control which items are selected. | |
Configure ROX-Filer. | |
Create a new file or subdirectory inside this directory. | |
Open an xterm with its current directory set to this directory. | |
Operations on the window as a whole. |
The permissions field, when shown, is made up of four groups of three flags. Each flag is displayed as a letter if it is on and a dash (–) if not. The first three characters show the permissions for the owner of the file, the second for other members of the file's group and the third for everyone else. Whichever group applies to the ROX-Filer process itself is shown underlined. The fourth group shows any special flags.
The meanings of the characters are:
r — Permission to read the contents of a file, or the names of files in a directory.
w — Permission to alter the contents of a file, or change which names appear in a directory.
x — Permission to run the file as a program, or refer to the files listed within the directory.
U — This program executes with the effective user ID of its owner rather than the person who ran it.
G — This program executes with the effective group ID of its group, regardless of who ran it.
T — Entries in this directory can only be altered or removed by the people who own the files even if they have write permission on the directory itself.
rwx,rwx,r-x/---means that the owner of the file is the same as the effective user of ROX-Filer (basically, you own the file), you and members of the file's group have read, write and execute permission and other people have only read and execute permission. There are no special flags set. The rules which determine which permissions apply may vary slightly between operating systems, but a rough guide is:
If the effective user ID of the process is equal to the file's owner, then the owner permissions apply.
Otherwise, if the effective group ID of the process is equal to the file's group OR the file's group is one of the process's supplemental groups then the group permissions apply.
Otherwise, the `other' permissions apply. The real user ID and real group ID have no effect (except that a process may set its real IDs to its effective IDs).
All of these work in the same way — if you open the menu with some items selected then the operation applies to those items. If you open then menu over an item while there is no selection then that item is temporarily selected.
If you choose one of these while there is no selection at all then the window goes into `target mode'; the operation happens to the next item you click on. Click on the window background, press Escape, or click with the right mouse button to cancel target mode. Target mode is mainly useful with the `Single-click navigation in filer windows' option and keys bound to the various menu entries.
Note that individual applications may add extra menu items to the top of this submenu when you click over them — see Application directories for details.
Entry | Action |
---|---|
Make a copy of this object. | |
Change the name used for this object, or move it between directories. | |
Create a symbolic link to this name. | |
Opens applications as directories, files as text/plain, mount points by mounting or unmounting them and symlinks by opening the directory containing the thing they point to. This is the same effect as clicking with Shift held down. The text of the menu entry changes to show which action will be performed. | |
Explain what kind of thing is selected. For applications, display the help files. | |
Display extra information about this object. | |
Allows you to set the default program to use when opening files of this type. See the Set Run Action box section for details. | |
You can give each file or directory its own special icon using this feature — simply drag a suitable image onto the Set Icon box. | |
Open the file as if it was a directory — see the Virtual file systems section. | |
Opens the `Send To' menu, allowing you to send the selected files to one of a list of applications. See the Send To menu section. | |
Remove all the selected entries from the directory. Subdirectories will have their contents deleted first. Deleting symlinks only removes the link, not the thing it points to. | |
Count the sizes of all the selected items. Directories also have their contents counted. Symlinks count themselves, not the things they point to. | |
Allows you to change the permissions for the selected files. | |
Search for files by specifying various conditions — see the Searching section. |
Note about symlinks: A symbolic link stores the location of another file. Deleting the symlink doesn't affect the other file. Deleting the other file means that the symlink won't work. There are two types of symbolic link — Relative and Absolute. An absolute link stores the path from the root directory to the target file (eg `/home/fred/MyFile' ). A relative path stores the path from the symlink to the target (eg `../fred/MyFile' ). If the target file is never going to move then you want an absolute link, but if the target may move (and the symlink will be moved with it) then you want a relative link.
This menu allows you to select and unselect files in various ways. See the mouse and key bindings section for other ways to select files.
Entry | Action |
---|---|
Select every item in this window. | |
Unselect every item in this window. | |
Every selected file becomes unselected, and every unselected file becomes selected. | |
Select just those files that match the given pattern — see the Select If section. |
Each entry in this submenu opens a savebox for creating a new file or directory. There are two standard entries; the others are the contents of your `<Choices>/Templates' directory, if it exists.
Entry | Action |
---|---|
Directory | Create a new directory. |
File | Create a blank file. |
<user entries> | Copy a file from your Templates directory. |
<html> <head> <title>My Page</title> </head> <body> The contents. </body> </html>Save this as `index.html' inside the `Templates' directory and you can easily create new HTML files. You can also save blank documents from various applications into here (eg, a blank spreadsheet, a blank letter, etc).
Note that you cannot set keyboard shortcuts for these user-defined entries at present.
Entry | Action |
---|---|
Open a new window displaying this window's parent. | |
As above, but reuse this window. | |
Open another window onto this directory. | |
Change to your home directory. | |
Set the window to a sensible size for its contents. | |
Close this window. | |
Open the path-entry box (see the the Minibuffer section). | |
Open the shell command box (see the Minibuffer section). | |
Same as selecting ROX-Filer and choosing | from the menu.
The `Send To' menu provides a quick way to send some files to an application. The filer scans all the `SendTo' directories in your CHOICESPATH and lists the contents on this menu.
To change which applications appear here you should choose the Control and Shift held down.
item from the bottom of the menu to create and open your own SendTo directory. Applications can be symlinked into this directory by dragging them in withOpening the Send To menu via the main menu is rather slow, so it is normally opened by clicking the Menu mouse button over a file while holding the Shift key down.
The Pinboard support and Panel support sections explain how to turn the pinboard and panels on. Once on, you may drop items from filer windows onto the them to pin them up. Clicking on a pinned item acts just like clicking on it in a filer window. You can drag pinned icons just like normal icons and you can right-click on one to see the popup menu.
Drag panel icons with the middle mouse button to move them around. In previous versions of the filer, pinboard icons were also moved using the middle mouse button. This may still work (depending on your window manager), but using the left mouse button is now preferred.
Changes to the pinboard and panel are automatically saved. Clicking on pinned icons with Control held down selects and unselects them. Click on the background to unselect them all.
If the panel has so many icons that they can't all be shown at once then you can scroll it by dragging the blank area in the middle.
Pinning a file does not copy it, it merely creates a shortcut to the original file. If you delete the file, then you've lost it! Removing a pinned file from its pinboard or panel only removes the link. This is different to most other filers...
These menus are both the same, and very simple:
Entry | Action |
---|---|
Show the filer's help, edit the options or open your home directory. | |
Offers a smaller version of the filer's submenu of the same name. | |
Change the name displayed under the icon, or the pathname the item points to. | |
Open a directory viewer showing where the file is stored. | |
Remove the selected items from the pinboard or panel. |
Note that individual applications may add extra menu items to the top of this menu when you click over them — see Application directories for details.
ROX-Filer allows you to run small programs inside the panel — such programs are called applets. To run an applet, drag it onto the panel from a filer window and instead of the applet's icon being shown, the applet will run.
To create your own applets (programmers only!):
Create a directory for the applet (eg `MyApplet' ).
Put an icon called `.DirIcon' inside it (so the directory appears with an icon).
Make a `Help' directory inside it for when the user chooses
from the menu.Create an executable file called `AppletRun' . This will be passed the XID of the panel socket window when the directory is dragged onto the panel. You can use this to create a GtkPlug widget. An example applet (written in python) is available at http://rox.sourceforge.net/applets.php3
Some types of file can be represented as a directory. A typical example is a zip file, which contains an entire directory structure in compressed form. It is often useful to be able to open up such a file as if it was a real directory, and the VFS system allows you to do this.
To use this feature you must have one or both of the following:
A system such as AVFS[AVFS] which causes the kernel to support various Virtual File Systems directly. This is the best option since all programs will be able to access the contents of the VFS. You may require root access to install such a system, however, and it is not available on all platforms.
Support for the Midnight Commander VFS library compiled into ROX-Filer. This happens automatically when you compile ROX-Filer if it can find the VFS library — this means having `libvfs.so' (or `libvfs.a' ) in a system library directory or in the directory in the environment variable LD_LIBRARY_PATH. In this case, you will be able to view the directory structure and copy files out of it, but not change it.
When using libvfs, the menu structure is slightly different —
is replaced by the Open VFS submenu. This is simply a short-cut for using the path-entry box (explained below), so if you want to use a VFS not listed on the menu you can type in the path directly, eg: `/home/fred/archive.zip#uzip/' . Don't forget the final slash!Use of libvfs is strongly discouraged; use AVFS instead. Recent versions of the library don't compile properly, and it can't be used on many systems because it conflicts with large file support.
The mini-buffer is a white bar that appears along the bottom of the window and allows you to enter some text. Press Escape to get rid of it again. It behaves in different ways depending on how you invoked it:
This allows you to type in a path directly. As you type the display is updated to show the item entered visually. The main use is to find a file in a large directory quickly, but you can also use it for navigating between directories, or for selecting a full pathname from somewhere else and pasting it directly into the path-entry box.
Key | Action |
---|---|
Return | Open the currently selected item. |
Tab | Shell-style tab completion. |
Up, Down | Select the previous/next matching entry. |
If you start entering a name beginning with a `.' then the `Show Hidden' feature is temporarily turned on so that the file can be shown.
Tab completion tries to fill in as many characters for you as it can. For example, if there are two files in a directory called `save-mail-nov-1999' and `save-mail-dec-1999' then typing 'save' and pressing Tab will expand `save' to `save-mail-' and beep to indicate that the match is not complete. If you use tab completion on a directory and it is unique then the filer will automatically change into the directory. This behavior should be familiar to shell users.
Let's say you want to locate the documentation for Wine in the directory `/usr/doc' (which is usually very large). Here's how you could do it:
Open the minibuffer by choosing from the Window menu. I usually bind this function to the slash (/) key.
Press CTRL+U to delete the existing contents — this moves you to the root directory.
Type u<Tab>do<Tab>wi<Tab>. As you type, the cursor will move to the correct subdirectory. If it beeps when you press Tab then you need to supply more letters.
This provides a quick way of entering shell commands if you don't want to open an xterm. If you don't know what shell commands are, skip this section!
Just type in the command and press Return to execute it. Up and Down arrows move through previously entered commands. Tab does shell-style completion. Clicking on an item inserts its name into the minibuffer. If some items are selected then they are assigned to the positional parameters $1, $2, etc.
Opening the minibuffer with a selection adds $@ to the end of the command — this expands to all the selected files.
Notes
Be careful; you will not be asked to confirm! If in doubt, start the command with xmessage so that it will be displayed rather than executed.
sh is always used as the name of the shell to run (mainly because bash and csh treat positional parameters differently). However, PATH is searched to find it so you can still use another shell if you want by naming it sh and putting it in your path.
Commands execute in the background, so you can say: sleep 240; xmessage Time to go!
Use this if you want to automatically select all files in the directory which match a condition.
For example, to select all files larger than 5Mb:
Action windows are those boxes that appear while you're doing a Copy/Move/Link/etc operation. The status line at the top of the window shows the current directory or object that the window is processing. The scrolling area below is the log area — it shows what has been done, and questions may be displayed here.
Below this are four buttons and some options. All windows have the `Quiet' option. When this is on the filer will only confirm some operations (such as deleting a non-writeable file). Otherwise, all operations are confirmed.
The buttons work as follows:
Some actions have options, which appear as option boxes at the bottom of the window. They are:
`Force' means that the filer won't treat non-writeable files as special. Normally, it confirms the deletion even if is pressed. Note that you still can't remove files from non-writeable directories because in that case you really don't have permission.
`Brief' prevents the filer logging a message every time it does something. Use this to speed things up if large numbers of messages are being logged.
`Recurse' means that doing something to a directory will also do the same thing to all its contents, and the contents of any subdirectories, and so on.
The Find feature looks through all the selected files and directories and any subdirectories (recursively) looking for items that match a particular expression.
If you know the name of a file then just enter it in the `Expression:' box, enclosed in single quotes. For example, to find a file called `log' you would enter 'log'. Remember to use normal quotes, not double quotes (") or back-quotes (`).
As the filer finds matching files they are added to the results list. Clicking on an entry in the list opens a viewer showing the file you clicked on. The filer will use the same window to view other results (so, if you want the results shown in separate windows you must explicitly create a new window from the Window menu).
You can also put shell-style wildcard characters inside the quotes, for example:
'*.html' |
'Report.*' |
'Draft[1-5]' |
'main.[ch]' |
If the pattern you enter contains a slash (`/') character then the pattern is matched against the file's full path, otherwise only the leafname is used. That is, '*tmp*' will find `tmp' and `tmpfile' but not `/tmp/file' — '/*tmp*' will find all three.
As well as finding files by their names you can also find them by various other attributes. Note that file is used here to mean anything that can appear in the filesystem — including directories, devices and so on.
You can also use a short form for each test; these are shown in brackets. You can combine multiple tests — `-rw' is the same as `IsReadable and IsWriteable'.
These look at the type of the item being checked:
These look at the permissions set on the file — see the Permissions section.
You can combine the above tests in various ways to perform more advanced searches. An expression is actually made up of a list of cases, separated by commas. The filer will try to match each case in turn until one matches or there are no more cases left. For example, to search for files with several possible endings:
'*.gif', '*.htm', '*.html'Further, each of the cases is actually a list of conditions. The case only matches if all of its conditions are met. So, to find a directory called `lib' or a regular file ending in `.so' :
IsDir 'lib', IsReg '*.so'You can negate a condition by putting a ! in front of it and you can use a sub-expression as a condition by bracketing it, like this:
!(IsDir, IsReg) !IsDir !IsReg Not isdir and not isreg !-d !-fAll four do the same thing.
You can also compare various values using the operators <, <=, =, !=, >, and >= (for less-than, less-than-or-equal-to, equal-to, not-equal-to, greater-than and greater-than-or-equal-to). When comparing times, you may find it helpful to use after and before instead of > and < to make things clearer.
The following are read from the file being checked and may be used for the values being compared:
Times are measured as seconds since the Unix Epoch (00:00:00 UTC, January 1, 1970). Sizes are in bytes. When specifying constants to compare these values with you may use various keywords to scale the value:
mtime after 1 day ago size > 10 Mb IsReg and nlinks > 1The first finds files modified within the last 24 hours. You could use > instead of after, but it's not so clear what is meant.
The second finds files larger than 10 Mb. The last finds regular files with more than one directory entry.
Be careful though — the filer doesn't check the context of the modifiers, so size > 1 day ago is allowed, although it doesn't make much sense! Also, forgetting to use ago or hence will cause odd effects (the time will be measured relative to the Epoch rather than the current time). Finally, don't use = with times — atime = 1 day ago looks for a file accessed exactly 86400 seconds ago...
System(Command) executes `Command' on the file. The test succeeds if the command returns an exit status of zero. A `%' character in `Command' is replaced by the full path of the file being checked. System is a very slow test to perform, so do it last if possible. For example, if you're looking for a `.c' file containing the word `main', do:
'*.c' system(grep -q main "%")so that the grep is only performed for files ending in `.c' (as opposed to only checking that the file ends in `.c' if it contains the word `main').
Prune Always fails! [2] However, if it gets evaluated at all then it prevents the filer from checking inside the current directory. Remember the order in which the filer checks the expression!
'*.old' system(rm '%') 'src' prune, '*.c'The first deletes each file ending in `.old' . The second looks for `.c' files, but does not bother checking inside directories called `src' . The expression is evaluated like this:
If file is named `src' then `Prune'. Either way, check if it ends in `.c' and include it in the results if so.
You can configure various aspects of ROX-Filer from the Options box. Choose
from a filer window menu to open it. At the bottom of the window are four buttons:puts all your choices into effect, and also saves them into your Choices directory for next time ROX-Filer is loaded. ROX-Filer will never save any preferences to disk unless you click on the button in the options window. Exactly where choices are loaded from and saved to is controlled by the CHOICESPATH environment variable — see [Choices] for details.
puts your choices into effect without writing anything to disk.
You can choose which language the filer will display messages in from here, or get it to read the LANG environment variable to get the desired language.
`Ignore case when sorting' treats upper and lower case letters as equivalent when sorting. If this is off then `Zoo' comes before `animal' , for example.
`Directories always come first' means that all directories are sorted and displayed at the top, then all the other items are sorted and displayed below. With this option off, directories are mixed in with the other files.
`Large wrap width' sets the maximum width for a file's name in `Large Icons' display mode before the text will wrap onto two lines. In `Huge Icons' mode, the wrap width is 50% larger than this value.
`Max Small Icons width' — in `Small Icons' mode, any text longer than this is chopped off (a red bar indicates that some text is not shown). You can hold the mouse over the truncated name to see the full text.
`Inherit options from source window' controls what happens when you open a new window from an existing window (eg, by clicking the middle button over a directory). If on, the new window has the same options (icon size, sort order, etc) as the old window. If off, the new window has the default options.
`Default settings for new windows' . The remaining options provide the default settings for newly opened windows — they correspond to choosing styles from the menu.
If you are using the pinboard features (see the Pinboard support section) then you can choose how the text under each icon is displayed. If you have a fairly uniform background then you may like to choose `No background' , which simply draws the text directly over the desktop background. However, users with more `noisy' backdrops may find such text hard to read; selecting `Rectangular background slab' will draw a solid rectangle behind the text to make it easier to read. When using Gtk+-2.0, this option has no effect.
You may also change the foreground and background colours used for the text by clicking on the colour slabs in the Options window.
`Single-click to open' allows you to open a file or directory just by clicking on it. Hold down Control to select things. If this is off, clicking selects and double-clicking opens.
`Keep icons within screen limits' prevents icons from going partly off the side of the screen.
`Icon grid step' controls how finely the icons may be positioned.
If you are using panels (see the Panel support section) then this section lets you choose which icons will have textual labels underneath them. You can have labels on all icons, on no icons, or on all icons except applications.
You can choose to start some operations automatically, without waiting for you to click on
. Select each operation that you want to auto-start here. You can also set the default state for each of the options that appear inside action windows.The toolbar is described in the Toolbar section.
`Unshade the tools you want:' allows you to set which tools should appear on the toolbar. Click on the buttons below to shade and unshade them — shaded tools will not be shown on filer window toolbars.
`Toolbar type' allows you to choose what kind of toolbars you want. means that windows will not have a toolbar, provides a small bar of icons, and displays larger buttons, with textual labels.
`Show totals of items' shows the number of items displayed in a filer window, as well as the number of hidden items (if any) on the toolbar. When there's a selection, it shows the number of selected items and their combined size (excluding directories).
`Automatically resize filer windows' can be used to control when windows are automatically resized:
`...never' turns off auto-resizing. Windows must be resized manually.
`...when changing the display style' will resize the window automatically when you change the icon size or the type of details to be displayed.
`...always' causes the window to resize whenever it seems useful (that is, when changing to a different directory or when switching between display styles).
`Window size limit' sets the largest size (as a percentage of the screen size) that the auto-resizer will resize windows to.
`Unique windows' prevents you from having two windows showing the same directory. Opening a second view onto a directory closes the first.
`New window on button 1' swaps the actions of the two non-menu buttons when opening directories. This is provided for people who are used to the RISC OS mouse bindings.
`Single-click navigation in filer windows' means that clicking on a file or directory will open it. If off, clicking on files selects them instead — you must double click on a file to open it.
ROX-Filer uses the standard XDND protocol for drag-and-drop. This protocol recommends that URIs should contain the hostname of the computer that the resource is on so that the program receiving the data can determine whether it can get the data directly or whether it must go via the X-server. However, many older programs (particularly GNOME applications) get confused by the hostname and fail to load the data correctly. If `Don't use hostnames' is on then the hostname part is omitted and ROX-Filer will work with these applications BUT you can't drag data to a program running on a different machine.
`Allow dragging to icons in filer windows' controls what happens when you drop files onto icons in filer windows. If on then drops onto directories will save the data inside the directory, while dropping onto programs will invoke the program on that data. If off then drops anywhere inside a filer window act like drops onto the window background — that is, the data will be saved into the directory being displayed.
`Directories spring open' controls what happens when you hold a file over a directory while dragging it. If on, the directory will `spring open' after a short pause, allowing you to navigate to any directory during a drag. You can also hold the pointer over the Home and Up buttons on the toolbar for a similar effect. You need to have the previous option enabled for this to have any effect on files displayed in a directory.
`Spring delay' sets how long, in thousanths of a second, the filer will wait before spring opening a directory as described above. If the above option is turned off, then this has no effect.
`Dragging files with the middle mouse button...' you can choose whether this displays a menu (like Alt dragging) or moves the files (like Shift dragging).
`Xterm here program' is the command used when you choose from the menu. You can replace it with another command such as gnome-terminal, konsole, or anything else.
`Size of icons in menus' controls the size of the icons in the and menus.
`Menu on button 2' swaps the actions of buttons 2 and 3 so that the middle button brings up the menus. This is provided for people who are used to the RISC OS mouse bindings.
As an alternative to using the options window to put menu on button-2, some people prefer to use the command xmodmap -e "pointer = 1 3 2", which makes the right mouse button button-2 and the middle one button-3 (this affects all programs, not just ROX-Filer).
`Ignore eXecutable bit for known extensions' means that when a file has a known extension (eg `.gif' ) the executable bit is ignored. This is useful if you have files on a Windows-type filesystem which are being shown as executable programs. However, it prevents a file such as `script.sh' from being treated as a program.
`Colour files based on their types' . If on, each file's name is coloured depending on what kind of thing it is (regular file, directory, executable, etc). You can choose the colours from the list below.
All files have a MIME type in the form text/plain. Here, text is the media type and plain is the sub-type.
ROX-Filer uses a file's name to decide what its MIME type is, and then uses the MIME type to decide what icon to give it and what program to use when you open the file.
This box appears when you choose
from the File menu, and is used to set which application is loaded when you click on a file.For example, let's say you want to set things up so that opening a `.gif' file loads it into the Gimp. First, right-click over a gif image to open the menu and choose
from the submenu. Then, you have a choice of two methods to set the run action:Drag the Gimp (from a filer window, a panel or the pinboard) onto the area marked `Drop a suitable application here' . From now on, clicking on a GIF file will load it into the Gimp.
Type: gimp "$1" into the box labelled `Enter a shell command' and press Return. $1 will be replaced by the name of the file you click on when this command is used. As before, clicking on any GIF image will now load it into the Gimp.
Whichever method you use to set the action you have the choice of setting the run action just for that type, or setting the default for all files with that media-type which don't already have a specific action.
Since the Gimp can load many types of image, it makes sense to select the `Set default for all `image/<anything>'' option so you don't have to do it again for image/jpeg files and so on. However, this only affects types that don't already have a specific action (ie, those that would have brought up an error box if you tried to open them).
This box appears when you choose
from the File menu, and is used to set which image to use to represent the file.It works much like the Set Run Action box described above, except that you may specifiy an icon for one file individually (by name) as well as for all files of a particular type.
The directory icon inside the `Drop an icon here' area allows you to quickly get to a directory from which you are already using one or more icons.
ROX-Filer uses three sub-directories in your Choices directory for filetypes:
contains files which specify what the MIME types for files should be, based on their extentions. All the files in all the `MIME-info' directories are scanned when the filer loads. ROX-Filer comes with a file containing many such rules — this is installed into the `MIME-info' directory by the rox-base package.
Many applications now come with a file called `something.mime' ; copy these files into your `MIME-info' directory to make ROX-Filer automatically recognise the new extensions. ROX-Filer doesn't automatically re-read these files when they change. You can either restart the filer, or click on the Types' section of the Options box.
button in the `contains symlinks, one for each MIME type, which point to programs that can handle files of that type. To set what program is run when you click on the file you should normally use the feature (see the the Set Run Action box section). However, you can also set the actions manually — for example, to make opening an HTML file load it into Netscape:
You can also put actual programs in here as well as links if you want to.contains the images used to display each type of file. So the filer will try to display an HTML file using the icon `MIME-icons/text_html.xpm' .
An application directory is a directory which can be run as an application. It contains all the resources of an application — source code, binaries, documentation and so on. Keeping everything in one place make installation and uninstallation much easier for users. You can also keep multiple versions of a program by simply having several application directories. You may move and rename them as you please. Application directories make programs easier to use and install.
They're more secure too, because you can compile an application as a user and then simply copy it as root. Since you don't have to run an install script you are free from the danger of running untrusted code as root. All you have to watch out for is setuid binaries.
The following files are treated as special by ROX-Filer:
`AppRun' is executed when you click on the directory — make sure it is executable (use the Permissions box)!
`.DirIcon' is the image used to represent the directory (this works even if there is no `AppRun' ).
`Help' is the directory to be opened when you choose from the File menu.
`AppInfo.xml' contains extra information about an application (see below).
`AppIcon.xpm' is used if `.DirIcon' is missing (for backwards compatibility).
For security reasons, an application directory must have the same owner as the `AppRun' file inside.
`AppInfo.xml' is an XML file with the following structure (any elements may be omitted, and the file itself is optional):
<?xml version="1.0"?> <AppInfo> <Summary>A graphical file manager</Summary> <About> <Purpose>File manager</Purpose> <Version>1.1.3 (07-May-2001)</Version> <Authors>Thomas Leonard and others</Authors> <License>GNU General Public License</License> <Homepage>http://rox.sourceforge.net</Homepage> </About> <AppMenu> <Item label="Enable pinboard" option="-p=Default"/> <Item label="Disable pinboard" option="-p="/> </AppMenu> </AppInfo>
Summary is displayed in a tooltip when the mouse is held over the application.
About contains a list of fields which are shown in the `File Info' box for the application (any element names may be used, but the above are suggested).
AppMenu is a list of extra menu items to display for the application. When one is chosen, `AppRun' is called with option as its only argument. You can nest AppMenus inside other AppMenus.
ROX-Filer is able to translate many of its messages, provided suitable translation files are provided:
Go into the `src' directory and create the file `messages.pot' :
$ cd ROX-Filer/src $ make messages.pot
Copy the file into the `po' subdirectory under `src' as `<name>.po' . Eg, if your language is referred to as `ml' (`my language'):
$ cp messages.pot po/ml.po
Fill in the translations, which are all blank to start with.
Run the `make-mo' script to create the binary file which ROX-Filer can use. You will need the GNU gettext package for this. If you don't have it then just send me the `.po' file and I'll convert it for you.
$ cd ROX-Filer/src/po $ ./make-mo ml Created file ../../Messages/ml.gmo OK
Edit `ROX-Filer/Options.xml' so that your language is listed, restart the filer and select it from the Options box (see the Translations section).
Submit the `.po' file to me so that I can include it in future releases of the filer.
Go into the directory containing the `.po' files and run the `update-po' script. This checks the source code for new and changed strings and updates all the translation files.
$ cd ROX-Filer/src/po $ ./update-po
Edit the file by hand as before, filling in the new blanks and updating out-of-date translations. Look out for fuzzy entries where update-po has made a guess; check it's correct and remove the fuzzy line.
This is a quick start guide for people who want to modify the source code. If you make useful changes or fix bugs, please send patches to me or to the mailing list. Tell me which version you're using!
The first time you compile the program you need to do AppRun --compile, but in future you only need to run make in the `src' directory when you change the `.c' and `.h' files. You might want to run make depend too.
When people make small modifications to the sources they will often distribute them as patch files — usually on the mailing list. To apply a patch, go into the `src' directory and run patch with the patch file. Then recompile, like this:
$ cd ROX-Filer/src $ patch < patchfile $ ../AppRun --compileYou can remove the patch by simply repeating the above sequence — patch will detect that the patch is already applied and offer to remove it.
To create a patch you should first get the latest version of the filer from CVS (instructions on using CVS can be found on the web-site). Modify the program as you please. Create the patch using cvs diff from the appropriate directory:
$ cvs diff -u > my_patchThis creates a human– and machine-readable patch file. Submit this to the mailing list. The are many reasons for posting patches rather that the modified files:
They are smaller, and hence shouldn't bounce. They are also quicker to download for people with slow connections.
People can see what they're getting into before applying them!
Patches can (usually) be applied to slightly modified versions of the sources. This means that people can apply several patches without each new one overwriting the others.
Here's a quick explanation of the autoconf system in case you haven't used it before. See info autoconf for full details.
There's a file called `configure.in' which contains various tests (info autoconf). You run autoconf and it reads through the file and generates a shell script to perform the tests, saving it as `configure' . `configure' is normally distributed with the program because not everyone has autoconf.
You then run `configure' (in fact, let the `AppRun' script do it because it passes it some arguments), which performs all the tests. It reads in `Makefile.in' and `config.h.in' and fills in the missing values with the test results to produce `Makefile' and `config.h' .
You run make, which creates `.o' files from the `.c' files and links to produce `ROX-Filer' .
The `global.h' file lists each major data-structure used in the filer and explains its purpose. This is a good place to start reading if you want to know how the filer works.
In summary, each window has its own FilerWindow structure. This structure has pointers to a Collection (which is the widget which actually displays the files) and to a Directory, which is used to cache the directory contents.
Both Collection and Directory have pointers to (the same) DirItems, each of which corresponds to one filesystem object.
Several FilerWindows may share the same Directory.
While scanning is in progress the Directory keeps a list of the new items it has found (new_items) and the items which have changed in some way (up_items). It periodically notifies the filer window of the changes-so-far by calling all the functions in the users list (use attach() and detach() to add and remove functions to or from the list).
ROX-Filer is a simple and easy to use graphical file manager for X11, the windowing system used on Unix and Unix-like operating systems.
It is also the core component of the ROX Desktop: http://rox.sourceforge.net
Invoking rox opens each directory or file listed, or the current working directory if no arguments are given.
open DIR as directory (not as an application, even if it looks like one).
start a new filer, even if one already seems to be running. This also prevents the filer from forking (running in the background), which is useful for debugging.
read and invoke SOAP RPC from standard input (see Appendix B. SOAP RPC).
The main documentation for ROX-Filer is available by choosing
from the popup menu, or by clicking on the toolbar icon.Copyright (C) 2002 Thomas Leonard.
You may redistribute copies of ROX-Filer under the terms of the GNU General Public License.
ROX-Filer was created by Thomas Leonard, with help from:
Christopher Arndt | Couderc Damien | James Kermode | Jimmy Olgeni |
Jens Askengren | Andreas Dehmel | Jim Knoble | Andy Piper |
Liav Asseraf | Dmitry Elfimov | Krzysztof Krzyzaniak | Marcelo Ramos |
Wilbert Berendsen | Mattias Engdegard | Vincent Ledda | Michel Alexandre Salim |
Francesco Bochicchio | Andrew Flegg | Vincent Lefevre | Chris Sawer |
Andrzej Borsuk | Olivier Fourdan | Victor Liu See-le | Taras |
Richard Boulton | Eric Gillespie | Anders Lundmark | Simon Truss |
Simon Britnell | Thierry Godefroy | Jose Romildo Malaquias | Jan Wagemakers |
Arnaud Calvo | Alex Holden | Denis Manente | Stephen Watson |
Andrew Clover | Jasper Huijsmans | Andras Mohari | Andre Wyrwa |
Fabien Coutant | Bernard Jungen | Christiansen Merel | Diego Zamboni |
and many others; the `Changes' file contains more detailed information!
When the filer starts you can use command-line options to control its behaviour. As an alternative to this, the filer allows you to specify an operation with a [SOAP] RPC format message. In fact, if you use the command-line options, the filer converts to SOAP RPC internally.
All SOAP RPC messages are passed on standard input, like this:
$ rox --RPC << EOF <?xml version="1.0"?> <env:Envelope xmlns:env="http://www.w3.org/2001/12/soap-envelope"> <env:Body xmlns="http://rox.sourceforge.net/SOAP/ROX-Filer"> <Panel> <Name>Default</Name> <Side>Bottom</Side> </Panel> </env:Body> </env:Envelope> EOFThe following methods are recognised:
CloseDir(Filename) Close directory Filename and all its subdirectories.
Examine(Filename) Filename may have changed — check it and update the display.
Panel(Side, [Name]) Open the panel named Name on screen side Side (Top|Bottom|Left|Right). Name can be a name in Choices (eg, MyPanel) or a full pathname. If not given, the panel on that side is turned off.
Pinboard([Name]) Display pinboard Name on the desktop background. Name can be a name in Choices (eg, MyPinboard) or a full pathname. If not given, the pinboard is turned off.
Run(Filename) Run Filename as if it was clicked on in the filer.
Show(Directory, Leafname) Open Directory and flash the file Leafname inside it.
FileType(Filename) Returns the MIME-type of Filename (by writing the SOAP response to standard output).
The following calls can be used to start new file actions. Quiet can be true if the operation should start immediately, instead of waiting for the user to confirm. If false, the user must always confirm. If not given, the default setting is used.
Copy(From, To, [Leafname, Quiet]) Copy each file in the array From to the directory To. If Leafname is given then From should contain a single entry only; Leafname gives the new leafname.
Move(From, To, [Leafname, Quiet]) Move each file in the array From to the directory To. If Leafname is given then From should contain a single entry only; Leafname gives the new leafname.
Link(From, To, [Leafname]) Symlink each file in the array From to the directory To. If Leafname is given then From should contain a single entry only; Leafname gives the new leafname.
Mount(MountPoints, [OpenDir, Quiet]) Mount each directory in the list MountPoints. If true, OpenDir causes each directory to be opened once it is mounted.
The ROX desktop, http://rox.sourceforge.net
RISC OS, http://www.riscos.com
GTK+ Toolkit, http://www.gtk.org
The GNOME desktop, http://www.gnome.org
The Drag and Drop protocol, http://www.newplanetsoftware.com/xdnd/
The X Direct Save protocol, http://www.newplanetsoftware.com/xds/
The ROX Choices system, http://rox.sourceforge.net/choices.php3
AVFS - A Virtual File System, http://sourceforge.net/projects/avf/
Simple Object Access Protocol (SOAP) 1.2 http://www.w3.org/TR/SOAP/
Thumbnail Managing Standard (Version 0.5) http://triq.net/~pearl/thumbnail-spec/