fix: replace per-user skel autostart with gated system-wide autostart#23
Merged
Conversation
The wizard's autostart entry was installed to /etc/skel/.config/autostart/, so every user ever created (live-session users, installer-created users, accounts added years later) received a private copy that launched the wizard unconditionally on first login. Suppression was purely reactive: the app deleted the per-user copy only when that user completed the flow, and live media had to manually rm the file from skel. Mechanism change: - Install a single autostart entry to /etc/xdg/autostart/ (XDG-standard, never copied per-user). Its Exec passes --autostart. - Gate at startup: with --autostart, main() exits 0 before any GTK/resource loading when the per-user completion marker ($XDG_CONFIG_HOME/snow-first-setup.done) exists or when running a live session (existing backend.is_live_session(), snow-linux.live=1). - On completion, write the marker instead of deleting a file: the remove-autostart-file script becomes complete-setup, which touches the marker and also rm -f's the legacy skel-copied per-user entry as upgrade cleanup (rm -f, since new users never have it). - Upgrade safety: pre-0.2.16 users keep a per-user copy with the same filename, which shadows the /etc/xdg/autostart entry per the XDG autostart spec, so no double launch; GApplication single-instance (org.frostyard.FirstSetup) guards any residual race. A dpkg maintscript removes the now-obsolete skel conffile on package upgrade. The OEM snow-user path (Session=firstsetup) and explicit launches are unaffected: the gate only applies to --autostart invocations. Fixes frostyard/snosi#355 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jul 5, 2026
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.
Fixes frostyard/snosi#355
Problem
data/meson.buildinstalled an unconditioned copy of the launcher .desktop to/etc/skel/.config/autostart/, so every user ever created on a snow system got the wizard autostarted on first login — live-session users (colliding with the installer; dakota-iso had to manually rm it from skel), installer-created users, and accounts added years later. Suppression was purely reactive: the app deleted the per-user copy only when that user completed the flow.Mechanism change
/etc/skel/.config/autostart//etc/xdg/autostart/(XDG-standard, never copied per-user)Exec=snow-first-setup --autostart;main()exits 0 before any GTK/resource loading when the completion marker exists orbackend.is_live_session()is trueremove-autostart-file)$XDG_CONFIG_HOME/snow-first-setup.done(complete-setupscript); alsorm -f's the legacy skel-copied entry as upgrade cleanup--autostartis registered as aGApplicationmain option so a gated-through launch (fresh user, first login) parses cleanly.snowuser path (Session=firstsetup) and explicit/manual launches are unaffected — the gate applies only to--autostartinvocations.is_live_session()(snow-linux.live=1).Upgrade / double-launch analysis
~/.config/autostart/org.frostyard.FirstSetup.autostart.desktop. It has the same filename as the new system entry, so per the XDG autostart spec the per-user file shadows/etc/xdg/autostart— no double launch. If both somehow fired,org.frostyard.FirstSetupis a single-instanceAdw.Application, so the second activation folds into the first.--autostartflag, so legacy behavior persists for them until they finish the wizard, at which pointcomplete-setupremoves the legacy file and writes the marker.debian/snow-first-setup.maintscriptrm_conffiles the obsolete skel conffile on package upgrade (moot for fresh image builds, correct for any dpkg upgrade path).Verification
meson setup --prefix=/usr --sysconfdir=/etc+ninja: clean build;DESTDIRinstall confirmed the entry lands atetc/xdg/autostart/org.frostyard.FirstSetup.autostart.desktop(withExec=snow-first-setup --autostart) and nothing underskel/.meson test: bothdesktop-file-validatetests pass (launcher + new autostart entry).main.main([... --autostart])returns 0 before resource loading; without marker,is_setup_complete()is False.complete-setupexercised against a fake$HOME: writes the marker, removes a pre-seeded legacy autostart file, exit 0;shellcheckclean.FirstSetupApplicationconstructed successfully with the new--autostartoption registered (no short-flag collision).🤖 Generated with Claude Code