KMail on Xandros - Success!

Remember how I mentioned that I couldn't figure out how to change the default mail client in Xanrdos 3 OCE? Well, I figured it out, thanks to a little experimentation in Slackware. Actually, all I did was change the default mail client on my Slackware box, grep for the program name under my $HOME/.kde/share directory, and there it was. I don't know why I didn't think of that the first time.

Anyway, it turns out that all you need to do is add a line to your $HOME/.kde/share/config/emaildefaults file. Under the [PROFILE_Default] section, add the setting EmailClient=kmail, so that it looks kind of like this:
[PROFILE_Default]
EmailClient=kmail
I'm not sure how the profiles stuff works, but this seems to do the trick. Now, when I right-click a contact in the KDE address book and send them an e-mail, it opens up KMail instead of Thunderbird.

In a related note, a little Googling also found me the setting to make FireFox open links in KMail. Of course, this isn't specific to Xandros - I've been wondering how to do it for a while. It's just that I don't use FireFox on my Slackware box (it runs too slow on my old hardware), so I never really bothered with it until now. All you need to do is open up FireFox and type
about:config
into the address bar. This will open up FireFox's long, convoluted settings dialog. Type "mailto" in the filter box to search for the relevant setting. Look for a preference named
network.protocol-handler.app.mailto
You probably won't see one, so right-click in the preferences list and select New->String. Enter network.protocol-handler.app.mailto for the preference name and kmail, or whatever your favorite mail program is, for the value.

The only one problem with this is that the File->Send Link menu item may not work. Sure, it will open your mail program, but it won't actually put the link in the body of the message. It turns out that this is because FireFox calls the mail program with a single argument: a URL query string. That means that if your mail program doesn't understand how to parse a query string, you're out of luck. So, for example, the KMail command line options like -s and --body won't work, because there aren't any separate variable to pass them. However, it turns out there's a program called kmailservice which comes with KDE, and it does know how to parse query strings. I haven't looked into it much yet, but apparently it takes a URL and parses it into a form the default mail client can understand. So I just set kmailservice as my mailto program in FireFox and I'm good to go.

You can reply to this entry by leaving a comment below. This entry accepts Pingbacks from other blogs. You can follow comments on this entry by subscribing to the RSS feed.

Comments #

    kmailservice -- who knew?

    May God bless your geeky soul!! :-)

    I've been looking for this fix on and off for a very long time.

    Thanks *very* much!

    kmailservice

    Bless you!

    I've been trying to find the answer to this little glitch for months.

    Thanks so much.

    network.protocol-handler.app.mailto behavior

    I too struggled with getting Firefox's Send Link operation to work with kmail, and this kmailservice discovery was a gem! It worked for me right off.

    But one puzzle remains: just how Firefox interprets the value of network.protocol-handler. app.mailto. You'd think it would, in general, treat it as an executable program. But I tried creating a shell script that left a mark in a file and putting it into both my home directory and /usr/local/bin. It never got executed, though I could execute it from a command line. I also tried providing the value "beep", and heard nothing.

Add your comments #

A comment body is required. No HTML code allowed. URLs starting with http:// or ftp:// will be automatically converted to hyperlinks.