Skip to content

Instantly share code, notes, and snippets.

@taikedz
Created August 28, 2020 07:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save taikedz/0c4387e87315ce4ef413d4a679b1883a to your computer and use it in GitHub Desktop.
Save taikedz/0c4387e87315ce4ef413d4a679b1883a to your computer and use it in GitHub Desktop.
Run Linux X apps on Windows

Run X apps on Windows

Two methods - either through WSL, or through SSH with cygwin/git bash/mingw.

Both require an X server

Easiest so far to install is VcXsrv through chocolatey

  1. Install chocolatey https://chocolatey.org/install
  2. Install vcxsrv: choco install vcxsrv -y
  3. Run XLaunch

SSH - run a remote X app

Install a nix shell environment - Git Bash, MinGW, Cygwin are the most common.

Then set export DISPLAY=localhost:0.0 in your Windows bash environment (.bashrc)

Run ssh -Y user@host [command] and the application should display on your local Windows

WSL - run a local X app

  1. Activate WSL
  2. Set export DISPLAY=localhost:0.0 in your environment
  3. Run the GUI application from the command line.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment