[Haskell-cafe] Re: [Haskell-beginners] Start file with associated
prog (windows only?)
Magnus Therning
magnus at therning.org
Tue Aug 18 16:59:48 EDT 2009
Max Desyatov wrote:
> Bernhard Lehnert <b.lehnert at gmx.de> writes:
>>> Windows has a command "start" which you can use e.g. via System.Process.proc.
>> Thank you, Magnus - this is exactly what I was looking for. (By the way,
>> someone should implement something like this for GNOME and KDE,
>> too ;-) )
>
> You can do that using MIME, look at /etc/mailcap, it already contains
> all what you need to run appropriate process for exact MIME-type. As
> long as it's supported in your distribution.
Is there a command line interface for that?
Or maybe a lib that's easy to wrap?
If you want to query the Gnome MIME database (which is separate from
/etc/mailcap) you can use 'xdg-mime'.
/M
--
Magnus Therning (OpenPGP: 0xAB4DFBA4)
magnus@therning.org Jabber: magnus@therning.org
http://therning.org/magnus identi.ca|twitter: magthe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: OpenPGP digital signature
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20090818/49763390/signature.bin
More information about the Haskell-Cafe
mailing list