9

I installed Spotify, VS Code and Atom snap packages. I used them a couple of days. Today, I can't use them. There are two different problems:

  1. They aren't in Gnome Launcher with all other programs.

  2. I can't use them starting them via cli because "command not found". I'm using zsh.

Cirelli94
  • 626
  • 1
  • 6
  • 26

4 Answers4

9

[SOLUTION to QUESTION1]

There is some kind of bug in I-do-not-know-where. To temporally solve this, I had to copy programname.desktop from /snap/programname/current/programname.desktop to /usr/share/applications (with sudo) and then all was fixed: programname shows in the gnome menus.

See more here

[SOLUTION to QUESTION2]

The snap binary and desktop directories will not automatically be added to your environment variables. In order to solve this, I added the following line to /etc/zsh/zprofile:

emulate sh -c 'source /etc/profile'

See more here

Cirelli94
  • 626
  • 1
  • 6
  • 26
0

this simple solution worked for me.

  1. open your shell profile file ~/.bashrc or ~/.zshrc
  2. append export PATH=$PATH:/snap/bin
  3. refresh profile changes source ~/.bashrc or source ~/.zshrc

enjoy your snaps !

0

use this to remove the package:

sudo snap remove name-package

use this to completely remove the directory where the packages are built (i.e, for example to remove the directory in which atom is built use : sudo rm -rf ~/snap/name-package; this will remove the directory and its child directories) and build them again:

sudo snap install name-package
Cirelli94
  • 626
  • 1
  • 6
  • 26
Nissaar
  • 71
0

an alias could be added to .bash_aliases

  • echo 'alias foosnap="/snap/bin/foo"' >> /root/.bash_aliases
  • exec bash

or a symlink could be added to /usr/bin

  • ln -s /snap/bin/foo /usr/bin/foosnap
noobninja
  • 548