Windows Subsystem for Linux

Windows Subsystem for Linux (WSL) is a compatibility layer for running Linux binary executables (in ELF format) natively on Windows 10. This means you can download an executable compiled for Linux and run it unmodified under Windows. You can also use `apt install` to access the repertoire of all Ubuntu packages. You can also install a different distribution such as Fedora and openSUSE via Windows Store.

X11 and DBus

Since WSL does not currently support X11 and Unix sockets, which DBus uses by default, we need to do the following:

  • Install VcXsrv or Xming.
  • export DISPLAY=:0.0. You can add this to your shell init script:
echo "export DISPLAY=:0.0" >> ~/.bashrc
  • In /etc/dbus-1/session.conf, replace unix:tmpdir=/tmp with tcp:host=localhost,port=0. If the file or the line does not exist, simply add it.
  • Suppress a few other benign warnings:
echo "export NO_AT_BRIDGE=1" >> ~/.bashrc
sudo dbus-uuidgen > /etc/machine-id


Comments powered by Disqus