You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
desktops: clean up headers for the mkdocs sidebar TOC
The auto-generated left-nav was rendering badly:
- YAML schema sub-headers like
'Per-release block (releases.<codename>)' had angle
brackets that mkdocs's TOC generator passed through
as raw text, producing 'releases <codename>' with
a literal '<' / '>' character and a missing dot.
- Bash module API headers carried the full function
signature inline, e.g.
module_desktops <command> [de=<name>] [tier=<tier>]
[arch=<arch>] [release=<release>]
This wrapped over multiple lines in the sidebar and
looked like garbage.
Two fixes:
1. Drop angle-bracket parameter hints from every header.
The schema sections become 'Tier blocks',
'Per-release block', 'Custom repository block', etc.
The information that used to be in the header (the
parent path like releases.<codename>) is already
covered in the body text.
2. For each bash module function, the header is now just
the function name (no signature, no inline backticks).
The signature moves into a fenced code block on the
line below — visible to readers, invisible to the
sidebar TOC.
Before:
### `module_desktops <command> [de=<name>] [tier=<tier>] [arch=<arch>] [release=<release>]`
After:
### module_desktops
```text
module_desktops <command> [de=<name>] [tier=<tier>] [arch=<arch>] [release=<release>]
```
Same treatment for the Common pitfalls subheaders, the
parser helper section header, and the common.yaml /
'List and JSON list modes' subheaders — drop the inline
backticks so the sidebar formatting is consistent.
No content changes; this is purely a sidebar-rendering fix.
@@ -123,7 +123,7 @@ Each desktop is defined in a single YAML file under `tools/modules/desktops/yaml
123
123
124
124
The first DE-specific package that survives all filters becomes `DESKTOP_PRIMARY_PKG`, used by `module_desktops status` for `dpkg -l` checks. It must come from the DE's own `tiers.minimal.packages` block, not from `common.yaml`, otherwise every DE would share the same primary package.
125
125
126
-
### Per-release block (`releases.<codename>`)
126
+
### Per-release block
127
127
128
128
The release block is **orthogonal** to the tier walk: it applies to whatever tier is being installed. Use it for things that vary by release rather than by user choice (e.g. trixie's pulseaudio→pipewire swap, bookworm's `gnome-calculator` addition).
129
129
@@ -155,7 +155,7 @@ Use the per-arch layer for permanent arch-wide holes (e.g. `blender` always miss
155
155
156
156
`tier_overrides`can live in `common.yaml` (applies to every DE) or in a per-DE YAML (applies only to that DE). The parser merges common first, then per-DE.
157
157
158
-
### Custom repository block (`repo`)
158
+
### Custom repository block
159
159
160
160
| Field | Type | Description |
161
161
|---|---|---|
@@ -253,7 +253,7 @@ releases:
253
253
architectures: [arm64, amd64]
254
254
```
255
255
256
-
### `common.yaml`
256
+
### common.yaml
257
257
258
258
`common.yaml`carries the per-tier defaults that apply to every desktop, the browser substitution table, and any cross-DE `tier_overrides`. Per-DE YAMLs only declare a `tiers` block when they want to add packages on top of common or override common-tier entries.
259
259
@@ -359,7 +359,7 @@ The per-release layer is needed because the same arch can resolve differently ac
359
359
- `chromium`isn't built for riscv64 in either Debian or Ubuntu.
360
360
- `firefox`isn't built for noble/plucky riscv64 either.
361
361
362
-
## Python helper: `parse_desktop_yaml.py`
362
+
## Python helper: parse_desktop_yaml.py
363
363
364
364
Single-purpose CLI that bash modules invoke via `python3`. All YAML parsing and validation happens here so the bash side stays free of YAML logic.
365
365
@@ -421,15 +421,19 @@ The parser is strict about top-level structure but tolerant of malformed sub-nod
421
421
-**Path traversal guard** — `de_name` is resolved against `yaml_dir` via `os.path.realpath`/`commonpath`. Anything outside the directory (`../...`, absolute paths, symlink escapes) is rejected with `Error: invalid desktop name '<name>'` and exit 1.
422
422
-**Tolerant normalization** — `tiers`, `releases`, `architectures`, `tier_overrides`, `repo`, every list field passes through `_as_dict` / `_as_list` helpers. Wrong-typed nodes coerce to safe empty defaults (`{}` or `[]`) instead of raising `AttributeError` or doing surprising substring matches like `arch in "arm64"`.
423
423
424
-
### `--list` / `--list-json` mode
424
+
### List and JSON list modes
425
425
426
426
Iterates every `*.yaml` (excluding `common.yaml`), parses each one's release block, and prints **only entries supported on the requested (release, arch)**. Used by `module_desktops install` to show available desktops on error and by `module_desktops supported` to expose a machine-readable catalog. These modes do not require `--tier`.
427
427
428
428
## Bash module API
429
429
430
430
All functions are loaded by configng's module loader. They share global state (`DESKTOP_*` variables, `desktops_dir`, `DISTROID`) — call sites must follow the documented order.
Wraps `parse_desktop_yaml.py`. Resets all `DESKTOP_*` globals, runs the helper, and `eval`s its stdout. Returns 1 on parse failure (with the parser's stderr surfaced).
475
483
@@ -487,15 +495,27 @@ echo "$DESKTOP_TIER" # → full
487
495
echo"$DESKTOP_PACKAGES"# → minimal + mid + full set, with browser resolved
Convenience wrapper around `module_desktop_yamlparse` that returns 0/1 based on `DESKTOP_SUPPORTED`. Suppresses parser stderr — meant for predicates and CI gates.
497
513
498
-
### `module_desktop_repo <de_name>`
514
+
### module_desktop_repo
515
+
516
+
```text
517
+
module_desktop_repo <de_name>
518
+
```
499
519
500
520
Sets up a custom APT source. Must be called **after**`module_desktop_yamlparse` because it consumes `DESKTOP_REPO_URL`, `DESKTOP_REPO_KEY_URL`, `DESKTOP_REPO_KEYRING`.
501
521
@@ -508,7 +528,11 @@ Behavior:
508
528
509
529
A no-op if the YAML has no `repo:` block.
510
530
511
-
### `module_desktop_branding <de_name>`
531
+
### module_desktop_branding
532
+
533
+
```text
534
+
module_desktop_branding <de_name>
535
+
```
512
536
513
537
Copies branding assets and runs the optional postinst hook. Idempotent — every step is guarded with `[[ -d ... ]]`.
514
538
@@ -526,11 +550,19 @@ Copies branding assets and runs the optional postinst hook. Idempotent — every
526
550
527
551
The distributor logo for GNOME Settings → About / KDE Info Center / etc. is **not** installed from here — that file ships from `armbian-base-files` so it stays in sync with the `LOGO=` line in `/etc/os-release`.
528
552
529
-
### `module_desktop_getuser`
553
+
### module_desktop_getuser
554
+
555
+
```text
556
+
module_desktop_getuser
557
+
```
530
558
531
559
Returns the first non-root, non-system user with a real login shell. Prefers `$SUDO_USER` if set and not root, otherwise scans `/etc/passwd` for the first entry with `1000 ≤ uid < 65534` and a shell that does not match `nologin|false`. Exits 1 if none is found.
532
560
533
-
### `module_update_skel install`
561
+
### module_update_skel
562
+
563
+
```text
564
+
module_update_skel install
565
+
```
534
566
535
567
Walks `getent passwd`, and for every regular user (`1000 ≤ uid < 65534`, home directory exists, not root):
536
568
@@ -541,7 +573,11 @@ Walks `getent passwd`, and for every regular user (`1000 ≤ uid < 65534`, home
541
573
542
574
The recursive `chown` is critical: other package postinst scripts (caja, nemo, gnome-keyring, …) routinely leak root-owned files into the user's `~/.config` directory on first install. Without the recursive chown, those tools refuse to start on first login because they can't write their own config dirs.
Standalone AppImage helper. The internal `APPIMAGE_REPO` registry maps logical app names (e.g. `armbian-imager`) to GitHub `owner/repo` slugs and downloads the appropriate architecture-suffixed AppImage from the latest release. `module_appimage install` also installs `libfuse2`, `fuse3`, and the `libgles2`/`libegl1`/`libgl1`/`libgl1-mesa-dri` runtime so the AppImage can launch.
547
583
@@ -702,7 +738,7 @@ This makes the same code path usable for image preseeding inside Docker without
702
738
703
739
## Common pitfalls
704
740
705
-
### `packages_uninstall` cascade
741
+
### packages_uninstall cascade
706
742
707
743
Listing a package in`tiers.minimal.packages_uninstall` runs `apt-get remove --purge` on it after the install. If that package is a hard `Depends:` of any meta package the DE install pulled in, apt's autoremove cascade will yank the meta package along with it — and on systems with `APT::Get::AutomaticRemove "true"` (Ubuntu noble/plucky), the cascade keeps going and rips out a chunk of the desktop. Real examples that bit us:
708
744
@@ -712,7 +748,7 @@ Listing a package in `tiers.minimal.packages_uninstall` runs `apt-get remove --p
712
748
713
749
**Rule**: never put a `Depends:` of a metapackage you ship into `packages_uninstall`. Verify with `apt-cache rdepends --installed <pkg>` before adding anything.
714
750
715
-
### Gnome `daemon.conf` vs `custom.conf`
751
+
### Gnome daemon.conf vs custom.conf
716
752
717
753
Both Debian and Ubuntu ship a `gdm3` package, but they read different config files:
718
754
@@ -723,7 +759,7 @@ Both Debian and Ubuntu ship a `gdm3` package, but they read different config fil
723
759
724
760
The `auto` path also edits the file in place via sed (preserving any user customization like `WaylandEnable=false`) rather than overwriting it with a fresh `cat > $file`.
725
761
726
-
### `login` regex anchoring
762
+
### login regex anchoring
727
763
728
764
The stock Ubuntu noble `/etc/gdm3/custom.conf` template ships with a commented sample line:
0 commit comments