@@ -22,6 +22,12 @@ modular, more functional structure — is described in
2222** standard packages only** (Perl core plus ` libcurses-perl ` ); see the git
2323history for the detail of past fixes.
2424
25+ Recent work added things you drive ** from inside the running UI** : a guided
26+ config wizard, runtime config reload, colour-theme and key-map switching
27+ (including Meta/Alt and Ctrl bindings), menu/form search, file-based
28+ notifications, object-ownership management, and a one-step "run CCFE at login"
29+ kiosk setup. These are covered below and in ` man ccfe.conf ` .
30+
2531** v2.0 reorganises the install layout** (menus/forms moved out of ` lib/ ` into
2632` share/ccfe/objects/ ` ; per-user files follow the XDG base directories). See
2733[ ` MIGRATION.md ` ] ( MIGRATION.md ) if you are upgrading from a 1.x install.
@@ -131,6 +137,33 @@ setup). Defence in depth — OS-level confinement (a restricted shell, a
131137container, seccomp/AppArmor) — is still worthwhile for a true kiosk. See
132138` M8-AUDIT.md ` and ` TECH-DEBT.md ` for the analysis and history.
133139
140+ ` ccfe -R ` (` --restricted ` ) forces restricted mode for a single run regardless of
141+ config — it can only * tighten* (there is no flag to turn it off) and it also
142+ makes the object search ignore user-writable directories. It's the primitive the
143+ login-shell setup uses.
144+
145+ ### Launching CCFE at login
146+
147+ ** Configure CCFE → Login / shell setup** (the ` ccfe-login ` helper) makes CCFE
148+ start automatically on an interactive login or SSH session — for the current
149+ user, or ** system-wide** via ` /etc/profile.d ` (which needs root). It hooks the
150+ shell profile and fires on ** interactive logins only** , so ` scp ` , ` sftp ` ,
151+ ` rsync ` and ` ssh host command ` are unaffected.
152+
153+ Tick ** restricted kiosk mode** and the hook launches ` ccfe -R ` and replaces the
154+ login shell with it, so the session is sandboxed and quitting the menu logs out:
155+
156+ ``` sh
157+ ccfe-login install-user -r # kiosk menu for me on next login
158+ ccfe-login install-system -r # kiosk for every user (needs root)
159+ ccfe-login status # what is enabled
160+ ccfe-login uninstall-user # undo
161+ ```
162+
163+ The block it writes is marker-delimited and idempotent, so it is safe to
164+ re-apply or remove. A restricted CCFE session refuses these reconfiguration
165+ commands, so a kiosk user can't unhook the login they're confined to.
166+
134167## Colour and styles
135168
136169CCFE is monochrome by default. When the terminal supports colour (and
@@ -158,13 +191,60 @@ browser_global {
158191` title_attr ` (the header) and ` key_attr ` (the function-key bar) apply to every
159192screen — menus, forms and the output browser.
160193
161- CCFE was modelled on AIX's SMIT, and two ready-made themes ship under
194+ CCFE was modelled on AIX's SMIT, and ready-made themes ship under
162195` <prefix>/share/ccfe/themes/ ` : ** ` ccfe.conf.smit ` ** (the classic monochrome
163- original) and
164- ** ` ccfe.conf.smit-color ` ** (the colour version, including the header and
165- control keys). Drop one in as your ` ccfe.conf ` , or use it as an instance
166- config: symlink the binary to ` smit ` and save it as ` smit.conf ` , so ` smit `
167- gets its own scheme and menu tree (see * One binary, many menu trees* above).
196+ original), ** ` ccfe.conf.smit-color ` ** (the colour version, including the header
197+ and control keys), ** ` ccfe.conf.smit-panel ` ** (a panelled white-on-blue look)
198+ and ** ` ccfe.conf.console ` ** (a Linux-console scheme). Drop one in as your
199+ ` ccfe.conf ` , or use it as an instance config: symlink the binary to ` smit ` and
200+ save it as ` smit.conf ` , so ` smit ` gets its own scheme and menu tree (see * One
201+ binary, many menu trees* above).
202+
203+ You don't have to copy a theme by hand, though — ** Configure CCFE → Select
204+ colour theme** lists the installed themes and applies the chosen one at runtime
205+ (next section).
206+
207+ ## Configuring CCFE from the menu
208+
209+ Run ** ` ccfe config ` ** (or pick * Configure CCFE* from the default menu) for a
210+ guided wizard that writes your personal ` ~/.config/ccfe/ccfe.conf ` — screen
211+ layout, behaviour toggles, shell/restricted mode, config variables — without an
212+ editor. Several settings can then be changed ** while CCFE is running** and take
213+ effect immediately, no restart:
214+
215+ - ** Reload** — * Apply configuration now* re-reads the config and re-applies
216+ colours, key bindings, behaviour toggles and variables. (Switching the mouse
217+ or the screen layout, and restricted mode, still need a restart; the
218+ confirmation says so.) Bind it to a key with ` keymap { reload = ... } ` for
219+ instant feedback while you tune a config.
220+ - ** Colour themes** — * Select colour theme* lists the themes installed under
221+ ` share/ccfe/themes/ ` , saves your choice and applies it at once — the same as a
222+ ` theme = NAME ` line in the config.
223+ - ** Key maps** — * Select key map* switches between shipped presets:
224+ ** classic** (the F1–F9 SMIT layout), ** safe** (every function * also* on an
225+ Alt-letter, for terminals that grab the function keys), ** nano** (Ctrl chords)
226+ and ** mc** . Or spell your own out with a ` keymap { } ` section — each function
227+ can take an F-key, a Meta chord (` M-l ` ), a Ctrl chord (` ^G ` ) or a plain key,
228+ primary plus alternates:
229+
230+ ```
231+ keymap {
232+ list = F2, M-l
233+ back = F4, M-b, ^B
234+ exit = F9, M-q
235+ }
236+ ```
237+
238+ (A lone ` Esc ` is still "cancel"; Meta chords are disambiguated by a short
239+ timeout — the ` ESCDELAY ` environment variable, default 25 ms.)
240+ - ** Search** — * Search menus and forms* (also on the main menu, or bind the
241+ ` search ` function to a key) scans every menu and form on the path — titles,
242+ top/bottom text, item descriptions and form field labels — and jumps to the
243+ match you pick.
244+
245+ ** Notifications.** Point ` notify_file ` at a file and CCFE shows its contents as
246+ a banner whenever a menu screen is entered (each distinct write once) — a simple
247+ way for a producer to reach a logged-in operator.
168248
169249## Docker
170250
@@ -262,6 +342,12 @@ validating each with `ccfe -k`. It is plain CCFE content driving the
262342"Disk usage" "run: df -h"`). Field values reach the helper through
263343` $CCFE_FIELD_* ` , so nothing you type is shell-interpolated.
264344
345+ The builder also manages ** ownership** of your objects — * Change object
346+ ownership* (` ccfe-build chown <name> <user>[:<group>] ` ) lists the local users
347+ and groups to pick from and changes the owner of one of your own menus/forms.
348+ Changing to another user usually needs root; if you lack the privilege the
349+ error is shown plainly.
350+
265351Validate a menu or form without opening the UI (useful for authors and CI):
266352
267353``` sh
@@ -305,12 +391,14 @@ cd src
305391prove t/
306392```
307393
308- The suite covers: that the program compiles; that the ` .menu ` / ` .form ` /
309- ` .item ` plugin file formats still parse against the demo and ` sysmon `
310- fixtures; a source-level regression guard for the historical form crash; and
311- an end-to-end terminal smoke test that batch-installs CCFE into a temp prefix
312- and drives the menus and a form on a real pseudo-terminal. The parser tests
394+ The suite (400+ tests) covers: that the program compiles; that the ` .menu ` /
395+ ` .form ` / ` .item ` plugin file formats still parse against the demo and ` sysmon `
396+ fixtures; a source-level regression guard for the historical form crash; the
397+ pure ` CCFE::* ` parser/layout/theme modules; and end-to-end terminal tests that
398+ batch-install CCFE into a temp prefix and drive it on a real pseudo-terminal —
399+ including the runtime reload, theme/key-map switching (and Meta-key bindings),
400+ menu search, notifications, ownership and login-shell setup. The parser tests
313401load the program headlessly (via the ` CCFE_TESTING ` guard) so no terminal is
314- required; the tty test brings its own pty (pure core Perl, see
315- ` t/lib/CCFE/Test/Pty.pm ` ) and skips itself where no Linux pty / ` Curses ` is
402+ required; the tty tests bring their own pty (pure core Perl, see
403+ ` t/lib/CCFE/Test/Pty.pm ` ) and skip themselves where no Linux pty / ` Curses ` is
316404available.
0 commit comments