General :  K-Meleon Web Browser Forum
General discussion about K-Meleon 
How do I get gmail account via clicking on a mailto link?
Posted by: Ralph
Date: April 12, 2015 03:54PM

I have the latest version of K-Meleon running on Windows 7 64 bit Home Premium, and would like to configure the default mailer to open up gmail.

Right now, it defaults to outlook, which I do not use.

Thank you for any insight into this issue.

Options: ReplyQuote
Re: How do I get gmail account via clicking on a mailto link?
Posted by: JohnHell
Date: April 12, 2015 05:53PM

Uh, that's a bit tricky: set a browser to open the Gmail web page.

Note that doing so you will lose features such as the parameters of a mailto link.

For example, if click in a link like "mailto:john@doeDOTcom?subject=Hi there" you won't pass to Gmail page the recipient, nor the subject, just open mail.google.com inbox front page.

In other words, invoking K-meleon with mailto will be the same as just open mail.google.com, nothing else.

Said that, for me, the easiest way is to edit the Windows registry key "HKEY_CLASSES_ROOT\mailto\shell\open\command" and set the default value to the path to k-meleon.exe plus the url to go:

"Path to where you installed K-meleon\K-meleon.exe" "https://mail.google.com/";
(without removing the quotes)

I could provide you a registry file, but you still would need to edit it by hand in the same way I described, as I don't know the path to your K-meleon.exe.




Edited 2 time(s). Last edit at 04/12/2015 08:40PM by JohnHell.

Options: ReplyQuote
Re: How do I get gmail account via clicking on a mailto link?
Posted by: siria
Date: April 12, 2015 06:49PM

Did a quick search for gmail mailto, produces lots of results. Looks like html5 allows now much easier handling, just not sure what KM can handle. An example that sounds like may work via errorconsole, but no clue if true:
http://updates.html5rocks.com/2012/02/Getting-Gmail-to-handle-all-mailto-links-with-registerProtocolHandler



Edited 1 time(s). Last edit at 04/12/2015 06:58PM by siria.

Options: ReplyQuote
Re: How do I get gmail account via clicking on a mailto link?
Posted by: JohnHell
Date: April 12, 2015 07:51PM

Quote
siria
Did a quick search for gmail mailto, produces lots of results. Looks like html5 allows now much easier handling, just not sure what KM can handle. An example that sounds like may work via errorconsole, but no clue if true:
http://updates.html5rocks.com/2012/02/Getting-Gmail-to-handle-all-mailto-links-with-registerProtocolHandler

After having a look to mimetypes.rdf in Firefox, you are right, Siria, is a browser thing.

EDIT: I can't make it to work without editing the file.

Even substitute the file doesn't work :-?



Edited 3 time(s). Last edit at 04/12/2015 08:17PM by JohnHell.

Options: ReplyQuote
Re: How do I get gmail account via clicking on a mailto link?
Posted by: rodocop
Date: April 12, 2015 08:25PM

I found advice how-to set it in FF: in Preferences->Applications it can be done visually.

(Mailto web handlers are described in chrome://browser-region/locale/region.properties)

then I copy FF's fresh saved mimetypes.rdf over KM's one - and voila!
Mailto: Gmails now! (but in KM you cannot change it through about:preferences GUI)

But wait! I've added some prefs from firefox.js (FF defaults) connected with it:
// We want to make sure mail URLs are handled externally...
pref("network.protocol-handler.external.mailto", true); // for mail
pref("network.protocol-handler.external.news", true);   // for news
pref("network.protocol-handler.external.snews", true);  // for secure news
pref("network.protocol-handler.external.nntp", true);   // also news

// ...without warning dialogs
pref("network.protocol-handler.warn-external.mailto", false);
pref("network.protocol-handler.warn-external.news", false);
pref("network.protocol-handler.warn-external.snews", false);
pref("network.protocol-handler.warn-external.nntp", false);

// By default, all protocol handlers are exposed.  This means that
// the browser will respond to openURL commands for all URL types.
// It will also try to open link clicks inside the browser before
// failing over to the system handlers.
pref("network.protocol-handler.expose-all", true);
pref("network.protocol-handler.expose.mailto", false);
pref("network.protocol-handler.expose.news", false);
pref("network.protocol-handler.expose.snews", false);
pref("network.protocol-handler.expose.nntp", false);

// mailto
pref("gecko.handlerService.schemes.mailto.0.name", "chrome://browser-region/locale/region.properties");
pref("gecko.handlerService.schemes.mailto.0.uriTemplate", "chrome://browser-region/locale/region.properties");
pref("gecko.handlerService.schemes.mailto.1.name", "chrome://browser-region/locale/region.properties");
pref("gecko.handlerService.schemes.mailto.1.uriTemplate", "chrome://browser-region/locale/region.properties");
pref("gecko.handlerService.schemes.mailto.2.name", "chrome://browser-region/locale/region.properties");
pref("gecko.handlerService.schemes.mailto.2.uriTemplate", "chrome://browser-region/locale/region.properties");
pref("gecko.handlerService.schemes.mailto.3.name", "chrome://browser-region/locale/region.properties");
pref("gecko.handlerService.schemes.mailto.3.uriTemplate", "chrome://browser-region/locale/region.properties")

I saved this as mailto.js in KM\browser\defaults. I really have no time now to make all things clear, but I guess I will do it tomorrow.




UPD.: and this a link to test page with working mailto: links



Edited 2 time(s). Last edit at 04/12/2015 08:27PM by rodocop.

Options: ReplyQuote
Re: How do I get gmail account via clicking on a mailto link?
Posted by: rodocop
Date: April 13, 2015 01:56PM

Well, folks - aren't we so stupid as those who forget their own tools?

RVJmimeedit works fine to handle this job.



So, what do you need, Ralph, are the next steps:

1) download and install (unpack into KM folder) this archive with RVJmimeedit 0.6.3 addon prepared by JujuLand

2) *optional* save this macroextension written by siria (and posted there) into your 'macros' folder.

3) open your profile folder and find there file mimetypes.rdf

4) open it as text (for example in Notepad or your default text editor) and find these lines:
  <RDF:description RDF:about="urnconfused smileycheme:handler:mailto"
                   NC:useSystemDefault="true"
                   NC:alwaysAsk="false">

! note that second line could not be there (but if your KM opens mailto:-links in system default mailer - then it SHOULD be there) - doesn't matter!

Your should change "false" in last line to "true" - save and close file.

5) Now run KM and try to click mailto: link. You should get now window like this:



//Mail handling agents may vary depending on your config.//

6) Select Gmail and tick the box for 'Remember my choice'.

VOILA! Now all the mailto: links will open in your gmail account (sure if you are logged in).



Edited 6 time(s). Last edit at 04/13/2015 02:16PM by rodocop.

Options: ReplyQuote
Re: How do I get gmail account via clicking on a mailto link?
Posted by: rodocop
Date: April 13, 2015 02:12PM

Note for my comrades involved in development of MIME editor:

I found that RVJ can edit only parts of mimetypes.rdf applied to mimetypes not protocols (named 'schemes' in RDF).

Being precise, procedure that's described above, DOES change parameter
 NC:alwaysAsk="true"
in
<RDF:description RDF:about="urn: scheme:handler:mailto"
to "false"

but you cannot change it back through GUI thus you need do it manually.



Edited 3 time(s). Last edit at 04/13/2015 02:14PM by rodocop.

Options: ReplyQuote
Re: How do I get gmail account via clicking on a mailto link?
Posted by: rodocop
Date: April 13, 2015 04:20PM

Well...

Forget it all. That's how it works in KM 75 RC2:

1) type in URLbar
about:Ñ€references
Settings page will open.

2) select 'Applications' in menu on the left.
mimetypes and protocols list opens

3) scroll down to the 'mailto' record

4) you can select Gmail in the dropdown list in right column like shown (image is clickable for fullsize):



That's it!!!


BUT! There are downside here. If you'll decide to change this one more time - you'll find that 'mailto'-dropdown is locked.

One step later I'll show you how to unlock it for continuous use.
Watch my step!



Edited 1 time(s). Last edit at 04/13/2015 04:21PM by rodocop.

Options: ReplyQuote
Re: How do I get gmail account via clicking on a mailto link?
Posted by: rodocop
Date: April 13, 2015 04:35PM

Now we shell unlock chooser for mailto protocol handlers.

1) download file 'webprotocol.js' and save it to
\browser\defaults\preferences

2) restart K-Meleon

3) open about:config page (type this address in URLbar or just run menu item Edit->Configuration->Browser Configuration)

4) press 'I'll be careful, I promise!' button to get into prefs

5) type 'gecko' in searchbox

6) find line
gecko.handlerService.defaultHandlersVersion default string 5

7) double-click it to change value ('5') and input some number (no matter!). Say 'OK'


8) Then repeat it and set '5' again (really optional step, but I recommend to do this too)

9) now open about:Ñ€references - and VOILA! - mailto dropdown is unlocked!

P.S. KM will lock this at every restart - so when you need it, just repeat all this 'about:config magic' - in other words pp.3-7 (you can change the pref once every time. I jump from '5' to '0' and back again, but you can select other numbers)



Edited 2 time(s). Last edit at 04/13/2015 04:41PM by rodocop.

Options: ReplyQuote
Re: How do I get gmail account via clicking on a mailto link?
Posted by: rodocop
Date: April 13, 2015 04:44PM

I cannot explain why KM locks mailto dropdown every time - while Firefox doesn't.

May be someone more experienced in Mozilla hacking can. :cool:

Options: ReplyQuote
Re: How do I get gmail account via clicking on a mailto link?
Posted by: siria
Date: April 13, 2015 06:52PM

Very cool, great job! smiling smiley

Did a quick search for that pref, and acc. to mozilla that number is a "version" number that must match the version inside the rdf-file, otherwise it gets written new or something... no idea if helps anything.

Or perhaps, as a workaround, add a setpref(...) line to some macro? (e.g. below macroinfo-line)



Edited 1 time(s). Last edit at 04/13/2015 06:57PM by siria.

Options: ReplyQuote
Re: How do I get gmail account via clicking on a mailto link?
Posted by: rodocop
Date: April 13, 2015 08:07PM

As I understand, some 'version' info taken from region.properties file is copied into mimetypes.rdf.

When 'version' number in prefs and rdf-file stop matching - new data is written to rdf and it gets unlocked.

But I can't find the reason for locking though. Maybe Dorian can tell us?

Options: ReplyQuote


K-Meleon forum is powered by Phorum.