Skip to content

Commit

Permalink
xdg-autostart: downgrade warning for missing executables
Browse files Browse the repository at this point in the history
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 ed73914)
  • Loading branch information
keszybz authored and bluca committed Nov 9, 2023
1 parent d42ab01 commit fc31aba
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/xdg-autostart-generator/xdg-autostart-service.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit fc31aba

Please sign in to comment.