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.
X Windows is designed to work well on older systems or systems with minimal resources. However, it's quite complex to build from source. I've built it completely a few times. I've done so on Linux/BSD systems, but I've also built it natively for design), it still seems to run rather slow compared to other options such as the console or framebuffer. It also runs quite slow on Windows compared to native Windows applications.

Wayland looks like it will be a popular replacement for X Windows and it will also have backward compatibility allowing users to continue to run X Windows applications using XWayland. Wayland is designed specifically for Linux systems. So, it'll be interesting to see how much work it will take to get this going on other POSIX systems like BSD and how well it will be adopted by users of those systems.

Another alternative to X Windows on Linux is to use console or framebuffer based applications. Since POSIX systems multitask, you can run multiple terminals with an application in each. However, if you want more than one application on your screen at once or an easier way to switch between applications, you have to use a terminal multiplexer. Screen is the most well known, but there are several others such as tmux, dvtm, twin. There are also options like splitvt, terminator and mtm (Micro Terminal Multiplexer). This can be a speedy solution, but it's not always as intuitive to use as a windowing system such as X Windows. A couple of framebuffer related projects that look interesting for their cross-platform support are:
https://github.com/uobikiemukot/yafblib
https://github.com/emoon/minifb

Here's another terminal multiplexer and TUI window manager looks interesting:
https://github.com/netxs-group/VTM
Nice thing about this one is cross-platform support.

DirectFB is another option. Unlike SDL 1.x which had backend support for the Linux framebuffer, the best solution for running applications in framebuffer for SDL 2.x is DirectFB. Despite it being an interesting project, the original development site for DirectFB is no longer available. Even when it was available, the mailing lists for it weren't very responsive. There is a patched and working version of DirectFB among the Debian packages but with the advent of other options like Wayland, who knows how long it will continue to be included/supported by larger Linux distributions. I did find a github site for the project, but the commits don't look too recent.

https://github.com/deniskropp/DirectFB

When reading about DirectFB, I also saw mentions of GGI. DirectFB only works on systems like FreeBSD if it uses SDL as a dependency. GGI was mentioned as another alternative on BSD systems. I believe the GGI project is no longer active. There is a GGI project at Sourceforge. I'm not even sure if it's related to the original I was reading about, however, it does mention a stable graphics system that works anywhere.

https://sourceforge.net/projects/ggi/

There are mentions of Xynth and XFast as portable desktop environments:
https://github.com/alperakcan/xynth
https://sourceforge.net/projects/xfast/

Not sure how portable it is or how easy it will be to get applications to work with it, but Arcan provides another alternative to solutions such as X Windows. If anyone has any interesting results using it, I'd appreciate hearing about it.

https://github.com/letoram/arcan

Sixel looked interesting as well. It can run some SDL applications via the terminal. Again, if anyone has any interesting results with it, I'd like to hear more about use cases.
https://github.com/saitoha/libsixel

So is there still a viable middle ground between X Windows/Wayland and console/framebuffer applications?

First off, I'd like to mention nano-x. It works on a variety of platforms. It has basic API support for porting X11 applications (with nxlib) and Win32 applications. You can use it to build single programs, but it can also be run in client/server mode similar to X Windows. That way, you can display multiple programs on the same screen. It's actively developed (even though the number of developers is small). XFDos (which runs on DOS/FreeDOS) and nanolinux are some good examples of what can been done with nano-x and just how portable it is. It also works on Android systems. On systems where X Windows won't build easily or just won't run, it's hard to beat nano-x.

https://github.com/ghaerr/microwindows
https://github.com/georgp24/microwindows-android-bin
https://github.com/ghaerr/nxlib

If you want to create your own windowing system on the style of DirectFB or nano-x, I've seen some developers start with libraries like AGG. Typically the older 2.4 version is used because it's still available under the BSD license.

http://www.antigrain.com/

Finally, if you really want X Windows, but you still want something that uses less resources or might perform better on older systems, there are a fewer lighter versions of X that may be of interest.

https://github.com/pelya/xserver-xsdl
https://github.com/idunham/tinyxlib
https://github.com/tinycorelinux/tinyx
ftp://distro.ibiblio.org/pub/linux/distributions/amigolinux/download/AmigoProjects/X11-tiny-1.2.61
https://github.com/rswier/picox

There are other windowing systems, however, most of them aren't very portable and are limited to a particular niche operating system. Know of other portable Open Source windowing systems or other good options for POSIX systems like Linux and BSD? Please share the information. I'd be very interested to hear about them.

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. 28th, 2025 04:26 pm
Powered by Dreamwidth Studios