justinmeiners / classic-colors

Paint program for Unix. Inspired by MS Paint (Windows 95-98).
GNU General Public License v2.0
46 stars 3 forks source link
c graphics motif ms-paint paint paint-application unix x11

Classic Colors icon

Classic Colors is a simple and efficient paint program for Unix systems, inspired by MS Paint (Windows 95-98 version). It is built on the time-tested Motif UI library, so it should last for a long time and be widely compatible with various Unix flavours.

classic colors screenshot

Dependencies

For now, you must build from source (help making it available in package managers would be greatly appreciated.)
It has been tested on Debian (Ubuntu), OpenBSD, and macOS(Homebrew).

List

Debian/Ubuntu:

sudo apt install libmotif-dev libxpm-dev libxext-dev

macOS (homebrew):

Install XQuartz either from the link, or homebrew cask:

brew install xquartz

If you just installed XQuartz for the first time make sure you restart otherwise you will get an error:

Error: Can't open display.

Now install motif:

brew install openmotif libxpm

NetBSD (pkgsrc)

pkgin install motif gmake pkg-config

OpenBSD

pkg_add motif gmake

openIndiana/Tribblix:

Classic colors is available as a package for Tribblix:

zap install-overlay classic-colors

Install

Now you are ready to build:

./configure
make
make install

And run:

classic-colors

If you do not want to install in your path, the build output ./bin/classic-colors is a standalone executable which can be moved around.

Platform notes

Classic colors uses the MIT SHM extension when available. This extension allows the display to refresh much faster. There is a fallback codepath when it is not available. It works well, it's just not as smooth.

SHM can be disabled at configuration time:

./configure --no-shm

Unfortunatly, macOS does not allow very much SYSV shared memory to be used, and so it is likely if you resize the window very large it will exceed this limit and switch to the fallback codepath. For the best experience on macOS you will need to increase this limit. Create a file /etc/sysctl.conf containing the following:

kern.sysv.shmmax=134217728
kern.sysv.shmmin=1
kern.sysv.shmmni=1024
kern.sysv.shmseg=256
kern.sysv.shmall=32768

Restart the system after making this change.

Building Motif

If motif is not available in a package you will need to build it manually.

Download source:

curl -L https://sourceforge.net/projects/motif/files/Motif%202.3.8%20Source%20Code/motif-2.3.8.tar.gz -O

Here the development dependencies on Debian:

sudo apt install libx11-dev libxt-dev libxext-dev libxft-dev bison flex

LICENSE

GPL

Screenshots

classic colors openbsd screenshot

classic colors Mac OS screenshot

classic colors NetBSD screenshot