Skip to content

Instantly share code, notes, and snippets.

@franferrax
Created March 6, 2026 10:00
Show Gist options
  • Select an option

  • Save franferrax/2b1c89630eb99ebbc7384b13212e4750 to your computer and use it in GitHub Desktop.

Select an option

Save franferrax/2b1c89630eb99ebbc7384b13212e4750 to your computer and use it in GitHub Desktop.
Install Thunderbird as a RFC 2392 mid: URL opener

Install Thunderbird as a RFC 2392 mid: URL opener

With this, Thunderbird will direclty recognize mid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx@sender.com URLs and make them clickable, allowing cross-email hyperlinks.

Install

dest="$HOME/.local/share/applications/thunderbird-mid-opener.desktop"
mime="x-scheme-handler/mid"
name="$(basename "$dest")"
# https://unix.stackexchange.com/a/497147
# https://superuser.com/a/309343
tee "$dest" <<EOF && xdg-mime default "$name" "$mime"
[Desktop Entry]
Name=Thunderbird mid: protocol opener
Type=Application
StartupNotify=false
Terminal=false
MimeType=$mime;
Exec=thunderbird %u
EOF

Uninstall

dest="$HOME/.local/share/applications/thunderbird-mid-opener.desktop"
mime="x-scheme-handler/mid"
name="$(basename "$dest")"
sed -i "/${mime/\//\\/}=${name/\//\\/}/d" "$HOME/.config/mimeapps.list"
rm -f "$dest"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment