Skip to content

Instantly share code, notes, and snippets.

@Markus-de-Koster
Last active September 23, 2025 19:56
Show Gist options
  • Save Markus-de-Koster/4006b75e358a80bb9625485dfffa9466 to your computer and use it in GitHub Desktop.
Save Markus-de-Koster/4006b75e358a80bb9625485dfffa9466 to your computer and use it in GitHub Desktop.
Open Teams links in edge PWA, for all other links, use firefox (Linux Ubuntu)
#!/bin/bash
# URL passed to the script
url="$1"
edge_path="/path/to/microsoft-edge"
# Check if the URL is a Teams link
if [[ "$url" == *"teams.microsoft"* ]]; then
# opens edge PWA
$edge_path --profile-directory=Default --app="$url"
else
# Opens all other links in Firefox
firefox "$url"
fi
[Desktop Entry]
Name=Custom Browser Opener
Exec=/home/yourusername/custom_browser_opener.sh %u
Type=Application
Terminal=false
MimeType=x-scheme-handler/http;x-scheme-handler/https;
@Markus-de-Koster
Copy link
Author

Unfortunately, this does not work too well after the "New Teams" update...
Don't expect a fix in the near future.

@stefanmore
Copy link

Unfortunately, this does not work too well after the "New Teams" update...

It seems there is now a surprisingly simple solution for this.

Replace
$edge_path --profile-directory=Default --app-id=$app_id "$url"
with
$edge_path --profile-directory=Default --app="$url"

Steps to find the app_id of the PWA are not needed anymore.

This works for me on Ubuntu 24.04.3 (LTS).

@Markus-de-Koster
Copy link
Author

Unfortunately, this does not work too well after the "New Teams" update...

It seems there is now a surprisingly simple solution for this.

Replace $edge_path --profile-directory=Default --app-id=$app_id "$url" with $edge_path --profile-directory=Default --app="$url"

Steps to find the app_id of the PWA are not needed anymore.

This works for me on Ubuntu 24.04.3 (LTS).

Thank you for the update! I tried it out on 22.04 and it works really well. I updated the gist accordingly.

@stefanmore
Copy link

Do you happen to have an easy solution for how to also make this work from Firefox? I can only find workouts by using a "mock protocol handler" and a browser extension that redirects teams.microsoft.com/meet/ to this handler.

@Markus-de-Koster
Copy link
Author

Unfortunately no, that seems to be difficult to achieve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment