Would it be possible to build two separated versions of AppImage for X11 and Wayland? #1322
Replies: 17 comments
-
I don't know much about Wayland except that it is not 100% compatible with X11, makes screen sharing complicated, and never works with full performance on my Nvidia based systems, so forgive me if this is a stupid question, but: Why are there two different versions of the application needed? Wayland proponents tend to claim that X11 applications can run in XWayland. Of course the author of the Espanso AppImage could make two separate AppImages, but that is not what I'd recommend. If there are really two different versions of the application needed, then it would be best if the author of the Espanso AppImage would put both versions into the same AppImage, add an |
Beta Was this translation helpful? Give feedback.
-
Maybe @federico-terzi can explain. Espanso built for X11 will not work on Wayland due to When I ran Not only Espanso, Autokey also doesn't support Wayland because of @microsoft's VSCode can run on both X11 and Wayland without needing to build two different versions because it can detect the XDG session and switch to @Mange's |
Beta Was this translation helpful? Give feedback.
-
@gusbemacbe it's a little bit rude to tag people in unrelated issues. Just link to the project - it's clearer that way. Especially since autokey is neither mine nor elleria's |
Beta Was this translation helpful? Give feedback.
-
Ah, I'm sorry, I always sought to credit the people for the project authorship. |
Beta Was this translation helpful? Give feedback.
-
I see. So ideally the Espanso AppImage would ship both and decide at runtime which one to use. |
Beta Was this translation helpful? Give feedback.
-
I second building some unified AppImage that supports either system. With some scripting it should be possible to make some prototype. |
Beta Was this translation helpful? Give feedback.
-
Hey everyone, thanks for the feedback!
That's a really clever idea, I didn't realize it was possible. I'll investigate further, though IIRC, Espanso is not recommending AppImage on Wayland as it's not compatible with the required Linux capabilities (instead of asking the users for root access on Wayland, Espanso uses Linux capabilities to get the required permissions for a short initial period). As far as I remember from my tests, the way AppImage was structured didn't allow setting linux capabilities to the binary unless the user performed an extraction first |
Beta Was this translation helpful? Give feedback.
-
Thanks @federico-terzi. The contents of an AppImage are read-only, as an AppImage is a read-only self-mounting disk image. If the application was installed to e.g., |
Beta Was this translation helpful? Give feedback.
-
(Short overview, not 100% correct, but you'll get the idea.) Capabilities can be set on files to grant unprivileged processes (i.e., processes whose uid is nonzero which applies to all non-root processes) privileged access to some kernel APIs. This way, one can avoid hacks like There are modern alternatives to capabilities, suid etc., e.g., @federico-terzi maybe you could elaborate a bit on why Wayland needs capabilities for regular applications? You seem to have some understanding of this. Or maybe just link to other resources? I'm curious. |
Beta Was this translation helpful? Give feedback.
-
Uh, is this a Linuxism that Wayland now requires? How does this work on non-Linux POSIX systems? |
Beta Was this translation helpful? Give feedback.
-
I don't think this may be 100% accurate. I've been running some GUI software packaged as an AppImage on a Wayland system today... |
Beta Was this translation helpful? Give feedback.
-
...yes, it's not AppImage that requires this Linux capabilities thingy ;-) |
Beta Was this translation helpful? Give feedback.
-
Hello @probonopd I am building and testing an AppImage to make Espanso, but a small fail.
I tested running it, but a small fail:
|
Beta Was this translation helpful? Give feedback.
-
You need to change your script so that it loads In other words, your script seems to want to load |
Beta Was this translation helpful? Give feedback.
-
any update on this? |
Beta Was this translation helpful? Give feedback.
-
@ppvnf your question makes no sense. Please specify. That said, this is more of a question. Moving to discussions. |
Beta Was this translation helpful? Give feedback.
-
The package, that I built, was not successful. If you wish to test and improve it, I can provide the zipped package for you, for @federico-terzi and @probonopd to test: |
Beta Was this translation helpful? Give feedback.
-
Hello!
I usually switch from X11 to Wayland and from Wayland to X11. I often use @federico-terzi's Espanso. The problem is that I had to install two versions of Espanso, one designed for X11, another for Wayland.
I use
Espanso-X11.AppImage
when I switch to X11, and use/usr/bin/espanso
compiled and built from a source without X11 when I switch to Wayland, the concern is that, I will always receive an inconvenient Espanso advice about incompatibility when I switch to a different graphic environment because ofespanso.service
that points to/usr/bin/espanso
. I had to useespanso service start --unmanaged
.Imagine that I am switching to i3 that is an X11 window manager or to Sway that is a Wayland window manager, and writing the following code to the i3/Sway config file or on a global Bash/ZSH file):
Is it possible?
Beta Was this translation helpful? Give feedback.
All reactions