Skip to content
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

hostinfo, tailcfg: add desktop environment to hostinfo #4369

Merged
merged 1 commit into from Apr 18, 2022

Conversation

twitchyliquid64
Copy link
Contributor

@twitchyliquid64 twitchyliquid64 commented Apr 7, 2022

From the machines tab its hard to differenciate desktop Linux installs from server Linux installs. Transmitting this information should make this determination a lot easier.

Due to the reality that tailscaled is likely a system process, the standard checks based on XDG_SESSION_TYPE or DISPLAY environment variables are not possible (those variables won't be set). Instead, we look for listening unix sockets that are typical of desktop installs.

@twitchyliquid64
Copy link
Contributor Author

I'll also note that I had to manually update the generated file due to golang/go#51629

hostinfo/hostinfo_linux.go Outdated Show resolved Hide resolved
@twitchyliquid64 twitchyliquid64 force-pushed the tom/desktop-hostinfo branch 2 times, most recently from 04b9f09 to 07dd5a4 Compare April 18, 2022 20:09
@twitchyliquid64 twitchyliquid64 marked this pull request as ready for review April 18, 2022 20:11
@twitchyliquid64
Copy link
Contributor Author

Changed logic to only cache the desktop/not-desktop determination after a minute - based on slack convo.

hostinfo/hostinfo.go Outdated Show resolved Hide resolved
Copy link
Member

@bradfitz bradfitz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM otherwise

hostinfo/hostinfo.go Outdated Show resolved Hide resolved
From the machines tab its hard to differenciate desktop Linux installs from
server Linux installs. Transmitting this information should make this
determination a lot easier.

Due to the reality that tailscaled is likely a system process, the standard
checks based on XDG_SESSION_TYPE or DISPLAY environment variables are not
possible (those variables won't be set). Instead, we look for listening
unix sockets that are typical of desktop installs.

Signed-off-by: Tom DNetto <tom@tailscale.com>
@bradfitz
Copy link
Member

LGTM

@bradfitz bradfitz merged commit 24cd265 into main Apr 18, 2022
@bradfitz bradfitz deleted the tom/desktop-hostinfo branch April 18, 2022 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants