Open in browser not working within WSL due to account requirement
See original GitHub issueI’m using this Linux fork on Windows within WSL, and accessing it via xserver remote (on the same windows machine), as this is much quicker than the windows App accessing my git repo over the WSL network share.
I use wslu to set a BROWSER=wslview
variable to something that can only links within my browser in my host Windows environment. Running wslview https://github.com
successfuly opens Chrome in Windows.
I appreciate this is exceptionally niche roundabout way of doing things 😅
Describe the bug
When running the app within a WSL2 Ubuntu 18.04.2 LTS environment, the “View on Github” options are not available.
The initial in-browser signup flow did work successfully (launching a Ubuntu chrome app).
I have set BROWSER=wslview
environment variable to open links in my Windows default browser
Version & OS
Version 2.5.4-linux1
Ubuntu 18.04.2 LTS running within WSL2 on Windows.
Steps to reproduce the behavior
- Set
BROWSER=wslview
environment variable - Click Repository Menu
- See error
Expected behavior
“View on Github” is not greyed out, and it opens the repo in a browser configured by my BROWSER environment variable.
Actual behavior
“View on Github” is greyed out
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
@joshhunt that is an interesting setup.
I’m not aware of how the
BROWSER
environment variable works with Electron apps butView on GitHub
is enabled/disabled based on whether we can detect the repository is hosted on GitHub:https://github.com/shiftkey/desktop/blob/8bdb92182138ffc23691f81b4278b1a3002abbe8/app/src/lib/menu-update.ts#L267
I suspect that something related to how the repository is detected (i.e. can we get details about the repository through the GitHub API) isn’t working for your situation:
https://github.com/shiftkey/desktop/blob/8bdb92182138ffc23691f81b4278b1a3002abbe8/app/src/lib/menu-update.ts#L78-L89
@joshhunt could you please explain how did you get GitHub desktop work on WSL2 or link me to a blog post explaining that, I’ve spent too many hours trying to figure that out with no success
Steps I did:
github-desktop
I get as a result
Thank you