swiupw
Last Updated: September 09, 2019
·
3.88K
· xnt

Opening with Sublime Text @ Gnome/Nautilus

Use this to Add Sublime Text to the "Open With" Dialog in Nautillus. See @Gist: https://gist.github.com/2928209

Put in ~/.local/share/applications/.desktop

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon[enUS]=/opt/SublimeText2/Icon/128x128/sublimetext.png
Name[enUS]=Sublime Text
Exec=/opt/SublimeText2/sublime
text %U
Comment[enUS]=Open in Sublime Text
Name=Sublime Text
Comment=Open in Sublime Text
MimeType=text/plain;
Icon=/opt/SublimeText2/Icon/128x128/sublime
text.png

1 Response
Add your response

3070

This works! Note that the %U is the key. The odd thing is that when I added the %U to the sublime_text.desktop in /usr/share/applications/ Sublime Text 2 did not appear in the "open with other application..." dialog. Adding this entry into the ~/.local/share/applications worked. One more tip though. To make all plain text files open with Sublime Text 2, do this command in terminal:

$ xdg-mime default sublime_text.desktop text/plain

over 1 year ago ·