Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upFix "Gtk: cannot open display" error on Linux #386
Merged
Conversation
|
Thanks for tracking this down! This was unintended and doesn't seem to affect my fix as far as I can tell, believe it was left around after a few reverts/rebases when I was working on that. Plan to add some tests here since these scripts are pretty easy to break, will make sure to add a test for this as well. |
|
Thanks for fixing |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
garrettr commentedJun 19, 2018
Fixes #385.
Chromium's GTK frontend requires the
$DISPLAYenvironment variable to be set.$DISPLAYis set correctly by default in a graphical session on Ubuntu 16.04, but was not being inherited by the child process spawned inutil.run. Environment variables should be inherited by default according to the child_process docs, but this behavior was broken by the following recent-ish change:brave-browser/lib/util.js
Line 20 in 7e590eb
@RyanJarv Can you confirm that this PR does not otherwise break the intended behavior of #229, which introduced the bug? If it does, we'll need a more sophisticated fix. Generally I think we always want to inherit the environment in subprocesses spawned by the yarn scripts, since we/Chromium use environment variables (not just
$DISPLAY) for a variety of purposes.Submitter Checklist:
git rebase -ito squash commits (if needed).Test Plan:
Same as #385 STR.
Reviewer Checklist: