Installed snaps not visible in fish-shell on Fedora 23

Bug #1592558 reported by Thibaut Brandscheid
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
snapd (Ubuntu)
Invalid
High
Unassigned

Bug Description

System: Fedora 23, 64-Bit, Wayland, GOME

After installing snapd as described on http://snapcraft.io for Fedora 23, I installed the 'krita' snap. When using fish-shell the command 'krita' can not be found, but when using bash everything is fine.

Tags: shell
Zygmunt Krynicki (zyga)
Changed in snapd (Ubuntu):
assignee: nobody → Zygmunt Krynicki (zyga)
Revision history for this message
Mark Shuttleworth (sabdfl) wrote : Re: [Bug 1592558] Re: Installed snaps not visible in fish-shell on Fedora 23

Good catch, thank you for the report Thibaut.

 tag: shell

Mark

Revision history for this message
Thibaut Brandscheid (k1au3-is-37) wrote :

'zkrynicki' mentioned on Reddit that apps-bin-path.sh has been renamed to snapd.sh in the non-git version.

description: updated
Revision history for this message
Tim Jester-Pfadt (t-jp) wrote :

99% sure that it is related to this bug report:
https://bugzilla.gnome.org/show_bug.cgi?id=736660

When I switch to nouveau use GNOME 3.20/Wayland on Arch Linux the PATH variable for /snapd/bin also isn't exported.

Revision history for this message
Thibaut Brandscheid (k1au3-is-37) wrote :

Seems like it is a fish problem, because fish does not source /etc/profile.d (can't read *.sh files).

Revision history for this message
Fabian Homborg (fhomborg) wrote :

Speaking with my fish developer hat on:

It seems snap creates POSIX shell scripts in /etc/profile.d, which fish doesn't read because it doesn't use POSIX syntax.

Since fish 2.3.0, fish has three directories for additional configuration to be slotted in:

- "/usr/share/fish/conf.d" for packages (this is where the pkg-config variable "confdir" points to)

- "/etc/fish/conf.d" for administrators (really "$__fish_sysconfdir/conf.d" - which depends on the sysconfdir configure variable)

- "~/.config/fish/conf.d" for users (really "$XDG_CONFIG_HOME/fish/conf.d")

It reads all files that end in ".fish", but for each name only the one in the highest-precedence directory.

So, my ideal solution would be for snapd to make a file that contains _just_ components for $PATH (not `PATH=`) which is then read by a conf.d script for fish and a /etc/profile.d script for other shells.

Revision history for this message
Mark Shuttleworth (sabdfl) wrote :

Sounds reasonable, Fabian, thank you.

Changed in snapd (Ubuntu):
importance: Undecided → High
status: New → Triaged
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

I'll fix this shortly, just testing the solution now.

Revision history for this message
Mark Shuttleworth (sabdfl) wrote :

Did you follow Fabian's guidance, Zygmunt?

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

Yes, I am experimenting with that now.

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

Hi

We'll try to fix this in the fedora package on the next upload. Please report further bugs on Fedora using https://apps.fedoraproject.org/packages/snapd/bugs

Changed in snapd (Ubuntu):
status: Triaged → Invalid
assignee: Zygmunt Krynicki (zyga) → nobody
Revision history for this message
Leonardo Donelli (learts92) wrote :

I have the same problem on Ubuntu 17.10 under Wayland.

Revision history for this message
Mahmoud Al-Qudsi (mqudsi) wrote :

Can this behavior be changed upstream in snapd rather than fixed individually in fedora, ubuntu, etc.?

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.