Appendix E

config-deb.sh

The full post-install automation script. Run it after a fresh Debian Testing netinst and it builds out the Fluxbox workstation described in Appendix B — or any slice of it you choose.

841 lines
4 profiles
17 components

How it works

Data-driven. Profile-based.

Each piece of the setup is a component: an ID, a description, a list of apt packages to install, an optional hook function, and a list of profiles that enable it by default. Add a line to COMPONENT_SPECS, and you automatically get a CLI flag, an interactive prompt, a config-file key, and profile inclusion — nothing else to wire up.

Four profiles

workstation default
Full daily-driver stack. This is what runs on my machine.
Includes: Cinnamon cleanup · APT guardrails · Xorg + Fluxbox · NetworkManager · Thunar + utilities · Bluetooth & battery tray · PipeWire audio · CUPS printing · Chromium + Firefox ESR · Fluxbox config skeleton · dev-tools
full workstation + extras
Everything in workstation, plus media apps and optional games.
Adds: evince · VLC · LibreOffice · GIMP · Inkscape · Audacity · DOSBox Staging · ScummVM · XBoard · XMahjongg · XGalaga
minimal bare X + Fluxbox
Guardrails + X11 + Fluxbox + NetworkManager + basic utilities. No audio, no browsers, no printing.
Good for: low-spec hardware, network appliances, machines where you'll install your own software selection.
guardrails cleanup only
Strips Cinnamon packages and sets APT to avoid installing Recommends/Suggests. No desktop installed.
Good for: existing installs that already have a DE configured, or servers where you only want the APT guardrails.

Components

Every component can be toggled independently of its profile defaults using --no-id, --enable-id, or --with-id flags. Components with a hook function run post-install logic beyond just apt-get install.

ID Description Profiles
cinnamon-clean Purge Cinnamon packages (runs hook, no apt install) workstation · full · minimal · guardrails
guardrails APT guardrails — no Recommends/Suggests, no Cinnamon in apt preferences workstation · full · minimal · guardrails
x Xorg + Fluxbox core (xorg, xinit, xterm, fonts-dejavu-core, xbacklight) workstation · full · minimal
network NetworkManager + loopback-only /etc/network/interfaces workstation · full · minimal
utils Thunar file manager, arandr display tool, numlockx workstation · full · minimal
bt-batt Blueman Bluetooth applet + cbatticon battery tray workstation · full
audio PipeWire stack (pipewire-audio, wireplumber, pavucontrol, pasystray) workstation · full
audio-alsa ALSA stack (alsa-utils, alsa-tools, alsa-oss) — use --alsa not in any profile by default
printing CUPS + system-config-printer GUI workstation · full
browsers Chromium + Firefox ESR workstation · full
extras evince, VLC, LibreOffice, xtrlock, xfburn, simple-scan, Calibre full
config Fluxbox config skeleton (menu, keys, startup, .xinitrc) per target user workstation · full · minimal
dev-tools git, vim, tmux, htop, build-essential, curl workstation · full
media-graphics GIMP + Inkscape full
media-audio Audacity full
dosbox DOSBox Staging full
casual-games ScummVM, Xboard + GnuChess, XMahjongg, XGalaga full

Running it

Common invocations.

The script requires sudo for all profiles except --dry-run, which you can run as your normal user to preview the plan without touching the system. By default it targets $SUDO_USER — the user who invoked sudo — for the Fluxbox config skeleton.

Default workstation profile for $SUDO_USER
sudo ./config-deb.sh
Specify a different target user
sudo ./config-deb.sh --user josh
Dry-run — see what would happen, no changes
./config-deb.sh --profile full --dry-run
Full profile
sudo ./config-deb.sh --user myuser --profile full
Minimal — X + Fluxbox + NM, nothing else
sudo ./config-deb.sh --user myuser --profile minimal
Guardrails only (no desktop)
sudo ./config-deb.sh --profile guardrails
Drop specific components from a profile
sudo ./config-deb.sh --profile full --no-printing --no-audio
ALSA audio instead of PipeWire
sudo ./config-deb.sh --profile workstation --alsa
Interactive wizard — choose everything interactively
sudo ./config-deb.sh --interactive

Config file

Per-user defaults can be set in ~/.config/debian-fluxbox-setup.conf (the home of whoever invoked sudo). Supported keys: PROFILE= and any component ID set to true or false. CLI flags override config file settings.

# ~/.config/debian-fluxbox-setup.conf
PROFILE=minimal
audio=true
printing=false

The Script

All 841 lines.

The source below is the exact file. Use the copy button to grab it, or the download link to save it directly. Once downloaded, make it executable with chmod +x config-deb.sh.

config-deb.sh 841 lines
Download