FileRunner

Tech tip: FileRunner

What is FileRunner?

FileRunner (FR for short) is a very handy file browser with a 2-panel GUI. Forget about cute icons and animations, FR is a lean and mean text-ony display -- but the text display is surrounded by convenient buttons for the most common operations on files and directories. It is quite like a GUI version of Midnight Commander. See a FileRunner screenshot here.

In my distro (Mandrake Linux 10.1), I noticed two problems with FileRunner v2.5.1. I attempted to contact the author, to no avail. My fixes are described below. The program hasn't been updated since 1999, so it looks like the maintenance should be picked by someone else.

The FR code is written mostly in Tcl, with a bit of C. The fixes described here involve only Tcl. Since Tcl is a scripting language, the fixes only require a text editor.

File size display problem for very large files

Description

For files greater than 2 GB, FileRunner displays the file size incorrectly (as a negative number).

Solution

This problem is due to 32-bit integer conversion in the Tcl format command. Let's fix it. First, find where the fr program resides on your system.

$ which fr
/usr/bin/fr
$ ls -l /usr/bin/fr
lrwxrwxrwx  1 root root 20 Jul  1  2004 /usr/bin/fr -> ../lib/FileRunner/fr

So on my machine, the code is in the /usr/lib/FileRunner directory. YMMV.

Now, as root, edit the code (make a copy first!). The fr program is just a text file. In the file, change all occurences of %7d to %7ld. The changed lines look like:

lappend fl [format "%-26s %7ld %s %s %s " " [lindex $k 1]" "[lindex $k 3]" "[GetTimeFromSecs [lindex $k 4]]" \

Save the file, make sure it is readable and executable by all.

Note: The Tcl manual says that the l flag is ignored in the format command. Well, that's not true in Tcl8.4 anymore.

Help files are not displayed in the GUI

Description

On some distros (noticeably Mandrake 10), the help files do not appear when the user selects the various entries in the help menu, and a "file not found" message is displayed.

Solution

Check where the FR documentation has been installed on your machine. On an RPM-based disto such as Mandrake, you can do:

$ rpm -ql FileRunner|grep doc
/usr/share/doc/FileRunner-2.5.1
/usr/share/doc/FileRunner-2.5.1/COPYING
/usr/share/doc/FileRunner-2.5.1/FAQ
/usr/share/doc/FileRunner-2.5.1/HISTORY
/usr/share/doc/FileRunner-2.5.1/QuickStart.txt
/usr/share/doc/FileRunner-2.5.1/README
/usr/share/doc/FileRunner-2.5.1/Tips.txt
/usr/share/doc/FileRunner-2.5.1/Users_Guide.txt

So the documentation dir, in this case, is /usr/share/doc/FileRunner-2.5.1

Then, as root, you should create a config file that sets the appropriate FR variable. This config file is named config and is located in the FR code directory. Do this:

FRDOCDIR=/usr/share/doc/FileRunner-2.5.1 # Documentation dir given by the previous step
cd /usr/lib/FileRunner # Location of the FR code in my distro
# Create the config file
echo "set glob(doclib_fr) $FRDOCDIR" > config
chmod a+r config

FileRunner (last edited 2005-04-13 16:29:40 by FredMora)