You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the reason App.setAsDefaultProtocolClient()is not available for Linux? I was under the impression this is possible, but requires different solutions for different distros.
On Linux this is declared in your .desktop file, which is something you set up at install-time, not something you can toggle. I could be full of it on this though, there might be a way to register for this dynamically
@paulcbetts For windows it should be done on install too.. But that doesn't mean this API call shouldn't be available. Right now we just do it on first run.
@zcbenz@atypicalprogrammer A possible solution might be checking for gnome-open, exo-open, xdg-open, gvfs-open, or kde-open and using which ever is available. You could never guarantee support for all Linux distros but you can hopefully target common desktop environments.
Just as a sidenote, we've been using xdg-mime default to make N1 the default mail client on Linux and it's been working fairly well for folks. Would definitely be nice to push it upstream. nylas/nylas-mail@43e9b4c
Yep! I'm aware - the full command we use in that commit above is xdg-mime default nylas.desktop x-scheme-handler/#{scheme}. I only bring it up because it has been successfully making N1 the default handler for the mailto protocol on Debian systems and might be more broadly incorporated into Electron.
Reacted by Kirill Fomichev, Eugene, oikonomopo and Aleksandr Gavrilov
Activity
anaisbetts commentedon Jul 11, 2016
On Linux this is declared in your .desktop file, which is something you set up at install-time, not something you can toggle. I could be full of it on this though, there might be a way to register for this dynamically
zcbenz commentedon Jul 12, 2016
It can be done with xdg-settings, and Chromium uses it in
shell_integration_linux.cc:https://cs.chromium.org/chromium/src/chrome/browser/shell_integration_linux.cc?sq=package:chromium
[-]App.setAsDefaultProtocolClient for Linux?[/-][+]App.setAsDefaultProtocolClient for Linux[/+]atypicalprogrammer commentedon Jul 12, 2016
@paulcbetts For windows it should be done on install too.. But that doesn't mean this API call shouldn't be available. Right now we just do it on first run.
anaisbetts commentedon Jul 13, 2016
@atypicalprogrammer I'm not saying what people should do, I'm saying what I (incorrectly) believed was possible
baconbrad commentedon Jul 13, 2016
@zcbenz @atypicalprogrammer A possible solution might be checking for gnome-open, exo-open, xdg-open, gvfs-open, or kde-open and using which ever is available. You could never guarantee support for all Linux distros but you can hopefully target common desktop environments.
bengotow commentedon Jul 27, 2016
Just as a sidenote, we've been using
xdg-mime defaultto make N1 the default mail client on Linux and it's been working fairly well for folks. Would definitely be nice to push it upstream. nylas/nylas-mail@43e9b4cbaconbrad commentedon Jul 27, 2016
@bengotow Mime type handlers and protocol handlers are two different things.
bengotow commentedon Jul 27, 2016
Yep! I'm aware - the full command we use in that commit above is
xdg-mime default nylas.desktop x-scheme-handler/#{scheme}. I only bring it up because it has been successfully making N1 the default handler for the mailto protocol on Debian systems and might be more broadly incorporated into Electron.atypicalprogrammer commentedon Mar 16, 2017
Any updates on this by anyone?
Eugeny commentedon Apr 18, 2017
This can also be done by editing the file directly: https://askubuntu.com/questions/514125/url-protocol-handlers-in-basic-ubuntu-desktop
hron84 commentedon Aug 3, 2017
@baconbrad Not neccessarily. On Linux, proto handlers are also handled via - special - MIME types.
codebytere commentedon Oct 9, 2017
This is now in master 🎉