labwc
labwc copied to clipboard
Degrade gracefully when built with xwayland support but it isn't available during runtime
From the build log it looks like it is not using xwayland and it is not a dependency. However, when trying to start labwc one gets a "Cannot create xwayland server /usr/bin/xwayland"
The labwc Alpine package seems to depend on wlroots which says in its build log
xwayland : YES
And the labwc build doesn't seem to disable xwayland either. So if its really not a dependency it should likely be added as one.
Adding @ptrcnull as Alpine maintainer.
Should be fixed as soon as this is merged: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/36084/diffs
fixed, though i don't understand why it always tries to start xwayland just because wlroots supports it, instead of making it optional (from the code)
yea sucks to have to drag xwayland around on a pure wayland only setup. Maybe @ptrcnull if you can't make it truely optional have a -no-xwayland
version?
wlroots can install fine without xwayland.
@ptrcnull Also, might want to update https://wiki.alpinelinux.org/wiki/LabWC and explicitly mention how it is dependent on xwayland and not optional component :(
We could try to degrade gracefully when labwc was built with xwayland support but it isn't available while executing.
That requires some more investigation on how massive these changes would be and depending on the result this might never be merged into the v0.5
stable branch but go into the master
branch only and thus only be available in a future 0.6
release.
Turning this into a feature request.
We could do it like this if anyone feels like writing a patch:
https://github.com/swaywm/sway/blob/b69d637f7a34e239e48a4267ae94a5e7087b5834/sway/server.c#L269
Best way would be to have an xwayland config option. This would allow for ignoring xwayland even if compiled in. And if it is seen that the xwayland option is set, but xwayland doesn't exist, then the config option could be turned off in the code.
Along with this every place that has HAVE_XWAYLAND needs to be looked at to see about adding a check for config->xwayland being set, because xwayland code sometimes gets called along with regular wayland calls inside routines and those would need a conditional to keep from trying to execute.
Same issue seems to exists on Fedora: https://www.reddit.com/r/labwc/comments/zo0xob/comment/j0kscgd/
and indeed, xwayland is only a build dependency of wlroots: https://src.fedoraproject.org/rpms/labwc/blob/rawhide/f/labwc.spec https://src.fedoraproject.org/rpms/wlroots/blob/rawhide/f/wlroots.spec