Commit Graph
11 Commits
Author SHA1 Message Date
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
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