Associate a file extension with an application

Ahau @porteus.org ajax.criterion at gmail.com
Fri Mar 23 19:27:07 CET 2012


Hi Joe,

I've only been using thunar for a few months, so I'm not sure if this
is the only method, or if there's a better way to do it, but I would
go about this by creating a custom action:

open Thunar
click on the "Edit" menu item
select "Configure Custom Actions"
click on the "plus" button to add a new action
In the dialog that opens, enter a name (e.g. Open in Maple),
Description (e.g. "Open an .mw file in Maple"), then add a command
(e.g. "maple %n").
assign an icon if you want, by pushing the "icon" button.
Click on the "Appearance Conditions" tab
for the "file pattern" use: *.mw
tick these boxes: Appears if selection contains:  (x)Text Files  (x) Other files

After you're done with that, you can right click on a .mw file and an
entry will show in the right click menu, "Open in Maple".  Click on
that and it should open up.


If you want this to work with a double click rather than a right
click+menu selection, you could probably use a simple wrapper script,
and set it as the default program for opening xml.  It would examine
the filename and if it was .mw it would open it in maple, otherwise it
would open whatever your current default xml editor is.  Again, there
might be a better way...

-Ahau


On Thu, Mar 22, 2012 at 5:45 PM, Joe Riel <joer at san.rr.com> wrote:
> How can Thunar be configured to associate a file extension with a
> particular application?
>
> 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.
>
> --
> Joe Riel
>
>
> --
> Joe Riel
>
> _______________________________________________
> Xfce mailing list
> Xfce at xfce.org
> https://mail.xfce.org/mailman/listinfo/xfce
> http://www.xfce.org


More information about the Xfce mailing list