You are not logged in.

#1 2018-05-17 12:04:05

Beep
Member
Registered: 2018-05-17
Posts: 11

[Solved] Default email application

Hello from a former CrunchBang user...

I have installed Claws Mail and Thunderbird and want to use Claws as the default email client. I couldn't see an email option in Debian Alternatives and after some researching (okay, Googling) I added the following line to .local/share/applications/mimeapps.list:

x-scheme-handler/mailto=claws-mail.desktop

Both Claws and Thunderbird have a .desktop file and it seems Claws should be the default:

$ ls -1 /usr/share/applications/claws* /usr/share/applications/thunder*
/usr/share/applications/claws-mail.desktop
/usr/share/applications/thunderbird.desktop

$ xdg-mime query default 'x-scheme-handler/mailto'
claws-mail.desktop

However... when I open an email link in Firefox or Writer I get a dialogue asking me to choose which email client I want to use. There also doesn't seem to be anything related to email applications in /etc/alternatives:

$ ls -l /etc/alternatives/*mail*
ls: cannot access '/etc/alternatives/*mail*': No such file or directory

I guess editing the mimeapps.list file wasn't the way to define the default email client or that I missed a step. So my question is: what is the right way to define the default email application?

A related question is: once there is a default email client, what is the command I need to add to the menu.xml file? I guess there is something similar to x-www-browser?

Last edited by Beep (2018-05-17 22:13:28)

Offline

#2 2018-05-17 14:16:30

iMBeCil
WAAAT?
From: Edrychwch o'ch cwmpas
Registered: 2015-09-29
Posts: 767

Re: [Solved] Default email application

I'm using Sylpheed and I have had a similar problem.

Here is how I have solved it:
1) create file $HOME/claws_compose_email_Firefox.sh

#!/bin/bash
#
# Add this as a Firefox action for mailto.
# (This works in Iceweasel and Palemoon, too.)
#
# This works for Sylpheed email client.
sylpheed --compose "$1"
# Please, adjust this line for claws. Chances are this is something like
#      claws --compose "$1"
# but I really don't know.

Make this script executable:

$ chmod u+x $HOME/claws_compose_email_Firefox.sh

2) Open the Firefox and go to Preferences|Applications (or copy 'about:preferences#applications' to address bar. Chose mailto 'Content type' and select (probably by navigation; I forgot the details) your script for the Action.

HTH.

I can help you if you encounter problems ...

Last edited by iMBeCil (2018-05-17 14:16:55)


Postpone all your duties; if you die, you won't have to do them ..

Offline

#3 2018-05-17 15:53:15

Beep
Member
Registered: 2018-05-17
Posts: 11

Re: [Solved] Default email application

Thanks, that's an interesting script. I think, though, that I can achieve the same by picking Claws Mail from the dialogue that pops up when I click on an email link in Firefox. I haven't tried that as I'm hoping to make Claws the default email client system-wide, in the same way you can make a browser or terminal emulator the default.

I'll keep digging smile

Offline

#4 2018-05-17 16:59:10

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

Re: [Solved] Default email application

Beep wrote:

what is the right way to define the default email application?

exo-preferred-applications

You may have to remove that mimeapps stuff first though.

what is the command I need to add to the menu.xml file? I guess there is something similar to x-www-browser?

Good question smile

Try

exo-open --launch MailReader

(Untested)

Offline

#5 2018-05-17 22:12:19

Beep
Member
Registered: 2018-05-17
Posts: 11

Re: [Solved] Default email application

Head_on_a_Stick, you're my hero. Both worked!

Offline

#6 2018-05-21 06:20:57

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

Re: [Solved] Default email application

BTW there is no debian alternative like x-www-browser for a mail reader. You could make your own though!

(exo-open and exo-preferred-applications are XFCE utilities which we've imported into BunsenLabs because our default file manager is also XFCE.)


...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