Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WSL2 Firefox and Chrome not starting #5332

Closed
guszernial opened this issue Jun 4, 2020 · 9 comments
Closed

WSL2 Firefox and Chrome not starting #5332

guszernial opened this issue Jun 4, 2020 · 9 comments

Comments

@guszernial
Copy link

I have wsl2 ubuntu 20.04 VcXsrv xfce4. Desktop comes up but firefox-76.0.1 will not start. Message is "Sorry. We just need to do one small thing to keep going". Clicking restart does so, but no joy, same message.

google-chrome-stable does not start either, core dump and message "ERROR:nacl_helper_linux.cc(308)] NaCl helper process running without a sandbox! Most likely you need to configure your SUID sandbox correctly"

@patarok
Copy link

patarok commented Jun 18, 2020

have the exact same problem.
why do people close this, when there is NADA solution?

@stevenlafl
Copy link

No explanation?

@therealkenc
Copy link
Collaborator

No explanation?

There was one, but the OP deleted it. From the issue template:

  1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement.

The probability an issue submitter would take the considerable amount of effort to identify an actionable diverge from Linux behavior following the template, using firefox-76.0.1 as their starting point, only to have it marked as a duplicate is... exceedingly small. [It would take a submitter the better part of a day pouring over the firefox source code and strace log just to identify the diverge let alone put together an actionable test case.]

The probability that an explanation will be offered for every deleted issue template is.... also very small. This one never even made it past windows build.

when there is NADA solution

You probably want WSL2.

image

@stevenlafl
Copy link

stevenlafl commented Jun 23, 2020

I was on WSL 2.

A followup, Chrome will exit with only this message (for whatever reason) if X server is not installed. Installing it, setting a DISPLAY to forward, and using a Windows X server (like vcxsrv or x410) appears to work. Very strange, I assume it just assumes headless if X11 is not installed.

It seems that the error is a red herring, because:

  1. It still shows up even when it is working properly.
  2. After installing X11, and running with --headless, the same behavior appears with that.

What worked for me:
If using VcXSrv, just run XLaunch. If you use X410 just run that.

Then ensure your .bashrc has this in it. And remember to either restart your WSL app or run source .bashrc.

Example:

# X11 Forwarding
export DISPLAY=:0 # in WSL 1
export DISPLAY=$(awk '/nameserver / {print $2; exit}' /etc/resolv.conf 2>/dev/null):0 # in WSL 2

Use one of those two examples and delete the other depending on WSL version.

I chose to go all the way with XFCE4 and that runs great with startxfce4.

@patarok
Copy link

patarok commented Jun 23, 2020

I was on WSL 2.

A followup, Chrome will exit with only this message (for whatever reason) if X server is not installed. Installing it, setting a DISPLAY to forward, and using a Windows X server (like vcxsrv or x410) appears to work. Very strange, I assume it just assumes headless if X11 is not installed.

It seems that the error is a red herring, because:

1. It still shows up even when it is working properly.

2. After installing X11, and running with --headless, the same behavior appears with that.

What worked for me:
If using VcXSrv, just run XLaunch. If you use X410 just run that.

Then ensure your .bashrc has this in it. And remember to either restart your WSL app or run source .bashrc.

Example:

# X11 Forwarding
export DISPLAY=:0 # in WSL 1
export DISPLAY=$(awk '/nameserver / {print $2; exit}' /etc/resolv.conf 2>/dev/null):0 # in WSL 2

Use one of those two examples and delete the other depending on WSL version.

I chose to go all the way with XFCE4 and that runs great with startxfce4.

thanks for the clarification, stevenlafl!!
i guess that could really help me out for what i need it... nonetheless... shouldnt headless work also?
I also dont understand why you actually can fire up firefox but though it starts, cant connect to the internet...?
It always says it has gotta reconnect....
But I admit... I gotta retry before i can make a correct statement on what does and what does not.
I hope, you could stay in contact with me in a few days again?

@SirLouen
Copy link

SirLouen commented Oct 8, 2020

I'm using WSL2 and VcXSrv
With export DISPLAY=:0 it starts XFCE4 but it doesnt seem to run Chrome
With export DISPLAY=$(awk '/nameserver / {print $2; exit}' /etc/resolv.conf 2>/dev/null):0 it doesn't even start XFCE

$ startxfce4
/usr/bin/startxfce4: X server already running on display 1.1.1.1:0
xrdb: Resource temporarily unavailable
xrdb: Can't open display '1.1.1.1:0'
Unable to init server: Could not connect: Connection refused
xfce4-session: Cannot open display: .
Type 'xfce4-session --help' for usage.

I've not been able to run Chrome with WSL 2 yet...

@spences10
Copy link

I have it the other way around, I can get Google Chrome working on WSL but not Firefox 😲

@LozanoMatheus
Copy link

I've tried quite a few things and the only one that worked for me was by using my Windows bin and setting up the *_BIN environment variable on WSL.

I'm using WSL2, and added this 👇 on my ~/.bashrc

export CHROME_BIN="/mnt/c/Program Files/Google/Chrome/Application/chrome.exe"
export FIREFOX_BIN="/mnt/c/Program Files/Mozilla Firefox/firefox.exe"

@TheLime1
Copy link

still no fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants