So I've installed Sublime Text from "Ubuntu Software", and I can't open text files with it by default. Right click offers "Open with Other Application" and I can choose Sublime from there, but I have to do this every time.

I see tonnes of questions and replies about this, which involve editing ~/.config/mimeapps.list - but each entry points to .desktop files. And for the life of me I can't find a .desktop file for Sublime Text.

I typed "which subl" and got "/snap/bin/subl" Ah - it's a snap install. But then where is the desktop file for it located? It's not in ~/.local/share/applications or /usr/opt/applications. But it must exist somewhere, because it exists in the "Open with" menu, and I can run it from the application menu!


I'm not sure which you want but Main Menu (alacarte) says that the application menu is using /var/lib/snapd/desktop/applications/sublime-text_subl.desktop. Also (by searching for desktop in /snap/sublime-text/current) I discovered that subl.desktop is at /snap/sublime-text/current/meta/gui and sublime-text.desktop is at /snap/sublime-text/current/opt/sublime_text/sublime_text.desktop. Does that resolve your problem? Perhaps you could write your own answer with this information so that anyone who comes across this problem can use your full instructions to resolve it? :)

| improve this answer | |
  • Thank you - I've actually book marked this page and am going to re-visit this soon and try out your ideas. I will certainly update this with my findings. – Domarius Nov 28 '18 at 7:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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