om26er
March 28, 2018, 5:58pm
1
I have a snap for sublime-text, the snap opens fine from the command line and gnome shell BUT if I right click and select “New File” or “New Window” nothing happens.
Here is my yaml file https://github.com/om26er/sublime-text/blob/a864aedd4363723e2d3492c17b1929a7692ce0fe/snap/snapcraft.yaml
Is there anything specific I should be doing to get them working ?
om26er
March 28, 2018, 6:03pm
2
Another variant of the yaml file I tried that didn’t work either https://github.com/om26er/sublime-text/blob/dbc5dcd7cd0cefdbc31b71896c7bb658955e98f4/snap/snapcraft.yaml (note the different in install scriplet).
Here is how the desktop file looks like
[Desktop Entry]
Version=1.0
Type=Application
Name=Sublime Text
GenericName=Text Editor
Comment=Sophisticated text editor for code, markup and prose
Exec=sublime_text %F
Terminal=false
MimeType=text/plain;
Icon=/Icon/256x256/sublime-text.png
Categories=TextEditor;Development;
StartupNotify=true
Actions=Window;Document;
[Desktop Action Window]
Name=New Window
Exec=sublime_text -n
OnlyShowIn=Unity;
[Desktop Action Document]
Name=New File
Exec=sublime_text --command new_file
OnlyShowIn=Unity;
om26er
March 29, 2018, 6:49pm
3
Who shall I contact regarding desktop integration of snaps or if there are any links to docs, let me know.
om26er
April 5, 2018, 3:50pm
5
We seem to be eating Exec line of sub entries
$ cat /var/lib/snapd/desktop/applications/sublime-text_subl.desktop
[Desktop Entry]
Version=1.0
Type=Application
Name=Sublime Text
GenericName=Text Editor
Comment=Sophisticated text editor for code, markup and prose
Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/sublime-text_subl.desktop /snap/bin/sublime-text.subl %U
Terminal=false
MimeType=text/plain;
Icon=/snap/sublime-text/1/Icon/256x256/sublime-text.png
Categories=TextEditor;Development;
StartupNotify=true
Actions=Window;Document;
[Desktop Action Window]
Name=New Window
OnlyShowIn=Unity;
[Desktop Action Document]
Name=New File
OnlyShowIn=Unity;
1 Like
om26er
April 5, 2018, 3:55pm
6
and here is how the desktop file from original source looks like:
[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;
Do note that I replace /opt/sublime_text/sublime_text
with sublime_text
in my snap: https://github.com/om26er/sublime-text/blob/dbc5dcd7cd0cefdbc31b71896c7bb658955e98f4/snap/snapcraft.yaml#L23
om26er
April 11, 2018, 10:26pm
7
Hello typing a longer message as I could not just type “bump”.
This also affects other snaps: I’ve been working on WebTorrent Desktop and have exactly the same behaviour where the Exec=
lines in the [Desktop Action...]
sections are stripped.