labwc icon indicating copy to clipboard operation
labwc copied to clipboard

Degrade gracefully when built with xwayland support but it isn't available during runtime

Open keshto opened this issue 2 years ago • 7 comments

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"

keshto avatar Jul 07 '22 20:07 keshto

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.

Consolatis avatar Jul 07 '22 21:07 Consolatis

Should be fixed as soon as this is merged: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/36084/diffs

ptrcnull avatar Jul 07 '22 21:07 ptrcnull

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)

nekopsykose avatar Jul 07 '22 21:07 nekopsykose

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 :(

keshto avatar Jul 07 '22 21:07 keshto

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.

Consolatis avatar Jul 07 '22 21:07 Consolatis

We could do it like this if anyone feels like writing a patch:

https://github.com/swaywm/sway/blob/b69d637f7a34e239e48a4267ae94a5e7087b5834/sway/server.c#L269

johanmalm avatar Jul 11 '22 15:07 johanmalm

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.

droc12345 avatar Jul 14 '22 16:07 droc12345

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

Consolatis avatar Dec 17 '22 13:12 Consolatis