Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AmreeshTyagi/c298bf0124b7beef915aa143a254b8a6 to your computer and use it in GitHub Desktop.
Save AmreeshTyagi/c298bf0124b7beef915aa143a254b8a6 to your computer and use it in GitHub Desktop.
Fix to handle slack workspace open issue from browser to app on Linux.
#!/usr/bin/env bash
# Save this script as /usr/local/bin/xdg-open and make script executable using chmod +x /usr/local/bin/xdg-open
if [[ "${1:-}" = slack://* ]]; then
# Slack binary path can be anything depending on installation method and Linux version.
# Execute in shell/bash & check:
# $ whereis slack
# Possible outputs:
# /snap/bin/slack
# /usr/lib/slack/slack
# /usr/bin/slack
# Set the correct one in next line of this script. In most of the case it is /use/bin/slack which is default here.
exec /usr/bin/slack --enable-crashpad "$1"
fi
exec /usr/bin/xdg-open "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment