Commit Graph
54 Commits
Author SHA1 Message Date
lotherk 345c54105a dtsystemsettings: no call to the removed Startup Disk pane
The Startup Disk pane was taken out of the pane table (Konrad, 2026-11-21),
but ShowPane still had the branch that called MakeStartupDisk, and
startupdisk.c is no longer built.  A full `pkgchroot force wm/mcde' therefore
failed at link: "dtsystemsettings-main.o: undefined reference to
MakeStartupDisk" (measured 2026-11-22, the MacBook build).  The branch is
gone; the id stays in PaneMsg's stable list, the declaration in ui.h says why
the file is still in the tree.
2026-11-22 15:04:37 +01:00
lotherk bc84289d25 mcde: the review's loose ends
- dtsystemsettings/panes.c: the icon of every pane is unique again (Backup
  showed the same DtSystem.m.pm as System Information, Default Programs the
  same Dtmail.t.pm as Internet Accounts) and the dock entry is indented like
  its neighbours.
- startupdisk.c is no longer built: the pane was removed, the file stayed in
  the SUBDIRS list.
- dttoolbox.msg: message 2 says "No dttoolchest menu", like message 1 says
  "dttoolchest".
- dock.c stores the program's class as the command names it (lower case, as
  WM_CLASS's instance name is), not with an invented capital.  dtwm compares
  classes with strcasecmp (WmMcdePanel.c:144, 233), so matching works either
  way; the icon lookup by file name is what a made-up case could spoil.
2026-11-22 09:40:15 +01:00
lotherk bd2afc27f2 dtsystemsettings: a Dock pane that works
The Dock entry is back, and it is a pane of its own: it lists the programs
kept in the front panel (the CLASS and COMMAND lines of ~/.dt/panel-apps),
removes the chosen one, adds one from a command, writes the file at once and
restarts the window manager (_DtWmRestartNoConfirm) so the panel is built
again.  The icon is Dtapps.m.pm -- the entry was PANE_LATER with
DtPanel.m.pm, which does not exist, so it was greyed out and had no picture.
2026-11-22 08:08:45 +01:00
lotherk d574ce9587 dtsystemsettings: include Xm/ScrolledW.h for the pane scrolled window
The pane scrolls since 8f03d0d74e; the widget class was not declared
(measured 2026-11-22 on the MacBook: xmScrolledWindowWidgetClass
undeclared).
2026-11-22 06:46:01 +01:00
lotherk 68d4953b99 mcde: one window size for System Settings, tabs that are one of many, icons that exist
- dtsystemsettings: the shell is 1022x550 and stays so (min/max equal); every
  pane lives in it instead of growing the window (thirteen per-pane
  XtVaSetValues(shell, width, height) calls are gone), and a taller pane
  scrolls (the pages sit in an XmScrolledWindow with XmAUTOMATIC).
- panes.c: CDs & DVDs had no icon (Dtmedia.m.pm does not exist) - it shows
  IrixCD.m.pm; Energy Saver shows SDtpowermgr.m.pm; Accounts had the same icon
  as Startup (DtStart.pm) and shows McdeUser.t.pm.  The "Startup Disk" entry
  and the disabled "Dock" entry (no icon, PANE_LATER) are removed.
- McdePrefs: the tab strip is one of many (XmNradioBehavior,
  XmNradioAlwaysOne).  Without it every visited tab stayed pressed
  (measured 2026-11-21: Keyboard, Mouse and Shortcuts all down at once).
- dttoolbox: the window title is "dttoolchest" (msg 1 of the catalog).
- McdeSys: mcde_sys_keyboard_is_mac asks the machine (hw.model "Mac...")
  before usbdevs.  At session start the internal keyboard may not be
  enumerated yet, so dtkeys took a MacBook for a PC keyboard and exchanged
  Alt and Command (_MCDE_KEYS said "pc", measured 2026-11-21).
2026-11-21 21:44:16 +01:00
lotherk 11cd07b560 MCDE: the IRIX cursor font as an Xcursor theme, both themes in Appearance (t0301)
The IRIX cursor font x_eoe usr/lib/X11/fonts/misc/cursor.pcf is extracted
with the sw parser, pcf2bdf turns it into BDF, and bdf-cursors.py makes
58 Xcursor names from the glyphs (form + _mask).  The Solaris and IRIX
themes are in share/icons/Solaris and share/icons/IRIX; the Appearance
pane has a "Cursor theme:" menu (Solaris, IRIX) that keeps the choice in
~/.dt/cursor-theme; 0079.dtcursor exports XCURSOR_THEME from it.
Measured: XcursorLibraryLoadImage("left_ptr", "IRIX", 16) returns a
16x16 image, and the menu shows Solaris/IRIX; choosing Solaris wrote
~/.dt/cursor-theme.
2026-11-16 14:32:23 +00:00
lotherk 072d200303 MCDE: the Solaris cursor theme (t0301)
programs/cursors holds the 27 .cursor files of Solaris 2.6; programs/dtcursor
reads the X11 cursor text format (Format_version=1, Width, Height,
Valid_bits_per_item=16, one or two bitmaps) into source and mask bitmaps,
makes the cursor with XCreatePixmapCursor and puts it on the root window
(XDefineCursor; the clients that set none inherit it).  The name is kept
in ~/.dt/cursor; 0079.dtcursor sets it at login.  The Appearance pane has
a "Pointer:" menu of the cursor names; a choice runs dtcursor -set NAME.
Measured under Xvfb: the menu lists black, bullseye, busy, ... gr_root;
choosing busy wrote ~/.dt/cursor and printed "dtcursor: busy".
2026-11-16 14:08:53 +00:00
lotherk e3d8227249 MCDE: a backdrop per workspace (t0290)
dtsystemsettings has a Workspace menu on the Desktop page: This
Workspace (the active one) or one of the named workspaces, read from
DtWsmGetWorkspaceList.  A chosen backdrop goes to that workspace: dtwm
learned f.change_backdrop_ws INDEX PATH PIXMAP STYLE (the same parse as
f.change_backdrop, with the workspace index first) and
McdeBackdropFromFile on pSD->pWS[INDEX]; SetNewBackdrop keeps the choice
with SaveWorkspaceResources, so dtsession carries it to the next login
and ChangeToWorkspace shows it.  Measured under Xvfb: the menu lists
This Workspace, One, Two, Three, Four; Two + Ankh.bm printed
'dtwm: backdrop ws=1 .../backdrops/Ankh.bm style=0'.  WmMain.c now
includes WmFunction.h (the MCDE prototypes were implicit).
2026-11-16 10:05:40 +00:00
lotherk 977d2b9d57 MCDE dtsystemsettings: a message catalog, German measured (t0282)
Following dtbar (2c229d08c6): the categories, the panes, the window title and
"Show All" come from dtsystemsettings' catalog -- English source
programs/dtsystemsettings/dtsystemsettings.msg (set 1, messages 1-32: the
four categories, 26 panes by ID, the title, Show All), German copy in
programs/localized/de_DE.UTF-8/msg/dtsystemsettings.msg, gencat rule in
msg.C.am, PLIST C plain and ${PLIST.nls} for the German one.

main.c calls setlocale(LC_ALL, "") first: the window title is an argument of
XtVaAppInitialize, and a catalog opened while the locale was still C would
stay the C one for the whole process (measured: first attempt stayed English
in every label).

Measured on Xvfb (1280x800, fresh HOME, ttsession + dtwm), de_DE.UTF-8 via
localedef/LOCPATH: title "Systemeinstellungen", "Alle zeigen", categories
"Persönlich / Hardware / Internet & Netzwerk / System" and the panes
"Darstellung", "Schreibtisch & Bildschirmschoner", "Sprache", "Sicherheit",
"Standardprogramme", "Ton", "Bildschirme", "Tastatur & Maus", "Drucker",
"Energiesparmodus", "Internet-Konten", "Netzwerk", "Freigaben",
"Systeminformation", "Datum & Uhrzeit", "Starten", "Kindersicherung",
"Benutzer", "Software-Aktualisierung", "Sicherung", "Startvolume",
"Bedienungshilfen"; LANG=C the English labels.  make mcde-linux
MCDE_DIRS="install programs/dtsystemsettings" and "install
programs/localized/C/msg" exit=0; MCDE_DIRS=plist: "3482 installed names
under dt/, 8672 in the PLISTs", ok.
2026-11-16 09:48:19 +00:00
lotherk b61e22457f MCDE mouse pane: wheel labels unswapped, touchpad settings (t0288)
Konrad, 2026-11-16: scrolling looked inverted in the settings, and the
touchpad could not be configured (three buttons or two with taps/gestures).

- The wheel radio pair had its texts swapped: without the button 4/5 swap a
  wheel turned towards you sends button 5 and the content goes down, so that
  is the "towards you" state.  The labels now sit on the right widgets.
- McdeSys gains mcde_sys_touchpad_get/set (McdeSys.h): tap to click, two
  fingers as no/right/middle button (pms(4) hw.synaptics.tap_to_click and
  .two_fingers_emulation) and a scrolling strip at the pad's edge
  (.vert_scroll_percent/.horizontal_scroll_percent, 7 or 0).  The sysctls are
  CTLFLAG_READWRITE, so a write as a user answers MCDE_SYS_EPERM with a
  sentence; a system without the interface answers ENOTSUP (Linux: libinput
  keeps its own, per device).
- The Mouse tab builds a Touchpad section from the read values (tap, the
  pad's own buttons / right / middle, the scrolling strip) and writes
  ~/.dt/touchpad only after a successful set; the note says when the
  administrator is needed.  dtsystemsettings -apply-touchpad puts the saved
  values back, for a boot script or an unlocked session.

Measured: make mcde-linux MCDE_DIRS="install lib/McdeSys" and
"install programs/dtsystemsettings" exit=0; the NetBSD branch of netbsd.c
passes x86_64--netbsd-gcc -std=gnu11 -fsyntax-only -Wall with the tree's
sysroot; the Mouse tab on Linux shows the corrected wheel pair and "This
system keeps the touchpad settings outside the desktop" (screenshot), and
with a stub backend in the build tree only for the picture, the section with
tap, fingers and strip; dtsystemsettings -apply-touchpad with a saved file on
Linux answers the ENOTSUP sentence, rc=1; with no file rc=0.
2026-11-16 09:14:44 +00:00
lotherkandClaude Sonnet 5.5 e9d38270a3 dtlaunch: the clipboard history is opt-in and leaves passwords out (t0080 2')
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>
2026-11-15 00:37:01 +00:00
lotherkandClaude Sonnet 5.5 048e842776 MCDE dtlaunch: the panes of System Settings are results; dtsystemsettings -list-panes (t0185, first part)
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>
2026-11-14 22:28:06 +00:00
lotherk d72634fd62 MCDE: the web browser as the desktop's default program (t0179)
A web page has one action on the desktop now, McdeWeb
(programs/types/datatypes.dt.src): it runs "dtsystemsettings -open-web
%Arg_1%", which reads the browser from ~/.dt/defaults (web:, chosen in the
Default Programs pane) and starts it with execlp -- no shell, and an argument
with a shell character is refused.  -open-web is handled before Xt is set up,
so an action needs no display.

The .html and .htm criteria of programs/types/firefox.dt map their Open to
McdeWeb: a double click in dtfile now follows the file's choice instead of a
hard-wired Firefox.  McdeWeb takes ARG_TYPE * -- an action that names a data
type the file does not have is refused ("Either action ... does not apply",
measured), and it is only named by the types that may use it.

dtthemesync gained the Firefox part: every profile under ~/.mozilla/firefox
with a prefs.js gets a user.js (downloads into ~/Downloads, reduced motion,
no cosmetic animations, no smooth scrolling, ui.key.accelKey 91 -- Command is
Mod4 in MCDE) and a chrome/userChrome.css written from the palette.

Measured under Xvfb with xdotool and a wrapper that records its arguments:

  - dtsystemsettings -open-web http://example.org with web: true answers
    "Opened in true: http://example.org" and exits 0, without a display;
  - -open-web "http://x;rm -rf /" answers "That is not an address" and exits
    1; -open-web "" answers "No address was given";
  - a double click on page.html in dtfile with web: mcdetest-browser hands
    exactly that path to the wrapper (cat of what it got);
  - the same double click with web: firefox opens a "Mozilla Firefox" window;
  - dtthemesync -v in a test home with a fake profile writes user.js and
    chrome/userChrome.css; user.js carries browser.download.dir
    <home>/Downloads, prefersReducedMotion 1, cosmeticAnimations false,
    smoothScroll false, ui.key.accelKey 91, and the CSS starts with
    --toolbar-bgcolor: #c6b2a8 (the palette Default.dp);
  - the Default Programs pane shows web: firefox and, after the fix, the
    links choice that the file has ("in a tab of the window that is there")
    -- docs/screenshots/leopard/web-browser-default-mcde.png;
  - make programs/dtsystemsettings, programs/dtthemesync, programs/types
    exit=0; check programs/dtsystemsettings: test_panes PASS; check lib/DtSvc
    PASS.

Not measured: Firefox's own Cmd+T/W/L in a running window (the user.js sets
the accelerator; that needs a person at the keyboard), and dtexplorer -- the
Motif browser of the task -- which is its own program and a follow-up.
2026-11-14 15:54:22 +00:00
lotherk 813bd87f6e MCDE dtsystemsettings: the Backup pane in the reference's shape (t0175) 2026-11-14 14:53:48 +00:00
lotherk 4b3d4d6d93 MCDE dtsystemsettings: the Startup Disk pane, the volume in use marked (t0174) 2026-11-14 14:46:57 +00:00
lotherk 131f12ed69 MCDE dtsystemsettings: System Information from McdeSys (t0188) 2026-11-14 14:36:41 +00:00
lotherk b912458ef5 MCDE dtsystemsettings: the default programs, ~/.dt/defaults (t0180) 2026-11-14 14:32:10 +00:00
lotherk 116c142e2b MCDE dtsystemsettings: Internet accounts, own services only (t0130) 2026-11-14 14:27:41 +00:00
lotherk 9e849fbaa4 MCDE dtsystemsettings: the Energy Saver pane, display sleep on dtsession (t0120) 2026-11-14 14:22:40 +00:00
lotherk 61869aa8e1 MCDE dtsystemsettings: the CDs & DVDs pane, a choice per kind of medium (t0100) 2026-11-14 13:59:36 +00:00
lotherk 01cd2b88bc MCDE dtsystemsettings: Parental Controls in the System row of the panes (test_panes) 2026-11-14 13:54:28 +00:00
lotherk cec3eb49e3 MCDE dtsystemsettings: Parental Controls, enforced by the launcher (t0142)
New programs/dtsystemsettings/parental.c: the accounts on the left and, for
the chosen one, three pages.  Programs: "All programs" or "Only the
applications selected below" with a list of the desktop's programs.  Time
Limits: weekday and weekend hours ("09:00-19:00" or "any").  Log: the
programs that were started, from ~/.dt/parental.log.  The values are kept in
~/.dt/parental.conf under the login's name ("lotherk.allow=dtpad,dtfile"),
English keys, the file the launcher reads.

The enforcement is in dtlaunch, the place where a program is started: the
list shows only the allowed names, a disallowed program or a start outside
the hours is refused with a sentence in the window ("Outside the allowed
hours (Parental Controls)."), and every allowed start is appended to
~/.dt/parental.log.  A refusal keeps the launcher open.

Measured under Xvfb with xdotool:
  - with "lotherk.only=1, allow=dtpad" the launcher offers dtpad only;
  - with hours 03:00-03:01 (now 13:4x) Return on dtpad is refused, the
    window stays and says why, and ~/.dt/parental.log stays absent;
  - with "any" the same Return starts dtpad and the log gets
    "2026-11-14 13:44 dtpad";
  - the pane shows the accounts, the three pages and the applied file
    (docs/screenshots/leopard/System-Preferences-Parental-Controls-mcde.png,
    ...-Time-Limits-mcde.png);
  - make programs/dtsystemsettings, programs/dtlaunch exit=0.

Not done (follow-up): system-wide enforcement -- taking the execute
permission away from programs outside the list needs root, ending a session
when the hours are over belongs to dtsession, and a child's own file needs
the administrator.  A toggle or radio set before its page is laid out keeps
its first painted state in this pane (measured); the file is right.
2026-11-14 13:53:51 +00:00
lotherk f37f703eb2 MCDE dtsystemsettings: the Printers pane, CUPS and mDNS (t0143)
New programs/dtsystemsettings/printers.c replaces the "printers" entry that
only started dtprintinfo:

  * the left list is the queues of CUPS (McdeSys mcde_sys_printers: lpstat
    -p and -d, parsed; the default is marked with a star and named in the
    status line), the right side is what is chosen -- state, location,
    model, whether it is the default and whether it is shared;
  * "Add Printer..." lists the printers mDNS finds (_ipp._tcp through
    avahi-browse -rtp, names unescaped: avahi writes \032 for a space in
    decimal), fills the queue name from the chosen one and shows its URI;
  * "Add", "Remove Printer..." and "Set as Default..." run in the terminal
    of su(1) (dtsystemsettings -add-printer NAME URI | -remove-printer |
    -set-default-printer), the pattern of the other root actions; adding
    uses the driverless model (lpadmin -p NAME -E -v URI -m everywhere);
  * "Print Queue..." opens dtprintinfo -all, CDE's queue view.

McdeSys gained mcde_sys_printers, _printer_add, _printer_remove,
_printer_default and _printers_discovered (lib/McdeSys/printers.c, built for
every backend).  Names and URIs are checked before they reach an argument
list (letters, digits, - and _; ipp://, ipps://, socket://, usb:// without
spaces or shell punctuation); the mDNS output is only parsed.

The task asked for libcups rather than command lines; measured 2026-11-14 on
the build host, cupsGetDests2() returns 0x2 and leaves num_dests untouched --
through dlopen and linked directly -- while _cupsGetDests() finds no queue
and lpstat -p lists the two the desktop has.  The library path is a
follow-up, and AGENTS.md carries the measurement.

Measured under Xvfb with xdotool, against the host's CUPS:

  - the pane lists HP_LaserJet_M110w_CC1016 (idle) and Samsung_CLP-365
    (disabled, its reason shown), the default star on Samsung and "Default
    printer: Samsung_CLP-365" below -- the same two and the same default that
    lpstat -p / lpstat -d print; the detail side shows the chosen queue
    (docs/screenshots/leopard/System-Preferences-Print-and-Fax-mcde.png);
  - "Add Printer..." finds "HP LaserJet M110w (CC1016)" over mDNS, choosing
    it fills the name HP_LaserJet_M110w_CC1016 and the URI
    ipp://192.168.1.147:631/ipp/print
    (docs/screenshots/leopard/System-Preferences-Print-and-Fax-Add-Printer-
    mcde.png);
  - "dtsystemsettings -set-default-printer Samsung_CLP-365" as the user
    answers "The default printer was not changed: The default printer needs
    the administrator." -- the root step runs in the su terminal;
  - test_sysinfo prints both queues and the discovered printer;
  - make lib/McdeSys, programs/dtsystemsettings exit=0; check lib/McdeSys:
    test_sysinfo and test_netmount PASS.

Open (follow-up): printing a test page, the fax/Bluetooth/AppleTalk printers
of the reference, the NetBSD CUPS path, and adding a queue verified in a VM
with an IPP printer.
2026-11-14 13:27:22 +00:00
lotherk 020dd9ff5d MCDE dtsystemsettings: Security, three tabs (t0157)
New programs/dtsystemsettings/security.c with the reference's three tabs:

  General     "Require password to wake this computer from sleep or screen
              saver" writes dtsession's lock time (_DtSetSmState with
              SM_STATE_LOCKTIMEOUT; the Screen Saver page reads and writes the
              same field, so the two pages show one setting).  On: the lock at
              the saver's time, or ten minutes without a saver.  "Use secure
              virtual memory" is NetBSD's vm.swap_encrypt through McdeSys
              (now and in /etc/sysctl.conf, root).  Automatic login and a
              log-out after N minutes are shown as what the desktop has:
              dtlogin always asks for a name and a password, and dtsession
              has no idle logout -- the pane says so and greys the controls.
  Encryption  the cgd(4) volumes of /etc/cgd/cgd.conf, and the sentence that
              encrypting a disk is a decision of the installation, not of a
              running system; changing a passphrase is a follow-up.
  Firewall    the npf(7) state (rc.conf npf=YES, /etc/npf.conf); the rules
              are a follow-up -- a fixed template with the shares of the
              Sharing page, never free text.

McdeSys gained the security state: mcde_sys_swap_encrypt_get/_set,
mcde_sys_cgd_volumes, mcde_sys_firewall_get.  netbsd.c implements them
(sysctl(8) vm.swap_encrypt, /etc/sysctl.conf through a KeySet() that rc.conf
now uses too, /etc/cgd/cgd.conf, rc.conf's npf), linux.c answers
MCDE_SYS_ENOTSUP with a sentence saying whose feature it is.
test_sysinfo prints all three.

The pane's icon is new: programs/icons/McdeLock.pm (a padlock, palette
colours); "security" is a real pane now, not a greyed entry.

Measured under Xvfb with xdotool (dtsession started in the session):

  - the lock checkbox: _DT_SM_STATE_INFO on dtsession's window before the
    click 0xfff, ... lockTimeout 0x0; after it 0x100 (SM_STATE_LOCKTIMEOUT),
    lockTimeout 0x258 (600 s); a second click puts it back to 0x0;
  - the three tabs and their content (docs/screenshots/leopard/
    System-Preferences-Security-mcde.png with the lock on, ...-Encryption-
    mcde.png, ...-Firewall-mcde.png);
  - test_sysinfo on this (Linux) host prints the three MCDE_SYS_ENOTSUP
    sentences -- the pane shows them instead of dead controls;
  - make check programs/dtsystemsettings: test_panes PASS; the Sound and
    Keyboard & Mouse panes still switch their tabs after the layout fix
    below;
  - make programs/dtsystemsettings, lib/McdeSys exit=0.

A Motif lesson, saved in AGENTS.md: a row column inside the pane area takes
the other orientation unless told, a child added later to a tight-packed
column 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 pane therefore builds
its page fresh inside an XmPACK_COLUMN container on a tab change; the same
XmNorientation, XmVERTICAL went into the Sound and Keyboard & Mouse page
containers.

Not measured, because this host is not NetBSD or has no root: swapping
vm.swap_encrypt, reading cgd volumes, the npf state and writing npf rules.
They are the follow-up task for the VM.
2026-11-14 12:44:32 +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
lotherk 1474c16a59 MCDE dtsystemsettings: Sound in three tabs, and the bar switch (t0163)
The area is programs/dtsystemsettings/sound.c now (as MCDE-PROGRAMS.md
planned), with the reference's tabs:

  * Sound Effects: "Choose an alert sound" and the events of the session's
    theme in a list (Launch, Start, End, Error, Warning, Beep, ...); a click
    sends the event through mcdesoundd (McdeSoundEvent).  The theme is an
    option menu of the directories next to the current one (it replaces the
    row of buttons).
  * Output: the volume of the default output and Mute
    (mcde_sys_volume_get/_set/_mute), and "Show the volume in the bar": it
    writes ~/.dt/bar (showvolume=), which dtbar reads at start -- with 0 the
    speaker is not managed (the status area is one icon narrower).
  * Input: a note, because McdeSys has no capture API (no level meter, no
    input volume); that belongs to the same addition as a sound-device list.

Measured under Xvfb with xdotool:

  - the three tabs (docs/screenshots/leopard/System-Preferences-Sound-mcde
    .png, ...-Sound-Output-mcde.png, ...-Sound-Input-mcde.png); Output shows
    the volume read from the server (100) and the two switches;
  - unchecking "Show the volume in the bar" writes "showvolume=0" into
    ~/.dt/bar (cat); dtbar started with that file shows no speaker in the
    status area, with "showvolume=1" it does;
  - a click on an event reaches mcdesoundd: its log names the theme and the
    file ("Error -> .../Camouflage/error.wav"); PulseAudio is not there in
    the Xvfb session ("Connection refused"), the daemon's own player is the
    fallback.

Not measurable here: hearing a sound (no audio device in the session), and
choosing an output device (McdeSys has no device list; two Pulse sinks are
not there).  A separate alert volume and the input level wait for that API.
2026-11-14 11:23:51 +00:00
lotherk c13e16700b MCDE dtsystemsettings: Desktop & Screen Saver, with Test and Random (t0110)
Desktop and Screen Saver are one pane with the two tabs of the reference;
-pane screensaver still opens the saver's page (PaneFind gives the old id to
the pane).  The saver page has the list in two groups ("Screen Savers" and
"Pictures"), a running preview, Options..., Test, the start time in the
reference's seven steps (3/5/15/30 minutes, 1 and 2 hours, Never), the
password box and the notes for the corners and the energy pane.

  * "Use random screen saver" selects StartDtscreenRandom, a new action
    (programs/types/dtscreen.dt.src: dtscreen -mode random) that dtscreen
    resolves into one of its modes each time it starts.
  * Test starts the chosen saver fullscreen in an override-redirect window
    and stops it after eight seconds -- dtscreen has no input loop, and a
    session's saver is stopped by dtsession's lock, which a settings program
    does not have.
  * Options... writes dtscreen.<mode>.batchcount and dtscreen.<mode>.delay
    into the server's resources (where dtscreen reads them, resource.c) and
    records them in ~/.dt/screensaver; the preview restarts with them.
  * The start-time scale writes dtsession's saver timeout, as before.

Pictures are listed but not offered: dtscreen's image mode has no picture
folder source of its own, so a folder entry would write a setting nobody
reads.  "Show with clock" and the hot corners wait for a clock mode in
dtscreen and for the Expose & Spaces pane; the energy warning waits for the
Energy Saver pane (there is no DPMS time to compare with yet).  Those three
are named in the pane itself.

tools/mcde-shot.sh: DTDATABASESEARCHPATH is comma-separated now -- that is
the separator DtEnvMap uses for it; with colons DtDb stays half-loaded and
actions are not found (the preview said "Action StartDtscreenSwarm was not
found"; with commas the savers run).  The data types come with it: a dtfile
window in the test home shows the PNG and text icons instead of "??" (the
t0194 symptom).  The script also exports DTSCREENSAVERLIST as dtsession does,
through a Session() function because the list has spaces.

Measured under Xvfb with xdotool:

  - the page shows the two groups, Swarm chosen and running in the preview
    (docs/screenshots/leopard/System-Preferences-Desktop-and-Screen-Saver-
    mcde.png);
  - Test covers the screen with the saver (...-Test-mcde.png) and the pane is
    back eight seconds later;
  - Random replaces the preview's process: "dtscreen -mode swarm" became
    "dtscreen -mode random" (pgrep), and dtscreen itself reports "random
    mode chose image" when run with -mode random;
  - Options... with the delay moved writes "dtscreen.swarm.batchcount: 100"
    and "dtscreen.swarm.delay: 530000" into RESOURCE_MANAGER and
    "mode=swarm" / "batchcount=100" / "delay=530" into ~/.dt/screensaver;
  - make check: test_panes PASS (new alias checks).
2026-11-14 10:49:54 +00:00
lotherk 67315ef458 MCDE dtsystemsettings: Keyboard & Mouse with three tabs (t0129)
The two panes Keyboard and Mouse are one pane with the reference's tabs --
Keyboard | Mouse | Shortcuts; -pane keyboard, -pane mouse (and -pane
shortcuts) still work and open that tab (PaneFind maps the old ids onto the
pane and ShowPane passes the id).

Keyboard: repeat, its delay and rate, key click, the kind of keyboard (auto,
PC, Mac), the try-it field, and "Modifier Keys...": a dialog with four menus
(Caps Lock, Control, Option, Command -> one of the four functions or No
Action).  The dialog writes the same ~/.dt/keyboard dtkeys reads and runs
"dtkeys auto" at once.

dtkeys gained the modifier functions: the four physical keys come out of
Lock/Control/Mod1/Mod4 and into the modifier their function asks for
(XChangeKeyboardMapping + XSetModifierMapping, Xlib only, no setxkbmap), and
it runs at login as before (Xsession.d/0072.dtkeys).  It also reads the file
without dropping its lines when the kind changes.

Mouse: as before plus the wheel's direction (buttons 4 and 5 change places,
natural scrolling; the map goes to dtsession with the rest).  How far one
turn scrolls is the program's own step -- said in the pane.

Shortcuts: the keys of the desktop in a list (name, key, where it lives,
from ~/.dt/shortcuts; Launcher=... is written).  The launcher's key is live:
type a chord, Change writes Dtlaunch*hotkey and ~/.dt/shortcuts, then
"dtlaunch -quit" (new: asks the running launcher to let go of its key and
waits until the selection has no owner) and a fresh dtlaunch grabs the new
key.  Restore Defaults puts Cmd+space back.  The other rows are a record:
their keys are dtwm's and the app-defaults', and the pane says so.

"Full keyboard access" (the reference's text boxes / all controls) is left
out: Motif's focus traversal with Tab is always there and there is no switch
to turn it into two levels.

Measured under Xvfb with xdotool:

  - Modifier Keys: Caps Lock -> Control, Apply -> ~/.dt/keyboard says
    "capslock: control"; the key map then has keycode 66 = Control_L, Lock
    empty, Control 37/66/105 (read with an Xlib program; the pane keeps the
    display alive, so Xvfb does not reset the map when dtkeys exits).
  - Shortcuts: Launcher + "Cmd+j" + Change -> RESOURCE_MANAGER has
    Dtlaunch*hotkey: Cmd+j, ~/.dt/shortcuts has Launcher=Cmd+j, the running
    launcher is replaced and Cmd+j opens it (docs/screenshots/leopard/
    System-Preferences-Keyboard-and-Mouse-Shortcuts-mcde.png shows the list
    and the note; the picture with the open launcher after Cmd+j is the same
    run).
  - Wheel: "Scrolls down when turned towards you" -> xmodmap -pp: physical
    4 -> code 5, 5 -> 4.
  - -pane mouse opens the Mouse tab.
  - make check: test_panes PASS (new alias checks).

Pictures: System-Preferences-Keyboard-and-Mouse-mcde.png (Keyboard),
...-Mouse-mcde.png, ...-Shortcuts-mcde.png.

Open: only the launcher's key is changeable at runtime; the others are a
record (dtwm and app-defaults own them); the scroll step and Full keyboard
access are left out with the reason above; the modifier dialog keeps its
size after the first open.
2026-11-14 10:26:11 +00:00
lotherk dc8dfd2cc7 MCDE dtsystemsettings: Appearance, the four groups and the fonts (t0099)
The pane is the reference's form now: Appearance (a menu of the palettes with
the chosen palette's eight colours as a strip under it, then "In use:"),
Highlight Color (the eight colours of the active palette, written as
*highlightColor and *selectColor for programs started later), the scroll
bars, the number of recent items, font smoothing -- and the fonts, which
lose their own pane (the "fonts" id still opens Appearance, the entry is
gone from the overview).

What the pane writes is what the session reads:

  *<screen>*ColorPalette, *highlightColor, *selectColor   _DtAddToResource
  Dtwm*mcdeTitleBarDoubleClick: none|minimize             then dtwm restarts
  ~/.dt/recent.conf: applications=N, documents=N, servers=N
  ~/.config/fontconfig/conf.d/60-mcde-antialias.conf      antialias=false

dtwm gained the title-bar double click: a new resource (WmResNames.h,
WmGlobal.h, WmResource.c, default "none") and, in CheckButtonPressBuiltin
(WmCEvent.c), the double-click branch on the title -- F_Minimize or
F_Maximize instead of the move.  dtbar's Recent Items and Connect to
Server's history now read their counts from ~/.dt/recent.conf
(ItemsPush/FillRecent, ReadLines/RecentAdd).

Two things the task itself said to drop are dropped, with the reason in the
pane: Motif has no separate arrow buttons at both ends of a scroll bar and no
smooth scrolling (an animation), and a click in a Motif scroll bar pages
while the middle button jumps to the place.

Font smoothing is a fontconfig rule, not *Xft.antialias: measured here, Xft
ignores that X resource (205 grey levels with and without it), while a
<match target="font"> antialias=false rule gives 2.  The rule reaches GTK and
Qt as well (one look).

Measured under Xvfb with xdotool:

  - "Off" + Apply -> the file is written and an Xft render test in the same
    session drops from 205 distinct grey levels to 2; with the size limit 20
    the same test (size 12) gives 2, with 4 it gives 205 -- the rule holds
    only up to the size.
  - the title-bar box + Apply writes Dtwm*mcdeTitleBarDoubleClick: minimize,
    dtwm restarts, and a double click on dtpad's title bar leaves its window
    "Map State: IsUnMapped" (IsViewable before).
  - a palette choice writes *0*ColorPalette: Camouflage.dp (and dtthemesync's
    colours), the strip and the Highlight menu follow it.
  - Documents=5 with eight entries in ~/.dt/recent shows five in the bar's
    Recent Items; Servers=0 leaves the Connect to Server field at "sftp://",
    Servers=10 prefills the stored address.

Pictures: docs/screenshots/leopard/System-Preferences-Appearance-mcde.png
(the four groups) and ...-Appearance-fonts-mcde.png (scrolled to the fonts).
make check: test_panes PASS.

Open: a highlight colour reaches programs started later, not the running
ones; "Applications" has no recent list to feed; the dtwm value takes effect
when the window manager restarts (the Apply button does it); the antialias
rule is read at program start; and the fonts list is six rows inside the
scrolled pane.
2026-11-14 09:59:02 +00:00
lotherk 8f5d74c5f5 MCDE dtsystemsettings: the overview with history and search (t0097)
The overview has the reference's toolbar now: Back and Forward for the
panes shown (a history of 16 ids, the overview itself a place in it), Show
All, and a search field on the right.  Typing keeps the panes that match --
id, label or keywords, without case -- and frames them (two pixels, etched
out), the others and their names go grey; an empty field shows all again.

The panes are the four bands in the order of GOAL.md, with the ones the
reference has and MCDE names but does not draw yet (Dock, Security, CDs &
DVDs, Energy Saver, Startup Disk, Accessibility) greyed as PANE_LATER, and
Bluetooth under Hardware, where the reference has it.  Every pane has
keywords for the search ("wlan", "uhr", "drucker", "freigaben", ...).

test_panes.c: the categories run in the order Personal, Hardware, Internet
& Network, System; the six PANE_LATER panes exist and match their own names;
the search finds what it should -- "wlan" the network, "UHR" the date and
time, "bluetooth" one pane, "xyzzy" none, "" every pane.

Measured under Xvfb: docs/screenshots/leopard/System-Preferences-0-mcde.png
(the four bands, the toolbar) and System-Preferences-0-search-mcde.png
("wlan": Network framed, all else grey); Sound -> Show All -> Back returns
to Sound (the toolbar's title follows); make check: test_panes PASS.

Open: the reference's footer with the lock and the "?" is not there yet
(each pane keeps its own Unlock...), the search has no result list under
the field, and a PANE_LATER without an icon file shows no picture.
2026-11-14 08:55:44 +00:00
lotherk cbf1edf406 MCDE dtsystemsettings: Sharing, name at the top and services beside
their details (t0158)

The pane follows the reference's shape: "Computer Name:" with the field and
Edit..., the line "Computers on your local network can access this computer
at NAME.local", then the services at the left and the chosen one at the
right -- its switch, its state and the address others use (ssh,
smb://ADDR/, ADDR:/folder, afp://ADDR/ from mcde_sys_interfaces).  The
folders shared by SMB, NFS and AFP appear under the file sharing services
(Add.../Remove), and Unlock... is unchanged.

mcde_sys_hostname_set was declared and never written; it is now: the name
must be letters, digits, '.' and '-' (checked in common.c), NetBSD writes
/etc/myname and runs hostname(1), Linux /etc/hostname and hostnamectl (else
hostname(1)).  "Edit..." runs it as root (dtsystemsettings -set-hostname
NAME in the su terminal, like the time zone and the clock).

Measured under Xvfb: the pane shows the name (kitt), the .local line, the
five services, and for "File Sharing by SMB" its state "On -- others reach
it at smb://192.168.1.116/" and the Shared Folders list with Add.../Remove
(docs/screenshots/leopard/System-Preferences-Sharing-mcde.png); selecting
another service switches the page and hides the folders (Remote Login).

Open: the reference's On column as check marks (the switch is on the detail
page), per-user rights for a folder (Samba valid users/read list/write list
and the netatalk counterpart -- McdeSys would need a struct instead of the
path list), Printer, Screen and Internet Sharing entries, AppleTalk options
under "Options...", and the change of the host name was not run as root
here (no root; it writes /etc/myname and the running name).
2026-11-14 08:37:26 +00:00
lotherk 6398b40b08 MCDE dtsystemsettings: Date & Time with three tabs (t0103)
The pane is the reference's window now: the big clock, the date and the
zone, then Date & Time | Time Zone | Clock.

Date & Time: "Set date & time automatically:" with the server
(pool.ntp.org by default) and "Apply Time Service"; a month calendar with
the weekday row and < > for the months (the chosen day pressed), a time
field with "Now", an analog clock drawn on Expose and once a minute, and
"Set Date and Time".  Both root actions run in the su(1) terminal the
program already uses: dtsystemsettings -set-time EPOCH and -set-ntp on|off
SERVER.  Below: "To set date and time formats, use Language & Region." and
a button that opens that pane.

Clock: the bar's clock -- shown or not, 24-hour, seconds, weekday, date --
written to ~/.dt/clock ("show=", "format="), which dtbar reads at its next
minute (measured: format=%H:%M leaves "07:49" in the bar).

McdeSys has the system side: mcde_sys_ntp_get/set (NetBSD: ntpd=YES in
rc.conf, the pool line of ntp.conf, /etc/rc.d/ntpd start/stop; Linux:
timedatectl set-ntp and timesyncd.conf) and mcde_sys_time_set
(settimeofday(2), root).

Measured under Xvfb: the three tabs render
(docs/screenshots/leopard/System-Preferences-Date-and-Time-mcde.png,
...-Time-Zone-mcde.png, ...-Clock-mcde.png); the Clock tab writes
"show=1" and "format=%a %e %b  %H:%M" to ~/.dt/clock, and dtbar with that
file shows the chosen format.

Not run: the root paths (this session has no root, and setting the
development host's clock or switching its NTP on is a hazard).  The tests
the task asks for -- ntpd=YES in /etc/rc.conf, ntpd running, date(1)
changed -- belong in the test VM; the commands they use are the two above.
2026-11-14 07:54:06 +00:00
lotherkandClaude Opus 5.5 2e54b6f3d2 MCDE dtsystemsettings: Unlock runs root without the user's environment -- su root, a fixed PATH, XAUTHORITY named
AsRoot() ran "su -m root -c CMD"; su(1): -m "Leave the environment
unmodified", so root found CMD (dtsystemsettings, dtbackup ...) through the
user's PATH -- a ~/bin/dtsystemsettings ran as root -- and HOME stayed the
user's, so root wrote ~/.dt files there (review 2026-11-13, tasksd t0079).

Now plain su (HOME and SHELL become root's), the root command sets
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/pkg/sbin:/usr/pkg/bin:<dt>/bin and
XAUTHORITY (the user's, or $HOME/.Xauthority, only if the path is plain) so
root still reaches the display.  On NetBSD su's -c is a login class and the
words after the login go to the shell, so the form works there as on Linux.
A command too long for the buffer is not run at all instead of cut.

Checked: dtsystemsettings builds (make mcde-linux); the generated command run
under sh with a fake dtsystemsettings first in PATH finds none
(PATH=/sbin:...:/usr/pkg/dt/bin), /tmp/pwned is not created.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 03:41:32 +00:00
lotherkandClaude Sonnet 5.5 58f9281bb5 MCDE: System Settings > Language replaces dtstyle's language choice
language.c lists the UTF-8 locales of locale -a; 'Use for Next Login' writes
~/.dt/language, which Xsession.d/0010.language reads before the desktop starts.
Compiled and linked with make mcde-host (build/logs/mcde-host-2026-11-13c.log);
not yet run on a display.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-13 10:24:31 +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 b0ac7a9d25 MCDE S4: the Sound pane lists every event of the theme
Instead of eight fixed buttons the pane reads McdeSoundCount and
McdeSoundEventName: the twenty events of the theme appear as buttons that
play through mcdesoundd (screenshot settings-sound4.png).
2026-11-12 12:44:27 +00:00
lotherk 9b57d2a773 MCDE S4 in part: a second theme, listed and switched at runtime
The theme directory is the unit: a second theme Base (the lower voice of
Camouflage) sits beside it.  The Sound pane lists the directories found
next to the current theme; a click sends McdeSoundSetTheme, which writes
the path into _MCDE_SOUND_THEME and sends _MCDE_SOUND_RELOAD; the server
reads the property and reloads (McdeSoundLoadTheme).

Measured: click on Base -> daemon log 'theme now .../Base', the next
Launch plays .../Base/launch.wav; screenshot settings-sound3.png.
2026-11-12 12:42:42 +00:00
lotherk 6834760edb MCDE S3: the Sound pane plays the desktop's events
System Settings > Sound keeps volume and mute and adds eight event buttons
(Launch, OpenFolder, Error, Warning, Beep, DeskSwitch, TerminalBell,
NewMail) that send McdeSoundEvent; McdeSoundCount/McdeSoundEventName expose
the theme's event list for the next step (a list built from the theme).

Measured: screenshot build/mcde-shots/settings-sound.png; two clicks with
xdotool on 'Launch' produce two 'Launch -> .../launch.wav (player)' lines
in the daemon's log.
2026-11-12 12:36:39 +00:00
lotherkandClaude Opus 5.5 09cd93673c mcde: the monitors move into libDtSvc, for System Settings and dtwm alike
include/Mcde/Displays.h (McdeDisp*): the arrangement arithmetic
(DtUtil2/McdeDispConf.c, test_displays now in lib/DtSvc) and reading,
setting and keeping the monitors through RandR (DtUtil2/McdeDisplays.c,
the RandR ids in the structure instead of tables of the pane).  libDtSvc
links Xrandr when configure found it; dtwm links it for the coming plug
and play.  Tested: make check in lib/DtSvc (test_displays) and
dtsystemsettings; the pane on the dummy Xorg as before (applied, back
after 16 s, kept and written).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 23:41:23 +00:00
lotherkandClaude Opus 5.5 ab79f53571 mcde: System Settings > Displays -- arrange, resolution, rotation, main display, mirror
The monitors as rectangles to drag, docked to each other; per monitor on
or off, resolution, rotation, main display (top bar and front panel);
mirroring.  RandR 1.3, set as xrandr(1) does.  Apply asks to keep the
settings and goes back by itself after 15 seconds.  MCDE remembers the
monitor (EDID id), not the socket, also while it is unplugged:
~/.dt/displays, applied at login by Xsession.d/0071.displays.

Tested: make check (test_displays, 31 cases); Xorg with the dummy
driver: -apply-displays, an unknown mode and all-off refused; in the
pane 1024x768 applied and back after 16 s, kept with Keep and written.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 23:36:27 +00:00
lotherkandClaude Opus 5.5 c1367c039b mcde: dtthemesync -- GTK, Qt, KDE and X programs take MCDE's palette
From the session's palette and font, with Motif's own colour calculation:
X resources (and the 16 terminal colours), GTK 1, GTK 2/3/4 themes with
Motif's bevels and no animation, qt5ct/qt6ct schemes and kdeglobals.  It
is also the XSETTINGS manager, so running GTK programs change with the
palette at once; System Settings runs it when a palette or font is chosen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 23:00:27 +00:00
lotherkandClaude Opus 5.5 1b2f0c6b58 mcde: System Settings: the kind of keyboard, and how windows take the focus
Keyboard chooses which key is Command (find out, PC, Macintosh) and runs
dtkeys at once; Mouse has "The focus follows the pointer" and "The active
window comes to the front", applied as the Style Manager applies them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 22:34:37 +00:00
lotherkandClaude Opus 5.5 2f38a94a53 mcde: System Settings: Backup
The pane for the backup: Back Up Automatically, every hour; the backup
disk with Choose Disk... -- the partitions that do not hold the system,
and a password, twice, whose fields show stars, that encrypts the
backups (a reminder to keep it safe follows); when the last backup ran
and how it ended; Back Up Now, which runs dtbackup in a terminal where it
shows what it does; Restore..., the backups newest last and a path to
bring back into ~/Restored; how many hourly, daily and weekly backups
are kept, every monthly one or not, and the free space in percent below
which the oldest go.  As a user it shows and offers Unlock....

Measured on Xvfb as a user (build/mcde-shots/desk-0.png): no disk, no
backup yet, the defaults 24/30/52, every monthly, 10 %, all greyed but
Back Up Now and Unlock....  Not measured: setting up, running and
restoring (borg comes into the set with the next userland).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 13:54:27 +00:00
lotherkandClaude Opus 5.5 64bfd2048f mcde: Sharing in System Settings: SSH, SMB, NFS, AFP, AppleTalk
McdeSys gets the services that let others in (mcde_sys_service_state,
mcde_sys_service_set) and one list of shared folders for SMB, NFS and AFP
(mcde_sys_shares, mcde_sys_shares_set: /etc/mcde-shares, and a block
between "# MCDE shares begin" and "... end" in exports, smb.conf and
afp.conf; the rest of each file stays as written).  NetBSD switches
rc.conf and runs the rc.d scripts -- sshd; rpcbind, mountd, nfsd and
nfslocking for NFS; samba, netatalk, atalkd and papd from pkgsrc, whose
example rc.d scripts are copied to /etc/rc.d first, as PKG_RCD_SCRIPTS=YES
would.  Linux uses systemctl (ssh, smbd and nmbd, nfs-server, netatalk;
no AppleTalk).  NetBSD's kernel has AppleTalk (GENERIC: options NETATALK)
and pkgsrc's netatalk4 builds atalkd on NetBSD.  docs/reference/sharing.txt.

The Sharing pane (Internet & Network) shows each service with its switch
and how others reach it (ssh host, smb://host/, host:/folder,
afp://host/), and the shared folders with Add and Remove; as a user it
offers Unlock..., as Accounts does.

Measured: on the Linux host, read only: ssh, smb, nfs installed, enabled,
running; afp and appletalk not installed (the pane on Xvfb says so).  In
the build VM as root: NFS on started rpcbind, mountd, nfsd, statd, lockd;
sharing /tmp/mcdeshare made showmount -e list it for Everyone; NFS off
stopped them; the VM's rc.conf was restored after.  First found there:
mountd will not start without /etc/exports, and statd/lockd are one
script, nfslocking.  Samba and netatalk are not in the makronix set yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 12:36:46 +00:00
lotherkandClaude Opus 5.5 648a11f4de mcde: System Settings draws Startup, with programs opened at login
At login the session left or the home session, asking before logout, and
Save These Windows as Home Session: what dtstyle's Startup sets, sent the
same way (_DtSetSmState with SM_STATE_START and SM_STATE_CONFIRM; the
client message _DT_SM_SAVE_TO_HOME).  And a list of programs to open at
login, one command a line in ~/.dt/login-items, which the new
Xsession.d/0095.loginitems starts five seconds into the session, each
through sh in the background, as 0090.dtbar starts the bar.

Measured in a dtsession on Xvfb (build/mcde-shots/startup-*.png):
_DT_SM_STATE_INFO went from start 4 (current), confirm 1 (verbose) to 3
(home), 2 (quiet); adding dtcalc wrote ~/.dt/login-items.  0095.loginitems
sourced by ksh returned at once and ran both entries of a test list (one
with blanks in its argument) after the pause, skipping the comment.  Save
as Home Session is not measured.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 08:45:25 +00:00
lotherkandClaude Opus 5.5 dffeaf9b17 mcde: Wi-Fi in System Settings: the networks in reach, joining one
McdeSys implements mcde_sys_wifi_scan and mcde_sys_wifi_join.  NetBSD
does what sysinst does (src/usr.sbin/sysinst/net.c): a network block in
/etc/wpa_supplicant.conf -- a new file gets the example's ctrl_interface
for the wheel group, so wpa_cli answers users -- and wpa_supplicant,
wpa_supplicant_flags and dhcpcd in rc.conf, each line replaced or added;
then both are restarted.  Scanning asks wpa_cli scan_results, else
ifconfig -v IF list scan (root).  Linux uses nmcli.  The sources are in
docs/reference/wifi.txt.

The Network pane lists the networks of the first Wi-Fi card with signal
and lock, scanned once the pane is drawn.  Join... opens a terminal where
su asks for the administrator's password and dtsystemsettings -join-wifi
IF SSID-HEX asks for the network's password without echo: the name goes
as hexadecimal, the password on no command line of MCDE's (nmcli takes it
on its own on Linux; said in linux.c).

Measured on the Linux host: test_sysinfo finds 5 networks on wlp0s20f3
(read only); the pane lists them on Xvfb; -join-wifi as a user refuses
with "Only the administrator can join" and refuses a bad name.  Not
measured: joining (never on this host), NetBSD scanning and joining
(no Wi-Fi in the build VM).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 08:37:38 +00:00
lotherkandClaude Opus 5.5 db32002727 mcde: choosing the time zone in Date & Time
McdeSys gets mcde_sys_timezone_get (where /etc/localtime points into
/usr/share/zoneinfo), mcde_sys_timezones (zone1970.tab, else zone.tab, and
UTC) and mcde_sys_timezone_set: the zone must be a file of the zoneinfo
directory and a plain name, the caller root; the new link is made beside
/etc/localtime and renamed over it, so it is never missing (sysinst makes
the same link: src/usr.sbin/sysinst/util.c), and Debian's /etc/timezone
follows where it exists.  All POSIX, in common.c, for NetBSD and Linux.

Date & Time shows the regions and their places with the zone in use
selected; Set Time Zone sets it as root, or opens a terminal where su asks
for the password and runs dtsystemsettings -set-timezone ZONE.

Measured: test_sysinfo on the Linux host says "zone Europe/Lisbon, 313
zones offered" and refuses "../../etc/passwd"; on Xvfb the pane shows
Europe / Lisbon selected (build/mcde-shots/desk-0.png).  Setting a zone
is not measured yet (not on the host; the build VM is busy).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 08:29:50 +00:00
lotherkandClaude Opus 5.5 f788367833 mcde: read PNG with libpng, not with Motif
Motif 2.3.8 shifts the channels of a PNG without alpha the wrong way and
draws only its blue (docs/reference/motif-png.txt).  libDtSvc gets
McdeImageGetPixmap/McdeImageFreePixmap (Mcde/Image.h): PNG through libpng's
simplified interface (png_image, the background for the alpha), packed by
the visual's masks; every other format still through XmGetPixmap.  dtwm's
backdrops and slideshow and the small pictures of System Settings use it.
dtwm now also frees a backdrop pixmap that is not in Motif's cache (a
scaled copy), which it kept for good before.

configure finds libpng >= 1.6 with pkg-config; the recipe includes
graphics/png's buildlink3.mk (Motif depends on it already); the header is
in the PLIST.

Measured on Xvfb: the RGB PNG that showed only blue (slide-3.png before)
shows its colours as backdrop (build/mcde-shots/slide-3.png) and as a
small picture (desk-2.png).  A 16-bit PNG is not measured.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 08:16:14 +00:00
lotherkandClaude Opus 5.5 e73c2858e9 mcde: System Settings: Desktop and Screen Saver, with a folder as slideshow
One pane with two pages.  Desktop: the backdrop in use as a preview with
its name; the places on the left -- CDE's backdrops, ~/.dt/backdrops,
~/Pictures, folders the user adds with Choose Folder... (kept in
~/.dt/backdrop-folders); their pictures small on the right, made one at a
time while the window is idle and scaled with Xrender; the style (fill,
fit, centre, tile); "Change picture every ..." and "Random order" make
the place a slideshow in dtwm (f.mcde_slideshow now, Dtwm*mcdeSlideshow
for the next login).  Screen Saver: the savers of $DTSCREENSAVERLIST with
one running in a preview (_DtSaverStart), the minutes until it starts and
whether it asks for the password, sent to dtsession as dtstyle does.

DtWidget's mail control crashed in strlen when neither MAIL nor LOGNAME
was set (dtwm's front panel in a session started by hand): the name now
comes from the password file.

Measured on Xvfb with dtwm (build/mcde-shots/desk-*.png): the backdrops
and ~/Pictures appear as small pictures; a click made d-green.jpg the
backdrop and the preview; Change picture put "Dtwm*mcdeSlideshow: 30 0 3
.../Pictures" into the resources and dtwm showed the folder's first
picture; the Screen Saver page ran Swarm and Qix in its preview.  Not
measured: the saver settings through dtsession (the test was not run).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 08:12:20 +00:00