Nevermind my last comment. This works in chromium (no idea about snapd).
To get this to work in chromium, first make sure it works for xdg-open.

Click on the link that you want to be opened automatically in some
application. When it downloaded, right-click on it (the button that
appeared on the bottom) and select "Always open files of this type";
this will cause chromium to use xdg-open next time you open a file
of that type.

To make xdg-open work, run "xdg-mime query filetype the-downloaded-file",
this should print the correct mime type.
Then run "xdg-mime query default that-mime-type", this should print
the desktop file that you want to use, aka "myapplication.desktop".
Inside that .desktop then (.local/share/applications/the-file.desktop),
there should be the lines Exec=/path/your/application and 
MimeType=that-mime-type
Anyway, plenty of tutorial on xdg on the net. I missed the chromium
trick to make it use xdg-open in the first place.

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to chromium-browser in Ubuntu.
https://bugs.launchpad.net/bugs/1776873

Title:
  Whitelisted allowedURLschemes breaks some desktop apps

Status in snapd:
  Triaged
Status in chromium-browser package in Ubuntu:
  Confirmed

Bug description:
  
https://github.com/snapcore/snapd/blob/7952972d4897e085030b288e44dc98b824f6723a/userd/launcher.go#L55

  snapd has a hard-coded list of allowed URL schemes. Currently that is
  limited to "http", "https", "mailto", "snap".

  We have a number of applications in the store which are trying to use
  protocol handlers outside this scope and break when that's not
  possible.

  e.g.

  Telegram Desktop: tg:/
  Github Desktop: git:/
  IRCCloud Desktop: irc:/

  These are the ones I know of, others may also be affected. Can we
  please at least expand the list to those that we know of, and perhaps
  research other popular protocol handlers?

  Ideally we wouldn't have a whitelist, because this delays our ability
  to land new applications with as-yet unknown url schemes.

To manage notifications about this bug go to:
https://bugs.launchpad.net/snapd/+bug/1776873/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to