SNAP error, SNAP packages not showing in menu

Kernels & Hardware, configuring network, installing services

SNAP error, SNAP packages not showing in menu

Postby nociveboy » 2020-03-04 16:23

Hi people,
I need help, I'm trying to install SNAP packages on my Debian 10 Buster, but after installation, the packages do not appear in the menu, and there is also a message when installing some snaps, the message is this:
/ snap / bin was not found in your PATH
I believe this is the reason why SNAPs do not appear to me.
How do I add this information to my PATH?
Thank you
nociveboy
 
Posts: 11
Joined: 2020-03-04 15:19

Re: SNAP error, SNAP packages not showing in menu

Postby Head_on_a_Stick » 2020-03-04 18:09

nociveboy wrote:How do I add this information to my PATH?

Add these lines to the end of the file at ~/.profile:
Code: Select all
# Expand $PATH to include the directory where snappy applications go.
snap_bin_path="/snap/bin"
if [ -n "${PATH##*${snap_bin_path}}" -a -n "${PATH##*${snap_bin_path}:*}" ]; then
    export PATH=$PATH:${snap_bin_path}
fi

# Ensure base distro defaults xdg path are set if nothing filed up some
# defaults yet.
if [ -z "$XDG_DATA_DIRS" ]; then
    export XDG_DATA_DIRS="/usr/local/share:/usr/share"
fi

# Desktop files (used by desktop environments within both X11 and Wayland) are
# looked for in XDG_DATA_DIRS; make sure it includes the relevant directory for
# snappy applications' desktop files.
snap_xdg_path="/var/lib/snapd/desktop"
if [ -n "${XDG_DATA_DIRS##*${snap_xdg_path}}" -a -n "${XDG_DATA_DIRS##*${snap_xdg_path}:*}" ]; then
    export XDG_DATA_DIRS="${XDG_DATA_DIRS}:${snap_xdg_path}"
fi

But that should already be on your system at /etc/profile.d/apps-bin-path.sh — do you not have that file?

How did you install your snap packages, exactly?
User avatar
Head_on_a_Stick
 
Posts: 11992
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: SNAP error, SNAP packages not showing in menu

Postby nociveboy » 2020-03-04 19:39

hi, i found this file on /etc/profile.d/apps-bin-path.sh
and already have same lines, but apps installed via snap still don't appear in the menu.
i try install wps office, vlc, spotify etc...
I installed snapd and then ran the command
also occurs, when i try install yaru theme with
$ sudo snap install communitheme
and appear this message:
/snap/bin was not found in your PATH

thanks
nociveboy
 
Posts: 11
Joined: 2020-03-04 15:19

Re: SNAP error, SNAP packages not showing in menu

Postby Head_on_a_Stick » 2020-03-04 19:44

So is PATH being over-ridden in ~/.bashrc or ~/.profile (or ~/.bash_profile)? Note that ~/.bash_profile probably shouldn't be used at all.
Code: Select all
echo $PATH

What if you add my posted code block to the end of ~/.profile?

Or run
Code: Select all
export PATH="${PATH}:/snap/bin"

Then try to launch a snap package from the same shell.
User avatar
Head_on_a_Stick
 
Posts: 11992
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: SNAP error, SNAP packages not showing in menu

Postby nociveboy » 2020-03-05 11:31

Hi i not found /.profile or /.bashrc on my system,
i found /etc/bash.bashrc and added your posted code to the end of line in file,
rebooted and i tried again, but receive same error:

/snap/bin was not found in your $PATH. If you've not restarted your
session since you installed snapd, try doing that. Please see
https://forum.snapcraft.io/t/9469 for more details.

this is the result of:
rafael@rafael-pc:~$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/snap/bin:/snap/bin
rafael@rafael-pc:~$
nociveboy
 
Posts: 11
Joined: 2020-03-04 15:19

Re: SNAP error, SNAP packages not showing in menu

Postby Head_on_a_Stick » 2020-03-05 17:46

nociveboy wrote:Hi i not found /.profile or /.bashrc on my system

Read my post again, carefully this time. I didn't write "/.profile" or "/.bashrc".

I probably should have written "${HOME}/.profile" and "${HOME}/.bashrc", does that make it clearer?

Anyway it doesn't matter because
nociveboy wrote:
Code: Select all
rafael@rafael-pc:~$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/snap/bin:/snap/bin
rafael@rafael-pc:~$

Your normal user appears to have /snap/bin in PATH. Twice.
User avatar
Head_on_a_Stick
 
Posts: 11992
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: SNAP error, SNAP packages not showing in menu

Postby nociveboy » 2020-03-06 12:33

hello, I'm sorry
I didn't find any files like this in / home / user
there is no file called ./bashrc or ./profile on my machine, I searched for all folders,
are these files created automatically?
is there any way to find out which file I'm using as the default for my PATH?
nociveboy
 
Posts: 11
Joined: 2020-03-04 15:19

Re: SNAP error, SNAP packages not showing in menu

Postby Head_on_a_Stick » 2020-03-06 17:40

nociveboy wrote:I didn't find any files like this in / home / user
there is no file called ./bashrc or ./profile on my machine, I searched for all folders

Are you winding me up?
Code: Select all
ls ${HOME}/.{profile,bashrc}
User avatar
Head_on_a_Stick
 
Posts: 11992
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: SNAP error, SNAP packages not showing in menu

Postby nociveboy » 2020-03-06 19:02

these files don't really exist on my machine, I executed the command you said, this is the result, my system is Portuguese-BR

rafael@rafael-pc:~$ ls ${HOME}/.{profile,bashrc}
ls: não foi possível acessar '/home/rafael/.profile': Arquivo ou diretório inexistente
ls: não foi possível acessar '/home/rafael/.bashrc': Arquivo ou diretório inexistente
rafael@rafael-pc:~$
nociveboy
 
Posts: 11
Joined: 2020-03-04 15:19

Re: SNAP error, SNAP packages not showing in menu

Postby Head_on_a_Stick » 2020-03-06 21:30

Well that's not right. How did you install your system?
User avatar
Head_on_a_Stick
 
Posts: 11992
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: SNAP error, SNAP packages not showing in menu

Postby nociveboy » 2020-03-07 11:30

I downloaded an ISO of debian cinnamon, and installed it normally via graphical mode, then started the system and applied the updates, installed some common packages, like chrome etc ...
nociveboy
 
Posts: 11
Joined: 2020-03-04 15:19

Re: SNAP error, SNAP packages not showing in menu

Postby nociveboy » 2020-03-08 13:03

I believe its partial resolved, i have created .bashrc file and .profile on my home, added path with this command:
echo "export PATH=$PATH:/snap/bin" >> ~/.bashrc
and now i run snap programs from terminal, but icons dont appear on menu yet.
nociveboy
 
Posts: 11
Joined: 2020-03-04 15:19

Re: SNAP error, SNAP packages not showing in menu

Postby Head_on_a_Stick » 2020-03-08 17:07

But your user already had /snap/bin in their PATH (twice). Does it now appear three times? :?
User avatar
Head_on_a_Stick
 
Posts: 11992
Joined: 2014-06-01 17:46
Location: /dev/chair

SNAP error, SNAP packages not showing in menu

Postby nociveboy » 2020-03-08 17:16

in fact I used timeshift to recover the system to a point before all this configuration, created the .bash and .profile files, installed the snapd etc ...

Enviado de meu moto z4 usando o Tapatalk
nociveboy
 
Posts: 11
Joined: 2020-03-04 15:19


Return to System configuration

Who is online

Users browsing this forum: No registered users and 11 guests

fashionable