xdg-settings for setting mailto handler does nothing
Why doesn't thunderbird.desktop
get set as my default mailto
handler, but chromium-browser.desktop
instead?
I hope this contains all relevant information:
Here are my XDG data dirs:
$ echo $XDG_DATA_DIRS
/home/jluttine/.nix-profile/share:/etc/profiles/per-user/jluttine/share:/nix/var/nix/profiles/default/share:/run/current-system/sw/share
Just to verify the first three paths don't exist:
$ ls /home/jluttine/.nix-profile/share
ls: cannot access '/home/jluttine/.nix-profile/share': No such file or directory
$ ls /etc/profiles/per-user/jluttine/share
ls: cannot access '/etc/profiles/per-user/jluttine/share': No such file or directory
$ ls /nix/var/nix/profiles/default/share
ls: cannot access '/nix/var/nix/profiles/default/share': No such file or directory
So, thunderbird.desktop
from the fourth/last XDG data dir must be used. It's content:
$ cat /run/current-system/sw/share/applications/thunderbird.desktop
[Desktop Entry]
Type=Application
Exec=thunderbird %U
Terminal=false
Name=Thunderbird
Icon=/nix/store/xhj0aysfcqy1zwnl37iwnfl2zd5dq3j9-thunderbird-68.7.0/lib/thunderbird/chrome/icons/default/default256.png
GenericName=Mail Reader
MimeType=x-scheme-handler/mailto;message/rfc822;x-scheme-handler/feed;application/rss+xml;application/x-extension-rss;x-scheme-handler/news;x-scheme-handler/snews;x-scheme-handler/nntp
Categories=Application;Network
Yes, it seems to have x-scheme-handler/mailto
in MimeType
. So, let's set it as our default mailto
handler:
$ xdg-settings set default-url-scheme-handler mailto thunderbird.desktop
Let's check it actually got set:
$ xdg-settings get default-url-scheme-handler mailto
chromium-browser.desktop
What...???? Why is it chromium-browser.desktop
??