Skip to content

Conversation

@willnorris
Copy link
Member

Pass a local.Client to systray.Run, so we can use the existing global localClient in the cmd/tailscale CLI. Add socket flag to cmd/systray.

Updates #1708

Change-Id: Ia101a4a3005adb9118051b3416f5a64a4a45987d

Pass a local.Client to systray.Run, so we can use the existing global
localClient in the cmd/tailscale CLI.  Add socket flag to cmd/systray.

Updates #1708

Change-Id: Ia101a4a3005adb9118051b3416f5a64a4a45987d
Signed-off-by: Will Norris <will@tailscale.com>
@willnorris willnorris requested a review from cmol August 5, 2025 00:15
Copy link
Contributor

@cmol cmol left a comment

Choose a reason for hiding this comment

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

LGTM, just a comment on direction, which isn't directly relevant to this PR.

Comment on lines +10 to +22
"flag"

"tailscale.com/client/local"
"tailscale.com/client/systray"
"tailscale.com/paths"
)

var socket = flag.String("socket", paths.DefaultTailscaledSocket(), "path to tailscaled socket")

func main() {
new(systray.Menu).Run()
flag.Parse()
lc := &local.Client{Socket: *socket}
new(systray.Menu).Run(lc)
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to keep this cmd entry point around when we can launch through the tailscale cli and now need the localClient? Don't think there's any harm in having it here, mostly for consistency for users.

Copy link
Member Author

Choose a reason for hiding this comment

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

there was a slack discussion some time ago about the strategy here. The decision was to only include the subcommand on linux builds, since it's a little confusing to include it on macOS and Windows where there are more complete desktop clients. But if users really want to use the systray app for whatever reason, we wanted to make it relatively simple to do so... hence keeping cmd/systray around. We'll make this clearer in docs, both in the cmd/systray README as well as the eventual KB article.

@cmol cmol added the hackweek For hackweek related issues and pull requests label Aug 5, 2025
@willnorris willnorris merged commit 9f29c42 into main Aug 5, 2025
57 checks passed
@willnorris willnorris deleted the will/systray-localclient branch August 5, 2025 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hackweek For hackweek related issues and pull requests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants