]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
xdg-autostart: downgrade warning for missing executables
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 7 Nov 2023 16:50:51 +0000 (17:50 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Tue, 7 Nov 2023 20:47:04 +0000 (20:47 +0000)
On a system with a shared home directory, I'm getting a bunch of warnings:

systemd-xdg-autostart-generator[76]: Exec binary '/usr/bin/flatpak' does not exist: No such file or directory
systemd-xdg-autostart-generator[76]: /home/zbyszek/.config/autostart/org.signal.Signal.desktop: not generating unit, error parsing Exec= line: No such file or directory
systemd-xdg-autostart-generator[76]: Exec binary '/usr/bin/flatpak' does not exist: No such file or directory
systemd-xdg-autostart-generator[76]: /home/zbyszek/.config/autostart/im.riot.Riot.desktop: not generating unit, error parsing Exec= line: No such file or directory
systemd-xdg-autostart-generator[76]: Exec binary '/usr/libexec/gnome-tweak-tool-lid-inhibitor' does not exist: No such file or directory
systemd-xdg-autostart-generator[76]: /home/zbyszek/.config/autostart/ignore-lid-switch-tweak.desktop: not generating unit, error parsing Exec= line: No such file or directory
systemd-xdg-autostart-generator[76]: Exec binary '/usr/bin/flatpak' does not exist: No such file or directory
systemd-xdg-autostart-generator[76]: /home/zbyszek/.config/autostart/org.telegram.desktop.desktop: not generating unit, error parsing Exec= line: No such file or directory

This isn't really a problem. Let's just print an info message.

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

index 90321b892fa9fc7a2d262810567c93aea1dbb03f..480d1009c3e5b187be6b6b7a07005c65499f9ef0 100644 (file)
@@ -572,7 +572,10 @@ int xdg_autostart_service_generate_unit(
 
         r = xdg_autostart_format_exec_start(service->exec_string, &exec_start);
         if (r < 0) {
-                log_warning_errno(r, "%s: not generating unit, error parsing Exec= line: %m", service->path);
+                log_full_errno(r == -ENOENT ? LOG_INFO : LOG_WARNING, r,
+                               r == -ENOENT ? "%s: not generating unit, executable specified in Exec= does not exist."
+                                            : "%s: not generating unit, error parsing Exec= line: %m",
+                               service->path);
                 return 0;
         }