Dear Debian Wine party, I run wine in text mode in a CI cronjob (so XDG_RUNTIME_DIR is not defined). Since I upgraded wine, it reports a spurious error message: error: XDG_RUNTIME_DIR is invalid or not set in the environment. even though I set WINEDEBUG=-all This causes the output of wine to be broken and break the build. Cheers, Bill.
I believe this message comes from libwayland-client, and cannot easily
be suppressed by a caller.
(https://codesearch.debian.net/search?q=XDG_RUNTIME_DIR+is+invalid+or+not+set+in+the+environment&literal=1)
Some Wayland clients avoid this error message by only attempting to
connect to a Wayland display if there is some sort of evidence that
there ought to be a functioning Wayland session. For example, SDL only
tries to use Wayland if $WAYLAND_DISPLAY is set, or if $XDG_SESSION_TYPE
is set to "wayland". Wine could maybe do similarly.
(Or, your cron job could create a temporary XDG_RUNTIME_DIR for the
duration of running Wine things.)
smcv
control: tag -1 patch I didn't quickly get a headless or other setup to reproduce the original problem but went ahead and developed a potential fix based on smcv's suggestion. Please try the short patch attached, I don't currently have a way to test. Best wishes, Mike
control: tag -1 patch I didn't quickly get a headless or other setup to reproduce the original problem but went ahead and developed a potential fix based on smcv's suggestion. Please try the short patch attached, I don't currently have a way to test. Best wishes, Mike
Thanks for this info! FWIW, I do not see why libwayland-client should expect XDG_RUNTIME_DIR to be set. This seems like a major layering violation. One should be able to use wayland without using a desktop environment. Cheers,
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=914822 Well, XDG_RUNTIME_DIR has nothing to do with desktop environments, not even with graphical displays. It is set by pam_systemd at login time, e.g. also via ssh without a graphical display. See the pam_systemd(8) man page. Note that wine uses /run/user/$UID (which is normally identical to $XDG_RUNTIME_DIR) even when XDG_RUNTIME_DIR is unset, as I can see changes under "/run/user/$UID/wine". Since $XDG_RUNTIME_DIR is "automatically created the first time a user logs in and removed on the user's final logout" (pam_systemd(8) man page), I'm wondering whether wine is correct anyway: this directory may be removed while wine is still running in the background.
The error also occurs when running /usr/bin/wine64-stable directly, without the wine package installed.