How to run my snap application on startup
-
Get the exact path of the snap location you wish to execute. You can do that by executing the following in the
Terminal
-which nameOfSnap /usr/bin/nameOfSnap #copy this path
Click on add. Paste the path in the
command
textbox. You can provide any name, comment.Click on "Add" at the bottom and the snap will be added to your startup applications.
Reference - How do I start applications automatically on login?
Related videos on Youtube
Ulrich Dohou
Hello ! Welcome here ! I am ulrich, a great lover of web development and any JavaScript Technology. I am almost 5 years experienced !
Updated on September 18, 2022Comments
-
Ulrich Dohou over 1 year
I have a snapcraft application build on top of electronJs. I would like that application to run on startup.
I tried to directly drop a
app_name.desktop
file inside the current user config/autostart path but I was not able to do it from within my code, I got a right access issue which means I am not allowed to perform such action. I noticed inside the snap folder there is a.config
. I thought that dropping my.desktop
file there should work but nothing.Is there a way to run my snap application on startup? Is there a command I should add to my
.yml
file or is there a way to do it directly from my code?Here is my config
[Desktop Entry] Type=Application Terminal=false Exec=/snap/bin/rightplayer X-GNOME-Autostart-enabled=true StartupNotify=false Name=myapp
-
Ulrich Dohou almost 6 years@pomsky i just did it
-
pomsky almost 6 yearsTry changing
Exec=snap run myapp
toExec=/full/path/to/the/executable
. -
Ulrich Dohou almost 6 yearsDoesnt work. That was the first thing I did. In fact I tried that command manually and it works. But When I try to do it whithin my code I get a right access issue. Seems I cant do it. Then I decided to add that config inside snap config itself but it doesnt work either
-
doug almost 6 yearsMaybe read thru here, see what's up forum.snapcraft.io/t/…
-