A component that will handle display output from wsl to windows.
-
Install VcXsrv Windows X Server
-
Install
xubuntu-desktop
to suppress window manager warningssudo apt install xubuntu-desktop
-
Set env
DISPLAY
Two option, go with what works for you
# Option 1 - Gazebo wants this for my installation export DISPLAY="127.0.0.1:0" # Option 2 - Did not work for my Gazebo installation export DISPLAY="localhost:0" # Avoid # export DISPLAY=":0" # (Note from the WSL devs): "means X11 over AF_UNIX on /tmp/.X11-unix/X0, not AF_INET over localhost:6000. This will cause problems in some scenarios."
Add your chosen option to one of your shell session scripts (for example
.bashrc
or.zshrc
) so it will be set every time you start a new session.Example: My setting in
.zshrc
is# X-Server settings export DISPLAY="127.0.0.1:0"
-
Install
mesa-utils
to verify 3d accelerationsudo apt install mesa-utils
-
Run glxgears to verify 3d acceleration
glxgears
Expected output is a window with some animated gears.