Can't run Firefox in WSL 2
Please use the following bug reporting template to help produce issues which are actionable and reproducible, including all command-line steps necessary to induce the failure condition. Please fill out all the fields! Issues with missing or incomplete issue templates will be closed.
If this is a console issue (a problem with layout, rendering, colors, etc.), please post to the console issue tracker.
Important: Do not open GitHub issues for Windows crashes (BSODs) or security issues. Please direct all Windows crashes and security issues to [email protected]. Ideally, please configure your machine to capture minidumps, repro the issue, and send the minidump from "C:\Windows\minidump".\
See our contributing instructions for assistance.
Please fill out the below information:
- Your Windows build number: (Type
verat a Windows Command Prompt) Microsoft Windows [Version 10.0.19631.1] - What you're doing and what's happening: (Copy&paste the full set of specific command-line steps necessary to reproduce the behavior, and their output. Include screen shots if that helps demonstrate the problem.) At a bash prompt I type firefox
- What's wrong / what should be happening instead: Nothing happens. The system doesn't come back to the prompt and firefox doesn't start. I have
export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0.0
in /etc/bash.bashrc and was able to run gedit before I installed firefox. After I installed firefox, the same problem now occurs with any graphical program: no return to prompt and no execution of program.
-
Strace of the failing command, if applicable: (If
some_commandis failing, then runstrace -o some_command.strace -f some_command some_args, and link the contents ofsome_command.stracein a gist here). -
For WSL launch issues, please collect detailed logs.

maybe you have to allow the xserver networking port 6000 in your windows firewall. this was my issue with an company laptop.