Xvfb on Windows Subsystem for Linux

Related: Install X11 server for GUI programs in Windows Subsystem for Linux.

Have you ever needed to have non-visible X11 graphical windows on a system that otherwise doesn’t have X11 running? X server virtual framebuffer (Xvfb) allows creating non-visible desktop windows (say, Python Matplotlib figures) without having an actual X11 server.

This technique is effective on regular Linux systems as well as Windows Subsystem for Linux.

  1. install XVFB

    apt install xvfb
  2. add to ~/.bashrc

    Xvfb :99 &
    export DISPLAY=:99
  3. Open a new Terminal