Background services without systemd (runit, OpenRC, ...)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
sarahandClaude Opus 5.5 committed 2026-10-13 17:51:30 +02:00
1 parent e7e233951f
commit f63e708572
8 files changed
+325 -110

No files matched your search

+18 -5
View File
@@ -6,7 +6,8 @@ It's one AppImage file: download it, run it, pick a program.
- **Install**: downloads the program's latest commit from its git repo, copies it into
`~/.local/share/SaraSuite/Programs/<Name>/` with its own Python venv, places its configs in
`~/.config/SaraSuite/<Name>/`, and writes its desktop entries, systemd user units, D-Bus
services and so on.
services and so on. Without systemd (runit on Void, OpenRC, s6, dinit, ...), background
services run the way they do on Windows: see the table below.
- **Update**: shown when the repo has a newer commit. Program files and integration files are
replaced; configs are *merged*: your edits always win, defaults you never touched follow the
new version, new keys are added (see `ConfigMerge.py`).
@@ -90,6 +91,15 @@ places it. It reapplies the installed commit, so the program itself isn't update
| `~/.cache/...` | `%LOCALAPPDATA%\...` |
| desktop entry | Start Menu shortcut (`[[Shortcuts]]`) |
| systemd user service | `ServiceRun.py`, started at login by a shortcut in the Startup folder; its PID is in `%LOCALAPPDATA%\SaraSuite\Services\<Name>.pid` |
Linux without systemd (no `/run/systemd/system`: runit on Void, OpenRC, s6, dinit, ...) runs
services like Windows does (`Services.py`): `ServiceRun.py` runs them, started at login by an XDG
autostart entry, `~/.config/autostart/<Name>.desktop`, which desktop sessions start whatever the
init system is. It restarts a service 10 seconds after it fails, like the unit's
`Restart=on-failure`, and keeps its output in `~/.local/share/SaraSuite/Services/<Name>.log` (its
PID next to it, in `<Name>.pid`). Units aren't written there, and `RestartUnits` stops the process
instead (D-Bus starts `xdg-desktop-portal` again when it's needed). A window manager that doesn't
run XDG autostart entries needs to start them itself (e.g. `dex -a` in its startup config).
| system `python3` | the `py` launcher / `python.exe`; if there's none, SaraSuite installs Python for the user with winget |
| AppImage self-update (rename over it) | `.exe` self-update (the running one is renamed to `SaraSuite.old.exe`, deleted on the next start) |
@@ -193,13 +203,16 @@ Option = "Autostart" # optional: only while the option is ticked
Root = false # true: outside $HOME, written through pkexec
Executable = false
[[Services]] # Linux: systemd --user units, enabled + started
Platform = "Linux"
Unit = "Example.service"
[[Services]] # Linux: a systemd --user unit, enabled + started; without
Platform = "Linux" # systemd, Name/Script/WorkingDir run by ServiceRun.py instead,
Unit = "Example.service" # started at login by an autostart entry
Name = "Example"
Script = "Example.py"
WorkingDir = "{ConfigDir}"
Option = "Autostart"
[[Services]] # Windows: run by ServiceRun.py from a Startup-folder shortcut
Platform = "Windows" # (also add ../../ServiceRun.py as a Template to {ProgramDir})
Platform = "Windows" # (both: add ../../ServiceRun.py as a Template to {ProgramDir})
Name = "Example"
Script = "Example.py" # relative to the app folder
WorkingDir = "{ConfigDir}"