Skip to content

[startplasma] Migrate autostart scripts to .desktop files

Henri Chain requested to merge work/migrate-autostart-scripts into master

Currently the scripts inside of $XDG_CONFIG_HOME/autostart-scripts are not run in systemd mode (https://bugs.kde.org/show_bug.cgi?id=433987).

This PR migrates them to simple .desktop files inside of XDG_CONFIG_HOME/autostart so that they can be handled in both classic and systemd boot mode.

This way they can also be seen by other desktop environments (autostart-scripts was a kde-only feature). And you can even define login scripts at the system level thanks to the xdg config hierarchy

The migration will create a corresponding .desktop file for each existing login script. If the login script was a symlink, it will be deleted and the .desktop file will point to the source.

The KCM is also updated to use this new format. Login scripts are still visible as such (using a kde service type to distinguish them).

Instead of creating a symlink to $XDG_CONFIG_HOME/autostart-scripts, adding a new script now creates a .desktop file in $XDG_CONFIG_HOME/autostart

This also separates pre-startup (env) scripts from login scripts in the UI. They were previously supported but merged in the same category.

BUG: 434441

BUG: 433987

This supersedes plasma-desktop!390 (closed) since the KCM was moved from plasma-desktop to plasma-workspace

Edited by Henri Chain

Merge request reports

Loading