Terminal command to set default email application

I was messing around in Settings and somehow made Thunderbird my default email application instead of Geary. I did something so that I can no longer use the toggle switch to choose Geary; Thunderbird is now the only option. Is there a Terminal command that will reset Geary as the default email program?

To look:
xdg-mime query default 'x-scheme-handler/mailto'

To change:
xdg-settings set default-url-scheme-handler mailto firefox.desktop
or
xdg-mime default firefox.desktop 'x-scheme-handler/mailto'

That sets Firefox as the default email program, not Geary.

… that was an example.

Apologies.

You’ll have to substitute the desktop file for Geary there.

Edit:
Regular Applications desktop files will be in

/usr/share/applications

Flatpak Applications desktop files will be in

system:

/var/lib/flatpak/exports/share/applications

user:

~/.local/share/flatpak/exports/share/applications

1 Like