A new view beside icons, small icons and the columns (Command+4): the chosen
picture large in the middle, three neighbours each side, flat, in Motif's
frame colours -- no perspective, no reflection, no glide; a redraw happens on
Expose and when the choice changes. Under the strip the name is bold and
the kind follows (the type's label), then a scroll bar for the strip, then
the folder's list; the chosen line is selected and moves with the strip.
Pictures come from McdeThumb: only the visible entries are read, and the
second visit of a folder reads ~/.dt/thumbs (MCDE_THUMB_DEBUG=1 makes the
cache line appear; tools/mcde-shot.sh passes the variable into the session).
A file that is no picture is named where its neighbours are.
The arrows walk the strip (the list follows), Space is the file window's
preview, and the toolbar has the fifth toggle "Strip" -- its icon is the
folder's. Command+4 was the small-icon view; that moved to Command+5
(docs/reference/shortcuts.txt), as the strip takes the fourth place of the
reference's four views.
Measured under Xvfb with xdotool, a folder of 13 PNGs:
- Command+4 shows Bild-01 large with its neighbours
(docs/screenshots/leopard/finder-cover-flow-mcde.png shows Bild-03
chosen: two left, three right, "Bild-03.png" bold over "PNG", the list
with Bild-03 selected);
- Right twice walks to Bild-03 and the list's third line is selected;
- switching to Icons and back to Strip serves three of the visible
pictures from the cache: "thumb: .../Bild-02.png from the cache" and its
neighbours in the log (MCDE_THUMB_DEBUG=1);
- the strip's own drawing area takes the arrows and Space.
Open: the strip has its own list, not CDE's work-area list below it (the
status line and the other views' selection are not shared), and the split is
fixed -- no sash to drag. Idle traffic was not measured separately; the
strip draws only on Expose and on a change, and McdeThumb reads no timer.
14 KiB
14 KiB
ext/src/mcde -- MCDE, the Makronix Common Desktop Environment
What it is for
The Makronix fork of CDE 2.5.3 (IMPORT), on its way to a desktop that works
as one (GOAL.md, "MCDE"): one System Settings, a software update, the small
things that belong together. Makronix ships it in place of CDE; pkgsrc builds
it on any platform. What each program does is in its source and in
docs/MCDE-PROGRAMS.md (Makronix root); this file holds the rules. The
state of the file before the refactor of 2026-11-13, with the per-feature
narratives and test notes, is docs/reference/mcde-agents-history-2026-11-13.txt.
The philosophy -- binding (Konrad, 2026-11-09)
- CDE, Motif, Xlib, X11 only. No GTK, no Qt, no compositor, no scripting language as a requirement. Fast, and it runs on machines of 1995. GPU frugal: no compositing or animations, redraw on Expose only.
- C99 and POSIX (POSIX.1-2008, XSI where CDE already needs it). New code
compiles with
-std=c99 -D_POSIX_C_SOURCE=200809Land uses nothing beyond POSIX and the X/Motif libraries. MCDE runs on NetBSD and Linux. - The operating system is behind one layer:
lib/McdeSys. Everything that differs between systems (users, network, Wi-Fi, time zone, host name, services, update, power, sound, disks, sharing, backup) goes through the functions ofinclude/Mcde/McdeSys.h. A program never callsuseradd,ifconfig,wpa_supplicant, edits/etc/rc.confor callssystemctlitself, and never has an#ifdef __NetBSD__. Each system has one backend (lib/McdeSys/netbsd.c,linux.c, plusdisk_*.c);common.cis POSIX. A backend uses the system's own tools the documented way. - Installed with pkgsrc, in conflict with CDE:
pkgsrc/MakefilehasCONFLICTS+= cde-[0-9]*. - One look: the MCDE palette generates the X resources and the GTK/Qt
themes (
programs/dtthemesync, XSETTINGS daemon); MCDE is the reference. - Language: what a user sees may be translated; configuration, bindings
and the system below are English only (
Mod4<Key>,Shift<Key>,Ctrl<Key>in every app-defaults catalog, never translated).
What is in it
- The CDE 2.5.3 tree (first commit unchanged) with the fixes of pkgsrc
wm/cdefolded in.IMPORTsays where it came from. pkgsrc/-- recipewm/mcde(mcde-0.1.0);pkgsrc-motif/-- recipex11/mcde-motif(same archive, WRKSRCmotif/, CONFLICTS motif, lesstif, openmotif);tools/ext-sync.shcopies them into pkgsrc.motif/-- Motif 2.3.8 with pkgsrc x11/motif's patches and MCDE's own fixes (Command key inlib/Xm/Transltns.c, exported menu bars_XmMenuBarSetExported, Xft renditions). Outside pkgsrc MCDE builds it itself (configure.ac,--with-private-motif, the default); through pkgsrc on Makronix it is the system's Motif (--without-private-motif), and the recipe/buildlink direct other Motif packages to it. Konrad, 2026-11-13: MCDE builds its own Motif when it is not Makronix.lib/McdeSys(libMcdeSys;test_sysinfo),lib/McdeSound(include/Mcde/Sound.h),lib/DtSvc/DtUtil2/Mcde*.c(global menu client side, menu model, images, display arithmetic and RandR, WM hints); headers ininclude/Mcde/.McdeThumb.c(include/Mcde/Thumb.h, testtest_thumb) is the miniature: PNG, JPEG, GIF, BMP and XPM read with libpng, libjpeg and C99, scaled with a box filter and cached in~/.dt/thumbs/<64|128|256>/-- the one picture reader for dtfile and the programs that show pictures, no gdk-pixbuf, no program per picture.- Programs of its own:
dtbar(top bar and global menu, protocolinclude/Mcde/GlobalMenu.h),dtkeys,dtthemesync,dtappscan,dtsystemsettings(panes by category, McdeSys only),dtdiskutility,dtbackup,mcdesoundd,dtphoto,dtpaint,dttoolbox. - Changes inside CDE programs, marked "MCDE" in the source: dtfile
(
Navigation.c,NetView.c,Columns.c,Peek.c-- the preview on Space, withMcdeThumb;Trash.c-- the question before the Trash is emptied,Menu.c-- Open Trash/Empty Trash in the File menu), dtterm (Tabs.c,Dropdown.c,Profiles.c, Xft), dtwm (WmMcdeSnap.c,WmMcdePanel.c,WmMcdeDisplays.c,WmSlideshow.c, always-on-top,_NET_ACTIVE_WINDOW,McdeExcludeBar), dtlogin (config/sessionetc.d), the front panel (programs/types/dtwm.fp.src,types/dt.dt.src). programs/icons/MakronixDtlogo.pm-- the Makronix logo, default of dtlogin.
Conventions that bind
- Session start: the desktop's own programs (mcdesoundd, dtlaunch,
dtterm -dropdown, dtbar, login items) are started by dtsession through
config/sys.sessionetcandconfig/sessionetc.d/(source of the scripts:programs/dtlogin/config/0*), not by Xsession.d. Started before dtsession they took*backgroundfrom the user's~/.Xdefaults(purple bar, 2026-11-13). Xsession.d keeps only what must precede it (language, fonts, displays, dtkeys, home folders, dtappscan, dtthemesync:dist_xsess_SCRIPTS). - Command key (shortcuts by the place of a key): the key left of the space
bar is Command = Mod4 on every keyboard, left of it Option = Alt (Mod1,
Motif's mnemonics), then Ctrl.
programs/dtkeysexchanges left Alt and left Windows on a PC keyboard; a Macintosh keyboard is already so (mcde_sys_keyboard_is_mac);~/.dt/keyboard"type: auto|pc|mac". Menu shortcuts on letter keys areMod4<Key>xshowing "Cmd+X" in every catalog. Ctrl+C stays the interrupt in dtterm. - Global menu: every Motif program takes part through
DtInitializewithout its own change;MCDE_NO_GLOBAL_MENUkeeps a menu bar in its window. A foreign window is registered with a hidden core widget, never a shell. A program without a global menu in front: the bar shows only the M menu. The bar uses colour set 5 (Dtbar*secondaryColorSetId: 5). - Testing a pane:
tools/mcde-shot.shsetsDTDATABASESEARCHPATHwith commas (types/%L,types/C), which is the separatorDtEnvMapuses for this variable; a colon-separated list leaves DtDb half-loaded, so data types say UNKNOWN and actions ("StartDtscreenSwarm", "Trash") are not found (measured 2026-11-14 -- the screen saver preview showed "Action ... was not found" until the commas were in). The same script exportsDTSCREENSAVERLISTas dtsession would. - Windows: dtwm places and maximizes below the bar; focus follows the
pointer without auto-raise by default; zones and full screen use Command+Ctrl
keys; the outline is XOR or four thin windows, never FlashOutline. The main
display carries bar and front panel, the others the backdrop only;
workspaces are shared; MCDE remembers a monitor (EDID) in
~/.dt/displays. A double click on a window's title bar doesDtwm*mcdeTitleBarDoubleClick(noneby default,minimizeormaximize); the Appearance pane writes it and restarts dtwm (_DtWmRestartNoConfirm). - Front panel: Files, Mail, Terminal, Network, Desktop Style left of the
workspace switch (Konrad, 2026-11-11), running programs and trash right. No
clock in the panel (the bar has it). Actions at the end of
types/dt.dt.srctake no shell variables and noCDE_INSTALLATION_TOPinside'...'(docs/reference/frontpanel.txt). - Pictures: PNG goes through
McdeImageGetPixmap(libpng), because Motif 2.3.8 draws an RGB PNG as its blue channel only (docs/reference/motif-png.txt); free withMcdeImageFreePixmap. - Keyboard and mouse: one pane, Keyboard & Mouse (three tabs;
-pane keyboard|mouse|shortcutsopen a tab).~/.dt/keyboardcarriestype:(auto|pc|mac, dtkeys' Alt/Windows exchange) and the modifier functions (capslock: controland its three neighbours); "dtkeys auto" applies both with XChangeKeyboardMapping/XSetModifierMapping, at login (Xsession.d/0072.dtkeys) and at once from the pane. The Shortcuts tab keeps~/.dt/shortcuts(Name=key); the launcher's key is live there:Dtlaunch*hotkey, anddtlaunch -quitasks the running launcher to let go of it, so the next one takes the new key. The other rows are a record -- their keys live in dtwm and the app-defaults. - Desktop & Screen Saver are one pane with two tabs (the old
-pane screensaveropens the saver's page). The saver list is dtsession'sDTSCREENSAVERLISTplusStartDtscreenRandom(dtscreen -mode random, an action of its own inprograms/types/dtscreen.dt.src); "Test" starts the chosen saver in a fullscreen override-redirect window and stops it after 8 s (dtscreen has no input loop; a session's saver is ended by dtsession's lock, which the settings program does not have). "Options..." writesdtscreen.<mode>.batchcountand.delayinto the server's resources and~/.dt/screensaver. The start time has the reference's seven steps (3/5/15/30/60/120 minutes, never) and goes to dtsession as the saver timeout. - Sound: the pane is
dtsystemsettings/sound.c, three tabs (Sound Effects, Output, Input). The effects are the events of the session's theme (McdeSoundEventName, a click sendsMcdeSoundEvent), the theme is a menu of the directories next to the current one. Output has the volume, Mute and "Show the volume in the bar" (~/.dt/bar,showvolume=, read by dtbar at start -- unmanaged, the speaker is gone). Input is a note: McdeSys has no capture API and no sound-device list yet. - Strip view (
dtfile/Strip.c, Command+4): the reference's Cover Flow without compositing -- the chosen picture large in the middle, three neighbours flat each side (the type's picture when a file is no picture), the name and kind under it, and the folder's list below in the same form. Pictures come fromMcdeThumb(the~/.dt/thumbscache; only the visible entries are asked for), the arrows walk the strip and the list follows, Space is the preview. Command+5 is the small-icon view now. The old "Small" key moved;docs/reference/shortcuts.txtsays so. - Network in the column view:
~/Networklists the hosts DNS-SD finds (mcde_sys_net_browse) instead of files; a host is a column of its NFS exports and SMB shares (mcde_sys_net_shares), and a share chosen is mounted on~/Network/HOST/NAME(mcde_sys_net_mount) and opened. The mount needs root; as a user it says why in a message. The sidebar's eject buttons and a "Computer > Network" root are not built. - Disk Utility: the toolbar carries Mount, Unmount, Eject, Verify,
Info, Log, Refresh and Unlock; the detail block under the list shows
device, mount point, format, capacity, available and used from
mcde_sys_disks. "Eject" unmounts (McdeSys has no eject ioctl yet), and the RAID and Restore tabs say what is not built (RAIDframe/ccd, dump/dd copies); "Show details" opens and closes the First Aid report. - Displays menu: the bar's status area has one; it lists the monitors
from
McdeDispLoadand the modes of the first (the current one marked), "Detect Displays" re-reads RandR and runsdtsystemsettings -apply-displays, and "Displays Preferences..." opens the pane. A mode chosen is applied and asked about for 15 seconds, then put back (displays.cdoes the same). It reads only when the menu opens: no RandR timer. - Look settings: System Settings > Appearance writes what the session
reads --
*<screen>*ColorPaletteand*highlightColor/*selectColor(through_DtAddToResource, so programs started later use them),~/.dt/recent.conf(applications|documents|servers=N, read by dtbar's Recent Items and Connect to Server), and for font smoothing fontconfig's~/.config/fontconfig/conf.d/60-mcde-antialias.conf(anantialias=falserule; Xft ignores theXft.antialiasX resource here -- measured 2026-11-14, so the file is what reaches every toolkit). - Root actions (accounts, network, sharing, time zone, update) run in a
terminal after
su, viadtsystemsettings -<action>; backup is the exception:dtbackup runfrom root's crontab, passphrase in/etc/mcde-backup.pass(0600). - Reference documents for the system layer:
docs/reference/(borg, netconfig, wifi, sharing, battery, desktop-entry, cde-colorsets, frontpanel, motif-png).
Hazards -- never on the development host or the test VM
- Power items of dtbar (Restart, Shut Down) tested to the end; the system may let the user do it.
- Network Apply or Wi-Fi join over the ssh card; switching SSH in the VM (ssh is the way in); any join of Wi-Fi on the development host.
- Erase, mount or repair in dtdiskutility.
- Sound tests against the real PulseAudio: use a private one (null sink, own socket).
- Xvfb loses its keymap and properties when its last client leaves: keep one
(
xprop -root -spy). XTest drags need-xrm "Dtwm*freezeOnConfig: False".
Building it
Building is cross and native, never in a VM (since 2026-11-13); the VM only tests installs.
- The recipe is
ext/src/mcde/pkgsrc(andpkgsrc-motif); the archive anddistinfocome fromtools/mcde-dist.sh(git archiveof a commit, so after a change: commit, thentools/mcde-dist.sh, then build). The set is made bymake userland(rootAGENTS.md). - On the Linux host, for development:
make mcde-linux(tools/mcde-linux.sh;MCDE_DIRS=programs/dtfilefor one directory,MCDE_DIRS=installintobuild/mcde-root/dt), andmake mcde-host(tools/mcde-host.sh, the desktop in/usr/mdt). - The C dialect is set by
configure.ac(-std=gnu11and five GCC 14 downgrades;MCDE_DIALECT_CFLAGSfor a build that ignores CFLAGS); no build system needs to know it. - Tests:
make check(test_sysinfo,test_menumodel,test_displays,test_items,test_panes,test_profiles).
What may be changed, and how
- Anything; it is ours. Keep the licence headers (LGPL,
COPYING): the "CDE - Common Desktop Environment" lines are attribution, not branding. - Branding is what a user sees: names in dialogs,
DtVERSION_STRING("MCDE x.y.z (CDE 2.5.3)"), logos.DtVERSION,DtREVISION,DtUPDATE_LEVELstay at 2.5.3: they are the API level programs test against. - Not yet: the install prefix (
${PREFIX}/dt) and the tarnamecde(from it comeshare/cdeandetc/cde); they move together with the PLIST. - An update of the CDE upstream is a merge,
IMPORTrenewed (ext/AGENTS.md).
What must not be touched
- The first commit (upstream archive unchanged); the API level above.
- The rules above: an
#ifdefper OS in a program, a GTK/Qt dependency, or a direct call of a system tool outsidelib/McdeSysis a finding, not a patch. - pkgsrc itself: a recipe problem is fixed in
ext/src/mcde/pkgsrc, not in the rootpkgsrc/.