GNOME Bugzilla – Bug 706692
add phase _EARLY_INITIALIZATION
Last modified: 2013-10-15 14:22:08 UTC
This would be useful for gnome-initial-setup bug #704956. Patches with rationale to follow.
Created attachment 252956 [details] [review] [PATCH 1/2] gnome-session/README: rename enum to match the code
Created attachment 252957 [details] [review] [PATCH] add new phase: GSM_MANAGER_PHASE_EARLY_INITIALIZATION gnome-initial-setup-copy-worker and gnome-keyring (and others) used to be started automatically by the session manager during the GSM_MANAGER_PHASE_INITIALIZATION phase. This is racy because gnome-keyring could read its file ~/.local/share/keyrings/login.keyring before it is written by gnome-initial-setup-copy-worker. The correct solution is to wait gnome-initial-setup-copy-worker finishes before starting other components in the initialization phase. I want to enforce this order without adding knowledge of gnome-initial-setup in gnome-keyring and others. It must also work on systems which don't use gnome-initial-setup. So I don't use a flag file in gnome-keyring's AutostartCondition to delay its startup. Instead, I add a new phase GSM_MANAGER_PHASE_EARLY_INITIALIZATION before the initialization phase. If no autostart desktop files use that phase, gnome-session will just go on to the next phase. But if gnome-initial-setup-copy-worker uses this new phase, it will ensure gnome-initial-setup-copy-worker finishes before the newly installed files in $HOME are read by anyone. Relevent documentation: https://wiki.gnome.org/SessionManagement http://standards.freedesktop.org/autostart-spec/autostart-spec-latest.html http://lists.freedesktop.org/archives/xdg/2007-January/007436.html https://bugzilla.gnome.org/show_bug.cgi?id=706692
bug 706420 also adds a new phase. we should make sure there's coordination between these two bugs.
(In reply to comment #3) > bug 706420 also adds a new phase. we should make sure there's coordination > between these two bugs. Thanks, I was not aware of it. There is also #563642 about adding yet another phase.