Skip to content

Add a systemd service to run xdg-user-dirs-update

David Redondo requested to merge davidre/xdg-user-dirs:systemdservice into master

Recently GNOME and Plasma have been embracing systemd for handling their session startup. To enable autostart integration with this systemd includes systemd-xdg-autostart-generator which creates units from autostart desktop files. xdg-user-dirs installs such a desktop file (xdg-user-dirs.desktop). However because this file contains X-GNOME-Autostart-Phase=Initialization systemd will skip it since it assumes it will be handles by GNOME itself. This a problem for Plasma and other desktop environments that do not handle this themselves, assuming that systemd takes care about autostart xdg-user-dirs-update will not be run. See https://github.com/systemd/systemd/issues/18791 We can provide a systemd service file to make sure xdg-user-dirs-update is run during session startup. This ensures that the relevant directories of the user exist on login and during startup as specifying to be run before graphical-session-pre.target means that it runs sufficiently early in the startup process while using the generator would result in 'After=graphical-session.target'.

Merge request reports