You are not logged in.

#1 2025-05-15 07:33:01

JasonMehmel
Member
Registered: 2015-10-06
Posts: 186

updating MailReader alternative, not sure where to turn

While playing around with emacs, (and doomemacs) I ended up accidentally making it an email reader option.

Now it's the 'default' whenever I click an email link. I can turn that off in Firefox but I'd like to turn it off of the default in general.

The closest answer I could find was a thread from 2018 where Head_on_a_Stick suggested exo-preferred-applications

https://forums.bunsenlabs.org/viewtopic.php?id=4826

But that command is no longer available; it's not already installed or findable in the repos (from what I can tell).

The Debian Alternatives options don't have a mailreader option that I can see, and I'm not sure where else to look... in an config file somewhere?

Last edited by JasonMehmel (2025-05-15 07:33:24)


Fortune favours the bold.
ThinkPad T15 Gen 2i

Offline

#2 2025-05-15 13:07:38

hhh
Gaucho
From: High in the Custerdome
Registered: 2015-09-17
Posts: 16,138
Website

Re: updating MailReader alternative, not sure where to turn

You didn't mention if you have an email application installed. Are you trying to revert to having nothing associated with email links?


I don't care what you do at home. Would you care to explain?

Offline

#3 2025-05-16 04:49:40

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,652
Website

Re: updating MailReader alternative, not sure where to turn

JasonMehmel wrote:

Now it's the 'default' whenever I click an email link. I can turn that off in Firefox but I'd like to turn it off of the default in general.

Firefox and Tbird have their own default settings for links. Is there somewhere else you want to change?


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#4 2025-05-16 07:20:18

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: updating MailReader alternative, not sure where to turn

JasonMehmel wrote:

The closest answer I could find was a thread from 2018 where Head_on_a_Stick suggested exo-preferred-applications

Did you check ~/.config/mimeapps.list? That would override exo-open.

Offline

#5 2025-05-16 16:30:11

greenjeans
Member
Registered: 2025-01-18
Posts: 239
Website

Re: updating MailReader alternative, not sure where to turn

Head_on_a_Stick wrote:
JasonMehmel wrote:

The closest answer I could find was a thread from 2018 where Head_on_a_Stick suggested exo-preferred-applications

Did you check ~/.config/mimeapps.list? That would override exo-open.

This^^^

It's good to check that file on a regular basis anyway, I fat-finger some things occasionally as does everybody. Most common is trying to open a binary by mistake, then it throws up an entry in there.

Might double-check /usr/share/applications/mimeinfo.cache as well.

Offline

#6 2025-05-16 22:07:24

JasonMehmel
Member
Registered: 2015-10-06
Posts: 186

Re: updating MailReader alternative, not sure where to turn

greenjeans wrote:

Might double-check /usr/share/applications/mimeinfo.cache as well.


That got me somewhere! The cache file did have this:


x-scheme-handler/mailto=claws-mail.desktop;emacs-mail.desktop;emacsclient-mail.desktop;firefox-esr.desktop;firefox.desktop;thunderbird.desktop;vivaldi-stable.desktop;

Is that listed in order of priority? So if I wanted to put Thunderbird first I would just drop it in there?

I did just install claws mail, which might explain why it's ahead of emacs.


There's also this in default.list

x-scheme-handler/mailto=vivaldi-stable.desktop;

I'm not sure how that got listed as the default! I use Vivaldi as a separate browser for chat-related tasks and so as to keep my logins uncomplicated in my main Firefox browser.

hhh wrote:

You didn't mention if you have an email application installed. Are you trying to revert to having nothing associated with email links?

That's a great question. I do have a few installed, claws and Thunderbird. I actually wouldn't mind having nothing associated because the account and system I use for any given email is going to vary wildly.

johnraff wrote:

Firefox and Tbird have their own default settings for links. Is there somewhere else you want to change?

I had the impression that whatever is handling mailto links has the 'top' authority. I'll probably be clicking links mostly in Firefox, true, but mainly I just want to make sure emacs mail windows stop popping up, period.


Fortune favours the bold.
ThinkPad T15 Gen 2i

Offline

#7 2025-05-17 01:39:30

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,652
Website

Re: updating MailReader alternative, not sure where to turn

JasonMehmel wrote:
johnraff wrote:

Firefox and Tbird have their own default settings for links. Is there somewhere else you want to change?

I had the impression that whatever is handling mailto links has the 'top' authority. I'll probably be clicking links mostly in Firefox, true, but mainly I just want to make sure emacs mail windows stop popping up, period.

So my question is when do those unwanted emacs windows pop up? ie what application is calling it? That might help us track down what default setting they're referring to.


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#8 2025-05-17 03:22:40

hhh
Gaucho
From: High in the Custerdome
Registered: 2015-09-17
Posts: 16,138
Website

Re: updating MailReader alternative, not sure where to turn

JasonMehmel wrote:
hhh wrote:

You didn't mention if you have an email application installed. Are you trying to revert to having nothing associated with email links?

That's a great question. I do have a few installed, claws and Thunderbird. I actually wouldn't mind having nothing associated because the account and system I use for any given email is going to vary wildly.

See if you can set it to Thunderbird for a start, via xdg-settings. See 'man xdg-settings' for an example under "EXAMPLES".

xdg-settings set default-url-scheme-handler mailto thunderbird.desktop

I have no idea where that MIME type will be stored, but maybe we can figure it out if that works. I also have no idea if that command needs root access.

exo-utils got moved to xfce4-settings a few years ago, and you don't want that app for a BL session.


I don't care what you do at home. Would you care to explain?

Offline

#9 2025-05-17 16:09:04

greenjeans
Member
Registered: 2025-01-18
Posts: 239
Website

Re: updating MailReader alternative, not sure where to turn

Only reason I have the info I do have on this subject, is a day-long search for info to solve an old mimetype-related bug I did a few days ago, which thankfully I finally tracked down and worked around, so take my info with a grain of salt:

1. You can edit /usr/share/applications/mimeinfo.cache manually and the system (at the system level) will honor your changes, until you install another new application, at which point during the install the system will call "update-desktop-database" which re-writes that file and likely will undo your changes.

2. ~/.config/mimeapps.list  overrides the system settings for mimetypes at the user level, and typically this file only gets changed by you attempting to open a new kind of file where you have to search for a program to open it, it will add the program you tried to use and assign it as another possibility for that mimetype, if you selected the box to set it as default for that mimetype, it will attempt to do so. But there are some mimetypes this won't work with for obvious reasons i.e. .desktop files which by their nature default action of clicking them needs to be activating/using them.

3. From what i've read, use of defaults.list is deprecated, as is the use of ~/.local/share/applications/mimeinfo.cache, all user changes should go into ~/.config/mimeapps.list which overrides everything as HOAS mentioned.

In practice on my clean build systems, there is nothing whatsoever in ~/.local/share/applications and no defaults.list anywhere, using mimeapps.list instead works perfectly. If it was me i'd simply try adding an association there for whatever mailto app you want to use, and deleting any other associations for that mimetype you might find in that file.

/usr/share/applications/mimeinfo.cache is just a good place to check and see what's available and what's already set by the system, to give you an idea of how to edit mimeapps.list.

JMHO, I am not a ninja like these other guys, just a determined user, lol.

EDIT: For users like me who are trying to learn, adding this tidbit to post for future readers reference.

/usr/share/mime is the place to go find out all about the mimetypes on your system. "types" will list all current mimetypes with their current designation, but there are also "aliases" and "subclasses" files which may be of interest. If making new applications, stick with current mimetypes only, don't use old aliases unless you need the app to recognize/replace them in older documents/apps you may want to work with.

Last edited by greenjeans (2025-05-17 16:29:08)

Offline

#10 2025-05-19 00:45:06

JasonMehmel
Member
Registered: 2015-10-06
Posts: 186

Re: updating MailReader alternative, not sure where to turn

johnraff wrote:

So my question is when do those unwanted emacs windows pop up? ie what application is calling it? That might help us track down what default setting they're referring to.

It is mostly in Firefox, my daily driver browser. And I did change the association in Firefox to 'ask first.'

So the main 'problem' is now mostly solved, but could still crop up clicking an active email address in a PDF, or in some of the other browsers I use. (Chrome when I'm playing in the Google ecosystem primarily, Vivaldi as a holder for my messaging apps, etc.)

What it did expose for me was the question: what's controlling that behavior?

I assume that when I installed emacs (and doomemacs which was quite the process) I must have either accidentally said yes to something along the way pushing emacs and its internal email integration into the forefront of any 'mailto' links.

Judging from some of the leads here, I may have already moved past emacs, but like any good Linux user, the desire to figure out the underlying cause is strong!


Fortune favours the bold.
ThinkPad T15 Gen 2i

Offline

#11 2025-05-19 04:53:20

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,652
Website

Re: updating MailReader alternative, not sure where to turn

Grep is sometimes good for digging out hints. Try, for example:

grep -ri 'emacs' ~/.config ~/.local

...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

Board footer

Powered by FluxBB