Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Support BROWSER env variable when selecting a browser to launch for oauth2

Open
#6,751 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
55/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Stale
Tech stack
go

Research direction

Start with vendor/github.com/pkg/browser/browser_linux.go and compare its Linux launcher selection with the referenced go-gh browser implementation. Done when the standard BROWSER environment variable can provide the OAuth2 browser launch command while the existing Linux launcher behavior remains available when it is unset.

Written by the indexing model from the issue text.

Description

kind/feature status/0-triage
Description

The current code for launching a browser to do oauth2 login in Linux hardcodes three linux browser launchers.

providers := []string{"xdg-open", "x-www-browser", "www-browser"}

vendor/github.com/pkg/browser/browser_linux.go

It would be nice if that choice could be overridden via the standard BROWSER= env variable. This would allow the end user to provide alternative browser launch commands. This is, for example, what the github browser utility does go-gh/blob/trunk/pkg/browser/browser.go

The use case for this is users running in dev containers. This allows them to have custom scripts that forward the browser request to outside of the dev container so it can be launched from the host browser (since the dev container likely does not contain a gui browser)

Dominant language
Go
Stars
6.1k
Forks
2.2k
Avg merge
1d 15h
Merged PRs (30d)
43

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from docker/cli

All issues in docker/cli

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.