Merge pull request #5706 from mtmiller/display-env
Set DISPLAY environment variable for browser on Linux
This commit is contained in:
commit
20e9f10d5c
@ -162,6 +162,12 @@ Note that environment variables must have a value set to be detected. For exampl
|
|||||||
If set, Homebrew will tweak behaviour to be more relevant for Homebrew
|
If set, Homebrew will tweak behaviour to be more relevant for Homebrew
|
||||||
developers (active or budding), e.g. turning warnings into errors.
|
developers (active or budding), e.g. turning warnings into errors.
|
||||||
|
|
||||||
|
* `HOMEBREW_DISPLAY`:
|
||||||
|
If set, Homebrew will use this X11 display when opening a page in a browser,
|
||||||
|
for example with `brew home`. Primarily useful on Linux.
|
||||||
|
|
||||||
|
*Default:* the value of the user's `DISPLAY` environment variable.
|
||||||
|
|
||||||
* `HOMEBREW_EDITOR`:
|
* `HOMEBREW_EDITOR`:
|
||||||
If set, Homebrew will use this editor when editing a single formula, or
|
If set, Homebrew will use this editor when editing a single formula, or
|
||||||
several formulae in the same directory.
|
several formulae in the same directory.
|
||||||
|
@ -388,6 +388,8 @@ def exec_browser(*args)
|
|||||||
browser ||= OS::PATH_OPEN if defined?(OS::PATH_OPEN)
|
browser ||= OS::PATH_OPEN if defined?(OS::PATH_OPEN)
|
||||||
return unless browser
|
return unless browser
|
||||||
|
|
||||||
|
ENV["DISPLAY"] = ENV["HOMEBREW_DISPLAY"]
|
||||||
|
|
||||||
safe_exec(browser, *args)
|
safe_exec(browser, *args)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
2
bin/brew
2
bin/brew
@ -54,7 +54,7 @@ HOMEBREW_LIBRARY="$HOMEBREW_REPOSITORY/Library"
|
|||||||
# Whitelist and copy to HOMEBREW_* all variables previously mentioned in
|
# Whitelist and copy to HOMEBREW_* all variables previously mentioned in
|
||||||
# manpage or used elsewhere by Homebrew.
|
# manpage or used elsewhere by Homebrew.
|
||||||
for VAR in AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY BINTRAY_USER BINTRAY_KEY \
|
for VAR in AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY BINTRAY_USER BINTRAY_KEY \
|
||||||
BROWSER EDITOR GIT NO_COLOR PATH VISUAL
|
BROWSER DISPLAY EDITOR GIT NO_COLOR PATH VISUAL
|
||||||
do
|
do
|
||||||
# Skip if variable value is empty.
|
# Skip if variable value is empty.
|
||||||
[[ -z "${!VAR}" ]] && continue
|
[[ -z "${!VAR}" ]] && continue
|
||||||
|
@ -1037,6 +1037,12 @@ Note that environment variables must have a value set to be detected. For exampl
|
|||||||
If set, Homebrew will tweak behaviour to be more relevant for Homebrew
|
If set, Homebrew will tweak behaviour to be more relevant for Homebrew
|
||||||
developers (active or budding), e.g. turning warnings into errors.
|
developers (active or budding), e.g. turning warnings into errors.
|
||||||
|
|
||||||
|
* `HOMEBREW_DISPLAY`:
|
||||||
|
If set, Homebrew will use this X11 display when opening a page in a browser,
|
||||||
|
for example with `brew home`. Primarily useful on Linux.
|
||||||
|
|
||||||
|
*Default:* the value of the user's `DISPLAY` environment variable.
|
||||||
|
|
||||||
* `HOMEBREW_EDITOR`:
|
* `HOMEBREW_EDITOR`:
|
||||||
If set, Homebrew will use this editor when editing a single formula, or
|
If set, Homebrew will use this editor when editing a single formula, or
|
||||||
several formulae in the same directory.
|
several formulae in the same directory.
|
||||||
|
@ -1266,6 +1266,13 @@ If set, any commands that can emit debugging information will do so\.
|
|||||||
If set, Homebrew will tweak behaviour to be more relevant for Homebrew developers (active or budding), e\.g\. turning warnings into errors\.
|
If set, Homebrew will tweak behaviour to be more relevant for Homebrew developers (active or budding), e\.g\. turning warnings into errors\.
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
|
\fBHOMEBREW_DISPLAY\fR
|
||||||
|
If set, Homebrew will use this X11 display when opening a page in a browser, for example with \fBbrew home\fR\. Primarily useful on Linux\.
|
||||||
|
.
|
||||||
|
.IP
|
||||||
|
\fIDefault:\fR the value of the user\'s \fBDISPLAY\fR environment variable\.
|
||||||
|
.
|
||||||
|
.TP
|
||||||
\fBHOMEBREW_EDITOR\fR
|
\fBHOMEBREW_EDITOR\fR
|
||||||
If set, Homebrew will use this editor when editing a single formula, or several formulae in the same directory\.
|
If set, Homebrew will use this editor when editing a single formula, or several formulae in the same directory\.
|
||||||
.
|
.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user