Skip to content

Instantly share code, notes, and snippets.

View benckx's full-sized avatar

benckx

View GitHub Profile
@davydka
davydka / WSL+X11.md
Last active June 7, 2024 17:29
X11 setup for Windows Susbsytem for Linux (WSL)
  • Open Powershell as Administrator and run: Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
  • Open the Microsoft Store, search for Ubuntu, and install
  • Launch Ubuntu and create your Linux user
  • Open a shell into WSL (I like cmder so far: http://cmder.net/)
  • In Windows, download and install MobaXterm (free version): https://mobaxterm.mobatek.net/download.html
  • Make sure X server is running
    • You’ll always need to run MobaXterm, and in the top right corner of the app there’s an "X server" button. Make sure it’s running.
    • In mobaxterm settings -> x11 -> set OpenGL Acceleration to: Hardware
  • WSL won't have a display environment variable set by default, so tell it manually to connect to the first display: export DISPLAY=:0.0
  • Test an x11 app: sudo apt-get install x11-apps