Several Flatpak apps broken after changing shells and rebooting

Just booted up my computer today and was surprised that the icons in my panel were broken for a couple of Flatpak apps. When I tried clicking them to launch the apps, it seems that is also broken. The apps I've discovered so far that are missing are Firefox, Zen Browser, Vencord, and Gear Lever. The Discover store seems to think these apps are all installed. I tried removing and reinstalling them, but they still can't be launched using the button in the Discover store. I was able to launch them from the terminal with flatpak run. Not sure what's happening here. Yesterday, I did change my default shell to ZSH but everything seems to be working properly there since I sourced /etc/profile in my config. Any idea what this weird bug might be?
Solution:
Found a solution for this and commented with it on that GH issue. Replicating it here in case anyone finds this thread. Maybe there's a cleaner way to do this, but I was able to work around this issue by writing a shell wrapper script to start ZSH for interactive shells and Bash for anything else. Here's the script: ```bash...
Jump to solution
29 Replies
RadDevon
RadDevon•5d ago
Looks like it's the same issue this user had, but they didn't seem to find a solution aside from falling back to Bash as the default shell. https://github.com/ublue-os/bazzite/issues/1196
GitHub
Flatpaks apps missing · Issue #1196 · ublue-os/bazzite
Describe the bug Sometimes apps are seemingly disappearing. For example Firefox is missing and searching for it prompts me to Get it from the discover store. Upon doing so it states that it's a...
Solution
RadDevon
RadDevon•5d ago
Found a solution for this and commented with it on that GH issue. Replicating it here in case anyone finds this thread. Maybe there's a cleaner way to do this, but I was able to work around this issue by writing a shell wrapper script to start ZSH for interactive shells and Bash for anything else. Here's the script:
#!/bin/bash

if [ -t 0 ]; then
exec /home/linuxbrew/.linuxbrew/bin/zsh
else
exec /bin/bash
fi
#!/bin/bash

if [ -t 0 ]; then
exec /home/linuxbrew/.linuxbrew/bin/zsh
else
exec /bin/bash
fi
The ZSH path assumes you installed with Homebrew. Then, make the script executable:
chmod +x /path/to/shell-script.sh
chmod +x /path/to/shell-script.sh
Finally, set this script as your default shell:
sudo lchsh $USER
sudo lchsh $USER
When prompted for the shell path, give it /path/to/shell-script.sh (replacing, of course, with the actual path; I just dropped it into my home directory). Restart once you've set the new shell, and you should see your Flatpaks work and you can have ZSH as your interactive shell.
HikariKnight
HikariKnight•4d ago
main issue here is you changed your shell with chsh, which is not how youre supposed to do it on atomic systems, leave the default shell as bash. then make your terminal run zsh as a custom command and you will have 0 issues and you will not break your system if you rebase to an image that does not have zsh
Kyle Gospo
Kyle Gospo•4d ago
I did change my default shell to ZSH We explicitly removed chsh so you wouldn't footgun yourself
RadDevon
RadDevon•4d ago
How is this communicated to the user? How would I have known? I didn't even know chsh was a thing or had been removed. I searched for how to change the shell in Fedora and found sudo lchsh $USER, so I ran that. It apparently hasn't been removed. If this was the intent, it's communicated very poorly.
Kyle Gospo
Kyle Gospo•4d ago
@j0rge 2nd command to delete in main, opening a PR for it
RadDevon
RadDevon•4d ago
I'll give that a shot. Sounds better than my solution. 😅
Kyle Gospo
Kyle Gospo•4d ago
Right now under stock KDE just switching your shell can break login This isn't a ublue or immutable specific thing we removed it to disincentivize doing this so you've helped today by giving us another avenue
RadDevon
RadDevon•4d ago
It would be great if there was an alias or something for chsh and lchsh that echoed out some instructions with the ideal way to change a shell. I wasn't aware of this either, so that doesn't help me unfortunately. Users are likely not as aware of the state of various bugs as some of the contributors and developers might be.
j0rge
j0rge•4d ago
we removed chsh already
RadDevon
RadDevon•4d ago
@j0rge I think he's referring to lchsh.
j0rge
j0rge•4d ago
I don't have that binary on my system
Kyle Gospo
Kyle Gospo•4d ago
It's on mine, bazzite gnome
RadDevon
RadDevon•4d ago
I'm on KDE, and I have it.
j0rge
j0rge•4d ago
yeah confirmed on my bazzite laptop, want a PR?
Want results from more Discord servers?
Add your server