On archlinux, /snap/bin is not added to the $PATH

Bug #1639095 reported by Leo Arias
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
snapd
Invalid
Undecided
Unassigned

Bug Description

I installed snapd in archlinux. It works fine, but I have to use the full path to start the snap binaries:

$ sudo snap install hello
$ hello
bash: hello: command not found
$ /snap/bin/hello
Hello, world!

Tags: archlinux
Revision history for this message
Oliver Grawert (ogra) wrote :

this is noarmally added by the /etc/profile.d/apps-bin-path.sh snippet,
does the arch package not ship it or did you just not re-login yet after installing snapd ?

affects: snappy → snapd
Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

You have to reboot / logout/login for the path to be added. I just tested this with Antergos, and the PATH had /snap/bin added after a reboot (I didn't try logout/in).

https://wiki.archlinux.org/index.php/Snapd#Installation clearly specifies this. "Tip: snapd installs a script in /etc/profile.d/ to export the paths of binaries installed with the snapd package and desktop entries. Reboot once to make this change take effect."

Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

Further testing reveals a simple logout/login adds the path to the environment variable.

Revision history for this message
Shuduo Sang (sangshuduo) wrote :

I happened to install arch linux 20170301 on a virtualbox then install snapd with "pacman -S snapd".
The /etc/profile.d/apps-bin-path.sh on my side is:

# Expand the $PATH to include /snaps/bin which is what snappy applications
# use
PATH=$PATH:/snap/bin

if [ -z "$XDG_DATA_DIRS" ]; then
    XDG_DATA_DIRS=/usr/local/share/:/usr/share/:/var/lib/snapd/desktop
else
    XDG_DATA_DIRS="$XDG_DATA_DIRS":/var/lib/snapd/desktop
fi
export XDG_DATA_DIRS

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

PATH is updated on next log-in / reboot. This is hard to do in any other way unfortunately.

Changed in snapd:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.