classic snap fails to find libraries

Oliver Grawert ogra at
Tue Jan 24 09:59:16 UTC 2017

Am Montag, den 23.01.2017, 21:49 -0600 schrieb Leo Arias:
> After reading the other thread about a similar issue, I moved my
> libraries to stage-packages and that worked.
> My problem now is that ssh can't call a binary from a snap, it will
> only work using the full path. Let's say I have the hello snap
> installed in Then:
> elopio at ubuntu-xenial:~/mosh$ ssh hello
> elopio at's password:
> bash: hello: command not found
> elopio at ubuntu-xenial:~/mosh$ ssh /snap/bin/hello
> elopio at's password:
> Hello, world!
> I seem to remember that there was a bug open about this, but I can't
> find it. Anyone remembers what's the problem here?
bash actually checks the calling process and will not source the env if
it is invoked by sshd or rshd as non-login shell (it checks if
the SSH_CLIENT environment variable is set and uses a different code
path internally).

the follwing works:

$ ssh env|grep PATH

$ ssh bash -lc env|grep PATH

you could also do something like:
ssh "source /etc/profile; hello"

i dont think we have a bug open for this and technically it is expected
behaviour (not different from any other ubuntu install), but given how
annoying it is i guess you should file one and we should find a proper
workaround or fix to ship in the image ...

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <>

More information about the Snapcraft mailing list