From dd0b5ee9db3fac285a09569f9384c152b131beac Mon Sep 17 00:00:00 2001
From: Jan David Mol <mol@astron.nl>
Date: Mon, 11 Oct 2021 08:26:10 +0200
Subject: [PATCH] L2SS-434: Added faq entries for Windows

---
 docs/source/devices/configure.rst |  2 +-
 docs/source/faq.rst               | 26 ++++++++++++++++++++++++++
 docs/source/interfaces/logs.rst   |  2 +-
 3 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/docs/source/devices/configure.rst b/docs/source/devices/configure.rst
index ffe21feeb..aa96966d2 100644
--- a/docs/source/devices/configure.rst
+++ b/docs/source/devices/configure.rst
@@ -59,5 +59,5 @@ If Jive does not appear, check ``docker logs jive`` to see what went wrong.
 
 For information on how to use Jive, see https://tango-controls.readthedocs.io/en/latest/tools-and-extensions/built-in/jive/.
 
-.. note:: If you need an X11 server on Windows, install `VcXsrv <https://sourceforge.net/projects/vcxsrv/>`_, disable access control during its startup, and use ``export DISPLAY=host.docker.internal:0`` in WSL.
+.. note:: If you need an X11 server on Windows, see :ref:`x11_on_windows`.
 
diff --git a/docs/source/faq.rst b/docs/source/faq.rst
index 971b6352a..367492e00 100644
--- a/docs/source/faq.rst
+++ b/docs/source/faq.rst
@@ -27,6 +27,32 @@ You have to explicitly stop a container to prevent it from restarting. Use::
 
 or plain ``make stop`` to stop all of them.
 
+Windows
+--------------------------------------------------------------------------------------------------------------
+
+How do I develop from Windows?
+``````````````````````````````````````````````````````````````````````````````````````````````````````````````
+
+Our setup is Linux-based, so the easiest way to develop is by using WSL2, which lets you run a Linux distro under Windows. You'll need to:
+
+- Install WSL2. See f.e. https://www.omgubuntu.co.uk/how-to-install-wsl2-on-windows-10
+- Install `Docker Desktop <https://hub.docker.com/editions/community/docker-ce-desktop-windows/>`_
+- Enable the WSL2 backend in Docker Desktop
+- We also recommend to install `Windows Terminal <https://www.microsoft.com/en-us/p/windows-terminal/9n0dx20hk701>`_
+
+.. _x11_on_windows:
+
+How do I run X11 applications on Windows?
+``````````````````````````````````````````````````````````````````````````````````````````````````````````````
+If you need an X11 server on Windows:
+
+- Install `VcXsrv <https://sourceforge.net/projects/vcxsrv/>`_
+- Disable access control during its startup, 
+- Use ``export DISPLAY=host.docker.internal:0`` in WSL.
+
+You should now be able to run X11 applications from WSL and Docker. Try running ``xterm`` or ``xeyes`` to test.
+
+
 SSTs/XSTs
 --------------------------------------------------------------------------------------------------------------
 
diff --git a/docs/source/interfaces/logs.rst b/docs/source/interfaces/logs.rst
index 648adf0c6..2b5c605ec 100644
--- a/docs/source/interfaces/logs.rst
+++ b/docs/source/interfaces/logs.rst
@@ -41,4 +41,4 @@ If LogViewer does not appear, check ``docker logs logviewer`` to see what went w
 
 For information on how to use the LogViewer, see https://tango-controls.readthedocs.io/en/latest/tools-and-extensions/built-in/logviewer/logviewer.html.
 
-.. note:: If you need an X11 server on Windows, install `VcXsrv <https://sourceforge.net/projects/vcxsrv/>`_, disable access control during its startup, and use ``export DISPLAY=host.docker.internal:0`` in WSL.
+.. note:: If you need an X11 server on Windows, see :ref:`x11_on_windows`.
-- 
GitLab