X Windows Alternatives
Apr. 17th, 2019 10:32 amX 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.
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.