14

I've done sudo snap install slack --classic and now have the Slack snap application (v. 4.1.2). When I run slack from the terminal, it opens the app, with the sign in button. Clicking this opens the Slack login page in my default browser (chromium, snap app v. 78.0.3904.108), where I successfully login.

The trouble is that it says, "Signing you in to Slack. You should be redirected in a few moments." Then, a pop-up appears: "Open xdg-open?" I select "xdg-open" (instead of "cancel") and then......nothing happens. The Slack snap app still shows the sign in page, while the browser thinks I've logged in and just says "Signing you in to Slack."

Is this because of sandboxing issues with the Chromium snap app? I'd love for my Slack (multiple workspaces) to be in a separate app, instead of being trapped in a browser tab, so any and all help resolving this would be greatly appreciated! And apologies if this is posted in the wrong place; I'd be keen to know anywhere else that might better fix this.

Other possibly relevant details:

  • Hardware: 2015 Macbook Pro 13" Retina
  • OS: LXLE 18.04
4
  • 3
    Same problem in my case. I've just openned redirection link from Firefox and then xdg-open shows an application list from where you can select slack application Commented Jan 16, 2020 at 15:41
  • This worked for me as well.
    – Gijs
    Commented Jan 22, 2020 at 7:32
  • @JoséValenzuelaSanz could you please elaborate on what you mean by "opened redirection link from Firefox and then xdg-open shows an application list"? and the actions you're doing? Thanks!
    – jaymullr
    Commented Feb 13, 2020 at 0:05
  • Issue is documented here on launchpad, and should be fixed via either: 1) A future release of snapd, or 2) The merge & release of this PR I'd really like to get this escalated at Canonical so it's fixed before 20.04 release (seems a real shame to Zoom launching broken in this new COVID-19 world), but not sure how to do that.
    – Troy Ready
    Commented Apr 2, 2020 at 23:12

4 Answers 4

15

Faced this issue on a snap install of Slack. Using Firefox rather than a Chromium-based browser did the trick.

5
  • This did the trick for me. Fedora 35 KDE.
    – panta82
    Commented Mar 27, 2022 at 7:43
  • Worked for me! running ubuntu/KDE Commented Mar 27, 2022 at 21:19
  • Still working for Kubuntu 22.04
    – kachar
    Commented Sep 23, 2022 at 9:38
  • not working for Ubuntu 22.04.2 LTS
    – Waqas
    Commented May 3, 2023 at 4:49
  • ubuntu 18. doesnt work. removed snap slack , downloaded .deb package from slack website. this is the only solution
    – Alex
    Commented Jul 27, 2023 at 11:37
7

2022 edit: This answer is old. Snap added slack as an allowed url scheme. See https://github.com/snapcore/snapd/blob/master/usersession/userd/launcher.go ~line 100.

This is because snap does not allow you to use special url schemes like slack:// . So chrome tries to open it but it is blocked. If you use firefox from apt you don't have this error and it will work fine (even if you use slack from snap). The error shows in your syslog:

user-open error: Supplied URL scheme "slack" is not allowed

To login using chromium anyways, at the bottom the page says this:

App didn't open? Try again, or sign in to Slack for the browser.

Right click "Try again" select "Copy link address" and with that in your clipboard just go back to slack. Slack will see the url in your clipboard and log you in.

Note: The fact this works is a slack feature. This does not work for other applications like zoom, unless of course they have this feature build-in as well.

6

Copy the link from the browser and run

xdg-open slack://...yourlink

in your terminal.

2
  • I can confirm it works on Fedora 32 as well.
    – Qortex
    Commented Jul 13, 2020 at 12:02
  • It also works on Pop! OS 20.04
    – hamx0r
    Commented Mar 14, 2022 at 16:02
5

Add the x-scheme-handler to your mimeinfo.cache like so:

$ echo "x-scheme-handler/slack=slack.desktop;" >> ~/.local/share/applications/mimeinfo.cache

make sure you have a slack.desktop file either in /usr/share/applications/ or ~/.local/share/applications/

If you don't then try this.

$ slack=$(which slack); cat > ~/.local/share/applications/slack.desktop << ENDL
[Desktop Entry]
Name=Slack
StartupWMClass=Slack
Comment=Slack Desktop
GenericName=Slack Client for Linux
Exec=$slack
Type=Application
StartupNotify=true
Categories=GNOME;GTK;Network;InstantMessaging;
MimeType=x-scheme-handler/slack;
ENDL

then cat ~/.local/share/applications/slack.desktop and make sure Exec= points to slack.

If this doesn't work, try

$ sudo apt install inotify-tools
$ inotifywait -m ~/.local/share/applications/{slack.desktop,mimeinfo.cache}

and see if those files are being opened. If this is still failing just comment below with your issues and I'll come back and tell you next steps. It was pretty frustrating only finding wrong answers for this question on the internet, I know your pain.

6
  • This works well but you need to specify %U in the Exec command so that it can correctly work. Example: Exec=$slack %U Commented Mar 21, 2022 at 6:37
  • it now opens the slack app, but it stays on the "Sign in" page
    – Chiptus
    Commented Sep 20, 2022 at 6:05
  • I tried @kristopolous answer and it still won't log me in to a slack workspace. it does launch the slack app but the slack app stays on the login page and never loads slack. Commented Oct 1, 2022 at 5:15
  • Removed the %U after the [EXEC] nine, now it throw an error that says "Unable to create io-slave. Unknown protocol 'slack'." Commented Oct 1, 2022 at 5:22
  • I gave up and removed the snap package and reinstalled Slack using apt and it works again. I guess the snap package isn't ready for prime time. In fact, it's useless if you cannot log into Slack with it. Commented Oct 1, 2022 at 5:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .