9/UX: a Macintosh-inspired desktop for 9front

Jeff Lindsay, h.d.a.

The 9/UX desktop: Desktop's menu bar and volume icons, two spatial folder windows, and the libux sample app with a file just dropped onto its Notes field
This is the real thing, running live in your browser: the rio fork in 9/UX mode, Desktop, and the libux sample app, compiled for 386 and run by h9 on the v86 emulator inside the page. Nothing is sent anywhere; it's about 17 MB to load, once. Click the screen to type; right-click (or Ctrl-click) is button 3, and Alt-click is button 2. It needs a recent Chrome or Edge; other browsers see a screenshot, a real frame from the end-to-end drag-and-drop test, running headless on h9. Open it in its own tab for a bigger screen.

About

9/UX brings the classic Mac and A/UX desktop (a spatial desktop, a global menu bar, consistent controls and dialogs, icons, and resource-driven presentation) to 9front, built the Plan 9 way: rio and libdraw draw the screen, 9P exposes every application's UI state and commands as files, namespaces define the working environment, the plumber opens documents, and ndb holds human-editable metadata.

Keep the Macintosh's direct-manipulation desktop, but make every meaningful object, action, and resource visible as a Plan 9 file.

It is not an emulator, a Macintosh ABI, or an A/UX reimplementation. Native 9front programs stay first-class, and existing rio programs (acme, sam, rc windows, nested rio) keep working unchanged beside 9/UX apps.

The pieces:

Screenshots

These are real frames, not mockups. The GUI tests embed h9 with a headless screen, inject mouse and keyboard input, and drive the 9P files at the same time.

The end of the end-to-end demo: the libux sample with a text field set from rc, Desktop windows behind it, an rc window, and acme with a file opened from Desktop
The last step of the end-to-end demo. From rc, the sample app's Name field was set to from rc and its Save button pressed through ctl; a double click in Desktop plumbed a text file to acme; and an ordinary rc window is still moved and typed into.
The libux sample app on 9front's own kernel and VESA framebuffer at 32 bits
The libux sample on 9front's own kernel and VESA framebuffer in QEMU, at 32 bits per pixel. Its ICN# and icl8 icons match the headless golden images pixel for pixel.

Visual Design

Macintosh structure, Plan 9 colour: butter title bars from rio's selection yellow, acme's cream and olive, and rio's greygreen for the desktop, so 9/UX windows and legacy rio windows sit together on one screen. Everything reads in one bit, uses a sixteen-colour palette, and is drawn in whole pixels. Every graphic is original to 9/UX; it ships no Apple resources. The mockups below are generated from the same palette and metrics files as the code.

Mockup of the desktop with icon and list views and an rc window
Desktop, with icon and list views and an rc window driving /mnt/ux.
Mockup of an app with its File menu open in the menu bar and a settings dialog
An app's menu in the global bar, and a dialog.
Buttons, check boxes, radio buttons, text fields and scroll bars in each state
Controls in each state.
Window title bars in six themes: nine, nine-sea, butter-deep, nine-grey, seven and win
Title bars in each theme.
The 9/UX icon set
The icon set.

Documentation

The design document describes 9/UX and its v0.1 acceptance criteria; release.md has where each one stands, the end-to-end demo, and the open issues. Every interface between components is a file protocol in docs/protocols, and the visual design covers the palette, fonts, metrics, chrome, icons and cursors.

Source Code

The source is on GitHub, under the MIT license. Development runs on h9, which runs 9front's own compilers, mk and rio directly from the host shell, without booting a VM. scripts/h9.sh clones and builds the pinned h9 on its first run:

git clone https://github.com/progrium/9ux
cd 9ux
scripts/h9.sh --rc 'mk'
scripts/h9.sh --gfx rio/7.out -u
scripts/test.sh

Use rio/6.out on amd64. development.md and testing.md have the details.

Warning!

9/UX is at v0.1 and under active development. Interfaces and behaviour change without notice.

Contact Info

Please report bugs and send questions through GitHub issues.

Credits

The 9/UX mark in the menu bar is a pixel-art Glenda by Dan Fessler. Glenda, the Plan 9 bunny, was created by Renée French.