Skip to content

FR: linux: open login URL during "tailscale login" using $BROWSER #8551

Open

Description

@awly

What are you trying to do?

Logging in to tailscale on a Linux machine using "sudo tailscale login" prints a login URL but requires the user to open it in the browser manually.

How should we solve this?

Open a tab with the login URL automatically on tailscale login, using $BROWSER or some other standard-ish Linux mechanism. Maybe lookup common browser binary names in $PATH as a fallback.

What is the impact of not solving this?

Minor onboarding friction, you have to click the URL if your terminal supports this or copy-paste it into your browser.

Anything else?

OS: EndeavourOS (Arch-based).
Tailscale version: 1.44.0-dev20230621
Browser: firefox

Activity

  1. michaelneale commented on Oct 8, 2025

    @michaelneale

    in case anyone finds this, I did something like this, reading the stream for the url and then opening it if it is there:

    echo "🔐 Bringing up Tailscale..."
    # Monitor tailscale output in real-time and open auth URL if needed
    tailscale --socket "$TS_SOCK" up 2>&1 | {
      AUTH_OPENED=false
      while read line; do
        echo "$line"
        if [[ "$AUTH_OPENED" == false ]] && echo "$line" | grep -q "https://login.tailscale.com/"; then
          URL=$(echo "$line" | grep -o "https://login.tailscale.com/[^\s]*")
          echo "🌐 Opening authentication URL in browser..."
          open "$URL"
          AUTH_OPENED=true
        fi
      done
    } || true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    frFeature requestneeds-triage-productReady for triage by product management team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions