Has anyone tried this or interested in giving it a try and sharing experiences?
Why bother? Well I have been having issues with intermittent crashing of Kstars/EKOS on Windows. Unfortunately there is currently no debug facility for EKOS under windows.
So I thought I would see if I could get it to run under WSL either for reliability or to enable debugging with ekos debugger. This approach may also work on low powered Linux devices which would not need to run the overhead of a full GUI desktop environment. The setup and operation would be slightly different then.
You need to enable WSL in Windows. I suggest using WSL1 for now as WSL2 works a bit differently. I installed Ubuntu 18.04 a while back and upgraded to Ubuntu 20.04 but you install Ubuntu 20.04 directly now I believe.
You need an X-server in Windows. I found vcXsrv seems to work best.
sourceforge.net/projects/vcxsrv/
Some good instructions at
seanthegeek.net/234/graphical-linux-appl...-bash-ubuntu-windows
Run xlaunch.exe to set up the X11 serve. Save the configuration file to %appdata%\Microsoft\Windows\Start Menu\Programs\Startup
so that vcXsrv runs automatically. When vcXsrv is running there is an X icon in the system tray
Open up a WSL session and install x11-apps. x11-apps installs some small graphical apps which are useful while getting X11 forwarding to work e.g. xeyes, xclock
<code>sudo apt install x11-apps
</code>
Edit the sshd configuration
<code>sudo nano /etc/ssh/sshd_config</code>
Make sure the following parameters are uncommented and have the values shown. For AllowUsers set it to the username you set up for WSL
Port 2200 is needed instead for the usual ssh port 22 because that is already used by Windows ssh
<code>PermitRootLogin no
AllowUsers <yourusername>
PasswordAuthentication yes
UsePrivilegeSeparation no
ListenAddress 0.0.0.0
Port 2200</code>
Restart the SSH service with the new parameters
<code>sudo service ssh --full-restart
</code>
Set the display for X11 for just this session
<code>export DISPLAY=localhost:0.0
</code>
or for all sessions
<code>echo "export DISPLAY=localhost:0.0" >> ~/.bashrc
. ~/.bashrc
</code>
Check that it is set with
<code>echo $DISPLAY
</code>
Test with xclock. You should see a clock window show up
<code>xclock</code>
Install Kstars:
indilib.org/download.html
<code>sudo apt-add-repository ppa:mutlaqja/ppa
sudo apt-get update
sudo apt-get install indi-full kstars-bleeding ekos-debugger
</code>
When you run kstars you may get an error to do with libQt5Core.so. This is fixed by
<code>sudo strip --remove-section=.note.ABI-tag /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
</code>
You may also see errors to do with fbConfigs and driver swrast. These are fixed by:
<code>sudo apt-get install -y mesa-utils libgl1-mesa-glx
echo "export LIBGL_ALWAYS_INDIRECT=1" >> ~/.bashrc
. ~/.bashrc</code>
My experience so far has been promising. Before applying some of the fixes above I had Kstars running successfully, moving the mount, focussing, plate solving and previewing. It crashed with a seg fault when the first capture completed but I have not yet reproduced that. Subsequent captures have worked. The mount popup does not display properly. It seems to show whatever was underneath it when it was created. Also, on one install kstars did not create the profile database so I copied an existing one. But on a subsequent install it started up with the profile wizard and everything worked as expected.