I can't use snap packages, even if installed

9,601

[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

Share:
9,601
Cirelli94
Author by

Cirelli94

Software developer and FOSS enthusiast!

Updated on September 18, 2022

Comments

  • Cirelli94
    Cirelli94 almost 2 years

    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.

  • Fabby
    Fabby over 6 years
    Welcome to Ask Ubuntu! :-) The last command is dangerous when run from the root directory! Could you edit and expand and provide exact details for the packages the OP is referring to?
  • Nissaar
    Nissaar over 6 years
    @Fabby is this okay ?
  • Cirelli94
    Cirelli94 over 6 years
    Ok, i removed atom folder from ~/snap/atom . Sadly this doesn't solve my problem :(
  • Nissaar
    Nissaar over 6 years
    build it again if it still fails use 'mkdir name' to make a new directory and build atom there. Then use 'cd name' to access the directory and run atom from there.
  • Cirelli94
    Cirelli94 over 6 years
    @Nissaar Why do you use the term 'build'? I'm just installing it with snap install... I do not choose any folder!
  • Nissaar
    Nissaar over 6 years
    in every snap tutorial ive seen 'build the snap.' And not 'install snap'. Ive seen that for travis, offlineimap etc... maybe im wrongly using the word. Did it work ?
  • Cirelli94
    Cirelli94 over 6 years
    I can't 'build' any snap in any folder. I just snap install atom. If I do mkdir atom & cd atom & snap install atom it makes no sense to me to do something like this.....
  • Cirelli94
    Cirelli94 over 6 years
    To have an idea where snaps are installed etcetera askubuntu.com/a/976039/396145
  • m93a
    m93a about 5 years
  • m93a
    m93a about 5 years
    emulate sh -c 'source /etc/profile' breaks oh-my-zsh themes for me
  • Cirelli94
    Cirelli94 about 5 years
    try emulate sh -c 'source /etc/profile.d/apps-bin-path.sh' as in the linked question