-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
app.setAsDefaultProtocolClient doesn’t work on Linux .AppImage #4035
Comments
Based on what I read I believe it should add the custom schema to |
I ran into the same problem. I had to workaround using : |
@roaringUnicorn Tried it using |
@roaringUnicorn do I need to do anything else? E.g. create a .desktop file? I haven’t created one but afaik electron-builder handles that. When searching for all
I tried alternative commands like |
You do need to add "x-scheme-handler/MyApp;" as a known mimetype in your .desktop file. You don't need to specify the full path of your .desktop file, as Desktop file are generated by electron-builder, and managed automaticaly by the OS.
The electron-builder doc might not be extremely explicit: https://www.electron.build/configuration/appimage BTW, don't put a space in your appimage name ! There is an escaping probleme somewhere... |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
The bug is still present in [email protected] and [email protected] |
@roaringUnicorn unfortunately that also didn't work for me. Probably because desktop integration was "removed in favor of AppImageLauncher". Do I need to tell the users to install this AppImageLauncher now? I tried installing this |
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Still a problem. |
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
🙄 |
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
. |
this should fix electron-userland#4035
@brunolemos Were you able to solve this eventually? I'm facing the same issue right now with .AppImage on Ubuntu. I was hoping the above workaround would work but it seems electron-builder is not even generating the .desktop file 😕 |
no |
I will make an pr to fix it until then you can do:
|
First of all 1. Mimetype/Protocol in .desktop fileHave the mimetype inside of your build configuration and validate you did the right thing by extracting the appimage ( 2. Install the AppImageMake sure you have the appimage "installed"/"Integrated" so that the 3. Patch electron-builderIn the .desktop file there is an
For me it looks like you are still on 2 while my PR is doing step 3. |
|
@mahnunchik this line change of from two years |
Yep! So we are waiting for PR #4909 to be merged to have it works. |
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Is is relevant! |
1 similar comment
Is is relevant! |
Is is relevant! |
2 similar comments
Is is relevant! |
Is is relevant! |
* fix missing %U in desktop file of appimages this should fix #4035 * fix test
Fixes #307. Implementation based on what I read here: electron-userland/electron-builder#4035 electron/electron#4857 Scheme is a lot like HTTP, except that there's no domain name. Like `heroic://launch?appName=Hazelnut`.
I have this issue not only with .AppImage but also with .deb packages. My workaround is as follows: Create a file called
Set handler for a specific protocol
This creates an entry like this:
in:
of course you can create that entry manually as well. Get handler assigned to a specific protocol
The result will be:
|
linux
(.AppImage
,Ubuntu
)app.setAsDefaultProtocolClient
works for macOS and Windows, but not for Linux, at least when using.AppImage
, which is the only one I use.The custom protocol / schema is never registered and
app.isDefaultProtocolClient
will always return false.The text was updated successfully, but these errors were encountered: