question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Open in browser not working within WSL due to account requirement

See original GitHub issue

I’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

  1. Set BROWSER=wslview environment variable
  2. Click Repository Menu
  3. 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:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
shiftkeycommented, Jan 8, 2021

@joshhunt that is an interesting setup.

I’m not aware of how the BROWSER environment variable works with Electron apps but View 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

0reactions
MiloudiMohamedcommented, Dec 29, 2021

@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:

  • Login to WSL Ubuntu
  • Install github desktop
  • Run github-desktop

I get as a result

The futex facility returned an unexpected error code.
Aborted

Thank you

Read more comments on GitHub >

github_iconTop Results From Across the Web

bash - Open browser in host system from Windows Subsystem ...
First open your browser and open file://wsl.localhost/ and lets just say you want to open Ubuntu-20.04 then you can change that URL to ......
Read more >
Launching notebook to browser on WSL · Issue #4594 - GitHub
How about you try to run the following command in your WSL terminal: export DISPLAY=localhost:0.0 ? Then, within the same terminal session, try ......
Read more >
Troubleshooting Windows Subsystem for Linux | Microsoft Learn
File a new issue. If you have found a problem with WSL and there does not appear to be an existing issue, you...
Read more >
WSL (Ubuntu): how to open localhost in browser from bash ...
Any ideas how to set a work flow for opening browser in WSL? So far I've ended up with: /c/Program\ Files\ \(x86\)/Google/Chrome/Application/ ...
Read more >
Docker Desktop WSL 2 backend on Windows
This extension allows you to work with a remote server in the Linux distro and your IDE client still on Windows. Now, you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found