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.
25 lines
1016 B
Makefile
25 lines
1016 B
Makefile
MAINTAINERCLEANFILES = Makefile.in
|
|
|
|
# dtsystemsettings, the settings of the computer in one window (main.c);
|
|
# panes.c is the list of the panes, plain C with its own tests (make check).
|
|
bin_PROGRAMS = dtsystemsettings
|
|
|
|
dtsystemsettings_SOURCES = main.c panes.c panes.h ui.h accounts.c update.c \
|
|
network.c \
|
|
input.c appearance.c desktop.c timezone.c wifi.c \
|
|
startup.c sharing.c backup.c displays.c language.c sound.c printers.c parental.c \
|
|
security.c
|
|
dtsystemsettings_CPPFLAGS = -I$(top_srcdir)/include $(DT_INCDIR) \
|
|
-I$(top_builddir)/include $(XFT_CFLAGS) \
|
|
-DCDE_INSTALLATION_TOP=\"$(CDE_INSTALLATION_TOP)\" \
|
|
-DCDE_CONFIGURATION_TOP=\"$(CDE_CONFIGURATION_TOP)\"
|
|
# Xft and fontconfig: the font families (appearance.c)
|
|
# Xrandr: the monitors (libDtSvc's McdeDisplays.c), when configure found it
|
|
dtsystemsettings_LDADD = $(LIBMCDESOUND) \
|
|
$(LIBMCDESYS) $(DTCLIENTLIBS) $(XRANDRLIB) \
|
|
$(XTOOLLIB) $(XFTLIB)
|
|
|
|
check_PROGRAMS = test_panes
|
|
test_panes_SOURCES = test_panes.c panes.c panes.h
|
|
TESTS = test_panes
|