Xdg won't open snap applications

Hello, i have a problem with xdg-open… it won’t work for snap applications like Slack or VSCode. When I do for example
xdg-open slack://<valid slack url>
nothing happens, in contrast to
xdg-open .
or
xdg-open https://google.com

I can’t figure this out… some useful info:

❯ xdg-mime query default x-scheme-handler/slack
slack_slack.desktop
❯ cat /var/lib/snapd/desktop/applications/slack_slack.desktop
[Desktop Entry]
X-SnapInstanceName=slack
Name=Slack
StartupWMClass=Slack
Comment=Slack Desktop
GenericName=Slack Client for Linux
Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/slack_slack.desktop /var/lib/snapd/snap/bin/slack %U
Icon=/var/lib/snapd/snap/slack/46/usr/share/pixmaps/slack.png
Type=Application
StartupNotify=true
Categories=GNOME;GTK;Network;InstantMessaging;
MimeType=x-scheme-handler/slack;
❯ snap version
snap         2.52-3
snapd        2.52-3
series       16
endeavouros  -
kernel       5.14.8-arch1-1

xdg-utils 1.1.3+19+g9816ebb-1

Thanks!

VSCode is in the repos, you should not be using the Snap version.

Slack is in the AUR (https://aur.archlinux.org/packages/slack-desktop/) so, if that works, you should not be using the Snap version.

1 Like

It doesn’t work either, I guess snap is not the problem here :frowning:

Have you tried using xdg-mime?

https://wiki.archlinux.org/title/XDG_MIME_Applications

Yes I have it configured for slack with the following entry (now that I removed snap):
x-scheme-handler/slack=slack.desktop;
in
~/.config/mimeapps.list