After a recent update to plasma 6.2.5, not all scripts in $HOME/.config/plasma-workspace/env/ get executed and I cannot find out why.
So some still work, and some don't? Can you see if you can figure out a pattern to explain the difference? Otherwise there's not much to go on here.
(In reply to Nate Graham from comment #1) > So some still work, and some don't? Can you see if you can figure out a > pattern to explain the difference? Otherwise there's not much to go on here. OK. I am using X11, I found that one of my bash scripts (headed with "#!/bin/bash") has an "exit" cmd. The scripts alphabetically after that didn't get executed. So are there any restrictions for these scripts? I remember they all worked before the plasma update.
Interesting observation. Evidently something changed under the hood to make that `edit` cause some mischief.
I guess all these scripts are "source"d to keep the env variables. I can make a workaround without "exit". But I still wish there is a way to let users to "./script.sh" for a more robust session start process. My sugguesstion is that if the script.sh is headed with like "#!/bin/bash" then "./script.sh", else "souce script.sh".
If you need a more complex script, just use the normal autostart mechanism, it's a better fit (desktop file in /etc/xdg/autostart). Or as a systemd service in that's Wanted-By plasma-workspace.target for example. On the topic I dont see any recent changes in how these scripts are run. these are https://invent.kde.org/plasma/plasma-workspace/-/blob/Plasma/6.2/startkde/startplasma.cpp?ref_type=heads#L139 and https://invent.kde.org/plasma/plasma-workspace/-/blob/Plasma/6.2/startkde/plasma-sourceenv.sh?ref_type=heads
(In reply to David Redondo from comment #5) > If you need a more complex script, just use the normal autostart mechanism, > it's a better fit (desktop file in /etc/xdg/autostart). Or as a systemd > service in that's Wanted-By plasma-workspace.target for example. > > On the topic I dont see any recent changes in how these scripts are run. > > these are > https://invent.kde.org/plasma/plasma-workspace/-/blob/Plasma/6.2/startkde/ > startplasma.cpp?ref_type=heads#L139 and > https://invent.kde.org/plasma/plasma-workspace/-/blob/Plasma/6.2/startkde/ > plasma-sourceenv.sh?ref_type=heads OK, I got it. Thanks for the reply.