How to run my snap application on startup

10,862
  • 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
    
  • Search for "Startup Applications" from the Launcher enter image description here

  • Click on add. Paste the path in the command textbox. You can provide any name, comment. enter image description here

  • 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?

Share:
10,862

Related videos on Youtube

Ulrich Dohou
Author by

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, 2022

Comments

  • Ulrich Dohou
    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
      Ulrich Dohou almost 6 years
      @pomsky i just did it
    • pomsky
      pomsky almost 6 years
      Try changing Exec=snap run myapp to Exec=/full/path/to/the/executable.
    • Ulrich Dohou
      Ulrich Dohou almost 6 years
      Doesnt 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
      doug almost 6 years
      Maybe read thru here, see what's up forum.snapcraft.io/t/…