29 Commits
Author SHA1 Message Date
lotherkandClaude Sonnet 5.5 222417e6bb mcde: the work of the Makronix tree (27 commits since 118b19a171) merged into the fork
The plain-file ext/src/mcde of the Makronix tree carried dtphoto (layers, PSD,
clipboard shape, JPEG/GIF/XPM writers), dtbar, dtsystemsettings (Startup Disk,
dock), dtwm and icon changes that this fork did not have.  Resolved by hand:
dtphoto.c, McdeThumb.c, Thumb.h, dtsystemsettings, dtphoto.msg, AGENTS.md take
the Makronix side (a strict continuation of what the fork mirrored); the fork's
own changes are kept (M_PI guard and the front[] fix of 4e51d6dd, 'No
dttoolchest menu', DeskLowerBackdrops, distinfo until the next ext-dist).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-23 08:34:35 +00: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 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 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
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
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 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 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 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
lotherkandClaude Opus 5.5 49860dec83 mcde: System Settings draws Appearance and Fonts
Appearance shows CDE's palettes, each as a row of its colours (named
colours too: Black.dp, BlackWhite.dp), found where the colour server looks
(~/.dt/palettes, the configuration and the installation directory).  A
choice merges "*0*ColorPalette: NAME.dp" with _DtAddToResource as dtstyle
does (ColorMain.c) and says it takes effect at the next login, with a Log
Out Now button: on TrueColor the colour server cannot change colours it has
allocated, which dtstyle says as well.

Fonts lists the families Xft knows and a size, with a preview in that
font, and merges *mcde.fontName/*mcde.fontSize, the render table every
MCDE program draws with (sys.resources).  dtsession saves the whole
RESOURCE_MANAGER at logout (SmSave.c, OutputResource).

Measured on Xvfb (build/mcde-shots/input-appearance.png, input-fonts.png):
choosing Arizona put "*0*ColorPalette: Arizona.dp" into RESOURCE_MANAGER;
choosing DejaVu Sans Mono at 12 put "*mcde.fontName: DejaVu Sans Mono",
"*mcde.fontSize: 12" there, and the preview drew in it.  The next login
with the new palette is not measured here.

www: System Settings and the bar brought up to date.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 07:42:21 +00:00
lotherkandClaude Opus 5.5 c0bf505c0a mcde: keyboard and mouse in System Settings; dtsession keeps them
dtsystemsettings draws the Keyboard pane (key repeat, its delay and rate,
key click, a field to try it) and the Mouse pane (primary button, pointer
speed, threshold, double-click time) instead of opening dtstyle.  A change
takes effect at once through Xlib and goes to dtsession as dtstyle sends
it (_DT_SM_KEYBOARD_INFO, _DT_SM_POINTER_INFO; *multiClickTime through
_DtAddToResource).

dtsession saves and restores the XKB repeat delay and interval
(XkbGetAutoRepeatRate at logout, XkbSetAutoRepeatRate at login), which the
core keyboard state does not carry.  And it keeps every pointer button: the
map was char[5], the parse of the property wrote past it without a bound,
and the restore cut the map to 5, which the server refuses on a mouse with
more buttons.

Measured on Xvfb (build/mcde-shots): the sliders set the server (xset q:
delay 490, rate 29, click 20; acceleration 3/1, multiClickTime 280; xmodmap
-pp 1->3, 3->1).  Through a whole dtsession: logout wrote RepeatDelay 490,
RepeatInterval 34, ButtonMap 3,2,1,4,...,10 (10 buttons), AccelNum 3; the
next login restored delay 490 rate 29, acceleration 3/1 and the swapped
buttons.  The double-click time is saved (dt.resources) but its restore is
not measured: a dtsession started without Xsession gets no resources
loaded (3 in xrdb, against 108 in a real session).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 07:30:58 +00:00
lotherkandClaude Opus 5.5 8ab668c689 mcde: Accounts and Software Update, in dtsystemsettings and McdeSys
McdeSys: mcde_sys_users/user_add/user_delete (users.c, POSIX getpwent and
useradd/userdel), user_set_password and user_set_admin per system (NetBSD:
pw_gensalt+crypt for usermod -p, wheel; a group member removed by rewriting
the group's line as user.c does, since usermod -G only appends -- measured;
Linux: chpasswd on stdin, gpasswd, sudo), mcde_sys_update_check/apply
(NetBSD: /etc/makronix/update, RELEASE, sysupgrade, pkg_add -uu; Linux:
apt-get).  A secret goes through a pipe, never on a command line.
Tests: test_sysinfo refuses a bad login and, not as root, adding (PASS on
Linux and NetBSD); as root in the NetBSD VM add/admin on/off/password/delete
pass and /etc/group is as before.

dtsystemsettings: Accounts (list, Add/Delete/Password/Administrator,
Unlock... through su -m root in a terminal, password fields show stars),
Software Update (running, available, new packages, source, Check Now,
Update Now... runs -apply-update as root in a terminal; the check runs
after the pane shows: apt took 21 s here).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 12:38:21 +00:00
lotherkandClaude Opus 5.5 6f68d92f75 mcde: dtsystemsettings, the settings of the computer in one window
Four bands of icons -- Personal, Hardware, Internet & Network, System --
from panes.c (plain C, PASS test_panes); a click opens the pane in the
window, Show All goes back, -pane ID opens one directly.  Own panes through
McdeSys: Sound (volume, mute), Network (the cards, addresses, SSID),
Bluetooth (state, on/off), Date & Time (a running clock, the zone), About
(everything mcde_sys_info knows).  Appearance, Desktop, Fonts, Language,
Screen Saver, Keyboard, Mouse, Startup open dtstyle, Printers dtprintinfo,
until they are drawn here; Accounts and Software Update are greyed.  dtbar's
System Settings... and the Sound/Bluetooth/Network Settings... items open
it.  New icons: a 48-pixel Makronix logo, 32-pixel network and Bluetooth.
Seen on Xvfb with dtwm and dtbar, sound against a private PulseAudio.

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