9/UX:9front 的 Macintosh 风格桌面
9/UX: a Macintosh-inspired desktop for 9front

原始链接: https://progrium.github.io/9ux/

9/UX 是一个受 Macintosh 启发、面向 9front 的桌面环境,可通过 h9 模拟器在浏览器中实时运行。它将经典 Mac/A/UX 空间桌面——图标、菜单、对话框和资源驱动的表现形式——带到 Plan 9,而不模拟 Mac 硬件或 ABI。它按 Plan 9 方式构建,使用 rio/libdraw 进行绘制,使用 9P 暴露 UI 状态、命名空间、plumber 和 ndb 元数据。原生 9front 程序与 9/UX 应用一样被视作一等公民。关键组件包括带全局菜单栏的 rio 分支、Desktop、libux Toolbox、uxd、uxmeta、resfs 和 clipd。截图是真实测试帧;设计将 Macintosh 结构与 Plan 9 颜色及原创 16 色调色板结合。源码在 GitHub 上采用 MIT 许可证,但 v0.1 仍在积极开发中。

Hacker News 上的一篇帖子介绍了 9/UX,一个受 Macintosh 启发、面向 9front 的桌面环境,获得了 77 点和 14 条评论。用户对 Plan 9/9front 表示热情,认为更常规的界面有助于采用,9P 可能有助于自动化 GUI 测试。一些人称赞其复古 Mac 美学,并表示它避免了完美克隆。其他人讨论 Plan 9 作为 Unix 后继者的历史,而少数人批评项目页面的写作风格像 AI。评论还讨论了 Plan 9 的实用性、鼠标密集型工作流,以及它能否取代 Linux/BSD 桌面。总体而言,该帖子混合了怀旧、技术好奇心和对日常可用性的怀疑。
相关文章

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

Jeff Lindsay, h.d.a.

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 its own 386 emulator inside the page. Nothing is sent anywhere; it's about 23 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:

  • rio fork (rio -u): a desktop layer, a global menu bar that follows the focused app, title-bar chrome, and a drag broker, all under /dev/ux. With 9/UX mode off it's stock rio.
  • Desktop: volume icons, spatial folder windows, rename, duplicate, Get Info, Trash, remembered layout, and double-click to open documents through the plumber. A remote 9P server works as a volume.
  • libux, the Toolbox: windows, menus, dialogs, alerts, and controls, each app serving its control tree over 9P, so echo activate >.../ctl presses a button.
  • uxd gathers every app's tree at /mnt/ux with per-app policy; uxmeta keeps associations, volumes and layout in ndb files; resfs serves classic ICN#, icl8, menu, dialog and string resources at /mnt/res; clipd is a typed clipboard kept in step with rio's snarf.

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.

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.

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.

  • h9, native 9front executables on host hypervisors
  • 9front
  • A/UX, Apple's Unix with the Macintosh Desktop
联系我们 contact @ memedata.com