]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
xdg-autostart: Ignore all files with GNOME autostart phase 16246/head
authorBenjamin Berg <bberg@redhat.com>
Tue, 23 Jun 2020 08:44:50 +0000 (10:44 +0200)
committerBenjamin Berg <bberg@redhat.com>
Tue, 23 Jun 2020 09:20:27 +0000 (11:20 +0200)
If an autostart file for GNOME has a phase specified, then this implies
it is a session service that needs to be started at a specific time.

We have no way of handling the ordering, and while it does make sense
to explicitly hide these services with X-systemd-skip, there is no point
in even trying to handle them.

src/xdg-autostart-generator/xdg-autostart-service.c

index 6b46cbaec2508ee8c99034966a074f2faa0e28ed..0d33c70401244ade9abe49fa6ccc1567fad5b0bb 100644 (file)
@@ -527,8 +527,9 @@ int xdg_autostart_service_generate_unit(
                 return 0;
         }
 
-        if (streq_ptr(service->gnome_autostart_phase, "EarlyInitialization")) {
-                log_info("Not generating service for XDG autostart %s, EarlyInitialization needs to be handled separately.",
+        if (service->gnome_autostart_phase) {
+                /* There is no explicit value for the "Application" phase. */
+                log_info("Not generating service for XDG autostart %s, startup phases are not supported.",
                          service->name);
                 return 0;
         }
@@ -563,10 +564,7 @@ int xdg_autostart_service_generate_unit(
                 fprintf(f, "Description=%s\n", t);
         }
 
-        /* Only start after the session is ready.
-         * XXX: GNOME has an autostart order which we may want to support.
-         *      It is not clear how this can be implemented reliably, which
-         *      is why it is skipped for now. */
+        /* Only start after the session is ready. */
         fprintf(f,
                 "After=graphical-session.target\n");