Run 2.5.1

Welcome to Run 2.5.1, originally written by Matt Brubeck, and since taken over by Luke A. Kanies (lkanies@reed.edu).

Version

New in version 2.5.1: New in version 2.5:

Install

To install, rename the file to remove the architecture extension, and drag each binary into the appropriate folder (the addon has the '-R' tag).

Description and Use

Run comes in two forms, application and addon. To use the application form, just double click the icon; from here you can run any shell command, but you don't get STDOUT, STDIN, or STDERR, or any kind of environment (I am looking to add these into later versions).

The use of the addon form is essentially equivalent, except that it is accessed from the Add-ons contextual menu, and it can be used to operate on files or directories. There are only two differences between the addon and the application: 1) the addon sets $PWD based on the directory you run it in, whereas the application always sets $PWD to '/boot/home'. 2) the addon has the ability to operate on a list of selected files, whereas if you want to operate on files in the application, you must drag them in (you can drag files onto the addon, too).

I couldn't come up with a really good way to operate on files, so the current method seems like kind of a hack, and might change in later versions. Basically, if you select a bunch of files, then Run will execute your command for each file, putting the name of the file in the variable '$FILE'. So, for instance, if you wanted to delete a bunch of files using the addon you could use the command line 'rm $FILE', and it would iterate over each file, executing 'rm _filename_'.

That's about all there is to it. Because of the lack of any output from this program, you will likely find it useful to send all of your manufactured output to files (for instance, if your rename isn't working correctly, put the new name into a file--'echo $name >>/boot/home/Desktop/file') so you can see what is going wrong. Or echo the whole command there.

Also, '$FILE' is set to the filename _including_path_. I figured this would make the most sense, but if you strongly disagree, then please, let me know.

This tool is currently mostly useful for two things: Very simple things (like launching a terminal), and running a command line on files which are easiest to select in the gui (for instance, because they are part the result of a query). If you find it to be the best thing since sharp, pointy objects, let me know!

In the future, I plan on adding the ability to see output and errors, and I also plan on some basic preference settings (such as making the window persistent).

Examples

Here are some examples where I think Run works and nothing else would: In general, Run is great when you want to execute a command on a partial list of files returned by a query. For instance, my roommate downloaded many Space Ghost mp3s with audio by Brak. I don't want to delete them, but I want to be able to exclude them when I query my machine for all mp3s. So, I want to set them to 'Humour', and my inclusive-mp3 query will exclude humour mp3s. I do a query for 'brak' in the Tracker, and it finds all of the files I want plus a few more. I select the ones I want to change and use Run on them:
addattr Audio:Genre Humour $FILE
This sets all of them to Humour. In general Run is very good for working with mp3s, because you modify many files in many disparate locations very quickly.

Or let's say you have a folder full of files, and you want to change many but not all of them to all lowercase. Instead of specifying each on the command line, use Run with the command: old=$(basename $FILE); name=$(echo $old | tr A-Z a-z); mv "$old" "$name"

Bugs

There are three what I would call 'bugs' in this app, but they are actually just problems which I not programmed a solution for yet: If you have any comments, questions, or suggestions, feel free to email them to me. Also, if you think that the source would be valuable, let me know--I would probably be willing to provide it.

I have listed this version as freeware, but the next one, if it ever comes out, will likely be shareware.

Luke A. Kanies
luke@madstop.com