7 Commits
Author SHA1 Message Date
lotherk 306f747041 dttoolbox: the IRIX toolchest menus, mapped to the MCDE programs (t0298)
system.chestrc now has the reference's menu tree instead of the five short
menus: ToolChest (Desktop, Selected, Internet, Find, System, Help), Desktop
(Access Files, Shared Resources, Customize, Control Audio, Empty Dumpster,
Eject Media, Start ScreenSaver, Open Unix Shell, Log Out), Access Files
(home, network, another user, remote login), Shared Resources, Customize
(Windows, Desktop, Sounds, Background, Color Schemes, Screen Saver, Mouse,
Keyboard, Accessibility, Language), Internet (browser, accounts, network,
remote login), Find (files, quick find, host quick find, info search, icon
catalog), System (manager, processes, filesystems, printers, software,
displays, date, information, Utilities: xhost and console, restart/shut
down through dtbar's one question) and Help.

Every action is a program this tree has: dtsystemsettings -pane for the
settings, dtfile for files and ~/Network, dtaction for ExitSession,
DtEmptyTrash and StartDtscreen*, dtactivity, dtdiskutility, dtprintinfo,
dtinfo, dticon, dtconsole, dtremotelogin, dtbar -command power.  Entries
without a counterpart (Extra Desks -- the workspace switch is dtwm's and F8
the overview, no command; License Manager; Demos; Restart Window Manager)
are left out and named in a comment at their place rather than starting
nothing.

The parser's TakeCommand stopped at the \" of an argument: a chestrc line
f.exec "dtfile -dir \"$HOME\"" gave "dtfile -dir \".  It now reads the
escaped quote as part of the command.

Measured (Xvfb :77, build/mcde-root/dt): the log says "dttoolbox: 11 menus
from .../share/toolchest/system.chestrc" (no menu left unread), the
screenshots show the opened Desktop, Access Files, System, Utilities and
Help menus (/tmp/opencode/dtchest-*.png), and a click on Access Files > In
my Home Directory runs "dttoolbox: dtfile -dir "$HOME"" (stderr; dtfile is
not in this test shell's PATH).  make mcde-linux MCDE_DIRS="install
programs/dttoolbox" exit=0; MCDE_DIRS=plist "mcde-plist-check: ok".

docs/MCDE-PROGRAMS.md: the T1 status says 11 menus, the mapped entries and
the quote fix; T2/T3/include and -horizontal/-icon stay open.
2026-11-16 13:18:50 +00:00
lotherk 121fab6753 MCDE dttoolbox: a message catalog, German measured (t0282)
dttoolbox's own texts come from programs/dttoolbox/dttoolbox.msg (set 1, 2
messages: the "ToolChest" window title and the "No ToolChest menu" label of
the empty chest), the German copy in programs/localized/de_DE.UTF-8/msg/
dttoolbox.msg, built by msg.C.am, listed in the PLIST (C plain,
${PLIST.nls} for German).  Like dtlaunch it calls catopen/catgets itself and
setlocale before its first message.  The menu labels come from the person's
chestrc (~/.chestrc or the installed one), which is their file and stays as
written.

Measured on Xvfb (1280x800, fresh HOME, ttsession + dtwm, DTTB_CHESTRC on a
missing file so the empty chest shows): de_DE.UTF-8 via localedef/LOCPATH
gives "Werkzeugkiste" and "Kein ToolChest-Menü" (/tmp/opencode/dtb-de.png),
LANG=C "ToolChest" and "No ToolChest menu" (/tmp/opencode/dtb-c.png).
make mcde-linux MCDE_DIRS="install programs/dttoolbox" and
"install programs/localized/C/msg" exit=0; MCDE_DIRS=plist: "3484 installed
names under dt/, 8676 in the PLISTs", ok.
2026-11-16 10:10:21 +00:00
lotherkandClaude Sonnet 5.5 1ea27d7b8d MCDE dttoolbox: told of the published menu, not polling every 500 ms; the rebuild no longer crashes (t0080)
The menu the desktop publishes (_SGI_MENU_Selected on the window named by the
root property _SGI__MENU_WINDOW) was read on a 500 ms timer, two atom lookups and
two property reads each time.  main now looks at PropertyNotify itself (Xt
routes no event for a foreign window to a widget; dtlaunch's loop does the
same) and selects the menu window's property events before reading the text.

Measured: idle writes to the X socket in 10 s (strace) 20 before, 0 after; the
publisher scenario (2, 3, then 1 entries) is reported at 0.01 s, 3.001 s and
7.001 s.

Two defects of the old code, found by the control run: (1) the third change of
a menu with children died with SIGSEGV in XtDestroyWidget -- the loop walked the
parent's own XmNchildren array while every destroy shortened it; the list is
copied first.  (2) A rebuild deferred because the menu was open recorded the
text as seen and never built it; the text is forgotten now and one 1 s timer
retries, only while that waits.  The deferred path is not exercised by the
harness.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 23:08:18 +00:00
lotherkandClaude Sonnet 5.5 d53ea094e7 licence: CNCL for what Makronix wrote itself
LICENSE at the root; the 103 files new in ext/src/mcde (none was in the CDE
import) carry the CNCL line instead of the LGPL notice.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 11:48:02 +00:00
lotherkandClaude Opus 5.5 9fd4818051 MCDE: the review's open points -- sound through McdeSys, dtwm plug and play, the rest
From the review of 2026-11-12's commits (the points left open in
1b524eb94):

Sound behind McdeSys (ext/src/mcde/AGENTS.md, philosophy 3): libMcdeSound
named /usr/bin/paplay, aplay, /usr/pkg/bin/audioplay and ffplay itself and
waited for the player, so mcdesoundd heard nothing while a sound played.
mcde_sys_sound_play (sound.c) takes paplay where a PulseAudio server
answers, else the backend's player (mcde_sys_player: audioplay(1) on
NetBSD, aplay(1) on Linux), started in a grandchild: no wait, no zombie.
Measured against a private PulseAudio with a null sink: OpenFolder and
TerminalBell sent back to back play at the same time (pactl list short
sink-inputs: two streams), mcdesoundd -selftest PASS, a second mcdesoundd
says "a server runs already".  The /usr/pkg/dt fallbacks of Sound.c and
dtphoto.c are gone (CDE_INSTALLATION_TOP is the prefix);
McdeSoundFile's dead buffer is gone; mcdesoundd ends the 20 bytes of a
message itself; Sound.h is installed (include/Makefile.am, PLIST).

Linking: LIBMCDESOUND and LIBTERM carry the libraries below them
(configure.ac).  Debian's libtool hands no indirect library to the
linker, which then took the installed, older libMcdeSys through
libMcdeSound's RUNPATH and failed (dtterm: undefined
mcde_sys_sound_play).

dtwm plug and play (WmMcdeDisplays.c, written 2026-11-11, uncommitted and
not compiling): the ClientData fields it uses, McdeHeadsChanged (Xinerama's
list read anew, its XineramaQueryScreens memory given back with XFree),
McdePanelMonitorsChanged (the panel centres on the main display), the
RandR events taken in WmMain.c's loop, McdeDisplaysInit after the EWMH
setup, the file in Makefile.am.  Measured on Xvfb: dtwm starts with it,
the check at login leaves the outputs as they were (xrandr before and
after: screen connected 1024x700+0+0), dtwm runs on.  Plugging itself was
not measured: Xvfb cannot change its outputs, and Xorg's dummy driver
refuses a user who is not at the console.

Smaller: dttoolbox ignores SIGCHLD from the start (set after the first
fork it missed the first child) and lost its test hook
/tmp/dttoolbox-no-home; dtfile plays OpenFolder once per folder
(FileMgr.c), not twice; dtpaint's unused variable; dttoolbox frees
XGetAtomName's string without a cast-away const.  AGENTS.md describes
McdeSound, mcdesoundd, dtphoto, dtpaint, dttoolbox and the plug and play;
the WAV tones' maker was not kept, which it says.  The two stale citations
(53b852bb2, 945da0f4c) are corrected in git notes.

Built with make mcde-host, exit 0 (build/logs/mcde-host-2026-11-13q.log).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 06:41:53 +00:00
lotherkandClaude Opus 5.5 0e81935ea0 MCDE: the bar after dtsession, its menus only for the focused program, a Network pane
Konrad, 2026-11-13: "panel fehlt, top leiste is lila", the network settings
"zu rudimentaer, keine ip config, kein dns", the global menu only while a
program that has one is in front.

The bar (and the launcher, the drop-down terminal, the login items) came
from Xsession.d, before dtsession had loaded the session's resources and
the colour server: dtbar took *background from ~/.Xdefaults (#6e1e7d, the
user's base16 theme; dtbar PID 1270788 started before dtsession 1270795).
Restarting dtbar in the running session gave the palette's colours.  Now
dtsession runs sys.sessionetc -- the first of CDE_CONFIGURATION_TOP/config
and CDE_INSTALLATION_TOP/config, as sys.session is found -- before the
user's sessionetc (SmRestore.c, StartEtc); it sources config/sessionetc.d,
where 0080.dtlaunch, 0085.dtdropdown, 0090.dtbar and 0095.loginitems moved.
The bar takes colour set 5, the programs' background, not set 6 of a menu
bar (Dtbar*secondaryColorSetId: 5; measured #c6b2a8 with Default.dp).

dtwm publishes the focused client as _NET_ACTIVE_WINDOW (EWMH, WmEwmh.c
SetNetActiveWindow from SetKeyboardFocus and where the focus is dropped);
dtbar shows a program's menus only while the active window is the menus'
owner, a dialog of it (WM_TRANSIENT_FOR) or a window of the same program
(WM_CLIENT_LEADER).  Measured on Xvfb with dtwm, dtbar, dtpad and xterm,
clicking: dtpad -> its menus, xterm -> M only, dtpad -> its menus again.

Network (dtsystemsettings/network.c, docs/reference/netconfig.txt): Show:
Network Status (a light and a sentence per card, Configure...) or one card
with the tabs TCP/IP (Using DHCP, with manual address, Manually, Off;
address, mask, router, DHCP client ID, Renew DHCP Lease; IPv6), DNS
(servers, search domains, what resolv.conf has now), Wi-Fi and Ethernet;
the lock and Apply Now as Accounts.  McdeSys mcde_sys_net_config,
_configure, _renew (replacing mcde_sys_net_dhcp, which was declared and
implemented nowhere): NetBSD one block per interface in dhcpcd.conf, as
ifconfig.if(5) recommends, sysinst's static address in ifconfig.IF read and
moved there, applied with dhcpcd -n IF (cross-compiled with the tree's
x86_64--netbsd-gcc, not run); Linux the NetworkManager profile (nmcli).
mcde_sys_interfaces took the last IPv4 address (the secondary one), now the
first.  Measured on this host, read only: the pane shows the three cards,
172.20.10.2/28 by DHCP, router 172.20.10.1, DNS 1.1.1.1, MAC, MTU 1500;
test_sysinfo (new checks: settings read, 300.1.2.3 refused) exit 0.
Nothing was applied on the development host.

From the review of 2026-11-12's commits: libDtTerm links libMcdeSound
(977a7347c made the bell call McdeSoundEvent; dtcodegen did not link); the
PLIST lacked dtphoto, dtpaint, dttoolbox, mcdesoundd, libMcdeSound, their
data and the sound themes (51 entries, from the installed tree); mcdesoundd
was started by nothing (sessionetc.d/0075.mcdesoundd) and took the
selection from a running server; dttoolbox kept only the first line of the
Selected menu and rebuilt it every 500 ms, and NewMenu returned an
uninitialised pointer past 64 menus.

Built and installed with make mcde-host MCDE_DIRS=install, exit 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 06:26:21 +00:00
lotherk a0ce4e5d47 dttoolbox T1: the chest, its chestrc parser, the dynamic Selected menu
A Motif window with the reference's five menus (Desktop, Selected, Find,
System, Help) read from share/toolchest/system.chestrc -- the grammar
subset Menu/f.menu/f.exec/f.checkexec.sh/f.separator/dynamic.  It owns
_SGI_TOOLCHEST_WINDOW, answers _SGI_TOOLCHEST_CONFIG, and polls the
desktop's _SGI__MENU_WINDOW rendezvous for _SGI_MENU_Selected, rebuilding
the Selected menu when the text changes (the property read asks for
AnyPropertyType: a CARDINAL window id is what xprop writes).

Measured: make mcde-linux exit=0; screenshot build/mcde-shots/dttoolbox.png;
with the property set by xprop the log says 'menu Selected published
(3 entries)'.
2026-11-12 11:08:58 +00:00