File: README

package info (click to toggle)
launcher 0.86-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, sarge
  • size: 220 kB
  • ctags: 50
  • sloc: tcl: 903; makefile: 85; sh: 18
file content (249 lines) | stat: -rw-r--r-- 9,938 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
README for launcher version 0.86 - updated 1/26/00
http://www.cs.columbia.edu/~etgold/software/launcher/

Ethan Gold <etgold@cs.columbia.edu>
This software is provided under the GNU Public License.
You should have received a copy with this distribution.


What does it do?
----------------
This launcher maps files to MIME types via filename extension or
output from the Unix "file" command.  If there are more than one
handler defined for a given MIME type it presents you with a GUI
giving you a choice of which one to use. The dialog is similar to the
Windoze "Open With" dialog box, but *gasp* resizeable! The Launcher
can also be used as a commandline MIME file typer by other applications
which need to determine the types of files (such as email programs).
There are also several additional features listed below.


Why this launcher?
------------------
Every filemanager and other file handling piece of
software has its own way of mapping file types to file
handling programs. I wrote this one-stop solution for mapping
filenames to handlers so I could keep all my configuration
information in one place. Whether I'm using KDE, DFM, TkArchive,
or Window Maker, I configure them all to use my launcher for
everything. I considered using metamail for this purpose, but
metamail insists copying its input to temporary files! This is
VERY inconvenient if you use it to launch an editor to access
an existing file. There were other problems as well.


Features:
---------
* Handles files, directories, URL's, and executables
* Makes use of well-known files/formats by parsing Apache's mime.types file and
      making use of the Un*x file utility along with Apache's magic number
      definition file
* Uses MIME types for mapping files to handlers
* Allows multiple handler definitions per type and provides
      GUI-based disambiguation
* GUI only lists handlers defined for the given file type or lists
      all defined handlers if the type is unknown
* Runs synchronously or asynchronously
* Launches handlers by file or by type
* Allows multiple files to be handled by the same handler invocation
* Can be used as a generic file typer without launching handlers
* Includes modified copies of Apache's mime.types and magic files
* Written in 100% basic tcl/tk - should be extremely portable
* Emacs/emacsclient wrapper script included
* GUI configurator for the Launcher's config file

Installation:
-------------
Read the INSTALL document

Usage:
------
You may also want to read the man page.
The launcher is intended to be invoked from a comandline or from
some sort of program requiring application file handling facilities.
If several possible handlers are defined for a given file or set of files
of a particular type on the commandline the Launcher will pop up a GUI window
to let you select between them. Clicking the third mouse button in the GUI
window will bring up the config file GUI configurator. You may also edit
the config file with a text editor or by launching the config GUI from
a commandline.

Several commandline switches are supported, some of which may be
set in the config file:

--nowait
	Operate asynchronously, launching handlers in the background

--all
	Send all same-type files to the same handler invocation if
	the configuration indicates that the handler can open multiple
	files

--type mimetype
	Force "mimetype" to the be type for all files specified
	on the commandline - bypasses all filetype tests. Unknown
	types will be handled as usual.

--showtypes
	Print the name and MIME type of each file to stdout and exit.

--default
	Surpress user queries and just use the default handler for
	each type. The default handler is the *first* one defined on
	any given type.

--compressed
	Peek inside compressed files to detect primary type using the
	file command's "-z" option. Note that this will return the internal
	type which will then be mapped to the handlers defined for that
	type. If your defined handlers do not read compressed data then
	this won't work very well. One option is to map compressed data
	reading handlers (like gv) to the compressed types as well as to
	their primary types. This can be used implicitly with the
	provided definition in the launcher mapfile called "Peek in
	compressed..." which will recursively call the launcher with the
	--compressed option for you.

--help
	Print out the usage message.

--version
	Print out the version number and primary web address.


Future/Bugs:
------------
* Provide infrastructure for different action types (view vs. edit)
* May decide to handler all types with common handlers
  in a single invocation
* Fix resizing in launcherconfig
- The Solaris "file" command seems to do strange things
  with the Apache magic.mime file
- semi-generic typing not fully handled yet. i.e. image/*
- interaction model (set/add/whatever) for the GUI needs
  some minor revision.


Changes:
--------
	Since 0.85
* launcher starts up with tclsh instead of wish - oops
* launcherchoice pops up under the mouse
* Fixed emacsw to handle embedded spaces in filesnames ( "$@" ).
  This does not seem to make a difference with wmfinder, however...
* changed magic.mime to mime-magic to match RH-6.1 files and
  duplicated mime-magic from RH since it's more comprehensive.
* updated included launcher.map


	Since 0.80
* added %d for parent-directory-of-file substitutions
* fixed bug in the parent directory function - it was breaking netscape
  URL stuff
* added --version switch
* added/working on GUI for launcher.map files

	Since 0.72
* file command is now used before extension mapping in type testing
  don't know if this is better or worse, but it allows the launcher
  to use the file command's -z option to peek into compressed files
* added --compressed option which lets the launcher peek into compressed
  files - only useful if your defined handlers for the internal type
  will read compressed data
* forced the file command result reading code to use the exact type
  field so it doesn't get confused on pathnames with "/"'s when looking
  for a valid MIME type string
* Added "Peek in compressed..." to the map file and some appropriate
  mappings
* Updated keybindings in choice window - escape and return  and C-c
  now work regardless of focused widget (appropriately for cancel/ok) and
  the scrollbar no longer takes focus when tabbing through widgets.
* Added emacsw wrapper to emacs/client which behaves exactly like
  emacsclient except that if no server is detected than regular emacs
  is invoked.

	Since 0.70
* fixed quoted name semi-bug for netscape even more. This kind of
  non-general code is a VERY BAD thing. It will work if the defined
  netscape handler is named something that matches
  [regexp -nocase {.*netscape.*} "handler string here"]
  But netscape should recognize both URL's and files properly again.
* MANPAGE!!!!!

	Since 0.62
* --all, --nowait, and --default are all now settable in the
  .launcher.map file. See the top of the sample mapfile.
* Added --showtypes option which prints a list of input filenames
  and their discovered MIME types before exiting without launching
  anything.
* fixed problem where executable, but not readable files were ignored
  (try typing ssh) - should links be reported as something specific,
  or */* as they are now?

	Since 0.60
* fixed semi-bug which caused netscape not to recognized URL's contained
  in quotes - URL strings are now passed unquoted to the commandline.
  This bug was caused by the embedded spaces in filenames workaround
* Added --default commandline option to surpress user queries


	Since 0.53
* added --type commandline option
* hopefully properly fixed multiple file handling with embedded spaces
  AND handlers that don't take multiple files on the commandline.
  basically debugged the bugfix.
* Added debug flag/procedure for debugging easier development.
* Added typeahead to the GUI disambiguator.

	Since 0.52
* fixed user's .mime.types error
* properly set default installroot in Makefile
* check to make sure mime.types files are found
  before trying to use their possibly non-existant descriptors

	Since 0.51
* tweaked GUI so button-3 to launch launcher works
* fixed handling of spaces in filenames - list element vs.
  non list element problem in arguments to handler procedure.
* added sh->wish trick to top of launcherchoice too. oops.
* added support for a user's ~/.magic.mime file to allow complete
  personal installation without adding any files to /etc
* changed ~/ references to $env(HOME). env(HOME) is set to ~/
  if undefined at startup. This will break the use of the
  unix file command transparently if env(HOME) is not defined
  at startup. Launcher will just assume unknown type.
* changed all instances of "*/*" to a variable reference
* Apache license included for completeness
* Added Makefile and config.tcl
* Added $etcdir variable for configuration from the Makefile via
  config.tcl

	Since 0.5
* changed switches to use GNU -- convention and to allow
  --help consistantly without biffing on tcl's greedy parser
* added usage/help message

	Since 1998
* rewrote entire program and configuration files
* released publicly

	Since 11/20/98
* forced absolute pathnames into outgoing commandlines

License:
--------
All the code I've written is released under the GPL. See the
file named LICENSE which should have come with this distribution.
You can get a copy of the GPL from the Free Software Foundation at
http://www.fsf.org/
The mime.types and magic.mime files are derivatives and direct
copies respectively of the mime.types and magic files from the Apache
1.3.4 distribution. As such, they may be licensed under the terms
outlined in the LICENSE.Apache file included with this distribution.

Acknowledgements:
-----------------
Thanks to the Apache crew for putting together the
MIME-based magic number file which I'd been planning
to do myeslf, and for their mime.types mapfile as well.