Associate a file extension with an application
Mathias Brodala
info at noctus.net
Sat Mar 24 03:18:45 CET 2012
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi.
Joe Riel, 23.03.2012 01:45:
> In my case, I'd like to double-click on a Maple worksheet
> (extension .mw) and have it be opened with the Maple application.
> However, a .mw file uses xml formatting, so if I click File ->
> Properties in Thunar and then try to change the application to
> Maple, it wants to associate *all* xml files with Maple. That is
> not what I want.
You can follow the examples from the xdg-mime[1] tool. Save the
following as mapleprimes-maple.xml:
<?xml version="1.0"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
<mime-type type="application/maple">
<comment>Maple worksheet</comment>
<glob pattern="*.mw"/>
</mime-type>
</mime-info>
Now run the following command:
xdg-mime install mapleprimes-maple.xml
Now *.mw files are assigned a custom MIME type (application/maple here
according to [2]) and can be assigned a custom default application.
Regards, Mathias
[1] http://linux.die.net/man/1/xdg-mime
[2]
http://www.mapleprimes.com/posts/43616-MIME-Type-For-Automatically-Attached-Worksheets#comment90283
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk9tLvUACgkQYfUFJ3ewsJi2gwCdHQ90AYKB1gcSisIf7uCBzmsR
N5wAn0YlBUO3CkZQeYBqRSPgR+mC3XhV
=syz4
-----END PGP SIGNATURE-----
More information about the Xfce
mailing list