Nano‐X - ghaerr/elks GitHub Wiki

Graphics support

The Nano-X screen driver is built for VGA or EGA cards. If "EGAMODE=1" is set in the environment, it will assume EGA and run in 640x350 resolution, otherwise it will assume VGA resolution and use 640x480.

Nano-X can be built to use CGA, which was done with some experimentation for IBM PC using a special driver. There is no CGA support for IBM PC using the standard build. The PC98 version of Nano-X uses a driver specific for PC98 and runs in 640x400 resolution. More info on CGA is available here. And as Tandy graphics is an extension of CGA it could work on Tandy as well.

Compilation

Clone: https://github.com/ghaerr/microwindows

Go to ELKS' root folder. Type: . ./env.sh

Go to microwindows/src and type: make -f Makefile.elks

Binaries from: bin/nano-X will be automatically copied to /root/elks/elkscmd/rootfs_template/bin. This means that once you build a new ELKS image the Nano-X binaries will be in ELKS' /bin.

Configuration for ELKS is available in: microwindows/src/Configs/config.elks

If there is a problem, perform clean:

$ make clean
$ make -f Makefile.elks clean

Usage

Any client application checks to see if the Nano-X server is running, by checking the existence of the shared named socket at /tmp/nxsock. If it doesn't exist, then it fork/execs bin/nano-x to start the server, then connects to it via the named socket. After the nano-X server is running, then subsequent applications do the same check but don't start the server because they see it is already running, and just connect to it to start sending graphics commands.

A desktop app exists called nxstart. It creates a graphical desktop with a window manager and a menu that allows you to start other Nano-X applications. You need to have a serial COM mouse on /dev/ttyS0 (default port unless MOUSE_PORT= environ variable is set) in either real hardware or an emulator.

Notes

  • The size of the cursor and its implementation do affect overall performance as discussed here.