LanX has asked for the wisdom of the Perl Monks concerning the following question:

Hi

This is not exactly a pure perl question! (... but I wanna use it for POD-pages)

I want to start local scripts associated to a mimetype from a (local¹) HTML-page in firefox and pass arguments via query string.

In Netscape4 it was possible to do that, the complete query string (or even the complete URL?) was passed as first argument to the associated application.

And mailer can still do this, e.g. with mailto:name@domain?subject=test&body=bla all fields are properly evaluated.

Does anyone know how to define a corresponding mime-type? Couldn't figure out the necessary modifications neither in mimeTypes.rdf in firefox's profile nor in the ubuntu configs. (mailcap doesn't seem to be evaluated anymore)

Cheers Rolf

Crosspost in German: http://forum.de.selfhtml.org/?t=193542&m=1292863

¹ There is no sandbox problem!

UPDATE: Made title clearer because of possible off-topic-nature.

  • Comment on (OT) Firefox passing arguments via mimetype to local perl script?

Replies are listed 'Best First'.
Re: (OT) Firefox passing arguments via mimetype to local perl script?
by Anonymous Monk on Dec 14, 2009 at 23:26 UTC
Re: (OT) Firefox passing arguments via mimetype to local perl script?
by The Perlman (Scribe) on Dec 16, 2009 at 00:32 UTC
    Workaround:

    Go to firefox menu Preferences-> Applications and bind mailto: to a wrapper script.

    If it's called with a mail address like "APP@wrapper" call the acording application APP, otherwise your mailer. You just need to forward the URI string which was passed as first argument.

    Like this something like <a href="mailto:myApp@wrapper?arg1=bla"> should do what you want.

    When making this script your OS wide default "mailer", it should do for all browsers.

    But better be paranoiac about security issues ... untaint the passed arguments!