]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
xdg-autostart-generator: do not warn about unknown fields
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 24 Mar 2023 16:51:52 +0000 (17:51 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 25 Mar 2023 04:38:39 +0000 (13:38 +0900)
My user manager says:
systemd-xdg-autostart-generator[2933]: /home/zbyszek/.config/autostart/org.gnome.Terminal.desktop:256: Unknown key name 'Actions' in section 'Desktop Entry', ignoring.
systemd-xdg-autostart-generator[2933]: /home/zbyszek/.config/autostart/org.gnome.Terminal.desktop:258: Unknown section 'Desktop Action new-window'. Ignoring.
systemd-xdg-autostart-generator[2933]: /home/zbyszek/.config/autostart/org.gnome.Terminal.desktop:343: Unknown section 'Desktop Action preferences'. Ignoring.
systemd-xdg-autostart-generator[2933]: /home/zbyszek/.config/autostart/org.telegram.desktop.desktop:12: Unknown key name 'Actions' in section 'Desktop Entry', ignoring.
systemd-xdg-autostart-generator[2933]: /home/zbyszek/.config/autostart/org.telegram.desktop.desktop:13: Unknown key name 'SingleMainWindow' in section 'Desktop Entry', ignoring.
systemd-xdg-autostart-generator[2933]: /home/zbyszek/.config/autostart/org.telegram.desktop.desktop:19: Unknown section 'Desktop Action Quit'. Ignoring.

This is not useful. Those are externally-provided files, and they are likely to
have entries which we know nothing about.

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

index 3905d4bfe1955d12e4bcf843bab42d620c98dc68..a174648f5337d32dbb041336c07ca06ac6792d37 100644 (file)
@@ -350,7 +350,8 @@ XdgAutostartService *xdg_autostart_service_parse_desktop(const char *path) {
         r = config_parse(NULL, service->path, NULL,
                          "Desktop Entry\0",
                          xdg_config_item_table_lookup, items,
-                         CONFIG_PARSE_WARN, service,
+                         CONFIG_PARSE_RELAXED | CONFIG_PARSE_WARN,
+                         service,
                          NULL);
         /* If parsing failed, only hide the file so it will still mask others. */
         if (r < 0) {