Konrad, 2026-11-15: "wenn keep in dock angewaehlt, muss das icon nach links
wandern"; icons drag & drop; the print widget back on the right; the
programs not in the dock in a separate area; the panel's terminal is xterm.
- The dock part (WmMcdePanel.c) is two halves now: the kept programs left,
a vertical separator, the running programs that are not in the dock
right. A running icon dragged out to the left (or onto the kept half)
is kept and moves to the left; a kept icon dragged out to the right (or
onto the running half) is removed and moves back.
- The dump separator is an XmSeparator widget, not a gadget: Motif's
XtQueryGeometry/XtTranslateCoords crash on gadgets (one dtwm core dump
measured before the change).
- The Printer control is back in the main row, position 7, left of the
trash (it was in the Desktop drawer); the dock part is inserted left of
it, so the order is switch | dock | printer | trash, and a file dragged
from dtfile onto the printer prints.
- The System (Terminal) control runs Xterm/XTerm, not Terminal/dtterm.
- MCDE_PANEL_DEBUG prints the part's absolute position for tests.
Measured in Xvfb (1280x800, fresh HOME, ttsession + dtwm + dtbar):
xclock kept by dragging its icon out to the left -> ~/.dt/panel-apps has
"XClock 'xclock' '-digital'", debug "2 buttons (1 kept)", area 60 -> 126
wide with the separator at +64; dragging it out to the right again empties
panel-apps ("2 buttons (0 kept)", area 120). Screenshots: two icons with
the divider, the printer and the trash right of them. make mcde-linux
MCDE_DIRS="install programs/dtwm" and "... programs/localized/C/types"
exit=0.
The tmsg line alone does not reach a default install: dtwm reads its keys
from ${CDE_CONFIGURATION_TOP}/config/%L/sys.dtwmrc, and only the
installation copy under ${CDE_INSTALLATION_TOP} exists there, so a default
session runs on WmResource.c's builtinKeyBindings. Ctrl+F2 is in that set
now (as Cmd+Tab, Cmd+H, Ctrl+Left/Right and the screenshots already are).
dtbar's Command("menu") puts the X input focus on the bar's shell and the
Motif focus on the M cascade (the first one), instead of XmTRAVERSE_HOME on
the bar, which left the traversal nowhere.
Measured on Xvfb with ttsession, dtwm, dtbar and dtterm, a fresh HOME:
xdotool getwindowfocus before Ctrl+F2 -> 0xe00037, the Terminal window
(547x361 at 23,45); after -> 0xc0003d, 1280x22 at 0,0, the bar's shell
(xwininfo). tools/mcde-keytest.sh ctrl+F2: "screen changed". Down and
Return still post no menu: the bar also carries the client's exported menu
bar, and Motif does not traverse into it from outside -- recorded in
AGENTS.md as an open point, the pointer opens the M menu (screenshot).
make mcde-linux MCDE_DIRS="install programs/dtbar programs/dtwm" exit=0.
mcde-dist from HEAD (7f80d71c74, tradcpp target-OS fix) and makronix-set after installing the rebuilt mcde into destdir.amd64 (adds dt/bin/dtscreenshot now present in the package).
tradcpp runs on the build host but preprocesses dtlogin/config/*.src for the target. config.h used the compiler's OS, so a Linux->NetBSD cross build preprocessed the __linux__ branch of Xservers.src (tested before __NetBSD__) and installed /usr/pkg/dt/config/Xservers with '/usr/bin/X :0' and Xfailsafe with XDIR=/usr/bin; dtlogin had no server to start. configure.ac now derives MCDE_TRADCPP_CPPFLAGS from host_os and tradcpp takes CONFIG_OS_IDENT for CONFIG_OS. Measured 2026-11-15 (config.log build_os=linux-gnu host_os=netbsd) and by hand: tradcpp with -DCONFIG_OS_IDENT=__NetBSD__ emits ':0 Local local@console /usr/X11R7/bin/X :0', without it '/usr/bin/X :0'.
tools/mcde-dist.sh and tools/ext-dist.sh archive a commit, not the working
tree, so the checksums have to be renewed after the change is committed: the
mcde archive of HEAD (7f764fddc9) now carries programs/dtscreenshot, and
pkgsrc-motif, which builds the same archive, gets the same three lines.
mcde-dist: /home/lotherk/src/distfiles/mcde-0.1.0.tar.gz, 61719603 bytes,
BLAKE2s 591c6e04be4ccbc4388f47c3eb06133c9bbcb40f0aca5a01e1d8de80a883fe4c
ext-dist afpfs-ng: 459861 bytes,
BLAKE2s ece337077bbb159740ecd828b1c3a08aaafac455eb5983e4898af242ffd69de0
The archive in DISTDIR and the copy in build/distfiles are hard links and
hash the same; ext/src/mcde/pkgsrc and pkgsrc-motif differ by nothing;
tools/ext-sync.sh put the recipes into pkgsrc/ (wm/mcde, x11/mcde-motif,
filesystems/afpfs-ng).
sys.dtwmrc bound Mod4 Shift 3 and 4 (and Ctrl for the clipboard) to
`dtscreenshot` since 2026-11-15, and the program did not exist: the key
reached dtwm and nothing happened (tools/mcde-keytest.sh, t0222).
programs/dtscreenshot/dtscreenshot.c: C99, Xlib and libpng only, no toolkit.
(none) the root window -- every monitor -- as a PNG,
"Screenshot YYYY-MM-DD at HH.MM.SS.png" in ~/Desktop, else in ~
-area the rectangle the pointer drags out, XOR outline, Escape cancels
-clipboard image/png on the CLIPBOARD selection, held until another owner
-delay N wait before the picture (a menu to open first)
-o FILE this file instead of the default name
Nothing runs until the key is pressed; the area is grabbed with a crosshair
cursor; a picture larger than the server's maximum request is refused with a
message (the clipboard is handed over in one property, no INCR).
Wired in three places as ext/src/mcde/AGENTS.md asks: programs/Makefile.am's
SUBDIRS, configure.ac's AC_CONFIG_FILES, the source directory with its
Makefile.am; dt/bin/dtscreenshot is a PLIST line.
Measured on Xvfb :99 with the development build (build/mcde-root/dt/bin):
dtscreenshot -o /tmp/shot-test.png -> 800x600 PNG, exit 0
dtscreenshot -area -o /tmp/shot-area.png with
xdotool mousemove 100 100 mousedown 1 mousemove 300 250 mouseup 1
-> 200x150 PNG
dtscreenshot -clipboard, then
xclip -selection clipboard -t image/png -o -> 800x600 PNG
tools/mcde-keytest.sh: Mod4 Shift 3 puts
"Screenshot 2026-11-15 at 08.51.30.png" on the session's Desktop
(0 before, 1 after; build/logs/mcde-keytest-2026-11-15f.txt).
make mcde-linux MCDE_DIRS=plist: 3210 installed names under dt/, ok.
Merged with the project's tool (programs/localized/util/merge, LC_ALL=C.UTF-8),
de_DE and es_ES lost F8-F11, Ctrl+Up and all lines after them because message 11
closed its quote after the F10 line; de_DE, es_ES and fr_FR lost every line
after the first f.exec "..." because the inner quotes were not escaped. Both
fixed; all 11 locales now merge with rc=0 and no message, and the Keys sections
carry the same 56 MCDE key lines as C.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
4affe0dc00 changed the compiled-in key table (WmResource.c) but not the
sys.dtwmrc.tmsg files, so a session bound Cmd+Tab to f.next_key (window cycling)
and Shift+Cmd+Tab to f.prev_key. Now f.mcde_app switcher / switcher-prev in all
three key messages of the 11 files. SEEN (C locale, tools/mcde-keytest.sh, build/logs/mcde-keytest-2026-11-15c.log
exit=0): a box naming the program 'Dtterm' appears.
tools/mcde-keytest.sh: keys through tools/mcde-xkey.sh, a before/after screenshot
compare next to the window list, the terminal keys with a terminal focused.
docs/reference/shortcuts-test-2026-11-15.txt: key, expected, seen, verdict for the keys tried; Ctrl+F2 (the bar's menu
bar) is not bound anywhere.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
MEASURED 2026-11-15 on Xvfb with plain XTest keys: a session loads
Dtwm*keyBindings: DtKeyBindings, and that block of sys.dtwmrc had no Mod4 line;
the 25 Command/Ctrl+Left/Right/Eject/screenshot lines stood only in
DefaultKeyBindings (and in the Sun-keyboard variant), so XGrabKey of Mod4+h from
a second client succeeded (nothing grabbed) and the keys did nothing. The 25
lines are copied into message 11 of all 11 sys.dtwmrc.tmsg.
SEEN after (C locale): Ctrl+Right goes to workspace Two; Command+Ctrl+Left makes
the focused File Manager the left half, Command+Ctrl+BackSpace gives it back,
Command+H minimizes it to an icon. Not run: the other ten locales (only C is
built on this host); they got their own lines of DefaultKeyBindings, placed
after the F9-F11 lines of their message 11 like the lines that stand there.
With the front panel focused, Command+Ctrl+Left made it half the screen:
f.mcde_snap and f.mcde_fullscreen now ignore panel windows (seen: unchanged).
tools/mcde-xkey.sh presses keys by plain keycodes (XTest): xdotool 3.20160805
sends Alt_L first and the F-key with Alt held on this keymap, which made every
plain F-key binding look dead (the F9 of t0216).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
WmMcdeSpaces.c: an override-redirect window like the window overview, drawn
once on demand, nothing runs while it is closed. Reached as f.mcde_app spaces
(a new function name is not bound by a key, as measured for the overview).
Seen on Xvfb: F8 opens it, Right + Return goes to Two, a click on Four goes
there, F8 twice closes, 1 goes back to One; docs/screenshots/leopard/Spaces-mcde.png.
The 'F9 does nothing' of t0058/t0216 was the test sender: xdotool 3.20160805
sends Alt_L before an F-key in this keymap, so the key arrives as Alt+F9. With
plain XTest keycodes F8 reaches the root grab (ext/src/mcde/AGENTS.md).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The same three paints meant different things on the four tabs (user/system/nice,
used/cached, read/write, receive/send) and nothing said which; each tab has a
"Graph: ..." line under its numbers now. The Disk and Network graphs stack
read on write but were scaled to the larger of the two, so a second with both
could clip: they scale to the highest stacked column (Peak sums the two).
Seen in a PID-namespace session with a disk writer: the line fits under the
numbers, the red writes fill the height at the peak.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A table of the processes -- PID, name, user, % CPU since the last sample,
threads, real and virtual memory -- sorted by the column title you click; Show
(all, mine, system), a filter, Quit Process (asks; SIGTERM; Force Quit SIGKILL)
and Inspect; and under it four tabs, CPU, System Memory, Disk Activity and
Network, with the numbers and a three-minute history graph. All of it through
McdeSys (processes, CPU times, memory, disk and network counters, signals, the
commits of 2026-11-14/15); no ps(1), no top(1). New program: programs/
dtactivity (Makefile.am, programs/Makefile.am, configure.ac, PLIST line
dt/bin/dtactivity; make mcde-linux plist: ok).
Frugal, as t0080 asks: one timer, 2 s, only while the window is mapped and not
fully obscured. Measured with strace -c -f -p for 15 s: 2349 system calls
visible, 0 unmapped (xdotool windowunmap), 0 with an override-redirect window
over the whole screen, 2365 shown again. Control: an idle sleep gives the same
empty summary, a process that makes calls does not.
Quit Process measured against real processes in a PID namespace (unshare -rpf
--mount-proc: only the test session's processes exist, so neither the tests nor
the screenshot show the host's): Cancel leaves a process alive, Quit ends it, a
process that ignores SIGTERM survives Quit and is ended by Force Quit. Filter
and column sorting seen in screenshots (the committed image is the CPU tab with
two busy loops and the 24 MB/s of a disk writer in the other tab). Cross
compile for NetBSD (x86_64--netbsd-gcc -Wall -Wextra): no diagnostic. The
"Cannot convert string mcde to type FontStruct" warning is the shared
*renderTable fallback: dtimage prints it too.
Not built: 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"), a legend for the graph colours, the dtappscan entry; the NetBSD
backends of the numbers were never run. Sorting by clicking a header was not
exercised by a script (the layout was); the default sort (CPU, descending) is
what the screenshots show.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
mcde_sys_net_io: bytes and packets each way, for each interface (the loopback
too). mcde_sys_disk_io: bytes and operations read and written, for each whole
disk (no partitions; no loop, ram or zram devices). The difference of two
readings over the seconds between them is the rate the Network and Disk
Activity tabs draw.
NetBSD (read in the tree first): the interface counters are the struct if_data
of the link-level address from getifaddrs(3) (ifi_ibytes, ifi_obytes,
ifi_ipackets, ifi_opackets); the disks come from sysctl hw.iostats
{CTL_HW, HW_IOSTATS, sizeof(struct io_sysctl)}, asked for its size and then for
the array (usr.bin/vmstat/drvstats.c:183-188, :323-328), type IOSTAT_DISK,
rbytes/wbytes/rxfer/wxfer (sys/sys/iostat.h). Cross-compiled with
x86_64--netbsd-gcc -Wall -Wextra: no diagnostic. NEVER RUN on NetBSD.
Linux: /proc/net/dev (64-bit counters), /proc/diskstats (512-byte sectors),
whole disks only: those with a directory in /sys/block.
test_sysload (make check, 7 of 7) now also: 2 MB sent over a TCP connection on
127.0.0.1 raise the loopback's rx and tx bytes by at least 2,000,000 and its
packets; 8 MB written and fsync'ed next to the test move the disks' write
counters (measured here: 25,595,904 bytes for 8 MB -- the device-mapper volume
and the physical disk under it are both whole devices, so a window should not
add them up); the counters never go back by name; the write check says SKIP
instead of failing where the file system has no disk. Mutants: rx bytes taken
from packets fails 2 checks, write bytes taken from the read sectors fails 1,
sectors not multiplied by 512 fails 1.
Not done of t0091: the program (programs/dtactivity).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
mcde_sys_cpu_times: one McdeSysCpu (user, nice, system, idle, other ticks since
boot) per processor. mcde_sys_memory: bytes, total = free + cached + used (cached
is what the system gives back when asked), and swap. mcde_sys_signal: TERM, KILL,
STOP, CONT, HUP or INT to a process above pid 1 -- never init, a group or "all my
processes" (kill(2) with 0 or a negative number is refused before it is asked);
EPERM for another user's process, ENOENT for one that is gone.
Backends, read in the tree before they were written:
- NetBSD: kern.cp_time given room for every CPU (hw.ncpu x CPUSTATES x 8 bytes)
returns each CPU's counters in CP_ order (sys/kern/init_sysctl.c,
sysctl_kern_cptime: "alternately, you can pass an additional mib number and get
cp_time for that particular processor"; a buffer of one CPU's size gets the
SUM); memory from vm.uvmexp2 (struct uvmexp_sysctl, pages; top(1) reads it
too, external/bsd/top/dist/machine/m_netbsd.c). Cross-compiled with
x86_64--netbsd-gcc -Wall -Wextra: no diagnostic. NEVER RUN on NetBSD.
- Linux: /proc/stat (cpuN lines, "other" = iowait + irq + softirq + steal),
/proc/meminfo (cached = MemAvailable - MemFree, else Buffers + Cached).
test_sysload (make check, 7 of 7): the memory adds up and agrees with
sysconf(_SC_PHYS_PAGES) within 5 per cent; the CPU counters never go down and
0.4 s of work of the test's own shows as at least 5 ticks; children are stopped
(state T in mcde_sys_processes), continued and ended by TERM, KILL, HUP and INT
(the exit status says which signal); pid 1, 0, -1, a group and a bad signal are
refused; a waited-for child is "gone"; another user's process answers EPERM (to
SIGCONT only, and only when the test is not run by root). Mutants: memory
without the x1024 fails 2 checks, a parser that loses the busy ticks fails 1.
Not checkable on a busy host: that user, nice, system and idle are not swapped
(the shares depend on the load); the NetBSD backends are not run.
Not done of t0091: mcde_sys_disk_io and mcde_sys_net_io (the Disk Activity and
Network tabs), and the program itself.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The Linux mcde_sys_wifi_join passes the network name to
"nmcli device wifi connect NAME ...". The name of an access point is what the
neighbour's device broadcasts. Measured with nmcli 1.56.1:
nmcli device wifi connect --ask password PW ifname IF
-> "Error: invalid extra argument 'PW'" -- the name was taken as the option
--ask (a name of -x, --help or - is taken as a name; no effect).
"--" in front is no remedy: nmcli takes the "--" for the name ("invalid extra
argument 'Home'" for a normal name). The password is safe: it is the argument
of the keyword "password" whatever it starts with.
So the Linux branch refuses a name that starts with "-" (mcde_sys_wifi_ssid_arg_ok
in net.c, with the old 1..32 byte rule); the NetBSD branch does not call nmcli.
A legitimate network called "-something" cannot be joined from System Settings
on Linux; the message is the old one ("The network name cannot be used").
test_netinput: 11 more checks; make check 6 of 6; with the dash rule removed the
test fails (checked with a mutant).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
mcde_sys_net_mount built afp://user:PASSWORD@host/vol and that was argv[1] of
mount_afp: everyone on the computer could read it with ps(1) for as long as the
mount ran (measured with a fake mount_afp and a slow tool: "mount_afp
afp://alice:TopSecret-42@nas.local/Volume /tmp/mp-test"). The address says
"-" now, and the password is one line of the tool's standard input:
afpfs-ng's mount_afp asks getpass(3) for a password "-" (fuse/client.c), and
getpass reads the standard input where the process has no controlling terminal
(src/lib/libc/gen/getpass.c:106-112: "Try to use /dev/tty if possible;
otherwise read from stdin"). So no change in the fork.
For that the tool must have no controlling terminal even when the program was
started from a terminal: the job runner is a session of its own now (setsid
instead of setpgid; the group is still the runner's, cancelling still ends the
tool; kill of the pid too, for the moment before the setsid), and
mcde_sys_net_mount is _start plus waiting, so it detaches the same way. The
restriction against "@", "/" and ":" in an AFP password is gone (they were in the
address); a line break or more than 297 characters is refused for sshfs and
mount_afp alike.
Measured with the fake mount_afp (records argv, whether /dev/tty opens, what
getpass returns): argv[1] afp://alice:-@nas.local/Volume, getpass returned the
password, also "pa:ss@w/rd 1"; under a pseudo-terminal the OLD code kept
"controlling terminal present" and the new one has "no controlling terminal"
and still gets the password; no password -> afp://alice@nas.local/Volume, no
getpass; a line break -> refused. ps during a mount: old code showed the
password in mount_afp's line, new code "-". test_netmount: 6 cases of
mcde_sys_net_afp_address (a function that is not given the password, so it
cannot put it into the address); make check 6 of 6 (test_job's cancel test still
passes); the dtfile timeout/Escape scenario still leaves 0 tool processes.
Not done of t0077: B (the /tmp/afp_server-<uid> socket and /tmp/fuse_stderr of
afpfs-ng), and the real mount_afp against a netatalk server (the fake stands
in; only the standard-input and argv behaviour is measured).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The checks that keep a typed network name and password out of
wpa_supplicant.conf and rc.conf (netbsd.c, mcde_sys_wifi_join) sat inline in
the NetBSD branch, behind geteuid() != 0: no test of the build could run them.
They are mcde_sys_wifi_config_ok in net.c now (one implementation for the file
that is built on every system), the NetBSD branch calls it, and the new
test_netinput.c runs 46 checks as an ordinary user: name 1..32 bytes (33
refused), passphrase none or 8..63 (7 and 64 refused), a quote, a backslash or
a newline in either (also a whole injected "network={" block), the interface
name (lower case and digits only), plus the two helpers net.c already had
without a test: mcde_sys_net_ifname_ok and mcde_sys_net_prefix (a
non-contiguous netmask, trailing text).
One behaviour change, found by writing the table: an EMPTY interface name
passed the inline check (strspn("") == strlen("")) and would have given
wpa_supplicant_flags="-B -s -i -D bsd ..."; it is refused now.
Measured: make check 6 of 6. Mutation check: with the SSID limit raised to 33,
with the empty-name guard removed, with the passphrase minimum 7, and with the
quote check left out of the passphrase, test_netinput fails (1, 1, 1 and 2
cases); the real code passes. netbsd.c and net.c compile for NetBSD
(x86_64--netbsd-gcc) without a diagnostic. Not run on NetBSD.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
19 paths in lib/McdeSys (borg, dtbackup, pactl, paplay, smbclient, sshfs,
mount_afp, lpstat, lpadmin, avahi-browse, sysupgrade, smbd, netatalk, atalkd,
the rc.d examples, smb.conf, afp.conf) were written as "/usr/pkg/...". They
are MCDE_PKG_PREFIX "/bin/borg" and MCDE_PKG_SYSCONFDIR "/afp.conf" now:
configure.ac has --with-pkg-prefix (default /usr/pkg) and --with-pkg-sysconfdir
(default PREFIX/etc), lib/McdeSys/Makefile.am hands them to the library as
-D, and the recipe passes --with-pkg-prefix=${PREFIX} and
--with-pkg-sysconfdir=${PKG_SYSCONFDIR} (the same way --with-local-bindir is
passed). The sources do not include config.h, hence the -D.
Measured: x86_64--netbsd-gcc -S of backup, netbsd, sound, netmount and printers
before and after: the string constants are byte-identical (490 strings, the same
17 distinct /usr/pkg paths). With -DMCDE_PKG_PREFIX=/opt/pk and
-DMCDE_PKG_SYSCONFDIR=/etc/pk: no /usr/pkg left, 15 paths under /opt/pk, the two
configuration paths under /etc/pk. Native: configure regenerated, the
Makefile has MCDE_PKG_PREFIX = /usr/pkg, make check 5 of 5, PLIST pre-check
ok (3208 installed names, 8396 in the PLISTs). git grep '"/usr/pkg' in
lib/McdeSys: nothing.
Not done of t0081: the message catalogs; the wifi_join checks.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
ParseUrl refused a host that starts with "-" but not a user: the first argument
of sshfs is "USER@HOST:PATH", so sftp://-p22@host/ gave it "-p22@host:/", an
option. Found by the table test this commit adds: mcde_sys_net_url_ok (the
tests' view of ParseUrl, private.h) with 22 addresses -- sftp/nfs/afp, IPv6
written bare, an empty user, a user or host that is an option, a space, ';',
'$(id)', a second '@', a newline in the path, no host, no scheme, a scheme of 16
characters, a host of 255 (kept) and 256 (refused) characters, NULL.
Red before the fix: exactly sftp://-l@host/ and sftp://-p22@host/ accepted;
green after: make check 5 of 5 (34 ok lines in test_netmount).
Not done of t0081: the checks of mcde_sys_wifi_join (netbsd.c:534ff, SSID 33
bytes, quotes, backslash, passphrase 8..63) -- they come after geteuid() != 0
and are NetBSD-only (the Linux branch checks the length only and must keep
quotes in a passphrase), so no test of the build can reach them without a
shared validator; catalogs and @PREFIX@ untouched.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
create_replace_merge_dialog: "A folder named ... already exists in this location.
Do you want to merge the contents of the two folders?" and Stop / Merge, no radio
box. Merge is the default (Return), Escape and the Stop button cancel. The
hidden G_merge_toggle keeps replace_merge_ok_callback and the pipe protocol as
they were; "replace the whole folder" is no answer of this question any more.
Found while measuring Stop: the focus of both dialogs sat on the FIRST button
(Stop here, Keep Both in the single-file dialog of t0156), and in Motif Return
activates the focused button, so Return did not take the default. XmNinitialFocus
is ignored on the form for a button in a RowColumn (a tab group of its own); it
is set on the row now, to Merge and Replace.
Measured (real dtfile on Xvfb; Cmd+C opens the Copy Object dialog, the
destination typed there; folders A/ord{one.txt}, B/ord{two.txt}):
folder: Return -> B/ord one.txt two.txt; Merge button -> the same; Escape and
Stop button -> B/ord two.txt only; A/ord one.txt every time.
file (A/f.txt "from-A", B/f.txt "from-B"): Return -> f.txt=from-A; Escape and
Stop button -> f.txt=from-B (the Stop of t0156 now measured); Keep Both ->
f_1.txt=from-B and f.txt=from-A.
Before the focus fix Return in the folder dialog did NOT merge (B/ord two.txt).
Cross compile for NetBSD (x86_64--netbsd-gcc, the build's flags): no error, no
warning in the changed code. Screenshots: Finder-Copy-Merge-mcde.png (new),
Finder-Copy-Replace-mcde.png (retaken: the focus is on Replace).
Not done: the multi-collision dialog "Do this for all" (item 3 of the task).
Keep Both renames the EXISTING file (CDE's rename protocol); the Finder keeps
the incoming copy under the new name -- noted in AGENTS.md, not changed.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
DtAction "Trash" (Cmd+Delete in dtfile) failed in the harness with
TT_ERR_NO_MATCH "No handler could be found for this message, and the
disposition was not queue or start". ttsession(1): the type databases
(types.xdr) are read from $HOME/.tt, /etc/tt, $OPENWINHOME/etc/tt and
/usr/dt/appconfig/tttypes, or from the directories in TTPATH; lib/tt/slib/
mp_typedb.C tt_path() appends /types.xdr to a directory of TTPATH. The harness
has none of the default places, so ttsession had no ptype. Session() now has
TTPATH=build/mcde-root/dt/appconfig/tttypes (the install's types.xdr).
Measured (Xvfb, real dtfile on a scratch folder with one dummy file): before,
the dialog "Action: Trash [Error] ... TT_ERR_NO_MATCH" and the file stays;
after, the folder is empty ("2 Items"), ~/.dt/Trash of the test home has
victim.txt (6 bytes), and File > Open Trash shows "Trash Can" with it
("1 Item(s)"). The cause was the session, not dtfile: no change to Trash.c.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
What was copied is shown on the screen the moment the launcher opens, so a
password from a password manager sat there in clear.
- Dtlaunch*clipboardHistory, default False. Off: nothing is asked of the
clipboard's owner (no XFixes watch, no poll) and the hint line drops "the
clipboard". System Settings > Keyboard & Mouse > Shortcuts has the toggle
"The launcher keeps a history of what was copied"; it writes the resource
like the hot key does and restarts the launcher.
- On: a text that is new is kept only if its owner does not offer the target
x-kde-passwordManagerHint with the value "secret" (what KeePassXC, KDE Wallet
and others set; docs/reference/clipboard-password-hint.txt has the two
sources and what they do not say). An unchanged clipboard costs no second
request. The copy of the text is overwritten after use.
Measured (Xvfb, a small X program as the password manager, logging requests):
on: owners "ordinary-text-123" (no hint target), "hunter2-PASSWORD" (hint
"secret"), "second-ordinary-456": each got UTF8_STRING then the hint request;
the list shows the two ordinary texts, not the password. Off (no resource):
0 requests in total, empty list. The toggle in the real dtsystemsettings gives
the resource True, False, True; the indicator changes; the note fits. Cross
compile (build's flags): dtlaunch.c and input.c without a warning; make check
of dtlaunch passes. Not verified: a real password manager (the assumption
that its MIME type is an X11 target of that name is written in the reference
file), a launcher restart on a real session. The default is the task's; one
word in dtlaunch.c's resource table turns it back.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The top-level shell only owns the selection _MCDE_SOUND_SERVER, but it was
realized with mappedWhenManaged on: a 1x1 window at +0+0 that a window manager
would frame (review no. 32, unverified until now). Measured on a private
Xvfb with xwininfo: before, the shell 0x200010 "mcdesoundd"/Mcdesoundd: Map
State IsViewable; after XtSetMappedWhenManaged(top, False): IsUnMapped (the
Xt leader window was and is IsUnMapped). The server still receives: an event
the theme does not know, sent with `mcdesoundd -event ProbeNoSuchEvent`, is
logged by the running server ("has no sound in the theme").
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
mcde_sys_net_mount ran in the Xt callback and waited for sshfs/mount_afp
without a limit: a server that is gone froze the window for as long as the
tool lived (measured: the call returns after 20.0 s with a tool that sleeps
20 s; with one that never ends, never).
McdeSys: mcde_sys_net_mount_start/_job_fd/_job_finish/_job_cancel. The tool
runs under a runner process (its own process group) that writes the answer
to a pipe: dtfile sets SIGCHLD to SIG_IGN (Main.c), where waitpid gives no
status. mcde_sys_net_mount and _start share one plan (MountPlanFor).
test_job (make check, 5 of 5 pass) covers success, failure, a missing tool,
a password on stdin, and cancel with the tool AND what it started gone, with
SIGCHLD default and ignored; without the group kill it fails (mutant run).
dtfile: _McdeNetMount (NetView.c) for all three mounts (network view,
Connect to Server, column view): a modal "Connecting ..." dialog with Cancel
(also close button and Escape), the descriptor as Xt input (no timer
polling), one time-out, Dtfile*connectTimeout, 20 s, 3..600 (app-defaults,
man page).
Measured (real dtfile on Xvfb, fake sshfs that sleeps 40 s, connectTimeout
4): the dialog shows and repaints when moved; the time-out gives "Could not
connect: The server did not answer within 4 seconds.", Escape gives
"Could not connect: Cancelled."; sleep processes while connecting 1, after
the time-out 0, after Escape 0; no dialog left. One first run showed a 40 s
stall of the whole session after Return (import blocked too); not
reproduced in three further runs, cause unknown. Cross compile for NetBSD
(x86_64--netbsd-gcc, the build's flags): netmount.c and NetView.c without a
warning; common.c's old settimeofday declaration warning is not new. Not
done: the NFS and AFP tools (only sshfs was faked), the afp://10.255.255.1/
case of the task with a real mount_afp.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A hung pactl made mcde_sys_volume_get wait 40 s (pactl info, then
get-sink-volume, then get-sink-mute; measured with a fake pactl that
sleeps 20 s in a private mount namespace). The reads the bar repeats to
show a state -- volume (pactl, mixerctl, amixer), Bluetooth (bluetoothctl,
btconfig), the Wi-Fi network (iw) -- now use mcde_sys_capture_limited with
MCDE_SYS_STATUS_SECONDS (2 s, private.h). Pactl() keeps its answer: a
"yes" until a read fails, a "no" for 30 s, so a stopped server costs
one 2 s wait, then the mixer answers.
Measured after: pactl hangs: 2.0 s, then 0.0 s (mixer); amixer hangs:
2.0 s a call, rc=-6; bluetoothctl hangs: 2.0 s, present=1 on=0; no
shim: 0.0 s. make mcde-linux check: 4 of 4 tests pass. Wi-Fi scan and
join, network configuration, disks and updates keep the unlimited call:
they do real work. AGENTS.md says so.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
pid, parent, owner, command name, state, threads, real and virtual memory in
bytes, CPU time in ms. NetBSD: sysctl KERN_PROC2 the way libkvm's kvm_getproc2
asks (size, then the buffer by count, ENOMEM -> again), CPU time from p_rtime_*
as ps(1) does (print.c:1059), state from p_realstat and the LWP's p_stat.
Linux: /proc/PID/stat read after the LAST ')', memory from statm.
Measured: test_processes (this process, init, a zombie until waited for, a
sleeping child named 'a b)c', SIGSTOP as T, SIGCONT back) and the three other
McdeSys tests PASS, mcde-linux exit=0. Against ps -eo for every process in both
lists: 631 compared, parent, owner, threads, RSS, state and CPU time all agree.
First version used stat's rss: on this kernel it is larger than VmRSS/statm
(126 of 632 processes more than 10 % off), so statm is read. The NetBSD code is
compiled against the NetBSD sysroot with x86_64--netbsd-gcc -Wall -Wextra
(all of netbsd.c, exit 0), not run there. Also <ctype.h> in netbsd.c and
linux.c: isspace() was used undeclared (an error with GCC 14, masked in the
build by -Wno-error=implicit-function-declaration).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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>
XFixesSelectSelectionInput on CLIPBOARD; the event names the new owner, whose
text is read once. configure.ac checks libXfixes and gives only dtlaunch
XFIXESLIB and XFIXES_CPPFLAGS (-DHAVE_XFIXES); a define in config.h would have
recompiled every file. Without the library or the extension the owner is asked
every 5 s (POLL_MS, was 1 s). The recipe lists x11/libXfixes/buildlink3.mk.
Measured with strace (writes to the X socket, 10 s idle after 4 s): 10 before,
0 with XFixes, 2 in the fallback (5.0 s and 10.0 s; tested with an LD_PRELOAD
shim that makes XFixesQueryExtension fail -- Xvfb -extension XFIXES aborts for
any Motif client, also an unmodified dtpad). Both paths still put a copy made
by xclip during idle into the history (screenshots). The sysroot has Xfixes.h,
libXfixes.so.4.1 and the pkg-config files; the cross build of the recipe change
is not run yet.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
pkgsrc stops make userland at the first installed file the PLIST does not list,
after hours of build (McdeLock.pm, Thumb.h, 0010.language, DtScrn.t.pm,
userland-2026-11-14n.log:26326). This installs the native build into a fresh
temporary DESTDIR (not build/mcde-root, where make install never removes old
files) and names every file under dt/ that neither PLIST lists, in seconds.
Compared: only dt/; both PLISTs, the Motif one read as if under dt/ (the native
build makes its own Motif there, x11/mcde-motif ships it into the prefix);
libraries without their version; without documentation (-docs, pkgsrc-cross.mk.conf:238)
and the four files the recipe moves to share/doc.
Measured: the current PLIST: 3208 names, ok. Controls from history: the PLIST
before fe8abbd1bb gives exactly the six files that commit added; before
2e062c4590 it gives McdeLock.pm and the same six. (First versions gave 241
and 4 false positives: the Motif PLIST sits in the prefix, not under dt/, and
the recipe moves four docs.) The rule is in ext/src/mcde/AGENTS.md.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
dtsystemsettings -list-panes prints the panes (ID, name, category, keywords; a
PANE_LATER pane is left out) before any X setup. dtlaunch asks for them once
(pipe and exec, no shell, a 3 s poll limit; no waitpid, SIGCHLD is ignored
there) and model.c parses and matches them: the name at full score, a keyword
at half, the ID checked because it ends up in dtsystemsettings -pane ID. A
result reads '[settings] Displays (Hardware)' and starts through the same
Parental Controls as a program (run_args). dtlaunch -text STRING fills the
field of the first opening, for tests and tools/mcde-shot.sh.
Measured: make mcde-linux 'check programs/dtlaunch programs/dtsystemsettings'
exit=0, test_model PASS (test_panes: parse incl. unsafe IDs, matching incl. a
German keyword); -list-panes: 24 lines, exit 0 with DISPLAY unset, no dock;
Spotlight-mcde.png: typing 'disp' lists '[settings] Displays (Hardware)'
second; Return on 'displays' starts 'dtsystemsettings -pane displays' and a
window 'Displays' appears (Xvfb). Not done: the grouped two-column list,
documents/mail/PDF/web results, the dtbar magnifier, the clipboard without the
1 s poll (t0185, t0080).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Both were noinst_PROGRAMS: built, not installed, run by no Makefile.am -- in a
cross build two programs compiled for the target that nothing can run
(tools/check-buildtools.sh found them). Built only on request now.
Native: make mcde-linux for the two directories, exit=0, the regenerated
Makefiles say EXTRA_PROGRAMS (build/logs/mcde-linux-2026-11-14-t0197.log).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The Dts.c and McdeSys commits change what git archive HEAD:ext/src/mcde makes;
tools/mcde-dist.sh renewed the checksums. Cross-checked with an archive made
by hand from HEAD: SHA512 64d39d7b..., 61669464 bytes, equal.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
sysupgrade-1.5 fetches with ftp and unpacks with tar as root and checks nothing;
pkg_add -uu trusts the packages it is given (docs/reference/update-verification.txt).
mcde_sys_update_source_ok (common.c, fail closed: the scheme in lower case, only
[A-Za-z0-9._~:/@%+,=-]) is asked by mcde_sys_update_check, which then does not
even contact a refused source, and by mcde_sys_update_apply, which refuses before
any root action. http://, ftp://, ssh:// and shell or query characters are out.
Measured: make mcde-linux MCDE_DIRS='check lib/McdeSys' exit=0, PASS 3 of 3
(test_updatesource has 28 cases, build/logs/mcde-linux-2026-11-14-t0078.log);
netbsd.c does not build on this host, its update section compiled alone with
-Wall -Wextra gives no warning. This does not verify any signature: that needs
a key and Konrad's decision (t0078 steps 2 and 3).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
CDE 2.5.3's max_buf (lib/DtSvc/DtUtil1/Dts.c) called realloc(buf, mb_size)
with the OLD size and only then stored the new one, so the buffer stayed at
MB_SIZE (100) bytes and DtDtsDataToDataType's strncpy and terminator wrote past
it. dtwm aborted at start with 'malloc(): unsorted double linked list
corrupted' while the front panel read the data types.
Measured: valgrind on dtwm under Xvfb gave 'Invalid write of size 1, 0 bytes
after a block of size 100' (Dts.c:1321, block from max_buf Dts.c:303) and six
invalid-access contexts in all; after the change none, and dtwm runs 40 s under
valgrind and 8 s plain (before: status 134). The two remaining reports are
struct and X-protocol padding.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The committed distinfo named the archive of an older HEAD; a fresh clone failed
the checksum. Measured: git archive HEAD:ext/src/mcde (tools/mcde-dist.sh's
command) gives SHA512 df4ada94..., 61667349 bytes, as in these files.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
libtool wrote '=<workdir>/.buildlink/lib/libpng16.la' (and libXm.la) into
dependency_libs of the two libraries in usr/pkg/dt/lib, measured in
build/obj/destdir.amd64. Same fix as x11/mcde-motif (021885cd9d); the
'=/usr/pkg/...' entries are libtool's sysroot notation and stay. The other
132 .la files of the sysroot carry no such path.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>