The global Xresources used -dt-interface system at 14 px for *FontList,
buttons, labels, text and the editor; in buttons, dialogs and lists that
read one size too big next to the IRIX look. The session fonts are Adobe
Helvetica now -- 14 px on a screen wider than 1175 pixels, 12 on a medium
one, 10 on a small one -- the face of the 4DWm reference.
The title and the menus are untouched: 14 px bold oblique, as the 4DWm
app-defaults say (Dtwm.defs.src, 8a0a5ac3). The panel keeps its 14/13/10.
sys.font.src carries the same defaults for dtsession's sys.fonts.
Measured: cpp -P -DXCOMM=# -DWIDTH=1280 sys.resources.src selects
-adobe-helvetica-medium-r-normal--14-* for FontList/button/label/text;
make -C programs/dtwm rc=0 and make -C programs/dtsession rc=0, 0 errors.
74 KiB
74 KiB
ext/src/mcde -- MCDE, the Makronix Common Desktop Environment
What it is for
The Makronix fork of CDE 2.5.3 (IMPORT), on its way to a desktop that works
as one (GOAL.md, "MCDE"): one System Settings, a software update, the small
things that belong together. Makronix ships it in place of CDE; pkgsrc builds
it on any platform. What each program does is in its source and in
docs/MCDE-PROGRAMS.md (Makronix root); this file holds the rules. The
state of the file before the refactor of 2026-11-13, with the per-feature
narratives and test notes, is docs/reference/mcde-agents-history-2026-11-13.txt.
The philosophy -- binding (Konrad, 2026-11-09)
- CDE, Motif, Xlib, X11 only. No GTK, no Qt, no compositor, no scripting language as a requirement. Fast, and it runs on machines of 1995. GPU frugal: no compositing or animations, redraw on Expose only.
- C99 and POSIX (POSIX.1-2008, XSI where CDE already needs it). New code
compiles with
-std=c99 -D_POSIX_C_SOURCE=200809Land uses nothing beyond POSIX and the X/Motif libraries. MCDE runs on NetBSD and Linux. Exception: dtchat (decided 2026-11-16). The chat program needs TLS, XMPP, speech and video, which POSIX cannot provide. It may link libtls (security/libretlson both systems; the base carries OpenSSL, not libtls), libstrophe (chat/libstrophe), libopus (audio/libopus) and, optional at build time, libvpx (multimedia/libvpx), each behind exactly one module (dc_tls,dc_xmpp,dc_audio,dc_video); libcrypto (base OpenSSL) supplies X25519, Ed25519, HKDF and ChaCha20-Poly1305. Nothing else from outside POSIX/X/Motif, no GUI toolkit, no scripting runtime. The Telegram (TDLib, C++) and WhatsApp (whatsmeow, Go) adapters are separate packages and separate processes (programs/dtchat-telegram,programs/dtchat-whatsapp), never linked into the UI or the core. The decision and its reasons are indocs/reference/dtchat-architecture.txt; the tasks are scopemcde/dtchat. - The operating system is behind one layer:
lib/McdeSys. Everything that differs between systems (users, network, Wi-Fi, time zone, host name, services, update, power, sound, disks, sharing, backup) goes through the functions ofinclude/Mcde/McdeSys.h. A program never callsuseradd,ifconfig,wpa_supplicant, edits/etc/rc.confor callssystemctlitself, and never has an#ifdef __NetBSD__. Each system has one backend (lib/McdeSys/netbsd.c,linux.c, plusdisk_*.c);common.cis POSIX. A backend uses the system's own tools the documented way. A call that a program repeats to show a state (the bar: volume, Bluetooth, Wi-Fi) asks its tool throughmcde_sys_capture_limitedwithMCDE_SYS_STATUS_SECONDS(private.h), never unbounded: a stopped sound server froze the bar for 40 s a read (measured, tasksd t0080; 2 s since). - Installed with pkgsrc, in conflict with CDE:
pkgsrc/MakefilehasCONFLICTS+= cde-[0-9]*. - One look: the MCDE palette generates the X resources and the GTK/Qt
themes (
programs/dtthemesync, XSETTINGS daemon); MCDE is the reference. - Language: what a user sees may be translated; configuration, bindings
and the system below are English only (
Mod4<Key>,Shift<Key>,Ctrl<Key>in every app-defaults catalog, never translated). Visible strings come from a catalog:programs/dtbar/dtbar.msg(English) and the locale's copy inprograms/localized/<locale>/msg/, built byprograms/localized/*/msgwith gencat and opened bycatopen("dtbar", NL_CAT_LOCALE)-- the name without.cat, NLSPATH carries%L/%N.cat(dtbar sets it when the session has none). dtsystemsettings does the same for its categories, panes and the window title (dtsystemsettings.msg, 32 messages); it callssetlocalebefore its first message, because the window title is already an argument ofXtVaAppInitializeand a catalog opened then would stay the C one (measured 2026-11-16). dtlaunch (dtlaunch.msg, 3 messages) has no libDtSvc to link, so it callscatopen/catgetsitself and its Makefile passesCDE_INSTALLATION_TOP. dttoolbox (dttoolbox.msg, 2 messages: the window title, which is "dttoolchest", and the "no menu" label) does the same and callssetlocalein main before its first message; the menu labels themselves come from the person's chestrc, which is their file, not a catalog. dtphoto (dtphoto.msg, 5 messages: the toolbox title, the two status lines and the open/save errors) keeps its menus as the reference's (dtphoto.menu, docs/reference/photoshop-ui.csv) -- they are the look of the program, not its sentences. dtphoto reads and saves through one 8-bit RGB buffer (SetImageRGB,GetImageRGB) and converts colours through the visual's masks on TrueColor, or in one XQueryColors/ XAllocColor per distinct colour otherwise -- never one X round trip per pixel. Measured 2026-11-22 on Xvfb 1280x1024x24, a 1024x768 24-bit BMP with 589,824 distinct colours:dtphoto -selftest A B20.3 s before the change, 0.046 s after; the round trip is byte-identical (2,359,350 bytes, 0 differing) and the selftest now compares every pixel, not a sample (/tmp/dtptest). The same reader takes 8-bit BMP (uncompressed and RLE8) and the first image of an ICO (1/4/8/24/32 bpp, alpha 0 composited on the document's background, a PNG-compressed icon refused), as dtpaint does; depth 8 (PseudoColor) is exact for 4 and 65536-colour documents alike. A document with more colours than the 256-cell colormap holds loses the excess, as any 8-bit picture must. The toolbox is wired end to end since 2026-11-22: selection is a bit mask, not a rectangle, so the lasso, the magic wand (colour flood, tolerance in colour distance), Select > Inverse and Edit > Clear all work on the same thing, and a command paints only inside the mask. Move drags the masked pixels; it snapshots the picture and the mask at the press and rebuilds from that snapshot on every motion event, because a rebuild from the last frame walks the pixels twice as far, and the release must not recompute the offset (a drag that ends on the frame gives a position outside the canvas, which moved the picture back). Crop drags a rectangle and crops to it on release. Type opens a prompt and draws one line with the GC font over an undo snapshot.dtphoto -movetest|-croptest|-typetest|-selecttest|-retouchtestare the headless proofs (no display needed beyond Xvfb): exact pixel sets for wand/inverse/lasso/clear, a 10x10 block moved (10,5) with its mask and a background hole left behind, a crop to 20x30 that keeps only blue, a text line with dark pixels and an untouched corner, and all six retouching tools (blur, sharpen, smudge, dodge, burn, sponge) moving the pixel values in the expected direction. All six run green on depth 24 and depth 8. Retouching reads a patch around the dab through one GetImageRGB round trip, not one per pixel; measured 80 ms for a full 1024x768 open/save round trip on a busy host. The Image and Filter menus carry real operations since 2026-11-22, all through the same RGB buffer: Image > Adjust (Invert, Desaturate, Brightness/Contrast), Flip (horizontal, vertical), Rotate (180, 90 CW, 90 CCW, which swaps the document size), Image Size (nearest neighbour, the aspect kept from the width) and Canvas Size (the picture centred in the larger canvas, the border in the background colour). Filter > Blur/Sharpen are 3x3 convolutions (Blur More a gaussian-ish kernel, Sharpen More the strong laplacian), Stylize has Find Edges, Emboss and Solarize, Noise has Add Noise (a xorshift seed, so the same run gives the same bytes) and Median/Despeckle, Pixelate has Mosaic. The border pixels keep what they had -- a 3x3 window at the edge would fold outside the picture -- and every per-pixel operation honours the selection: the first four (invert, desaturate, brightness, solarize) did not, which is why they now shareOpPerPixeland a new operation cannot forget the mask. A menu entry is bound by its full path, not its label: the reference has "Horizontal" in Image > Flip and in Layer > Type, and the label alone cannot tell them apart.CommandOftakes "menu/sub/item", the reader stores it inItem.path, and-menutestproves every path resolves to the command the callback switches on, that no path is claimed twice and that a path nobody knows stays CMD_NONE (206 paths, 0 doubled, measured 2026-11-22). The table ends at its NULL entry so the test walks it without knowing the length.DTPHOTO_CMDS=1prints what the loaded menu file bound: 206 of 206, none on CMD_NONE. Every menu path indtphoto.menuresolves, so a bound entry is a wired one. The test also readsdtphoto.menuitself and counts the entries that resolve to no command (206 items, 0 unbound, measured 2026-11-22): the table checked against itself can be green while a line in the menu file does nothing. Counter-check:Select/Growon CMD_NONE makes the test print "1 unbound" and FAIL, so the count is not decoration.Window > Show Commandslists the command table itself (206 rows), not a hand-kept list, so the palette cannot drift from what the menu binds.XmLocis the one place that casts a catalogue string forXmStringCreateLocalized:Trpromisesconstbecause its English fallback is a literal, and the widget asks forchar *. Without it six dialogs warned; with it the file builds without a single warning. The View switches are read, not just flipped:SnapX/SnapYpull a marquee or crop drag onto the grid or a guide,DrawGuidespaints the grid, the guides and the rulers on the canvas (not into the picture), and-viewtestchecks the snapping arithmetic while-drawtestcounts the pixels the decorations add on a real pixmap. A flag that only toggles itself is a menu entry that does nothing, which is why both tests exist.dtphoto -optest|-menutestare headless too: the operations are checked against the arithmetic (a hard edge blurred to 170, the same edge sharpened clamped to 255 and 0, a mosaic cell to its mean) and not against "the picture changed".-filtertestcovers the other 43 filters -- the gaussian, motion, radial and smart blurs, unsharp and high pass, find edges, emboss, trace contour, facet, fragment, median, offset, clouds, crystallize, pointillize, color halftone, mezzotint, diffuse, extrude, tiles, wind, deinterlace, NTSC colours, dust and scratches, the nine distortions and the whole Image mode family -- and asks for a property rather than a change: grayscale leaves r == g == b, bitmap only 0 and 255, indexed 4 only the ladder 0/85/170/255, offset is a permutation of the picture (same sum and sum of squares), equalize never narrows the range, and inverting twice returns the picture. Two of those are judged against what the display can hold and not against the bytes put in: on a 256-cell PseudoColor map the second inversion drifts 42/255 on a 576-colour picture, which is the map's limit, so the involution is checked on a four-colour picture where the floor is 0, and grayscale is allowed the 10/255 the nearest-cell search costs. The filtertest prints the floor it measured (0 on TrueColor, 30 on PseudoColor here) instead of carrying a hand-picked tolerance. The same run covers the colour-model and layer entry points that used to sit outside every test: CMYK Preview must not flatten the picture to one colour, Gamut Warning paints a saturated ink in the warning grey 128 and leaves a printable pixel alone (checked on a picture built for it -- pure red beside neutral grey -- because the structure picture holds no colour at the edge of the gamut), the 5x5 Custom kernel with a single 1 in the middle is the identity, Perspective at 0% is the identity and at 50% reads the top-left from inside the picture, a 90 degree Affine rotation is a permutation (same sum and sum of squares) and the identity matrix changes nothing, and Drop Shadow leaves the picture's own pixels alone. All twelve run green on depth 24 and depth 8.OpAffinemaps around (w-1)/2, not w/2: with the half-open centre a 90-degree turn of a 24-wide picture lost a whole row to the background (552 of 576 pixels hit), which-filtertestcaught as "not a permutation" before the fix. Every sampler that maps by inverse mapping needs the same centre, or an edge falls off. The zoom magnifier doubles on the left button and halves on the right (12%-800%), the hand pans the view, and both say what they did on stderr so a mouse-driven test can read the result. The Select menu's morphology works on an exact euclidean distance field (two passes, then the distance to the nearest selected and the nearest unselected pixel), so Expand, Contract, Border, Smooth, Grow, Similar and Feather are arithmetic, not guesses. Feather needed a second layer: one bit per pixel cannot carry a soft edge, soselCoverholds 0-255 beside the bit mask and every consumer --OpPerPixel, the gradient,PaintMask-- mixes by that coverage instead of cutting at the bit.-selmodtestchecks the numbers (a 5x5 block contracted by 1 loses its four corners and nothing else, a 2 px band from Border, Grow taking the neighbouring colour and Similar the whole picture).Window > Show Optionsopens the Options box, which is where the tool parameters live: pencil and eraser radius, the wand's tolerance (which Grow/Similar read too), the retouch radius and strength, and the gradient as linear or radial. Every field writes straight into the variable the event handler reads, so there is no second copy, and each edit saysdtphoto: options <name>=<value>on stderr. The box is built by a fixed row list, and a row returns the FIELD, not its label: a text field is taller than its label, so attaching the next row to the label stacked the fields on top of each other and the tolerance field was unreachable (measured 2026-11-22, the click landed in the eraser field).DTPHOTO_OPTIONS=1opens the box at startup, which is how the test reaches it without a mouse. Painting is clipped to the selection, as in the original: the pencil (a hard square tip of 2r+1), the brush (a round one) and the eraser all go throughPaintTip, which reads the box around the dab once, mixes by the coverage and writes it back. Before that the pencil drew its tip over the whole picture whatever the mask said, and the pencil ignored its radius entirely (one XDrawPoint).-optestproves both: a tip laid across the edge of a 2 px selection changes only those two columns, and the wand at tolerance 0 takes one pixel where tolerance 100 takes six. dtpaint builds its menus in code and its labels are catalogued (dtpaint.msg, 51 messages from 1-53, 52 unused: menus, the tool/file/error/discard/attributes/colour/print dialogs, Help and About); the program has no render table, so its German strings avoid umlauts (a UTF-8ücame out as two latin-1 characters under the core font, measured 2026-11-16; the German copy transliterates ae/oe/ue throughout, re-measured 2026-11-21). Its canvas is a drawing area of exactly the image size inside a scrolled window (a click outside the image must never reach XGetImage -- the picker crashed there), undo is one snapshot taken before every image-changing operation and refreshed after a load, and Open/Save/Invert convert colours through the visual's masks on TrueColor (or in batches otherwise), never one X round trip per pixel (measured 2026-11-21: open 18.3 s -> 0.02 s, invert 14.9 s -> 0.05 s, save 6.3 s -> 0.23 s on a 1024x768 BMP; PseudoColor measured 2026-11-22 on Xvfb depth 8: 4-colour BMP round trip exact, selftest PASS -- a picture with more colours than the 256-cell colormap holds loses the excess, as any 8-bit paint must). D3/D4 are built (2026-11-22): the airbrush sprays, Text fills a background box and draws the GC font, Curve is a two-phase quadratic and Polygon closes on a right or double click; rectangular and free-form selection draw an XOR marquee, move their pixels and clear through Edit > Clear Selection (Del), and Select All is Ctrl+A; the magnifier and View > Normal/Large Size zoom 1x/2x/4x/8x; Attributes resizes the document (a document operation, no undo across it); Edit Colors sets the foreground from three RGB scales; BMP 8-bit (uncompressed and RLE8) and the first image of an ICO (1/4/8/24/32 bpp, alpha 0 composited on the background; PNG-compressed icons refused) go through the program's own reader; PNG, JPEG, GIF and XPM come fromMcdeThumbRead(libDtSvc), so the program carries no second decoder. Saving writes the format the name ends in,.pngand.bmpthroughMcdeThumbWrite, anything else as 24-bit BMP. Measured 2026-11-22 on Xvfb depth 24: a 40x30 PNG written back is 1200 of 1200 pixels identical, a GIF 0 of 1200 different, JPEG q100 at most 3 steps per channel; on depth 8 a 32-colour picture comes back exact and the 1200-colour ramp is off by the colormap (mean 28.6 of 255), which is the visual, not the reader.test_thumbwrites a 13x7 ramp and reads it back pixel for pixel, and turns red when the writer's rows are flipped or its channels swapped. Print spools the current image throughmcde_sys_print_file(lp; MCDE_PRINT_COMMAND fakes the tool in tests) and removes the temporary file when the job ends. McdeSys has a catalog too (lib/McdeSys/mcdesys.msg,lib/McdeSys/ text.c,mcde_sys_msg): common.c's tool errors ask it for their sentence (messages 1-9: not there, cannot start, failed with status, no pipe, no answer, out of memory, ...), somcde_sys_error()reaches the dialog in the user's language -- a library does not callsetlocale, the program does. mcdesoundd gets no catalog: what it writes is the log of a background daemon, and the system layer stays English (point 6). A new catalog must be added toprograms/localized/templates/msg.C.amfor C and to the PLIST (C plain, a locale with${PLIST.nls}).
What is in it
- The CDE 2.5.3 tree (first commit unchanged) with the fixes of pkgsrc
wm/cdefolded in.IMPORTsays where it came from. pkgsrc/-- recipewm/mcde(mcde-0.1.0);pkgsrc-motif/-- recipex11/mcde-motif(same archive, WRKSRCmotif/, CONFLICTS motif, lesstif, openmotif);tools/ext-sync.shcopies them into pkgsrc.motif/-- Motif 2.3.8 with pkgsrc x11/motif's patches and MCDE's own fixes (Command key inlib/Xm/Transltns.c, exported menu bars_XmMenuBarSetExported, Xft renditions). Outside pkgsrc MCDE builds it itself (configure.ac,--with-private-motif, the default); through pkgsrc on Makronix it is the system's Motif (--without-private-motif), and the recipe/buildlink direct other Motif packages to it. Konrad, 2026-11-13: MCDE builds its own Motif when it is not Makronix.lib/McdeSys(libMcdeSys;test_sysinfo),lib/McdeSound(include/Mcde/Sound.h),lib/DtSvc/DtUtil2/Mcde*.c(global menu client side, menu model, images, display arithmetic and RandR, WM hints); headers ininclude/Mcde/.McdeThumb.c(include/Mcde/Thumb.h, testtest_thumb) is the miniature: PNG, JPEG, GIF, BMP and XPM read with libpng, libjpeg and C99, scaled with a box filter and cached in~/.dt/thumbs/<64|128|256>/-- the one picture reader for dtfile and the programs that show pictures, no gdk-pixbuf, no program per picture. Since 2026-11-22 it writes too:McdeThumbWrite(PNG through libpng's simplified API, BMP in C99, the ending decides), so an editor saves without a second encoder.- Programs of its own:
dtbar(top bar and global menu, protocolinclude/Mcde/GlobalMenu.h),dtkeys,dtthemesync,dtappscan,dtsystemsettings(panes by category, McdeSys only),dtdiskutility,dtbackup,mcdesoundd,dtphoto,dtpaint,dttoolbox. dtchat(in progress, Phase 0; scopemcde/dtchat): the Motif chat program.lib/libDtChatis the core (JSON IPC, adapters, local peer, media),programs/dtchatthe UI,programs/dtchat-ircandprograms/dtchat-xmppthe always-built adapters;programs/dtchat-telegram(TDLib) andprograms/dtchat-whatsapp(whatsmeow) are separate packages. The IPC contract isdocs/reference/dtchat-adapter-protocol.txt, the decisiondocs/reference/dtchat-architecture.txt. Rules: the UI and the core never link a protocol library; an adapter is a JSON-lines process under${libexecdir}/dtchat, spawned only from there (plus--adapter-pathin tests); the local peer protocol and media live in the core.- Changes inside CDE programs, marked "MCDE" in the source: dtfile
(
Navigation.c,NetView.c,Columns.c,Peek.c-- the preview on Space, withMcdeThumb;Trash.c-- the question before the Trash is emptied,Menu.c-- Open Trash/Empty Trash in the File menu), dtterm (Tabs.c,Dropdown.c,Profiles.c, Xft), dtwm (WmMcdeSnap.c,WmMcdePanel.c,WmMcdeDisplays.c,WmSlideshow.c, always-on-top,_NET_ACTIVE_WINDOW,McdeExcludeBar), dtlogin (config/sessionetc.d), the front panel (programs/types/dtwm.fp.src,types/dt.dt.src). programs/icons/MakronixDtlogo.pm-- the Makronix logo, default of dtlogin.programs/icons/also carries 178 .pm files of the Solaris 2.6 CDE icon package SUNWdticn that CDE 2.5.3 does not have (provenance and the rule inprograms/icons/SOLARIS); existing names are not overwritten.
Conventions that bind
- Session start: the desktop's own programs (mcdesoundd, dtlaunch,
dtterm -dropdown, dtbar, login items) are started by dtsession through
config/sys.sessionetcandconfig/sessionetc.d/(source of the scripts:programs/dtlogin/config/0*), not by Xsession.d. Started before dtsession they took*backgroundfrom the user's~/.Xdefaults(purple bar, 2026-11-13). Xsession.d keeps only what must precede it (language, fonts, displays, dtkeys, home folders, dtappscan, dtthemesync:dist_xsess_SCRIPTS). - Command key (shortcuts by the place of a key): the key left of the space
bar is Command = Mod4 on every keyboard, left of it Option = Alt (Mod1,
Motif's mnemonics), then Ctrl.
programs/dtkeysexchanges left Alt and left Windows on a PC keyboard; a Macintosh keyboard is already so (mcde_sys_keyboard_is_mac);~/.dt/keyboard"type: auto|pc|mac". Menu shortcuts on letter keys areMod4<Key>xshowing "Cmd+X" in every catalog. Ctrl+C stays the interrupt in dtterm. - Program switcher (Command+Tab,
f.mcde_app switcher): the bar stays as long as Command is held; dtwm grabs the keyboard while it is up and the release of a Command key closes it at once (McdeSwitcherEvent, WmMain.c looks before the generic dispatch). Repeated Tab walks on, Shift+Command+ Tab goes back; the chosen program is raised and focused on every press. - Global menu: every Motif program takes part through
DtInitializewithout its own change;MCDE_NO_GLOBAL_MENUkeeps a menu bar in its window. A foreign window is registered with a hidden core widget, never a shell. A program without a global menu in front: the bar shows only the M menu. The bar uses colour set 5 (Dtbar*secondaryColorSetId: 5). - Testing a pane:
tools/mcde-shot.shsetsDTDATABASESEARCHPATHwith commas (types/%L,types/C), which is the separatorDtEnvMapuses for this variable; a colon-separated list leaves DtDb half-loaded, so data types say UNKNOWN and actions ("StartDtscreenSwarm", "Trash") are not found (measured 2026-11-14 -- the screen saver preview showed "Action ... was not found" until the commas were in). The same script exportsDTSCREENSAVERLISTas dtsession would andTTPATH(the install'sappconfig/tttypes): ttsession starts the handler of a message (DtAction "Trash", Cmd+Delete) from the ToolTalk types, and finds them only in~/.tt,/etc/ttor/usr/dt/appconfig/tttypesunlessTTPATHnames a directory (ttsession(1);lib/tt/slib/mp_typedb.Ctt_path()). Without it Cmd+Delete saidTT_ERR_NO_MATCH ... disposition was not queue or startand left the file (measured 2026-11-15, t0206); with it the file is in~/.dt/Trashand the Trash Can window lists it. - Window titles are UTF-8 in the reference's face. The title has its own
XFontSet (
WmInitWs.c: Adobe Helvetica 14 bold oblique, the 4Dwm face, plus an ISO10646 fallback);DrawWindowTitledraws_NET_WM_NAME(or WM_NAME converted from compound text with_XmStringUngenerate) withXutf8DrawStringand clears the title box first. Motif's XmString path cannot draw UTF-8 under a non-UTF-8 locale -- withLC_CTYPE=Ca_NET_WM_NAMEof "Grüße 日本" appeared as the JIS bytes "FJK" (measured 2026-11-22). The_NET_WM_NAMEatoms are interned whether or not EWMH is on, and0010.languagegives a session without a languageLC_CTYPE=C.UTF-8: XCreateFontSet builds for the locale, and in C the set had only ASCII (font set test: "Grüße" 17 px instead of 43). - The session UI is IRIX Helvetica, not the wider CDE
-dt-interface systemface:programs/dtsession/sys.resources.srcandsys.font.srcselect Adobe Helvetica 14 px on screens wider than 1175 pixels, 12 on a medium one and 10 on a small one, for*FontList, buttons, labels, text and the editor -- the CDE face read one size too big. The title and the menus stay at the 4DWm reference, 14 px bold oblique (Dtwm.defs.src,8a0a5ac3); the panel is the same face at 14/13/10. - Windows: dtwm places and maximizes below the bar; the title sits at the
left of the bar (
Dtwm*titleLeft: True, the 4DwmSG_titleLeft; the CDE default is centred) and the frame is 7 pixels wide, as the reference's4DWmapp-defaults say;Alt+Button2resizes a window likeAlt+Button1moves it. The paletteIRIX.dpcarries the reference's greys (sgilightgray#c0c0c0,sgibrightgray#e0e0e0); focus follows the pointer without auto-raise by default; a client straight onto a desktop icon clears the keyboard focus (the icon windows select EnterWindowMask and WmMcdeDesktop calls Do_Focus_Key(NULL)); the bar is no focus target: dtbar sets_MCDE_NO_FOCUSand dtwm's focus-follows-pointer path skips such a client, so the program keeps the keyboard and its menu (t0255), so a non-client area never leaves the last terminal focused (t0255); zones and full screen use Command+Ctrl keys; the outline is XOR or four thin windows, never FlashOutline. An iconified window shows image and label (Dtwm*iconDecoration: label image, 85x67 pictures) and the icons fill a tight column at the left edge (iconPlacement: top left tight-- the first token is the primary direction;iconBoxSBDisplayPolicy: verticalkeeps the icon box from overriding it), Konrad's 4Dwm look of 2026-11-15. The main display carries bar and front panel, the others the backdrop only; workspaces are shared; MCDE remembers a monitor (EDID) in~/.dt/displays. F9/F10 open the window overview (WmMcdeOverview.c): an override-redirect window with a grid of tiles, one per window, ordered by the windows' places, each with its title; arrows/Tab/pointer choose, Return or a click raises and focuses that window and closes it, Escape closes. F10 keeps the focused program's windows (WM_CLASS), Ctrl+Up/Down do the same. F11 iconifies every window of the workspace and the next F11 brings exactly those back. A new dtwm function name is not bound by a key: the bindings namef.mcde_app overview-all|overview-app|overview-desktop, whichF_McdeApproutes (measured twice). F8 opens the workspaces overview (WmMcdeSpaces.c, t0183): the workspaces in a grid (n=4: 2 x 2), each a small screen with its name and its windows as outlines at their places; the workspace you are in has a white frame, the chosen one a blue one; arrows, a digit, Return or a click go there, Escape or F8 closes. Drawn once on demand, nothing runs while it is closed. Not yet: the backdrop in the miniatures, dragging a window to another workspace, assigning programs to workspaces. Testing keys on Xvfb:xdotool key F8(xdotool 3.20160805, this keymap) sends Alt_L first and F8 with Alt held, so no binding of F-keys without a modifier fires; usetools/mcde-xkey.sh F8(plain XTest keycodes). That was the "F9 does nothing" of t0058/t0216;f.mcde_overviewbound directly to F9 still does nothing, with the plain sender (2026-11-15), so "a new function name is not bound" stands. Keys go into the key set the session loads,Keys DtKeyBindings(message 11 ofprograms/localized/*/config/sys.dtwmrc.tmsg;Dtwm*keyBindings: DtKeyBindings): the Command keys (Mod4: Cmd+Tab, Cmd+H, zones, Ctrl+Left/ Right, screenshots) stood only inDefaultKeyBindingsand did nothing until 2026-11-15. A default install reads nosys.dtwmrc(dtwm looks in${CDE_CONFIGURATION_TOP}/config/%L/, and only the installation copy${CDE_INSTALLATION_TOP}/config/%L/sys.dtwmrcexists), so a key that must work out of the box belongs inbuiltinKeyBindings(programs/dtwm/ WmResource.c) and in the tmsg. Ctrl+F2 (dtbar -command menu) is such a key: the bar takes the X input focus and the Motif focus goes to its M cascade (measured 2026-11-15: focus before on the Terminal window, after on the bar's 1280x22 shell). Down/Return still open no menu (t0257): dtwm's focus-follows-pointer hands the input focus back to the window under the pointer within a second, and Motif ignored both a synthetic F10 and a ButtonPress sent to the bar, and XtCallActionProc("MenuBarSelect") from the ClientMessage handler; a keyboard grab waits for the key release (150 ms timer) and succeeds, but the following key did not arrive at the bar in the measurement. A menu opens with the pointer only until a dtwm-side or event-based path is found. The front panel is not snapped or made full screen by keys. The panel defines the standard arrow on itself when it is mapped instead of inheriting one from its frame (the frame's cursor was a black 16x16 square on the MacBook, measured 2026-11-21), and the busy cursor's handle is kept: it used to be created and thrown away, so BUSY_START defined cursor None. The dock's kept programs (~/.dt/panel-apps) have a pane of their own, System Settings > Dock: it lists them, removes one, adds one from a command and restarts the window manager (_DtWmRestartNoConfirm) so the panel is built again. A double click on a window's title bar doesDtwm*mcdeTitleBarDoubleClick(noneby default,minimizeormaximize); the Appearance pane writes it and restarts dtwm (_DtWmRestartNoConfirm). - Front panel: Files, Mail, Terminal, Network, Desktop Style left of the
workspace switch (Konrad, 2026-11-11); right of it the programs of the dock,
the printer and the trash, in that order (Konrad, 2026-11-15). The Terminal
starts xterm (
PUSH_ACTION Xterm,CLIENT_NAME XTerm; Konrad does not want dtterm as the panel's terminal). The dock part is WmMcdePanel.c: kept programs left, a vertical separator, the running programs that are not in the dock right; dragging an icon out to the left keeps it (to the kept half), out to the right unkeeps it. No clock in the panel (the bar has it). Actions at the end oftypes/dt.dt.srctake no shell variables and noCDE_INSTALLATION_TOPinside'...'(docs/reference/frontpanel.txt). An icon dragged from the dock onto a drawer's control in the main row goes into that drawer: WmMcdePanel.c writes~/.dt/panel-drawers(SUBPANEL <tab> CLASS <tab> COMMAND), the program leaves the dock, and an icon dragged out of a drawer onto the dock is kept there and leaves the file. The stored icons join the layout at the end of SubpanelCreate (McdePanelFillDrawer), and the last one holds the form's bottom (as CDE's own last control does), so a drawer is created as high as its contents -- the earlier attempt added a widget to a realized form, where it stayed outside the drawer's height (measured 2026-11-16). An icon added while the session runs shows in the drawer after the next session: the posted drawer's shell keeps the height it had when it was created. - Pictures: PNG goes through
McdeImageGetPixmap(libpng), because Motif 2.3.8 draws an RGB PNG as its blue channel only (docs/reference/motif-png.txt); free withMcdeImageFreePixmap. - The mouse wheel scrolls every scrolled pane:
DtInitializeinstallsDtUtil2/McdeWheel.cfor the program, which hooks the ButtonPress/ ButtonRelease wire conversion (XESetWireToEvent) and, deferred to the event loop, moves the nearest XmScrolledWindow's or XmScrollBar's value by three increments (XmText by its topCharacter) and swallows the wheel event. Buttons 4/5 are up/down, 6/7 left/right, Shift+4/5 horizontal too. This is the layer every widget passes through, so a custom drawing area in a scrolled window scrolls like XmList; horizontal needs a horizontal scrollbar (XmText's own does not follow the bar -- Motif has no public horizontal text scroll; vertical works). - Keyboard and mouse: one pane, Keyboard & Mouse (three tabs;
-pane keyboard|mouse|shortcutsopen a tab).~/.dt/keyboardcarriestype:(auto|pc|mac, dtkeys' Alt/Windows exchange) and the modifier functions (capslock: controland its three neighbours); "dtkeys auto" applies both with XChangeKeyboardMapping/XSetModifierMapping, at login (Xsession.d/0072.dtkeys) and at once from the pane. Whether the keyboard is Apple's is asked of the machine first (hw.modelstarting with "Mac"), then of usbdevs: at session start the internal keyboard may not be enumerated yet, and a MacBook took the PC branch and exchanged Alt and Command (_MCDE_KEYSsaid "pc", measured 2026-11-21). The Shortcuts tab keeps~/.dt/shortcuts(Name=key); the launcher's key is live there:Dtlaunch*hotkey, anddtlaunch -quitasks the running launcher to let go of it, so the next one takes the new key. The other rows are a record -- their keys live in dtwm and the app-defaults. The Mouse tab: buttons and handedness, pointer speed, double-click time, the wheel's direction (the radio pair swaps buttons 4 and 5; the text names the direction the content goes when the wheel is turned towards or away from you) and, on NetBSD, the touchpad throughmcde_sys_touchpad_get/set(hw.synaptics.*: tap to click, two fingers as right or middle button, a scrolling strip at the pad's edge). Those sysctls are CTLFLAG_READWRITE, so changing them needs root: the pane saves~/.dt/touchpad(English keystap,fingers,scroll) only when the write worked and says so when it did not;dtsystemsettings -apply-touchpadputs the saved values back (a boot script can call it as root). Linux has no such interface below X (libinput, per device): the pane says so instead of offering switches that do nothing. - Desktop & Screen Saver are one pane with two tabs (the old
-pane screensaveropens the saver's page). The saver list is dtsession'sDTSCREENSAVERLISTplusStartDtscreenRandom(dtscreen -mode random, an action of its own inprograms/types/dtscreen.dt.src); "Test" starts the chosen saver in a fullscreen override-redirect window and stops it after 8 s (dtscreen has no input loop; a session's saver is ended by dtsession's lock, which the settings program does not have). "Options..." writesdtscreen.<mode>.batchcountand.delayinto the server's resources and~/.dt/screensaver. The start time has the reference's seven steps (3/5/15/30/60/120 minutes, never) and goes to dtsession as the saver timeout. - System Settings is one window: 1022x550, minimum equal to maximum, and
every pane lives in it -- a pane taller than the window scrolls (the pages
sit in an
XmScrolledWindowwithXmAUTOMATIC) instead of growing the window (Konrad, 2026-11-21). The tab strip is one of many (XmNradioBehavior,XmNradioAlwaysOne), so a visited tab does not stay pressed. A pane's picture must exist inappconfig/icons/C; three did not (CDs & DVDs, Energy Saver, Dock) and one was used twice (Startup and Accounts). - The "already exists" question (dtfile/OverWrite.c,
create_replace_rename_dialog): one sentence ("An item named ... already
exists in this location. Do you want to replace it with the one you are
copying?"), the warning icon, and Keep Both / Stop / Replace -- no radio
box, no rename field. Replace is the default (Return), Stop the cancel
button and Escape; Keep Both keeps the generated new name. The old
callbacks and the pipe protocol to the file operation stay: the radio
toggle and the text field exist unmanaged (
G_rename_toggle,G_rename_text). The default button gets the focus (XmNinitialFocusof the button row, a tab group of its own; on the form it is ignored): in a Motif dialog Return activates the button that has the focus, not the dialog's default, and until 2026-11-15 the focus sat on the first button. A folder that exists (create_replace_merge_dialog): "A folder named ... already exists in this location. Do you want to merge the contents of the two folders?" with Stop / Merge (Merge default, Escape = Stop); the radio box is gone and so is "replace the whole folder" (a collision of names inside is asked about one by one),G_merge_toggleexists unmanaged. Measured in Xvfb with the Copy Object dialog (Cmd+C): Return and Merge ->B/ordhas both files, Escape and Stop -> unchanged,A/ordalways whole; the single-file dialog: Return ->f.txtis the copy's, Escape and Stop -> the old one stays, Keep Both -> two files. Keep Both renames the existing file (f_1.txtkeeps the old content, the copy takesf.txt): the old CDE rename-the-existing protocol; the Finder keeps the incoming copy under the new name -- not changed, the file operation would have to take a new name for the copy. The multi-collision dialog is unchanged (follow-up: "Do this for all"). - Copy progress (t0155): the child that copies a file (
FileManip.c, the read/write loop) writesPIPEMSG_PROGRESSwith done/total and the target name over the existing status pipepipe_s2m(a message per megabyte and at the end);FileOpPipeCB(FileOp.c) reads it and fills the small "Copy" window -- "Copying "NAME"", a scale the program only sets, "X MB of Y MB", Cancel -- created with the first message and popped up one second later (XtAppAddTimeOut), so a short copy shows no window. Cancel kills the child (mcdeChildPid) and unlinks the half-written target. Measured: a 4 GB copy shows the window with "129.0 MB of 4295.0 MB" while the file is written. - Host-qualified names in the type database (
lib/DtSvc/DtUtil1/Dts.c,local_path()): dtfile and the actions handhost:/path(the netfile form) toDtDtsFileToDataType; the content criteria then opened "host:/path" and every content-typed file was UNKNOWN -- a .txt showed the "??" icon and Put in Trash refused it with "data attributes: UNKNOWN" (measured 2026-11-14: the same file is TEXTFILE under its plain path and UNKNOWN underkitt:/path; a directory is FOLDER vs UNKNOWN). When the host part is this computer's name orlocalhost, the lookup now uses the path without it. Measured after: TEXTFILE/FOLDER and the text, folder and picture icons in dtfile. Trash still answers TT_ERR_NO_MATCH -- that is the ToolTalk handler of t0206, not the type. - The web browser (t0179): the desktop has one action for a web page,
McdeWeb(programs/types/datatypes.dt.src;EXEC_STRINGrunsdtsystemsettings -open-web "%Arg_1%"), and the choice of browser lives in~/.dt/defaultsasweb:(Default Programs pane).-open-webis handled before Xt is set up -- an action must not need a display -- and starts the program withexeclp, never a shell; the argument is refused when it carries a shell character. The.htmland.htmcriteria ofprograms/types/firefox.dtmap theirOpentoMcdeWeb, so a double click in dtfile follows the file's choice (measured: withweb: mcdetest-browserdtfile hands the page to that program, withweb: firefoxa Firefox window opens). Measured too: an action whoseARG_TYPEnames a data type the file does not have is refused ("Either action ... does not apply"), so McdeWeb takesARG_TYPE *and is named only by the types that may use it. - Firefox's look and keys (
dtthemesync, theFirefox()part): every profile under~/.mozilla/firefoxthat has aprefs.jsgets auser.js(browser.download.dir=~/Downloads,browser.download.folderList2, reduced motion, no cosmetic animations, no smooth scrolling, andui.key.accelKey91 -- Command is Mod4 in MCDE) and achrome/userChrome.csswritten from the palette (toolbar, tabs, arrow panels). Measured: the files appear with--toolbar-bgcolor: #c6b2a8from Default.dp. Firefox is GTK and takes no part in the desktop's global menu: dtbar shows only the M menu while it has the focus. A Firefox window's own Cmd+T/W/L was not measured (the user.js sets the accelerator; that measurement needs a person at the keyboard); thedtexplorerof the task is its own program, still to come. - The program menu's Hide / Show All (dtbar,
AppHide/AppShowAll): Hide and Hide Others send WM_CHANGE_STATEIconicStateto the clients; Show All sendsNormalStateto the client of every frame of the screen (XQueryTree+XmuClientWindow, because an iconified window is unmapped andClientWindows()skips it). Measured 2026-11-14: with two dtpads minimized (bothIsUnMapped)dtbar -command showallmakes bothIsViewable; dtwm's WM_CHANGE_STATE handler does acceptNormalState(an earlier note that it ignores it was wrong -- the test then had sent the message to the wrong window).dtbar -command showallis the key-side entry, the menu item calls the same function. - dtcmprefs (
programs/dtcmprefs): the calendar's settings window on the shared McdePrefs pattern -- General (first day of the week, week numbers, default appointment length), Accounts (a read-only note: the session's rpc.cmsd holds the appointments, a CalDAV account comes from ~/.dt/accounts.conf once the connection part exists) and Advanced (remind this many minutes before). Kept in~/.dt/dtcm.conf. dtcm's File > Options... starts it (calendarA.c,edit_cb, fork/exec, no shell) -- measured: the binary carries the name and the window runs on its own. - dtimage (
programs/dtimage): the picture viewer of the reference -- toolbar Previous/Next, Zoom -/+, Slideshow, the picture in a scrolled canvas, the folder's pictures on the right, the name, size and zoom in the status line. Pictures come from McdeThumb (PNG/JPEG/GIF/BMP/XPM); the module only shrinks, so dtimage scales itself (nearest neighbour) to make Zoom + enlarge too (measured: 320x240 at 100 %, 640x480 at 200 %). The slideshow's timer runs only while it is on. PDF is not read: the tree has no PDF renderer and the choice between mupdf (C) and poppler (C++) is Konrad's (docs/MCDE-PROGRAMS.md, section 6); a PDF says so. - dtnetutility (
programs/dtnetutility): tabs Info (name and the interfaces with their addresses, McdeSys), Lookup (getaddrinfo(3) in the program -- a name to its IPv4 and IPv6 addresses, no program run, no shell) and Netstat (the open TCP sockets, /proc/net/tcp on Linux; sysctl net.inet.tcp.pcblist on NetBSD is the follow-up). Ping, traceroute, whois and a port scan need privileges or a network a test session does not have; they are named as follow-ups in the program's comment. - dtactivity (
programs/dtactivity, t0091): the activity window. A table of the processes (PID, name, user, % CPU since the last sample, threads, real and virtual memory) that sorts by the column title you click (the header is one label of the list's fixed font, the click is mapped to a column by character width); Show (all, mine, system: uid below 1000) and a filter (name, user or pid, any case); Quit Process (asks, SIGTERM; Force Quit, SIGKILL) and Inspect (parent, user, state, memory, CPU time, command line); and under it CPU, System Memory, Disk Activity and Network with the numbers and a three-minute history graph (XFillRectangle, no animation). Everything is McdeSys:mcde_sys_processes,_cpu_times,_memory,_disk_io,_net_io,_signal-- no ps(1), no top(1). A disk that stands on another (dm-, md, NetBSD wedges dk) is not added up; the loopback is not in the Network numbers. One timer, 2 s, only while the window is mapped and not fully obscured (MapNotify/UnmapNotify, VisibilityNotify). Measured withstrace -c -f -pfor 15 s: 2349 system calls visible, 0 unmapped, 0 fully covered (an override-redirect window over the screen), 2365 when shown again; an idlesleepgives the same empty summary, a busy process does not. Quit/Force Quit measured against real processes in a PID namespace (unshare -rpf --mount-proc, which also keeps the host's processes out of screenshots): Cancel leaves a process alive, Quit ends it, a process that ignores SIGTERM survives Quit and dies of Force Quit. Not built yet: Show "with window", the global menu, Cmd+F and Cmd+1..5, the administrator's way for another user's process (t0079: it says "belongs to somebody else") and the dtappscan entry. Each tab says in a line what its colours are; the Disk and Network graphs scale to the highest stacked second. The NetBSD backends of the numbers were never run. - Device events (
mcde_sys_disk_events,lib/McdeSys/events.c): a non-blocking descriptor of the kernel's uevent socket (Linux, AF_NETLINK NETLINK_KOBJECT_UEVENT group 1) for the programs that must know when a medium comes or goes -- hand it toXtAppAddInput, read there, never poll. NetBSD's drvctl(4) DRVGETEVENT is the follow-up; the call answers MCDE_SYS_ENOTSUP there. Measured: fd 3, read returns EAGAIN when no event is queued (test_sysinfo prints it). - dtconsole (
programs/dtconsole): the log viewer -- the session's own (~/.dt/errorlog,~/.dt/startlog) and the files under/var/logon the left, the tail of the chosen one on the right, a filter field, Reload and a line count. Values come from McdeSys (mcde_sys_logs,mcde_sys_log_tail); a log the user may not read is listed as such (boot.log (not readable), measured). A selected log is watched withmcde_sys_log_watch(inotify on Linux) andXtAppAddInput-- the view follows the file without a timer (measured: an appended line appears and the count grows while dtconsole runs). NetBSD's kqueue branch is the follow-up. A new program is wired in three places: its directory with a Makefile.am,programs/Makefile.am's SUBDIRS andconfigure.ac's AC_CONFIG_FILES (the build regenerates configure and config.status by itself, measured). - Backup pane (
dtsystemsettings/backup.c): the reference's shape -- a big OFF/ON switch (its label is the state), the backup disk with "Available: X of Y" (statvfs on the disk's mount point from mcde_sys_disks), the last backup and its result, Oldest/Latest backup from mcde_sys_backup_archives, Back Up Now, Restore, the retention sentence and the keep sliders with the free-space limit. Without a configured disk the lines say so ("no disk is set up") -- measured on the build host, where backup is root work. - Startup Disk: not a pane any more (Konrad, 2026-11-21). The volumes
from mcde_sys_disks, the one the system started from and its device are in
System Information;
dtsystemsettings/startupdisk.cis no longer built. Writing another startup volume's boot loader configuration (grub on Linux, boot.cfg on NetBSD) was its follow-up and stays one. - System Information:
dtsystemsettings/sysinfo.c-- the sections Hardware, Network and Software in a list on the left, the values on the right from McdeSys (mcde_sys_info: model, processor, memory, startup disk, system, kernel;mcde_sys_interfacesand the host name). "Refresh" reads again; nothing runs a program for a value. - Default programs:
dtsystemsettings/defaults.c-- web browser, mail, images, video and text, each a menu of the programs that are on this computer ($PATH; "(none on this computer)" otherwise), and how a link from another program arrives (a new window or a tab). Kept in~/.dt/defaultsas "key: value" (web, mail, image, video, text, web-open: window|tab); the actions of programs/types read it. The default-program file is the one the mailto:/web follow-ups use too. - Internet accounts:
dtsystemsettings/internet.c-- the user's own services (CalDAV, CardDAV, IMAP, Files) in~/.dt/accounts.conf(count=N,N.name,N.service,N.server,N.user); "Add..." opens a sheet with name, service, server and user, "Remove" takes one away. The programs that use an account (dtcalendar, dtcontacts, dtmail) read it there; the account never goes into a command line or a shell. No store and no third-party address book. - Energy Saver:
dtsystemsettings/energy.c-- computer sleep, display sleep and the hard disks, each a menu (Never, 1, 5, 10, 15, 30, 60 minutes). Display sleep is dtsession's saver time (_DtSetSmState, SM_STATE_SAVERTIMEOUT) -- the same setting as the Desktop & Screen Saver page; computer and disk sleep are kept in~/.dt/energy.confand need the operating system (root; NetBSD: the powerd/atactl part, follow-up task). A schedule and the DPMS timeouts are the same follow-up: Xvfb has no DPMS extension (measured with xset). Pass a gadget (a menu item) toXtDisplayOfObject, notXtDisplay: XtDisplay on a gadget segfaults (measured in this pane). - CDs & DVDs:
dtsystemsettings/cds.c-- five lines (blank CD, blank DVD, music CD, picture CD, video DVD), each with a menu "Ask what to do", "Ignore" or "Open "; the valuesask,ignore,action:NAMEare kept in~/.dt/media.conf(English keys: blank-cd, blank-dvd, audio-cd, picture-cd, video-dvd), the file the medium-insert path of t0083 reads. No "run a script" entry: a file name never goes into a shell. - Parental Controls:
dtsystemsettings/parental.cedits~/.dt/parental.conf(LOGIN.only,LOGIN.allow,LOGIN.day,LOGIN.weekend); the launcher enforces it, because dtlaunch is where a program is started: the program list shows only the allowed names, a start outside the hours or of a disallowed program is refused with a sentence in the window, and every start is appended to~/.dt/parental.log(the Log tab reads it). A state given to a toggle or radio before its page is laid out does not paint in this pane (measured); the list's selection does. System-wide enforcement (execute permission outside the list, ending a session when the hours are over in dtsession, and the child's own file under root) is the follow-up -- the desktop's part is the launcher. - The desktop:
WmMcdeDesktop.cdraws the icons of the desktop in the style of IRIX 4Dwm (4DWm app-defaults: iconDecoration "label image", iconClick false, iconPlacementMargin 10), in the top right corner and filled from the top down, then the next column to the left. The pictures are the Foundation icons at 64x64 (programs/icons/Irix*.m.pm, rastered bytools/fti2xpm.pyfrom the .fti sources; the size is its third argument), and a medium picks its own by file system: cd9660 the CD, udf the DVD, msdos the diskette, tar/dump the tape, anything else the disk. A window's label is drawn on the backdrop with a shadow, not into a tile: the icon window is shaped (XShapeCombineMask) to the picture and the text. The icons are mapped and lowered -- an override-redirect window is not restacked by the window manager, soXMapRaisedused to put them above every client; now a raised window, a full screen one included, covers them, as 4Dwm's desktop does. The order is the computer itself ("/", the only system volume that is shown), the disk mounts, the removable media (a stick, a CD or a DVD -- also when it is not mounted), the network mounts (NFS, SMB, AFP, sshfs) and the person's files and folders from~/.dt/Desktopand~/Desktop. Each icon has a window of its own (override-redirect), an XPM glyph fromprograms/iconsand a one-line label cut with "..." when it is too long. A double click opens the place withdtfile; a medium that is not mounted is mounted first (mcde_sys_disk_mount). A right click opens a menu of its own -- Open, Open Home (the computer), Show on All Workspaces, Show on This Workspace Only, Unmount, Move to Trash (a user icon). The icon can be dragged; its place and its workspace are kept in~/.dt/desktop.confand a stick or a disk that comes back appears where it was left (the places are never forgotten).McdeDesktopWorkspaceChanged()(WmWrkspace.c) maps the icons of the workspace; all icons are on all workspaces until the menu says otherwise. A volume plugged in later shows through the kernel's device events (mcde_sys_disk_events, 500 ms gathered); NetBSD has no drvctl branch yet (t0272), there a slow timer and a workspace change rebuild the list. A device removed while a partition of it was still mounted gets the reference's one-button "Disk Not Ejected" warning (Motif error dialog, the Warning sound;mcde_sys_disk_detachedcopies the stale mountpoint and unmounts it the forced way, lazy on Linux,-fon NetBSD).MCDE_DESK_DEBUG=1prints what it found (the shot harness passes the variable, andMCDE_DESK_TEST_MOUNTS/_DISKS/_DESKTOPfill a test list without real mounts;MCDE_DESK_TEST_DEVICEhands the desktop one event line, the path a test or a screenshot takes without a kernel). McdeSys had no list of network mounts before:mcde_sys_mounts()(mount.c,/proc/mountson Linux,getmntinfoon NetBSD) names every mount and marks the network file systems; the desktop takes the local volumes frommcde_sys_disks(labels) and the network ones from there. - The bar is no focus target (
_MCDE_NO_FOCUS): moving the pointer from a program to the bar used to take the keyboard away from that program -- dtbar set the input focus to PointerRoot on EnterNotify and dtwm cleared the active client -- so the bar showed the M menu and a click could not act on the program (t0255, t0257). dtbar sets_MCDE_NO_FOCUSon its window and leaves the focus alone; dtwm's focus-follows-pointer path skips such a client, so the program keeps the keyboard, its menu stays in the bar, and an item acts on the client the menu came from (the ClientMessage goes to that window, not to whoever has the X focus). - The bar's right end: a person cascade (
McdeUser) whose first line is the login name from the passwd entry -- a session started with an empty environment has no USER (measured: the menu said "user") -- then Accounts and Log Out; and a magnifier cascade (McdeSearch) with "Launcher (Command+space)" (dtlaunch -show) and the settings. Both must be cascades: the status area is a homogeneous menu bar and refuses any other child ("Attempt to add wrong child type", measured). - The launcher finds settings (t0185, first part):
dtsystemsettings -list-panesprints the panes (ID<TAB>name<TAB>category<TAB>keywords, a pane that is only named,PANE_LATER, left out; no display needed, measured 24 lines with DISPLAY unset), dtlaunch asks for them once, by pipe and exec (SIGCHLD is ignored there, so no waitpid -- it would wait for every program the launcher ever started; a 3 s poll limit stops a stuck child), andmodel.c(mx_panes_parse,mx_pane_match,test_panes) turns the text into results: the name at full score, a keyword at half, the ID checked (letters, digits, - and _) because it ends up indtsystemsettings -pane ID, started with the same Parental Controls as a program. A result reads[settings] Displays (Hardware).dtlaunch -text STRINGfills the field of the first opening (tests,tools/mcde-shot.sh). Measured: typingdisplists the pane second (docs/screenshots/leopard/Spotlight-mcde.png); Return ondisplaysstartsdtsystemsettings -pane displaysand its window "Displays" appears. The clipboard history is told, it does not ask (t0080):XFixesSelectSelectionInputon CLIPBOARD (XFixesSetSelectionOwnerNotifyMask), the new owner is read once when the event arrives.configure.acchecks libXfixes and gives only dtlaunchXFIXESLIBandXFIXES_CPPFLAGS(-DHAVE_XFIXES) -- not a define inconfig.h, which would recompile the whole tree. Without the library or the extension the owner is asked every 5 s (POLL_MS). Measured withstrace(writes to the X socket, 10 s idle after a 4 s start): 10 with the 1 s poll, 0 with XFixes, 2 (at 5.0 s and 10.0 s) in the fallback (the fallback tested with an LD_PRELOAD shim that makesXFixesQueryExtensionfail: an Xvfb started with-extension XFIXESaborts as soon as any Motif client connects,privates.h: dixGetPrivateAddr: Assertion key->initialized, also for an unmodified dtpad, so it cannot serve for this). Both paths still catch a copy (xclipwhile the launcher idles, thendtlaunch -show: the history shows it). The history is opt-in (Dtlaunch*clipboardHistory, default False; System Settings > Keyboard & Mouse > Shortcuts writes it and restarts the launcher): off, nothing is asked of the clipboard's owner (0 requests measured) and the hint line drops "the clipboard". On, a new text is kept only if its owner does not offerx-kde-passwordManagerHintas "secret" (docs/reference/clipboard-password-hint.txt). The recipe hasx11/libXfixes/buildlink3.mkfor it -- not yet through a real cross build. Not done yet: the two-column list grouped by category, documents/mail/PDF/web results, and the magnifier button in dtbar with-at X,Y. - dttoolbox is told, it does not poll (t0080): the menu the desktop
publishes (
_SGI_MENU_Selectedon the window that the root property_SGI__MENU_WINDOWnames) was read every 500 ms with two atom lookups and two property reads; nowmainlooks at PropertyNotify itself (Xt routes no event for a foreign window to a widget -- dtlaunch's loop does the same) and asks for the menu window's property events before it reads the text. Idle writes to the X socket in 10 s (strace): 20 before, 0 after. A change shows at once (0.01 s after start, 3.001 s and 7.001 s for the changes made at those times; the poll needed up to 500 ms). A rebuild while the menu is open is deferred; the text is then forgotten and one timer (1 s) retries, only while that waits -- the old code recorded the text as seen and never built it. A crash that was there before: the third change of a menu with children died inXtDestroyWidget(SIGSEGV, measured) because the loop walked the parent's ownXmNchildrenarray while each destroy shortened it; the list is copied first now. Not exercised: the deferred-rebuild path (it needs an open menu). - The process list (
mcde_sys_processes, t0091 first part; dtactivity is not written yet): pid, parent, owner (name or number), command name, state (R S D T Z I ?), threads, real and virtual memory in bytes, CPU time in ms. NetBSD: sysctlKERN_PROC2asked as libkvm'skvm_getproc2asks (size first, then the buffer by count,ENOMEM-> again), the CPU time fromp_rtime_*as ps(1) does, the state fromp_realstatand the LWP'sp_stat-- compiled against the NetBSD sysroot with the cross compiler (x86_64--netbsd-gcc -Wall -Wextra, all of netbsd.c, exit 0), never run on NetBSD. Linux:/proc/PID/stat, read after the LAST)(a name may hold spaces and brackets;test_processesstarts a child nameda b)c), memory fromstatm.stat's own rss is not used: on kernel 7.1 it is larger than VmRSS/statm (126 of 632 processes more than 10 % off; the same numberspsshows come fromstatm). Measured againstps -eofor every process in both lists: 631 compared, parent, owner, threads, RSS, state and CPU time all agree (avszdiffers for a process that grew between the two reads).test_processeschecks this process, init, a zombie until it is waited for, a sleeping child, SIGSTOP showing as T and SIGCONT back. - Printers:
dtsystemsettings/printers.clists the CUPS queues (mcde_sys_printers: lpstat -p/-d, parsed), shows the chosen one (state, location, model, default, shared), and adds one from what mDNS finds (mcde_sys_printers_discovered:avahi-browse -rtp _ipp._tcp, names unescaped -- avahi writes \032 as DECIMAL) with the driverless model (lpadmin -p NAME -E -v URI -m everywhere). Adding, removing and setting the default run in the terminal of su(1) (dtsystemsettings -add-printer NAME URI,-remove-printer,-set-default-printer), as the other root actions do; as a user McdeSys answers MCDE_SYS_EPERM. The queues of CDE itself stay reachable withdtprintinfo -all("Print Queue... in the pane). Test page printing, the fax/Bluetooth/AppleTalk printers of the reference, and the NetBSD CUPS path are follow-ups. - libcups, measured 2026-11-14: the task for t0143 asked for libcups
instead of command lines, but on the build host
cupsGetDests2()returns 0x2 and leavesnum_destsuntouched -- through dlopen and linked directly -- while_cupsGetDests()answers no queues andlpstat -plists the two the desktop has. So McdeSys calls lpstat(1)/lpadmin(8) with fixed arguments (the output is parsed, never executed) until a host with a working libcups and its headers builds the library path. - Security:
dtsystemsettings/security.c, three tabs. "Require password to wake ..." is dtsession's lock time (_DtSetSmStatewithSM_STATE_LOCKTIMEOUT, the same field the Screen Saver page shows); with the lock at the saver's time dtsession locks the screen when the saver starts. Automatic login and a log-out after inactivity are shown as what the desktop can do today (dtlogin always asks; dtsession has no idle logout). Swap encryption, cgd volumes and the npf state come from McdeSys (mcde_sys_swap_encrypt_get/_set,mcde_sys_cgd_volumes,mcde_sys_firewall_get); the NetBSD backend isnetbsd.c, on another system the functions say so (MCDE_SYS_ENOTSUP) and the pane shows it. Writing npf rules and changing a cgd passphrase are follow-ups. - Motif row columns in a pane: a
xmRowColumnWidgetClasscreated inside the pane area (a vertical row column) takes the other orientation unlessXmNorientationis given; withXmPACK_TIGHTa child added later goes into the next column, and a page managed for the first time after its widgets were built keeps a height of one line. The Security pane therefore builds its page fresh on a tab change inside aXmPACK_COLUMNcontainer (measured 2026-11-14, several dead ends). - Sound: the pane is
dtsystemsettings/sound.c, three tabs (Sound Effects, Output, Input). The effects are the events of the session's theme (McdeSoundEventName, a click sendsMcdeSoundEvent), the theme is a menu of the directories next to the current one. Three themes are inshare/sounds/themes/:Camouflage(the reference's event names, MCDE's own short tones),Base(the lower voice) andIRIX(the old IRIX 6.5 sounds from~/tmp/irix_extract/assets/desktop-sounds/sounds-events, 20 events).MCDE_SOUND_THEME=...chooses one without a session (tests;mcdesoundd -selftestchecks the events and files). The session's own two tones: the daemon playsStartonce it owns the selection (dtsession starts it at login) andEndin the X I/O error handler -- at logout dtlogin resets the server and the player it forks outlives the daemon (t0043). Output has the volume, Mute and "Show the volume in the bar" (~/.dt/bar,showvolume=, read by dtbar at start -- unmanaged, the speaker is gone). Input is a note: McdeSys has no capture API and no sound-device list yet. - Program settings window (
lib/DtWidget/McdePrefs.c,include/Dt/ McdePrefs.h): the reference's shape for every program -- a row of icon tabs (appconfig/icons/C, the active one pressed), the page under them, no OK/Cancel; a change goes to the program at once and is kept in~/.dt/<prog>.conf(KEY=VALUE, the last tab aslasttab=; the store without X isMcdePrefsConf.c, tested bytest_prefs). The page is a verticalXmPACK_COLUMNrow column of rows;McdePrefsRowBegin(form, label)returns the row, the caller builds its widget with the row as parent and callsMcdePrefsRowEnd(row, child)(a widget cannot be reparented, so a row cannot take a widget made elsewhere). The window takes the size of the page on a tab change (the children are measured, not the page's request: measured 2026-11-14) and its title is the page's name. dtpad was the first user, dtmail the second (Options/dtmail -prefs: General and Viewing). Tab clicks find their window by walking up the widget chain to a shell whoseXmNuserDatais aPrefs-- anXtParent(XtParent(w))lookup is not enough (measured: the tabs did nothing). - dtmail's settings:
dtmail/McdeMailPrefs.C, opened bydtmail -prefs(the argument is taken out before Xt sees it;RoamApp::initializereturns after building the window, so no mailbox and no ToolTalk are needed). It writes~/.dt/dtmail.conf:mailreader(the label, e.g. Thunderbird),checkinterval,newmailsound(an event of the theme, played on the click),othersounds,frontpanelcount,downloads,removedownloads,searchtrash,searchjunk,headers,sort,preview. The CDE Options dialog (OptCmd.C) stays for the retrieval details; wiring these keys into dtmail's own option system, the rest of the reference's pages (Accounts, Signatures, Rules) and the~/.dt/defaultsfile for a mailto: reader are follow-ups. - Strip view (
dtfile/Strip.c, Command+4): the reference's Cover Flow without compositing -- the chosen picture large in the middle, three neighbours flat each side (the type's picture when a file is no picture), the name and kind under it, and the folder's list below in the same form. Pictures come fromMcdeThumb(the~/.dt/thumbscache; only the visible entries are asked for), the arrows walk the strip and the list follows, Space is the preview. Command+5 is the small-icon view now. The old "Small" key moved;docs/reference/shortcuts.txtsays so. - Network in the column view:
~/Networklists the hosts DNS-SD finds (mcde_sys_net_browse) instead of files; a host is a column of its NFS exports and SMB shares (mcde_sys_net_shares), and a share chosen is mounted on~/Network/HOST/NAMEand opened. The mount needs root; as a user it says why in a message. The sidebar's eject buttons and a "Computer > Network" root are not built. Every mount from dtfile goes through_McdeNetMount(NetView.c): a McdeSys job (mcde_sys_net_mount_start; the answer comes through a pipe, because dtfile ignores SIGCHLD), a modal "Connecting ..." dialog with Cancel, and the resourceDtfile*connectTimeout(20 s); a dead server no longer freezes the window (tasksd t0080, measured: the tool and the dialog are gone after the time-out and after Cancel). A mount in an Xt callback is nevermcde_sys_net_mount. A password goes through the tool's standard input, never argv (it shows in ps(1)): sshfs gets-o password_stdin; for AFP the address saysafp://user:-@host/voland mount_afp asksgetpass(3)(afpfs-ngfuse/client.c, password "-"), which reads the standard input when there is no controlling terminal (NetBSDgetpass.c:106-112) -- the job runner is a session of its own (setsid), also when the caller has a terminal. Measured with a fake mount_afp: ps during a mount showedafp://alice:TopSecret-42@nas.local/Volumebefore,afp://alice:-@...after; under a pty the old code kept the terminal, the new one has none; a password with:,@and/works (it was refused).mcde_sys_net_mountis_startplus waiting, so it detaches the same way. - Disk Utility: the toolbar carries Mount, Unmount, Eject, Verify,
Info, Log, Refresh and Unlock; the detail block under the list shows
device, mount point, format, capacity, available and used from
mcde_sys_disks. "Eject" unmounts (McdeSys has no eject ioctl yet), and the RAID and Restore tabs say what is not built (RAIDframe/ccd, dump/dd copies); "Show details" opens and closes the First Aid report. - Displays menu: the bar's status area has one; it lists the monitors
from
McdeDispLoadand the modes of the first (the current one marked), "Detect Displays" re-reads RandR and runsdtsystemsettings -apply-displays, and "Displays Preferences..." opens the pane. A mode chosen is applied and asked about for 15 seconds, then put back (displays.cdoes the same). It reads only when the menu opens: no RandR timer. - Look settings: System Settings > Appearance writes what the session
reads --
*<screen>*ColorPaletteand*highlightColor/*selectColor(through_DtAddToResource, so programs started later use them),~/.dt/recent.conf(applications|documents|servers=N, read by dtbar's Recent Items and Connect to Server), and for font smoothing fontconfig's~/.config/fontconfig/conf.d/60-mcde-antialias.conf(anantialias=falserule; Xft ignores theXft.antialiasX resource here -- measured 2026-11-14, so the file is what reaches every toolkit). - Root actions (accounts, network, sharing, time zone, update) run in a
terminal after
su, viadtsystemsettings -<action>; backup is the exception:dtbackup runfrom root's crontab, passphrase in/etc/mcde-backup.pass(0600). - Reference documents for the system layer:
docs/reference/(borg, netconfig, wifi, sharing, battery, desktop-entry, cde-colorsets, frontpanel, motif-png).
Hazards -- never on the development host or the test VM
- Power items of dtbar (Restart, Shut Down) tested to the end; the system may let the user do it.
- Network Apply or Wi-Fi join over the ssh card; switching SSH in the VM (ssh is the way in); any join of Wi-Fi on the development host.
- Erase, mount or repair in dtdiskutility.
- Sound tests against the real PulseAudio: use a private one (null sink, own socket).
- Xvfb loses its keymap and properties when its last client leaves: keep one
(
xprop -root -spy). XTest drags need-xrm "Dtwm*freezeOnConfig: False".
Building it
Building is cross and native, never in a VM (since 2026-11-13); the VM only tests installs.
- The recipe is
ext/src/mcde/pkgsrc(andpkgsrc-motif); the archive anddistinfocome fromtools/mcde-dist.sh(git archiveof a commit, so after a change: commit, thentools/mcde-dist.sh, then build). The set is made bymake userland(rootAGENTS.md). - On the Linux host, for development:
make mcde-linux(tools/mcde-linux.sh;MCDE_DIRS=programs/dtfilefor one directory,MCDE_DIRS=installintobuild/mcde-root/dt), andmake mcde-host(tools/mcde-host.sh, the desktop in/usr/mdt). - Every file MCDE installs is a line in
pkgsrc/PLIST, in the same change that adds the file (a program, an icon, a header, a config file): pkgsrc's check stopsmake userlandat the first one that is missing, after hours of build (14.11.: McdeLock.pm, Thumb.h, 0010.language, DtScrn.t.pm,build/logs/userland-2026-11-14n.log:26326). The line is sorted asLC_ALL=C sortsorts; the files of an option go with${PLIST.docs}or${PLIST.appbuilder}. Check before you commit:make mcde-linux MCDE_DIRS=plist(tools/mcde-plist-check.sh) installs the native build into a temporary directory and names every file underdt/that no PLIST lists, in seconds -- aftermake mcde-linux MCDE_DIRS=install. Measured against the history: with the PLIST from beforefe8abbd1bbit names exactly the six files that commit added. It excludes, with the reasons in its header, the documentation (-docs), the files the recipe moves toshare/doc, and reads the Motif PLIST as if it were underdt/. A file that should not be installed at all is a bug of itsMakefile.am, not a PLIST line;tools/mcde-plist.sh LOGadds what a failed build reported. - The C dialect is set by
configure.ac(-std=gnu11and five GCC 14 downgrades;MCDE_DIALECT_CFLAGSfor a build that ignores CFLAGS); no build system needs to know it. - Tests:
make check(test_sysinfo,test_menumodel,test_displays,test_items,test_panes,test_profiles). A test program ischeck_PROGRAMS; one thattools/mcde-tests.shruns from the native build isnoinst_PROGRAMSonlyif !MCDE_CROSS(configure.ac): in the cross build for the package it is a target binary nothing runs, andtools/check-buildtools.shstopsmake userlandon it (2026-11-17).
What may be changed, and how
- Anything; it is ours. Keep the licence headers (LGPL,
COPYING): the "CDE - Common Desktop Environment" lines are attribution, not branding. - Branding is what a user sees: names in dialogs,
DtVERSION_STRING("MCDE x.y.z (CDE 2.5.3)"), logos.DtVERSION,DtREVISION,DtUPDATE_LEVELstay at 2.5.3: they are the API level programs test against. - Not yet: the install prefix (
${PREFIX}/dt) and the tarnamecde(from it comeshare/cdeandetc/cde); they move together with the PLIST. - An update of the CDE upstream is a merge,
IMPORTrenewed (ext/AGENTS.md).
What must not be touched
- The first commit (upstream archive unchanged); the API level above.
- The rules above: an
#ifdefper OS in a program, a GTK/Qt dependency, or a direct call of a system tool outsidelib/McdeSysis a finding, not a patch. - pkgsrc itself: a recipe problem is fixed in
ext/src/mcde/pkgsrc, not in the rootpkgsrc/.