Overriding Chromium's internal protocol handlers (mailto:, news:, etc)

After reading many posts on different forums, I have found that overriding Chromium's internal protocol handlers is notoriously difficult. Some, like mailto:, use a hardcoded command name like xdg-email which doesn't work very well when not using one of the major desktops, while others don't work as expected for any number of reasons.
Which is why I've come up with a way to add any user-defined protocol that Chromium doesn't already handle using xdg-open.
The following example deals with adding an override for the mailto: protocol handler, to have it use xdg-open instead of xdg-email to start the email client.
The process is in 3 steps:
1. Add a .desktop file for the protocol handler override
2. Tell the system to use the protocol handler override
3. Tell Chromium to use the protocol handler override
Step 1: Create the file $HOME/.local/share/applications/chromium-mailto.desktop with the following contents:
[Desktop Entry]
Version=1.0
Name=Chromium mailto: override
Comment=Override the Chromium mailto: protocol handler
GenericName=Override the Chromium mailto: protocol handler
Exec=xdg-open $(echo %u|perl -pe 's/^x-chromium-mailto://; tr/+/ /; s/%([a-fA-F0-9]{2,2})/chr(hex($1))/eg;')
Terminal=false
Type=Application
MimeType=x-scheme-handler/x-chromium-mailto
NoDisplay=true
Step 2: Tell the system about the new MIME type
In a terminal, execute the following command:
$ xdg-mime default chromium-mailto.desktop x-scheme-handler/x-chromium-mailto
Note: the path to the .desktop file must be relative to $HOME/.local/share/applications !
Step 3: Tell Chromium to use the protocol handler override
First, close all open Chromium windows. This is very important for the following changes to 'take'!
Assuming you use the Default profile in Chromium, open the following file in an editor: $HOME/.config/chromium/Default/Preferences
Within the curly braces, for example under the lines:
"cloud_print": {
"email": ""
add the following:
"custom_handlers": {
"enabled": true,
"registered_protocol_handlers": [ {
"default": true,
"protocol": "mailto",
"title": "mailto: override",
"url": "x-chromium-mailto:%s"
Test that everything works by starting Chromium, then clicking on a mailto: link, for example the Contact link at the bottom of http://oswatershed.org.
The first time you click the link, Chromium will ask for permission to run the command, so you can check that it is correct. Check the checkbox to have Chromium remember your choice.
Comments and suggestions are very welcome.
Last edited by ackalker (2012-12-04 04:08:32)

The Preferences file has changed since Dec. 2012. The "cloud_print" input has changed. Adding your mod input to the Preferences file induced a Google warning--I undid. It seems that the previous mods prove sufficient. Thanks!
Last edited by rbrband (2014-04-23 20:13:40)

Similar Messages

  • One of my kids changed my password, and now i can't access my mail accounts. Any ideas on how to override the password and set up a new one?

    one of my kids changed my password, and now i can't access my mail accounts. Any ideas on how to override the password and set up a new one?

    A mail account password or you login password?
    Which OS by the way?

  • What does "improved international support " mean for new Airport software?

    what does "improved international support " mean for new Airport software?

    Improved language support, presumably, or more WiFi channels in some areas.

  • Registering URL protocol handlers

    I'm having some trouble registering URL protocol handlers in WebLogic. The handler I wish to register is not an existing one (like http or https) so it should not conflict with any of the built in ones.
    <pre>
    // PROTOCOL_PACKAGE defined as java.protocol.handler.pkgs
    // HANDLER_PACKAGE is defined as com.xxxx.xxxx
    // In that package I have a yyy package with its Handler class.
    String handlers = System.getProperty(PROTOCOL_PACKAGE);
    if (handlers == null) {
    System.setProperty(PROTOCOL_PACKAGE, HANDLER_PACKAGE);
    else if (handlers.indexOf(HANDLER_PACKAGE) == -1) {
    System.setProperty(PROTOCOL_PACKAGE, handlers + "|" + HANDLER_PACKAGE);
    System.out.println(System.getProperty(PROTOCOL_PACKAGE));
    </pre>
    The output shows that the system property is properly set:
    weblogic.utils|weblogic.utils|weblogic.net|com.xxxx.xxxx
    If I try to create a URL I get the following error:
    java.net.MalformedURLException: unknown protocol: yyy
    This same code works for me on both JBoss and using Straight Java. I looked through the documentation and scoured the Internet trying to find an alternate way to register the protocol in WebLogic, but I found none.
    Is there some reason why this would not work in WebLogic?
    Thanks
    Chris

    It seems like it's having trouble talking to the registry; perhaps the user authenticated to Windows doesn't have permissions?
    You could check to see if you have access to these Windows Registry keys:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\Outlook\Call Integration
    HKEY_CLASSES_ROOT\CLSID\{8885370D-B33E-44B7-875D-28E403CF9270}
    HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\14.0\Common\PersonaMenu
    The error message included isn't really that useful.  Maybe if you can attach the entire logfile to this thread we can dig into it more.

  • Adfs/ls does not work while adfs/ls/idpinitiatedsignon works | There are no registered protocol handlers on path /adfs/ls/ to process the incoming request

    Hello Experts
    I am trying to configure ADFS 3.0 with Sharepoint 2013 and facing an issue with ADFS 3.0 url
    When I try to access url https://<ADFS.domain.com>/adfs/ls - I face following error 
    Encountered error during federation passive request. 
    Additional Data 
    Protocol Name: 
    Relying Party: 
    Exception details: 
    Microsoft.IdentityServer.RequestFailedException: MSIS7065: There are no registered protocol handlers on path /adfs/ls/ to process the incoming request.
       at Microsoft.IdentityServer.Web.PassiveProtocolListener.OnGetContext(WrappedHttpListenerContext context)
    But When I try to access ADFS url - https://<ADFS.domain.com>/adfs/ls/idpinitiatedsignon 
    It works.. 
    Is it normal behavior or something wrong here.
    Please suggest.
    Thanks

    /adfs/ls/ is the endpoint for all "passive" protocols. a Plain GET to /adfs/ls wil complain (correctly) that the plain GET is not a correct SAML or WS-Fed message. You should only send correct messages to that EndPoint........
    Paul Lemmers

  • Cannot use protocol handlers.

    Hello
    I read the protocol handlers in the Cisco Jabber for Windows Administration Guide. I use three protocol handlers "IM: , XMPP: and TEL:" into my html pages.
    But, It cannot work and I got the unknown protocol from the web browser.
    Also, I cannot find three protocol handlers in the Windows registry. It look like the Jabber is not defined as the registered protocol handler for IM: , XMPP: and TEL: .
    How can I fix the problem ?
    Thank you!
    Andy

    Hi Andy,
    Is Jabber for Windows running on a Windows 7 OS with UAC (User Access Control) enabled? Jabber writes to following registry locations to register protocol handlers.
    HKEY_CLASSES_ROOT\tel\shell\open\command
    HKEY_CLASSES_ROOT\xmpp\shell\open\command
    HKEY_CLASSES_ROOT\im\shell\open\command
    If you don't see these values then you are hitting known bugs. There are two defects opened around this.
    CSCua81724: tel protocol handler does not work when UAC is enabled
    CSCua81752: xmpp protocol handler does not work when UAC is enabled
    As a workaround you can try to "run jabber as administrator".
    Thanks,
    Maqsood

  • Modify MDM record error through WebDynpro: com.sap.mdm.internal.protocol.ma

    When I use MDM java api thruogh WebDynpro portal try to save a record to MDM, I got this error:
    com.sap.internal.protocol.manual.ServerException: The selected node has children.
    Any help will be appriciated.

    Jitesh:
    thanks for your answer. It is great help.
    Let me put this way, if that is the problems cause, this only happens for one category when I try to save. I can save records to other category through portal application. So it is not portal problem.
    Then we come to MDM, how do I find out what is wrong with this category? Why other categories work and this one does not work?
    How do I find out why I have reference to parent node instead of leaf node for this category?
    What I can do in MDM side to find problem?
    thanks,
    Eric

  • Protocol handlers not registered

    JFW
    In some cases the protocol handlers will not be registered...we did multiple installations...no success...we tried to post register some dlls...no success...
    Appreciate any hint
    Andreas
    a little more....
    Analyzed the logs a little deeper there is a difference between working and non working installations...some error conditions occurring:
    INFO  protocol handlers not registered protocol handlers not registered protocol handlers not registered protocol handlers not registered - Setting registry settings
    2012-06-05 09:36:02,897 ERROR protocol handlers not registered protocol handlers not registered protocol handlers not registered protocol handlers not registered - Failed to create Software\Policies\Microsoft\Office\14.0\Common\PersonaMenu in 80000001 use64Bit: 0
    2012-06-05 09:36:02,897 ERROR protocol handlers not registered protocol handlers not registered protocol handlers not registered protocol handlers not registered - Failed to create SOFTWARE\Microsoft\Office\Outlook\Call Integration in 80000002 use64Bit: 0
    2012-06-05 09:36:02,897 ERROR protocol handlers not registered protocol handlers not registered protocol handlers not registered protocol handlers not registered - Failed to create CLSID\{8885370D-B33E-44B7-875D-28E403CF9270}\TreatAs in 80000000 use64Bit: 0
    How to avoid this?
    Regards
    Andreas
    Sent from Cisco Technical Support iPad App

    It seems like it's having trouble talking to the registry; perhaps the user authenticated to Windows doesn't have permissions?
    You could check to see if you have access to these Windows Registry keys:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\Outlook\Call Integration
    HKEY_CLASSES_ROOT\CLSID\{8885370D-B33E-44B7-875D-28E403CF9270}
    HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\14.0\Common\PersonaMenu
    The error message included isn't really that useful.  Maybe if you can attach the entire logfile to this thread we can dig into it more.

  • Google home page. remove boxes from web, images, video, maps, news, etc

    I use Google as my home page.
    I would like to remove the boxes around web, images, video, maps, news, etc.
    I don't see these boxes in Internet Explorer.
    Thanks
    Frank C
    Win Vista ultimate SP2 FF 4.0

    Thanks to jscher and cor-el I now have the Google home page that I wanted.
    I was not blocking gstatic.com or ssl.gstatic.com
    I looked at:
    http://kb.mozillazine.org/Website_colors_are_wrong
    I think items 2 and 3 fixed my problem. item 2 is the stronger candidate.
    My attempt to improve the display for my old eyes - contrast and font size was not very successful.
    I Checked these four items carefully from "website colors are wong.
    1 (Firefox) View -> Page Style should not be set to "No Style"
    Page style was set to wiki
    2 "Tools -> Options -> Content -> Colors" check "Allow pages to use their own colors, instead of my selections above"
    This item was NOT checked. It is now checked.
    3 (Windows users) Start Menu -> Control Panel -> Accessibility -> Display -> uncheck "Use High Contrast", restart the application
    This item was checked. I un- checked it. I think this fixed the problem.
    4 (Windows users) Right-click the Firefox shortcut -> Properties -> Compatibility -> uncheck "Run in 256 colors", restart the application
    This item was not checked.

  • How do I select features (e.g. news, investment info, sports news etc.) to the Firefox home page. It currently only contains a google search box ?

    My Firefox homepage currently only contains a Google search box. How do I select features (e.g. news, investment info, sports news etc) to the Firefox home page.

    The current build-in Firefox home page <b>about:home</b> doesn't have such extra features. If you need those then change the home page to <b>http://wwww<i></i>.google<i></i>.com</b>
    * [[How to set the home page]]

  • Why am I experiencing unwanted feeds;music, news,etc?

    why am I experiencing unwanted feeds; music,news,etc, constantly?

    Most likely because your system is infected with malware.

  • New /etc/passwd.shadow

    I have seen that with an upgrade I have an /etc/shadow.pacnew From what I know it is only a shadow copy of /etc/passwd without the password and can simply be generated by pwconv (similarly /etc/group.shadow can be generated by grpconv). So my question is why archlinux proposes me /etc/shadow.pacnew? What I did is simply fix the new /etc/passwd that were also proposed, rm the /etc/shadow.pacnew and run pwconv. If this is really the good thing to do, /etc/shadow.pacnew shouldn't have been proposed.

    olive wrote:I think most of you do not understand my point. I do not understand why /etc/shadow has to be shipped in the first place. It would be best to just ship /etc/passwd and to generate /etc/shadow automatically by pwconv. There are a lot of such files that can be automatically generated and such files are in general not included in the package.
    I ran pwconv and now I have two entries for dbus in /etc/shadow:
    I manually megerd the shadow.pacnew and had en entry for dbus
    dbus:x:14871::::::
    after running pwconv I have two entries for dbus:
    dbus:x:14871::::::
    and
    dbus:x:15686:0:99999:7:::
    I assume there arnt ment to be two?
    *EDIT
    Seems either works? I dont get any problems either way (I dont think)
    But, I think that:
    dbus:x:15686:0:99999:7:::
    was the original entry for dbus before the pacnew anyway?
    Last edited by jrussell (2012-12-12 00:33:27)

  • Internal error while creating new company in sap b1 pl 05

    Hi all
    I installed sap b1 server and clint in PL 05 for USA localization but when I m trying to create new company from login screen system start to create tables but after some time its giving error ''Internal error 101, then system showing that company in list but its not working
    Please help me out
    RIcky

    Hi Ricky,
    We had a similar issue and found we had to create the database on another server & restore it. I think, but didn't get around to proving, that the issue occurs where the license service is running using trusted connections

  • Default protocol handlers in Openbox

    Hi all!
    I'm switching from KDE to my own openbox-based environment. I really love the idea of building a system that just suits my needs. Nevertheless, I have stepped into some minor issues while trying to configure it (all told, less than I expected). One of these issues is default protocol management. In KDE, I used to "xdg-mime default transmission-qt.desktop application/x-bittorrent x-scheme-handler/magnet" in order for Qtransmission to handle both torrent files and magnet links. "xdg-mime default thunderbird.desktop x-scheme-handler/mailto", and Thunderbird managed my mailtoes. However, these don't work now. If I issue both commands (using transmission-gtk instead of transmission-qt), my ~/.local/share/applications/mimeapps.list gets updated and Thunar launchs Transmission when I double-click a torrent file (didn't realize if it did it before), but neither Transmission handles magnet links nor Thunderbird manages mailtoes if I click them on Firefox. I have tried installing gnome-defaults-list from the AUR and copying it to ~/.usr/share/applications (as described in the wiki), but no luck. Installing libgnome or issuing "ln -s ~/.local/share/applications/mimeapps.list ~/.local/share/applications/mimeinfo.cache" doesn't solve the problem.
    Of course I could click a magnet/mailto link on Firefox and choose the correct application to open it with, but I wondered if there was a cli method. I have a huge magic-bash-script-to-configure-all-and-I-really-mean-all-my-system-yes-I'm-that-lazy, and the more I can delegate to this script, the better. Moreover, is there a way to completely integrate xdg-utils into openbox? I solved some problems adding "export DE=xfce" to my ~/.xinitrc, but not all my xdg-whatever commands work yet.
    Thanks in advance for your help

    Knut Harald Støre wrote:
    Thanks for the info. I'm not so keen to get into programming unless it can be done in AppleScript.
    I have an odd relationship with AppleScript. I have written software in just about every language, from Assembly to million-line C++ monsters. But I can't get an AppleScript to work the same way twice. If I need a scripting language, I'll use Perl. If it is something that Perl can't handle, I'll use Objective-C because it is almost as easy.
    But I dug into the info.plist file. It contains no URL registrations but I opened up Safari's info.plist file, found its URL registrations, copied into Notes's info.plist file and modified it appropriately. I then restarted Notes and closed it again hoping that it would be registered but it still doesn't work. When I try to open a "notes://" url from Terminal nothing happens. Do I have to do anything else to make the system rescan the info.plist file and register the association? Here is what I added to info.plist:
    I'm pretty sure it will be more complicated than that. As I already mentioned, I can't get "Hello, World" to work in AppleScript so I can't help with that. Here is what I was thinking:
    1) Write a program that knows how to handle a "notes:" URL. Look at the Bwana source for an example. All you need at this point is a program that recognizes the URL and displays an alert with everything after "notes:" in the URL string. Test it by doing "open notes:yadayadayada" in the Terminal. I would do this in Objective-C. You may be able to do it in AppleScript. There is an AppleScript forum where anyone will know more than me.
    2) Find out what Apple script command are needed to tell Notes to open a particular message, given the contents of a Notes "notes:" URL. Hopefully Lotus Notes is scriptable and hopefully it has such a command. This is not guaranteed, however.
    3) Change your first program from displaying an alert to executing the Applescript commands in Step 2. You're done.

  • How to make custom protocol handlers work on weblogic 10.3

    Hello, BEA and community!
    I have created a simple "bufferedreader" protocol handler as described in JDK documentation:
    http://java.sun.com/developer/onlineTraining/protocolhandlers/
    To activate the protocol I'm explicitly setting the system property before creating the URL:
    System.setProperty("java.protocol.handler.pkgs", "sun.net.www.protocol.bufferedreader");
    I have created a unit test that runs perfectly, but when putting the same logic inside web application deployed in Weblogic 10.3 I get MallformedUrlException saying that protocol "bufferedreader" is unknown.
    I have also tried to put -Djava.protocol.handler.pkgs=sun.net.www.protocol.bufferedreader in the server's start up script, but with the same effect.
    Any ideas what could be wrong? Or any information on how WebLogic's url protocol handling is working? Is it different from standard one?
    Best regards,
    Sameer Tiwari

    No, we went for another solution :(
    We needed new protocol to support inclusion of XSLTs, but we used UriResolver interface instead.

Maybe you are looking for

  • Where to find the information regarding relationships between the tables?

    I am developing a Windows based app which among other things let’s users view SAP table schema and relationships. If I use SAP GUI and dig up a bit on say the MARA table I can see that Material Master (MARA) is related with 1) MaterialDescription (MA

  • My poor new iPad screen

    My friend bought me an iPad two weeks ago and I love it, but the screen is over now - color green was gone so the screen looks red. Yes I still can see the icons and images, even movies. And every operation is still as smooth as before. But the whole

  • Need some help with Keynote export

    I want to create an swf file from Keynote that will be used in a looped Powerpoint slideshow. It will be no longer than 1 minute long. I create the file and export as a .mov. Then I used Visualhub to convert to an .swf. People have had lots of issues

  • Cannot execute GR(MIGO)

    Hi All, There is a user ABC who is operating the production order X The user cannot carry the GR (MIGO ). The error note  is shown as below:-  Production Order X is already being processed by user ABC Message no. CO469 Diagnosis User ABC is blocking

  • Unable to open pdf files even though have installed the latest version of adobe reader

    New computer. Old computer had windows 7, new one has windows 8. On the old computer I can open the files, and I can download fillable forms and save them. On the new computer I can not open some files, and the fillable forms will only save empty, no