I have Kubuntu 17.10, trying to copy a .desktop file into the autostart directory then I figured out that I don't have it, just the directory
I do not know if they have the same purspose.
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
If you don't have it, create it
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.
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.
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
~/.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.
.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: