Custom URL Schemata?

fREW Schmidt frioux at gmail.com
Wed Sep 7 04:39:44 UTC 2016


Hey all,

I'm trying to make a few custom url schemes for personal links to
myself, here is, as far as I know, a complete summary of what I've
tried:

   $ cat install-xdg
   #!/bin/dash

   xdg-mime install ./xdg/frew-test.desktop
   xdg-mime default frew-test.desktop x-scheme-handler/email

   if [ $(xdg-mime query default x-scheme-handler/email) = "frew-test.desktop" ]; then
      echo "IT WORKED!"
   fi

   $ cat ./xdg/frew-test.desktop
   [Desktop Entry]
   Name=Mutt-id
   GenericName=Email Viewer
   Comment=View emailz
   TryExec=/home/frew/bin/email-handler
   Exec= TryExec=/home/frew/bin/email-handler %u
   Terminal=true
   Type=Application
   Icon=gvim
   Categories=Utility;TextEditor;
   StartupNotify=true
   MimeType=x-scheme-handler/email;

   $ cat ~/bin/email-handler
   #!/bin/dash

   echo $1

   $ ./install-xdg
   IT WORKED!

When I run `xdg-open email://foo`, instead of echoing foo (or maybe
email://foo) it always runs chrome.

What should I do?  Are there logs I could look at?
-- 
fREW Schmidt
https://blog.afoolishmanifesto.com


More information about the xdg mailing list