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
g-w linux: should perform a user login (XDG_RUNTIME_DIR not set) #6979
Comments
I'm not sure this is a bug. Generic Worker is agnostic to the choice of display server protocol, it depends what is set up on the host. Generic Worker is bound to the Gnome Desktop Manager, but does not assume Wayland is in use. I feel like the right place to set this might be in the task, or in Generic Worker configuration:
This would allow setting it at a worker pool level, which seems appropriate because not all worker pools might want to use Wayland. Update: actually, this might not work, because the env var wouldn't carry over to the task commands. But if you want the task commands to have extra env variables set when running bash, maybe you can update e.g. |
I think the ask here is that g-w executes a user/login session (vs the current non-login session) and then PAM will take care of the required env variables (not that g-w starts figuring out what subsystem is in use). |
Generic Worker just executes the commands in the task payload, so if a login shell is required, and currently a non-login shell is being used by the task, then the current |
Using
|
At some point from my testing perspective we can live with just setting the env var. I'll see if I can draft a PR. |
Describe the bug
Debugging Wayland issues, we notice that the XDG_RUNTIME_DIR env var (https://wiki.alpinelinux.org/wiki/Wayland) is not set. It's critical for Wayland functioning. It's normally set by
pam_systemd
when a user login is performed.It looks like in
taskcluster/workers/generic-worker/multiuser_posix.go
Lines 136 to 139 in 5f78921
To Reproduce
Run a task on a Wayland worker in community of firefoxci (gecko-t/t-linux-2204-wayland-exp-a2), the XDG_RUNTIME_DIR will be unset. This causes issues.
Expected behavior
XDG_RUNTIME_DIR is set to a valid path (e.g. from a working laptop running Wayland 22.04:
XDG_RUNTIME_DIR=/run/user/1001
).Taskcluster version
g-w multi: [taskcluster 2024-04-19T05:32:12.111Z] "version": "64.2.0"
Screenshots
Additional context
The text was updated successfully, but these errors were encountered: