No need to mess around with the mailcap files etc. If you use Lynx,
NCSA Mosaic/X, or the emacs-w3 browser, you can use the x-exec URL
syntax. (Emacs-w3 can use this by default, but you will have to patch
Lynx/Mosaic - try searching the WWWWorm for x-exec and you should find
the refs to the patches)
Basic syntax is
progname will be looked for in 'trusted' directories on your local
machine - no explicit paths are allowed. (So no x-exec://bin/rm/*)
The progname is executed the same way a CGI script is on an HTTP
server. Uses the same environment variables, etc. The script can return
either an HTTP/0.9 response, or a full HTTP/1.0 response.
I am not sure if the Lynx and Mosaic patches have been updated for
the new CGI spec, but emacs-w3 handles it correctly.