I’m developing a new application (https://github.com/tom-james-watson/Emote) which will be published as a snap.
The app requires autostart in order to function properly, however I’m having trouble getting it working. As far as I can tell from the docs, all I need to do is to add a autostart: <name of .desktop file>
to the app section of snapcraft.yaml
. I’ve done this but it doesn’t seem to do anything.
Here’s my snapcraft.yaml
:
So I have a few questions:
- Is there something obviously wrong with my config that is making this not work?
- What exactly does the value of
autostart
do? Isemote.desktop
simply telling snapcraft to look for that file in$SNAP_USER_DATA/.config/autostart/
? If so, am I meant to be manually moving myemote.desktop
to$SNAP_USER_DATA/.config/autostart/emote.desktop
as part of the build process? Looking at other apps’ configs online, I can’t see that being done anywhere. Or, does the value mean that snapcraft is going to automatically move myemote.desktop
file to that location in the build process? In that case how does it know where to copyemote.desktop
from? - Is it a bug that the documentation lists
autostart
underparts
and notapp
? https://snapcraft.io/docs/snapcraft-parts-metadata#heading--autostart. If it’sparts
, why do I need to put it under theapps
section insnapcraft.yaml
?
Many thanks in advance for your help!