Opening Ardour projects from file manager

I would like to be able to open up Ardour projects from my file manager.
.Ardour files are really .xml files so this can cause a little bit of an issue.
Linux does not view file extensions the same as Windows does.

In Windows you can trick it based on what file extension is added and associate programs to open them.

Linux detects MIME types, therefore you cannot do this.

Would like to be able to open .xml files in a text editor and open up .Ardour files in… you guessed it, Ardour. Does anyone know if there is any way to simply achieve this?

For Linux, only thing I can think of is to choose which file type you use more often and associate with that program, and then you will have to use “Open With” for the other application, which works but not as convenient.

Thank You

You can of course add your own MIME-type. This is untested, but should work:

Put this in a file ardour.xml

<?xml version="1.0" encoding="utf-8"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
  <mime-type type="application/ardour">
    <comment>Ardour session file</comment>
    <glob pattern="*.ardour" />
    <alias type="application/ardour" />
  </mime-type>
</mime-info>

Then:

xdg-mime install --novendor ardour.xml

Then add the line:

application/ardour=ardour.desktop

to $USER/.config/mimeapps.list

Then:

update-mime-database $HOME/.local/share/mime

Details may vary according to your distribution…

I think you can do all this with just the file manager (with Dolphin at least):
Right click on *.ardour file->Open With->Search Ardour->Select the checkbox “Remember…”

Thank you guys for the responses.
I have never created a MIME type before, I have come across similar information before when trying to solve other non Ardour related issues in the past, but wasn’t worth at the time.
Now that I have a few reasons for this I will give creating MIME types a try. Thank you very much for providing some information on how to do this.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.