Linking a file type to an application

I have searched high and low but cannot find out how to do this. I want to be able to automatically load LibreOffice when I click on one of the Open Document file types, but it tells me that there is no preferred application to open the file. It proceeds to ask if I would like to find a suitable application, and goes on to list the possibilities.

Which is fine, except for the fact that neither LibreOffice nor its constituent parts are listed.

What should I do? I’m hoping the answer is as simple as fixing my Ctrl key problem.


Select the file with filetype and search for you program to start.

Easiest is to select a file and click on “Open with…” of its context menu. In the opening panel, select an application and click “Open and make preferred” (check the User Guide).
This only works, if the app correctly reports what filr types it supports. Which LibreOffice apparently doesn’t…

So that only leaves opening the FileTypes preferences, find e.g.
“OpenDocument Spreadsheet” under “application” and find/select “LibreOffice” as preferred application.

Sadly, even that isn’t working completely, as LibreOffice opens on double-clicking the file, but it starts with some Launcher window…

1 Like

This is an example of where theory and practice don’t tie in as they should.

Thanks to both for the attempt to help; fortunately it’s not a major issue.

1 Like


I have the same kind of trouble here.
I try to play MIDI files with the software Audacious.
I have attempt to do it by the “Open with…” method like humdinger have said but it don’t work.
I have done it by Select the filetype from the preferences menu of Haiku and that work at half.

Now when I clic on a midi file, Audacious player launch but the midi file is not added to the playlist and is not played. So the question, is it a way to launch a certain command for filetype as exemple:
audacious %1
Here %1 can represent the filename.mid if this is a midi file.

One of the reasons I created my little TrackRunner project was to be able to run commands and scripts like that from Tracker. It’s available in HaikuDepot. You can create a new TrackRunner command that runs /boot/system/apps/Audacious and any selected files will be passed to it as command line arguments.

1 Like

Thanks, that’s work by access to the TrackRunner submenu but can I do it directly from a double-clic on a file type extention?


No, using TrackRunner like this is a workaround until the application properly supports Haiku. TrackRunner is capable of doing it, but it’s intended more for running scripts and other types of commands.

1 Like

The file type issues definitely need to be improved. Are file types added using Haiku recipes?

There are two ways to do this:

  • If the filetype is specific to one app, it can come with its own MIME type definition file in its package
  • If it’s some kind of standard, it can be added to the main Haiku repository, and then applications can register themselves at runtime to declare they can handle that filetype

The latter is better when there are several apps handling the same filetype, to not ship a conflicting copy of the MIME database entry with each of them.


I finally got around to uploading another one of my toy projects that does almost exactly what you want. This project allows creating editable launchers for non-native and command line applications. These launchers will appear in the Open with... menu and FileTypes application. There are also some predefined launchers including one for Audacious. It’s not a finished project but it’s usable.

Edit: It also supports substitutions in the command line but uses %file% and %files%