What is the difference between ~/.config/autostart and ~/.config/autostart-scripts?
The autostart
directory is a part of the freedesktop.org/XDG Desktop Application Autostart Specification. Per that spec, a compliant desktop environment will search $XDG_CONFIG_HOME/autostart
for any .desktop
files and execute them on startup. KDE Plasma 5 (the DE used in Kubuntu), specifically, complies with this spec.
The autostart-scripts
directory doesn't appear to be a part of any standard. It's a hardcoded directory that Plasma searches for executable scripts (that is, actual executable files, not readable .desktop
files) and likewise executes them on startup.
As was said in Sergiy's answer, you can create the autostart
directory if you so choose, but it's entirely optional.
For example, on my system, I use a .desktop
file, ~/.config/autostart/xrdb.desktop
, to load my X resource settings (urxvt
settings/colorschemes, mostly):
[Desktop Entry]
Type=Application
Name=X resources loader
Exec=xrdb -merge .Xresources
Comment=Load X resource files on startup of DE
It follows that the command xrdb -merge .Xresources
is executed upon startup of KDE Plasma 5, and so my settings are loaded.
Also, this .desktop
file shows up in the Plasma settings like so, which would be how I could graphically configure other .desktop
entries to be auto-started:
If you don't have it, create it
mkdir ~/.config/autostart/
As for the ~/.config/autostart-scripts
file, it is documented in ArchWiki article on KDE:
~/.config/autostart-scripts
for executing scripts at login
So this can be used to run shell commands, export environment variables, etc. Also, according to post by claydoh on kde forum:
...using the tool to add scripts seems to place them in ~/.config/autostart-scripts, and not as .desktop files.