From fc31abab9623a8681179d7337598177c1a127d88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 7 Nov 2023 17:50:51 +0100 Subject: [PATCH] xdg-autostart: downgrade warning for missing executables 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. (cherry picked from commit ed739145fba45d10d884661422d8779f88032749) --- src/xdg-autostart-generator/xdg-autostart-service.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/xdg-autostart-generator/xdg-autostart-service.c b/src/xdg-autostart-generator/xdg-autostart-service.c index eab33504de5..87a6c0ad875 100644 --- a/src/xdg-autostart-generator/xdg-autostart-service.c +++ b/src/xdg-autostart-generator/xdg-autostart-service.c @@ -571,7 +571,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; }