Files
mcde/programs/dtlaunch
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
..