Page MenuHomeSolus

snaps appear to be broken when using zsh
Closed, ResolvedPublic

Description

Solus Plasma Unstable, fully up to date, no broken packages.

Problem:
Snaps no longer work, app menu entry has disappeared too.

Example:

spotify
zsh: command not found: spotify

If I run bash then spotify it works as expected.

With bash

echo $PATH
/sbin:/bin:/usr/sbin:/usr/bin:/snap/bin

With ZSH

echo $PATH
/usr/local/bin:/usr/bin:/bin

As discussed on IRC:
<Harvey> I just tested adding it to sddm.conf
<Harvey> Works
<Harvey> https://hastebin.com/vipanoxeta.rb
<Harvey> Snaps still don't show up in app menu but they launch.

Some more digging I found this https://askubuntu.com/questions/910821/programs-installed-via-snap-not-showing-up-in-launcher/989485#989485
[20/2/20 6:32 pm] <Harvey> Ok so I created /etc/zprofile and added the line emulate sh -c 'source /etc/profile' that combined with adding the path to sddm.conf resolves the issue
[20/2/20 6:32 pm] <Harvey> Which confuses me as to why the sddm.conf change is needed.
[20/2/20 6:33 pm] <Harvey> We don't have apps-bin-path.sh but I tried to add 10-path.sh instead which didn't work.

Event Timeline

Harvey created this task.Feb 20 2020, 6:34 AM
Harvey assigned this task to Girtablulu.Feb 20 2020, 6:34 AM
Harvey edited projects, added Software; removed Lacks Project.
Harvey updated the task description. (Show Details)Feb 20 2020, 7:36 AM
DataDrake triaged this task as Normal priority.Feb 20 2020, 5:12 PM
DataDrake moved this task from Backlog to Package Fixes on the Software board.
Harvey added a comment.EditedFeb 23 2020, 1:28 AM

Due to some unrelated testing with girt's packaging script 'solt' where I found that || was not working, it made me think maybe its not working in the sddm patch either. So I removed the sddm.conf DefaultPath additions and simplified the Xsession zsh fix to:

[ -d /usr/share/defaults/etc/zsh ] && zdir=/usr/share/defaults/etc/zsh

With zsh:

echo $PATH                
/sbin:/bin:/usr/sbin:/usr/bin:/snap/bin

Snaps function perfectly including application menu entries. So there is no issue with making the zprofile addition in zsh stateless.

So question is do we actually need to bother checking those other locations at all in sddm?