Tcl/Tk Player


This is a tiny tool I wrote some time ago. It `executes' any kind of file according to the information found in ~/.mime.types and ~/.mailcap. The idea is certainly not original, and there are lots of other tools doing the same or more, but I love the tool as it is. One advantage it has over other tools of the same kind is that it also looks at the file itself (using the `file' command) instead of just looking at the extension. A file ~/.magic.types is read to match the output of `file' against MIME types.

The `Open' button pops up a file dialogue. After selecting a file, the program detects the appropriate MIME type and executes the appropriate program associated with that file type. your .mailcap.

The `Sync' button re-reads ~/.magic.types, ~/.mime.types, ~/.mailcap in case they have changed and is quite useful for testing purposes. If you don't need the button, hack the source.

The `Quit' button should be self-explanatory.

You can enter arbitrary commands in the field above the buttons, which are executed when you hit Return.

Whenever a command is executed, a new button is created to give information about which programs are currently controlled by the process. You can simply click on such a button to terminate the associated program.

Any output is captured and displayed in text widgets.

You need Tcl/Tk 8.x to run player.

See the source for more information. You are free to edit the source and change anything, but give me credit when you pass it on, please.

Frank Pilhofer <fp -AT-> Back to the Homepage
Last modified: Wed Dec 18 17:28:20 1996