I know how to tell Files what application to open when I double-click a document. But what I need is to tell it what arguments to always use when opening that kind of document. Can I do that?

For example. I'm using MPV as my audio player. When I double-click a mp3 in Files, it plays the file with an opened window (that's the default behaviour from MPV). So, if I want to play an audio file with no GUI, I need to use the argument no-video. My question is how can I pass the argument to Files? And only for audio file types?

1 Answer 1


There is no way to do that through the UI. One way it could be done would be to set up a custom contract as described in the README here: https://github.com/elementary/contractor. You can then insert the required flags in the Exec line. Unfortunately it means you have to use the context menu to launch the app though.

Another way would be to create a .desktop file with the appropriate Exec line, MimeType(s) and Name (using the existing .desktop as a template) and put it in ~/.local/share/applications. You can then set this as the default app (although you may have to look in "Other Application/View all Applications").

  • 1
    Just tried the .desktop file method and it works. The only problem is that, with mpv, there does not seem to be a way of stopping the playback (neither the media keys or the wingpanel sound indicator worked Apr 25, 2020 at 13:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.