You are not logged in.
Scripts placed in ~/.config/autostart/ are not run by KDE Plasma upon login for me, even after trying to configure them further in KDE's Settings, using .desktop entries etc.
The simplest workaround it to just use systemd units manually, using the xdg-desktop-autostart.target, eg
# ~/.config/systemd/user/set-virtual-desktop-2.service
[Unit]
After=xdg-desktop-autostart.target
[Install]
WantedBy=xdg-desktop-autostart.target
[Service]
Type=oneshot
ExecStart=/home/jb2170/.local/var/lib/systemd/bin/set-virtual-desktop-2.sh
Offline
Thank you for this solution. Weirdly, some KDE autostart entries work for me, and some don't.
I found that even after adding a systemd unit for my application to start, I still had to enable the service with systemctl. Then, it launches on login as expected:
systemctl --user enable set-virtual-desktop-2
Offline