I am running Ubuntu 15.10.
My /usr/share/applications/sublime_text.desktop contains the following:
[Desktop Entry]
Version=1.0
Type=Application
Name=Sublime Text
GenericName=Text Editor
Comment=Sophisticated text editor for code, markup and prose
Exec=/opt/sublime_text/sublime_text %F
Terminal=false
MimeType=text/plain;
Icon=sublime-text
Categories=TextEditor;Development;
StartupNotify=true
Actions=Window;Document;
[Desktop Action Window]
Name=New Window
Exec=/opt/sublime_text/sublime_text -n
OnlyShowIn=Unity;
[Desktop Action Document]
Name=New File
Exec=/opt/sublime_text/sublime_text --command new_file
OnlyShowIn=Unity;
When I right-click on a markdown file (xxx.md) in Gnome Files (formerly "Nautilus"), I cannot see "Sublime Text" as a choice, even when I select "View All Applications".
I even tried adding %F to the lines Exec=/opt/sublime_text/sublime_text -n and Exec=/opt/sublime_text/sublime_text --command new_file in the [Desktop Action Window] and [Desktop Action Document], respectively, but it did not change anything.
I even ran sudo update-desktop-database.
What am I doing wrong?