-
Notifications
You must be signed in to change notification settings - Fork 478
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
Add Fleet Desktop support for Wayland display sessions #25998
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #25998 +/- ##
==========================================
- Coverage 63.64% 63.59% -0.05%
==========================================
Files 1631 1631
Lines 156293 156402 +109
Branches 4088 4088
==========================================
- Hits 99470 99467 -3
- Misses 48985 49096 +111
- Partials 7838 7839 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have not tested e2e but code LGTM, couple of comments around getting sockets. I did run some of the various commands (like loginctl show-user
and loginctl show-session
) with my Ubuntu VM set to use Wayland and got the results expected by this code.
|
||
// getUserWaylandDisplay returns the value to set on WAYLAND_DISPLAY for the given user. | ||
func getUserWaylandDisplay(uid string) (string, error) { | ||
matches, err := filepath.Glob("/run/user/" + uid + "/wayland-*") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we can't use the value of $XDG_RUNTIME_DIR
rather than hardcoding /run/user
because we're running this as root? Probably not an issue on the majority of systems, but if there was an easy way to get the value of $XDG_RUNTIME_DIR
for the user that'd be 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree.
Something to improve as we go AFAICS (given it seems to be an edge case and we will see it on the logs if something like that happens on some system).
if strings.HasSuffix(match, ".lock") { | ||
continue | ||
} | ||
return filepath.Base(match), nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems slightly brittle, in the edge case where anything else besides sockets and lockfiles ends up in here, so we could take the extra step of looking at the file stats to make sure it's a socket, but again probably an edge case.
For #19043.
See the versions and distributions tested during development on the QA notes of #19043.
changes/
,orbit/changes/
oree/fleetd-chrome/changes
.See Changes files for more information.
runtime.GOOS
).