alexmurray / emacs-snap

GNU Emacs in a snap
https://snapcraft.io/emacs
71 stars 13 forks source link

emacsclient desktop file doesn't launch emacsclient correctly #40

Closed alexmurray closed 1 year ago

alexmurray commented 2 years ago

Since snapd rewrites the emacsclient.desktop file instead of the usual Exec line of:

Exec=sh -c "if [ -n \\" \\$*\\" ]; then exec emacsclient --alternate-editor= --display=\\"\\$DISPLAY\\" \\"\\$@\\"; else exec emacsclient --alternate-editor= --create-frame; fi" placeholder %F

This becomes:

Exec=emacs.emacsclient -c "if [ -n \\" \\$*\\" ]; then exec emacsclient --alternate-editor= --display=\\"\\$DISPLAY\\" \\"\\$@\\"; else exec emacsclient --alternate-editor= --create-frame; fi" placeholder %F

As such emacs doesn't execute the shell commands properly and emacsclient spawns a new frame with this shell code as it's title.