Autostart scripts not running Fedora 34 KDE

On a fresh install of Fedora 34 KDE spin, scripts under ~/.config/autostart-scripts/ don’t run.

I’ve been using this in previous versions to ssh-add on login. Even a trivial script to log something just doesn’t get executed:

#!/bin/sh
echo "$(date) something!" >> ~/something.log

Creating an equivalent ~/.config/autostart/something.desktop does work. So it’s only the scripts that aren’t getting executed.

I’m sure I haven’t touched any other configs since setting up the ssh client is the first thing I do on a new workstation.

1 Like

Hi there, script that should be executed on login usually reside in
/etc/profile
/etc/profile.d/ ## <<-- my suggestion would be here
or they are located in the users or system wide bashrc files.
~/.bashrc
/etc/bashrc

Those things under .config might not be that reliable, if that ever worked.
I believe there just resides userspace config data of various applications.
Maybe there is or was some auto start application?

1 Like

Wherever they should reside, this is a setting in the KDE setting that used to work. I have the same issue. I had a script at login to start conky and it no longer works. If I run that same script in a terminal it is working fine.

Worked perfectly fine in Fedora 33 KDE.

@chillyshacktd @esamson
If you don’t mind could you add any additional information you have to: 1956022 – KDE doesn't run scripts in $HOME/.config/autostart-scripts

Thanks!

@grumpey I do not have any more info on this sorry. I checked the logs and don’t see anything related to this. If you want me to look or provide something specific let me know and I will check.

Incidentally, I’m also using X11 instead of Wayland. Besides that, I have nothing more to add.

As I understood you wanted to run some script as soon as someone logs in.

You can try to do the following.

create a file like this:
sudo touch /etc/profile.d/greeting.sh

Paste in the following content:

#!/bin/bash
echo Hello ${USER}!

Save and open a Terminal or login.