Okay, so no solutions actually worked for me. I had everything everyone else stated (adding to /etc/environment, the emulate command, everything).
I'm running Kubuntu 20.04 with ZSH. My solution is to synchronize your local applications folder with the snap folder.
As a script
Add this file to any folder that is part of your "bin" path. For me, I have ~/.local/bin
, but you may have something else. Make sure what ever directory you use is part of your path variable. I added this file as ~/.local/bin/sync-snap-apps
to my system.
#! /bin/zsh
shareApps="$HOME/.local/share/applications"
snapApps="/var/lib/snapd/desktop/applications"
Detect all installed applications by snap
for file in $snapApps/*.desktop
do
Get a not-ugly version of the .desktop
Example: todoist_todoist.desktop -> todoist.desktop
link="$shareApps/$(echo $file | cut -d '_' -f2)"
Create new link if none exists
[[ -f $link ]] || ln -s $file $link
done
NOTE: Remove this if you do NOT want automatic broken symbolic link cleanup
for link in $shareApps/*.desktop; do
Remove any broken *.desktop symbolic links
[[ -e $link ]] || rm $link
done
Now that this file is added to your system, append sync-snap-apps
to the end of your ~/.zshrc
and start up a new terminal. It will automatically sync up your snap applications.
As a zshrc addition
Put this at the bottom of your ~/.zshrc
file
shareApps="$HOME/.local/share/applications"
snapApps="/var/lib/snapd/desktop/applications"
Detect all installed applications by snap
for file in $snapApps/*.desktop
do
Get a not-ugly version of the .desktop
Example: todoist_todoist.desktop -> todoist.desktop
link="$shareApps/$(echo $file | cut -d '_' -f2)"
Create new link if none exists
[[ -f $link ]] || ln -s $file $link
done
NOTE: Remove this if you do NOT want automatic broken symbolic link cleanup
for link in $shareApps/*.desktop; do
Remove any broken *.desktop symbolic links
[[ -e $link ]] || rm $link
done
Final Notes
Note, this solved the following issues for me:
- Error KIO Client, I could not use Google Auth redirects to Snap applications, similar to this question and this github issue.
- Apps are not in launcher, similar to this reddit post and this question. Related to this forum post on SnapCraft.
The solution came from this answer, and is easier to understand than this answer on the same thread.