The native Microsoft Teams application for Linux is not well maintained, so we switched to the Teams PWA in Google Chrome, which works rather well. We still want to use firefox as our default browser without maintaining active login sessions in multiple browsers. Clicking links in teams therefor becomes a bit annoying.
This little experiment introduces two new schemes for (ftl and ftls for firefox teams links) and an browser extension for chrome (works for edge as well). Clicked links in the Teams PWA are opened in Chrome and the extension modifies https to flts and http to flt, which causes Chrome to prompt for approval to open the FTL Handler
. The FTL Handler is defined by the firefox-ftl.desktop
file, which reverts the http/https replacement and opens the links in firefox.
- clone this repo
git clone git@github.com:frederic-klein/teams-pwa-link-redirect.git
- make the firefox-ftl.desktop file available in your system:
sudo cp ubuntu/firefox-ftl.desktop /usr/share/applications/
- install the chrome extension
- open chrome
- go to chrome://extensions/
- enable developer mode
- select Load unpacked
- select the cloned repo folder
- reopen the teams pwa or
ctrl+f5
- associate the schemes with the desktop file:
xdg-mime default firefox-ftl.desktop x-scheme-handler/ftl
xdg-mime default firefox-ftl.desktop x-scheme-handler/ftls
Chrome may display an "Open FTL Handler" prompt, which can only be permanently accepted per-domain.
You can define a policy to accept the custom protocol using the following command based on https://superuser.com/a/1588146
sudo bash
mkdir -p /etc/opt/chrome/policies/{managed,recommended}
cat <<EOF >/etc/opt/chrome/policies/managed/allow_ftl_protocol.json
{
"URLWhitelist": [
"ftl:*", "ftls:*",
],
"URLAllowlist": [
"ftl:*", "ftls:*",
]
}
EOF
sudo bash
mkdir -p /etc/chromium/policies/{managed,recommended}
cat <<EOF >/etc/chromium/policies/managed/allow_ftl_protocol.json
{
"URLWhitelist": [
"ftl:*", "ftls:*",
],
"URLAllowlist": [
"ftl:*", "ftls:*",
]
}
EOF
sudo bash
mkdir -p /etc/opt/edge/policies/{managed,recommended}
cat <<EOF >/etc/opt/edge/policies/managed/allow_ftl_protocol.json
{
"URLWhitelist": [
"ftl:*", "ftls:*",
],
"URLAllowlist": [
"ftl:*", "ftls:*",
]
}
EOF
Thanks to the following contributors for improving this helper ♡
- Ryan Cole https://github.com/ryanc-me