summaryrefslogtreecommitdiff
path: root/src/xdg-autostart-generator/xdg-autostart-generator.c
Commit message (Collapse)AuthorAgeFilesLines
* tree-wide: allow ASCII fallback for … in logsDavid Tardon2022-06-281-1/+2
|
* strv: make iterator in STRV_FOREACH() declaread in the loopYu Watanabe2022-03-191-1/+0
| | | | This also avoids multiple evaluations in STRV_FOREACH_BACKWARDS()
* xdg-autostart-generator: rework debug loggingZbigniew Jędrzejewski-Szmek2022-01-101-11/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The logs used the service name as the primary log key. But the service name often needs to contain escape symbols, and the logs are rather hard to read because of this. Thus the logs are changed to use the path to the source desktop file. I think this is much more useful because the user will want to look at the source file too and maybe change it if something goes wrong. A bit more logging to show which directories we are looking at and why we skip certain units is added too. $ rm -rf /tmp/out && mkdir /tmp/out && SYSTEMD_LOG_LEVEL=debug SYSTEMD_LOG_TARGET=console build/systemd-xdg-autostart-generator /tmp/{out,out,out} Scanning autostart directory "/home/zbyszek/.config/autostart"… Scanning autostart directory "/etc/xdg/autostart"… /etc/xdg/autostart/tracker-miner-rss-3.desktop: not generating unit, marked as skipped by generator. /etc/xdg/autostart/gnome-initial-setup-first-login.desktop: ExecCondition executable gnome-systemd-autostart-condition not found, unit will not be started automatically: No such file or directory /etc/xdg/autostart/geoclue-demo-agent.desktop: symlinking app-geoclue\x2ddemo\x2dagent@autostart.service in xdg-desktop-autostart.target/.wants… SELinux enabled state cached to: disabled Directory "/tmp" already exists, but has mode 0777 that is too permissive (0755 was requested), refusing. /etc/xdg/autostart/polkit-mate-authentication-agent-1.desktop: symlinking app-polkit\x2dmate\x2dauthentication\x2dagent\x2d1@autostart.service in xdg-desktop-autostart.target/.wants… /etc/xdg/autostart/mate-settings-daemon.desktop: symlinking app-mate\x2dsettings\x2ddaemon@autostart.service in xdg-desktop-autostart.target/.wants… /etc/xdg/autostart/user-dirs-update-gtk.desktop: symlinking app-user\x2ddirs\x2dupdate\x2dgtk@autostart.service in xdg-desktop-autostart.target/.wants… /etc/xdg/autostart/org.freedesktop.problems.applet.desktop: symlinking app-org.freedesktop.problems.applet@autostart.service in xdg-desktop-autostart.target/.wants… /etc/xdg/autostart/org.gnome.SettingsDaemon.Datetime.desktop: not generating unit, startup phases are not supported. /etc/xdg/autostart/org.gnome.SettingsDaemon.XSettings.desktop: not generating unit, startup phases are not supported. /etc/xdg/autostart/org.gnome.SettingsDaemon.DiskUtilityNotify.desktop: symlinking app-org.gnome.SettingsDaemon.DiskUtilityNotify@autostart.service in xdg-desktop-autostart.target/.wants… /etc/xdg/autostart/gnome-initial-setup-copy-worker.desktop: not generating unit, startup phases are not supported. /etc/xdg/autostart/org.gnome.Evolution-alarm-notify.desktop: symlinking app-org.gnome.Evolution\x2dalarm\x2dnotify@autostart.service in xdg-desktop-autostart.target/.wants… /etc/xdg/autostart/tracker-miner-fs-3.desktop: not generating unit, marked as skipped by generator. /etc/xdg/autostart/orca-autostart.desktop: ExecCondition executable gnome-systemd-autostart-condition not found, unit will not be started automatically: No such file or directory ... Inspired by https://bugzilla.redhat.com/show_bug.cgi?id=2038750. The return value from xdg_autostart_service_generate_unit() is ignored by the caller, so we can do a shortcut return without functional change. This is nicer because we're now consistently always returning an error if something failed.
* Define FOREACH_DIRENT through FOREACH_DIRENT_ALLZbigniew Jędrzejewski-Szmek2021-12-151-1/+0
| | | | As in the previous commit, 'de' is used as the iterator variable name.
* license: LGPL-2.1+ -> LGPL-2.1-or-laterYu Watanabe2020-11-091-1/+1
|
* tree-wide: define iterator inside of the macroZbigniew Jędrzejewski-Szmek2020-09-081-2/+1
|
* xdg-autostart-generator: Add a generator for XDG autostart filesBenjamin Berg2020-05-271-0/+116
This generator can be used by desktop environments to launch autostart applications and services. The feature is an opt-in, triggered by xdg-desktop-autostart.target being activated. Also included is the new binary xdg-autostart-condition. This binary is used as an ExecCondition to test the OnlyShowIn and NotShowIn XDG desktop file keys. These need to be evaluated against the XDG_CURRENT_DESKTOP environment variable which may not be known at generation time. Co-authored-by: Henri Chain <henri.chain@enioka.com>