Start score when the machine starts - #2184
Open
jcelerier wants to merge 1 commit into
Open
Conversation
jcelerier
force-pushed
the
fix/eglfs-screen-placement
branch
from
August 9, 2026 23:28
98b1bd4 to
17d941b
Compare
jcelerier
force-pushed
the
feature/autostart
branch
from
August 9, 2026 23:28
f88005d to
6040969
Compare
jcelerier
force-pushed
the
fix/eglfs-screen-placement
branch
from
August 10, 2026 05:05
17d941b to
809dde6
Compare
jcelerier
force-pushed
the
feature/autostart
branch
from
August 10, 2026 05:07
6040969 to
e65157a
Compare
jcelerier
force-pushed
the
fix/eglfs-screen-placement
branch
from
August 11, 2026 18:26
809dde6 to
3d77a23
Compare
jcelerier
force-pushed
the
feature/autostart
branch
from
August 11, 2026 18:26
e65157a to
e04a5b4
Compare
An appliance is a computer somebody switched on. Nobody logs into it, nobody opens a file, and when it stops nobody is there to start it again. Registering with whatever launches things at boot is small; the systems disagree about what can be asked of them, and that disagreement is the design. AutostartSettings says what is wanted, AutostartCapabilities says what the mechanism here can honour, and the generation is pure -- settings in, unit or task or entry out -- so what will be written can be tested without writing it anywhere. Three defaults are corrected rather than inherited, each of which fails silently on a machine with no keyboard. A systemd unit gets StartLimitBurst: unbounded restart plus a score that fails at startup is a boot loop nobody can log in to interrupt, and Task Scheduler gets the same bound. A task also refuses to start on battery and is stopped after three days, so both are turned off, and a second trigger is kept from starting a second copy to fight the first over the audio device. runningUnderSupervisor exists because a supervisor and score both restarting it gives two of them, one unwatched. Nothing uses it yet; the window that already restarts score into an editor will.
jcelerier
force-pushed
the
fix/eglfs-screen-placement
branch
from
August 18, 2026 01:08
3d77a23 to
3210a27
Compare
jcelerier
force-pushed
the
feature/autostart
branch
from
August 18, 2026 01:08
e04a5b4 to
90f0c8a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #2183, which it needs: coming up without an editor is a display setting, and this passes the flag that produces it.
An appliance is a computer somebody switched on. Nobody logs into it, nobody opens a file, and when it stops nobody is there to start it again.
This first commit is the part that can be tested without touching the machine: what would be written, and what each system will honour.
Model
AutostartSettings— enabled, delay, document, autoplay, hide editor, wait for load, restart on crash, and whether to start with the machine rather than with a login.AutostartCapabilities— what the mechanism available here can actually do, so the settings page can refuse to offer what nothing behind it will honour. A control that silently does nothing is worse than an absent one, because it is believed.The registration carries the command line
rather than score reading a second configuration at startup. It reuses flags that already exist, the unit says what it does, and it can be pasted into a terminal when it does not do it.
Defaults that are corrected rather than inherited
Each of these fails silently, on a machine that usually has no keyboard attached:
StartLimitBurst/StartLimitIntervalSec. Unbounded restart plus a score that fails at startup is a boot loop that nobody can log in to interrupt.RestartOnFailure/Count, plus three defaults turned off: a task refuses to start on battery, is stopped after three days byExecutionTimeLimit, and a second trigger would start a second copy to fight the first over the audio device and the screen.ThrottleInterval, since it ignores anything under ten seconds.runningUnderSupervisor()A supervisor and score both restarting it gives two of them, one of which nothing is watching. Nothing uses this yet — the shortcut that already restarts score into an editor will, in a later commit.
Tests
test_unit_autostart, 13 cases: command line assembly and ordering, the presence of each guard above, boot-vs-logon scope, XML escaping of a document name containing&and<, and quoting of paths with spaces through every mechanism. All generation is pure, so none of it writes to the system.Still to come
Backends that install and remove, status read back from the system rather than from score's own settings, the settings page, and making the editor restart supervisor-aware.