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
31 Replies
RadDevon
RadDevonOP•4mo 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•4mo 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•4mo 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•4mo ago
I did change my default shell to ZSH We explicitly removed chsh so you wouldn't footgun yourself
RadDevon
RadDevonOP•4mo 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•4mo ago
@j0rge 2nd command to delete in main, opening a PR for it
RadDevon
RadDevonOP•4mo ago
I'll give that a shot. Sounds better than my solution. 😅
Kyle Gospo
Kyle Gospo•4mo 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
RadDevonOP•4mo 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•4mo ago
we removed chsh already
RadDevon
RadDevonOP•4mo ago
@j0rge I think he's referring to lchsh.
j0rge
j0rge•4mo ago
I don't have that binary on my system
Kyle Gospo
Kyle Gospo•4mo ago
It's on mine, bazzite gnome
RadDevon
RadDevonOP•4mo ago
I'm on KDE, and I have it.
j0rge
j0rge•4mo ago
yeah confirmed on my bazzite laptop, want a PR?
RadDevon
RadDevonOP•4mo ago
$ which lchsh
/usr/bin/lchsh
$ which lchsh
/usr/bin/lchsh
Kyle Gospo
Kyle Gospo•4mo ago
I got it
j0rge
j0rge•4mo ago
something is pulling it in because I thought we nuked this in main
Kyle Gospo
Kyle Gospo•4mo ago
Just chsh Not lchsh
j0rge
j0rge•4mo ago
yeah but then how come lchsh isn't in bluefin then? I'll PR the docs
RadDevon
RadDevonOP•4mo ago
@Kyle Gospo I'd love to contribute something to the docs to capture this for anyone who might want to change shells in the future. Is there a place it would fit? FAQ maybe?
Kyle Gospo
Kyle Gospo•4mo ago
It's a tough one because it's not something a lot of users do Might be good to have a best practices doc?
j0rge
j0rge•4mo ago
https://docs.projectbluefin.io/administration#changing-the-default-terminal-shell you can copy it from the bluefin docs, already has screenshots and everything
Administrator's Guide
The next generation Linux workstation, designed for reliability, performance, and sustainability. Built for the love of the game. Welcome to indie Cloud Native.
j0rge
j0rge•4mo ago
fedora's getting rid of chsh too, we just went earlier
RadDevon
RadDevonOP•4mo ago
@j0rge This Bluefin documentation says fish and zsh are included with the image. I find fish in my Bazzite install but not zsh. Did that somehow get deleted from /usr/bin because I installed it via Homebrew, or is it not included with Bazzite? Just doing some basic adaptation of the documentation for Bazzite and confirming everything also applies here.
j0rge
j0rge•4mo ago
not sure
RadDevon
RadDevonOP•4mo ago
OK. I'll take out the mention of it being available, and I can revisit when the PR is reviewed if need be.
RadDevon
RadDevonOP•4mo ago
PR is in. Happy to tweak if it isn't quite right: https://github.com/KyleGospo/docs.bazzite.gg/pull/8
GitHub
chore(docs): add changing shell best practice by raddevon · Pull Re...
Mostly took this from the Project Bluefin docs, changing "Project Bluefin" to "Bazzite" and removing mention of ZSH being included since it doesn't appea...
HikariKnight
HikariKnight•4mo ago
bazzite is not bluefin, we do not include zsh
dae
dae•4mo ago
I footgunned myself with usermod -s, though I'm not sure how feasible that one is to remove
tulip
tulip•4mo ago
maybe just by straight up patching the functionality out of usermod
Want results from more Discord servers?
Add your server