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?
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.
@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.
$HOME/.config/autostart-scripts is a directory with scripts that a Plasma session should start when starting a desktop session. There are several directories with files the desktop session looks at. The best description I’m aware of is found on the Arch wiki.
In contrast, the various profile files are sourced by bash when it is started as an interactive login shell (and in a few other cases). That could be quite different. As an example a console login or SSH login, both non-graphical, should both source profile, but not do anything with .config/autostart-scripts. If you dig into the details, there are a lot of differences. (Changing the profile files in /etc would also affect all users, which wasn’t the intention as far as we know.)
As reported in the bug mentioned above, the autostart-scripts function broke in F34.
I thought for the use case of the opening poster, who wants to use it for ssh-add, this usual adds an ssh-key for the ssh-key-agent, it might be a workaround. One probably would use a terminal for that. So I’ve seen implementations that use a script in the bashrc or profile, but that’s a tat more complicated. For that scenario it could be fine to do it this way, for example by using it in the bashrc. But you are right, on the other hand the autostart-scripts are broken and this has other advantages. So sometimes it would be better to use those. One clearly is not starting a bash-session just by login to the desktop. And if you quit the terminal session, the desktop-session would still be active.
Edit
No, works, if you login to your desktop session, the bashrc is being sourced.
But it is sourced once more as soon as the user starts a terminal.
One could work around by adding this to the bashrc or profiled-script:
if [[ $doOnce == 1 ]]; then
echo “You already have been greeted.” >> ~/greetings.txt
else
echo “Hello ${USER}! It is $(date +%T) o’clock.” > ~/greetings.txt
export doOnce=1
fi
Now you can open Terminals as much as you want, and type in “cat ~/greetings.txt”.