Any chance that I can open a file with custom codes or a custom made application or a Wine software at Files? I can do that with Dolphin or Nemo, but I don't like Nemo that much and Dolphin is too heavy and slow for me. I love Files except this particular thing. I searched at here and Google but couldn't find a solution and I don't mean it like this: https://unix.stackexchange.com/questions/92494/how-to-add-open-folder-as-root-in-elementary-os-file-manager-context-menu

At least a way to open files with Wine applications.

  • What's wrong with the method in the posted link? Contract files can easily do what you ask (open a file with custom codes or a custom made application or a Wine software)
    – user170
    Feb 7, 2017 at 10:01

1 Answer 1


A way to do this is adding the specific MIME type to the .desktop file you use to launch a application.

I created this file ~/.local/share/applications/vscode.desktop to launch VSCode from Slingshot. If I want it to open a .vala file from Files, I have to add "MimeType=text/vala" to the "vscode.desktop" and it will appear in the "Open with..." menu.

There's a nice GUI for managing .desktop files called MenuLibre. You can install it from Software Center or sudo apt-get install menulibre

Example of a .desktop file: http://standards.freedesktop.org/desktop-entry-spec/latest/apa.html

  • 1
    I liked Menu Libre and seems like your way is a okay workaround. I hope in the future they add custom code etc. option to pantheon-file manager.
    – mtilhan
    Sep 22, 2015 at 9:51

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.