systemd-headless-service
Background a TTY/tray app as a 24/7 user systemd service that survives reboot. Use when an app exits under `systemd --user` with no TTY, auto-exits because `!process.stdin.isTTY`, or must run headless with linger after PC restart.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- systemd-headless-service
- metadata
- { "tags": [] }
- description
- Background a TTY/tray app as a 24/7 user systemd service that survives reboot. Use when an app exits under `systemd --user` with no TTY, auto-exits because `!process.stdin.isTTY`, or must run headless with linger after PC restart.
- when-to-use
- Use when an app works in a terminal but dies under systemd --user (no TTY), drops to tray/background mode, or must survive reboot via `systemctl --user enable` with `loginctl linger`.
- argument-hint
- <binary> <flags>
02 资源文件 4
- 参考文档references/pitfalls.md1.1 KB
- 参考文档references/steps.md1.6 KB
- 参考文档references/unit-template.md1.2 KB
- 参考文档references/verify.md477 B
03 SKILL.md 正文
systemd Headless Service
Background a TTY/tray app as a 24/7 user systemd service that survives reboot: write the user unit, walk the six steps that actually matter, and verify active + enabled + auto-restart.
Global Rules
- Confirm scope before destructive steps. "Run 24/7" is not an uninstall; any
rm -rfof an app's data dir needs explicit confirmation (seepitfalls.md). - Find the real process and port before killing or enabling anything. A port number does not name an app; the wrong
killbreaks the user's setup.
Routing
| Step | Reference | Purpose |
|---|---|---|
| Unit template | references/unit-template.md |
The user-unit INI, enable + start commands, and survive-crash check. |
| Steps that matter | references/steps.md |
The six in-order steps: process/port, launch inspection, headless flag, MemoryMax, wait time, linger. |
| Pitfalls | references/pitfalls.md |
Double-launch race, deleted cwd, OOM during build, sqlite WAL lock. |
| Verify | references/verify.md |
is-active, is-enabled, port check, and auto-restart proof. |
04 同仓库更多 Skills
github-workflow
Umbrella for GitHub auth, repo management, issues, PRs, Mergify, and releases. Subsumes github-auth and repo-manager.
brave-automation
baa CLI: Brave profiles, Google sessions, credentials.
aes
AES docs, layers, rule fixes, and legacy migration.
pretext
Build creative browser demos with DOM-free text layout.
popular-web-designs
54 real design systems (Stripe, Linear, Vercel) as HTML/CSS.
p5js
p5.js sketches: gen art, shaders, interactive, 3D.