I've been reading a lot about WSL. It's a great way to run Linux in Windows without needing a virtual machine like VirtualBox or Qemu installed. However, the earlier versions of WSL only ran command line or console based programs. If you wanted to run X Windows programs, you needed an X server. Well it just so happens, I've built the X server on Windows from source and all the packages for it. I've recently been testing remote access to X Windows programs on an AIX machine at work. From those tests, I found X forwarding using tools like putty and a Windows based X Windows server can be rather slow. My experiments with sixel weren't very satisfactory. The other protocols I investigated were vnc and xrdp. Both offer faster alternatives to X forwarding or other techniques I'd tried.

I did not make a lot of progress with the vnc protocol. I was able to build sdl_vnc from source. I had issues with building libvncserver because they're using cmake which never works properly for me. Was able to find an older version that uses GNU autotools and get that working though. Another interesting project is spiritvnc which uses libvncserver and provides a front end using FLTK.
https://sourceforge.net/projects/sdlvnc/
https://sourceforge.net/projects/libvncserver/
Eventually I was able to build two SDL based vnc clients from source code. Unfortunately, there isn't much in the way of documentation and I really couldn't get theTto do much. If anyone finds any decent documentation regarding vnc and either of those clients, please let me know.

Xrdp looked like a very promising option especially when I read that performance was even better than vnc. There isn't an xrdp package for AIX, but there is one for Debian via WSL. So, I decided to investigate. I found several articles on how to set up xrdp for WSL. That was surprising since so many articles I've been reading discussed how hard it was to access WSL based X Windows applications and the need for Microsoft to add GUI support in WSL 2.

It was also surprisingly easy to get working. I used sudo apt-get install xrdp to install it. I added my window manager of choice, jwm, and a few X Windows based test programs, SciTE and tuxmath. The documentation said to add the xrdp user to the ssl-cert group:
sudo adduser xrdp ssl-cert
Then it said to edit /etc/xrdp/xrdp.ini. I did so with nano. I changed any instances of 3389 to 3390. I commented out max_bpp=32 and added nmax_bpp=128. I added nxserverbpp=128 after #xserverbpp=24 which was already commented out. I started the system using:
sudo /etc/init.d/xrdp start
Then, all I had to do was use the remote desktop connection program on Windows and connect using my WSL username and password. When you connect, use computer name: localhost:3390 Everything came up with no issues. I tried out Xfireworks, SciTE and tuxmath. They ran very efficiently considering they weren't running as native Win32 applications. (I also have Windows versions of all these programs.) I was really pleased with the results. I think this method probably works even better for me than upgrading to the latest WSL and using the Microsoft GUI support (which I have tried on one of my computers). Now if I could just get a solution like this working on our AIX system at work, we'd be all set. It would also be interesting to see how this works with Wayland and rdp support in place of xrdp.

April 2025

S M T W T F S
  12345
6789101112
13141516171819
20212223242526
27282930   

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 24th, 2025 02:07 pm
Powered by Dreamwidth Studios