1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-11 09:18:07 +03:00

xdg-autostart: Ignore all files with GNOME autostart phase

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.
This commit is contained in:
Benjamin Berg 2020-06-23 10:44:50 +02:00
parent 566cb7e23b
commit 9d9a9500cd

View File

@ -527,8 +527,9 @@ int xdg_autostart_service_generate_unit(
return 0; return 0;
} }
if (streq_ptr(service->gnome_autostart_phase, "EarlyInitialization")) { if (service->gnome_autostart_phase) {
log_info("Not generating service for XDG autostart %s, EarlyInitialization needs to be handled separately.", /* 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); service->name);
return 0; return 0;
} }
@ -563,10 +564,7 @@ int xdg_autostart_service_generate_unit(
fprintf(f, "Description=%s\n", t); fprintf(f, "Description=%s\n", t);
} }
/* Only start after the session is ready. /* 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. */
fprintf(f, fprintf(f,
"After=graphical-session.target\n"); "After=graphical-session.target\n");