Skip to content

Instantly share code, notes, and snippets.

@d-rk
Forked from MaxMatti/README.md
Last active January 26, 2024 06:30
Show Gist options
  • Save d-rk/86c4f1ee151abe938caf27c096a35b13 to your computer and use it in GitHub Desktop.
Save d-rk/86c4f1ee151abe938caf27c096a35b13 to your computer and use it in GitHub Desktop.
Open all links to MS Teams in Google Calendar with the Teams PWA

How to open MS Teams Links with the PWA

Linux:

  1. Install Teams as PWA: https://support.google.com/chrome/answer/9658361?hl=en&co=GENIE.Platform%3DDesktop
  2. Modify desktop entry of PWA:
    desktop_file=$(find ~/.local/share/applications/ -name chrome*)
    sed -i -E 's/Exec=(.*)/Exec=\/usr\/local\/bin\/msteams.sh \1 %u/g' $desktop_file
    echo "MimeType=x-scheme-handler/msteams;" >> $desktop_file
  3. Download msteams.sh and move to /usr/local/bin
  4. make it executable chmod +x /usr/local/bin/msteams.sh
  5. Register protocol/mimeType
    • run xdg-mime default $(basename $desktop_file) x-scheme-handler/msteams
  6. install Tampermonkey and ms-teams-links.user.js:
    • download Tampermonkey for chrome or Firefox
    • install ms-teams-links.user.js by clicking the "Raw" button above it and pressing "install" in the prompt

Troubeshooting:

  • Check if mimeType works: xdg-open msteams://teams.microsoft/link/to/meeting
#!/bin/bash
chrome_executable="$1"
profile_param="$2"
app_id_param="$3"
url=${4/msteams/https}
"$chrome_executable" "$profile_param" "$app_id_param" --app-launch-url-for-shortcuts-menu-item="$url"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment