I’m having a very annoying problem which causes seemingly random applications to start with an orange highlight in the task manager, which visually distracts me until I manually click on them all every time I start my computer.
I start these applications from a PHP CLI script with commands such as:
exec('setsid -f krita >/dev/null 2>&1 &');
setsid -f is used in front to make it “decoupled” from the parent, so that the program doesn’t exit as soon as the script finishes.)
I was told to try the KDE autostart GUI mechanism to see if the same thing happens there. I tried this by uncommenting the Krita line in my script and adding Krita in the autostart GUI setting. This seems to cause Krita to never open with the orange highlight. Weird.
The autogenerated file
~/.config/autostart/org.kde.krita.desktop just says
Exec=krita %F in it. I expected something fancy such as
kstart --prevent-orange-highlight krita %F.
What to make of this? How can it possibly matter which “thing” is running the same command? Is it actually just running
krita %F under the hood? Or does it internally append something in front of it?
No, I can’t use a Bash script or use the KDE autostart mechanism. There are good reasons that this is done from PHP CLI:
- My system is in PHP CLI.
- It does important things before starting the programs, such as decrypting and mounting drives which the programs need. (No, I can’t use crypttab for this. It locked me out from my machine once and I’m never risking that again.)
- They have to be launched in the right order, and logic may have to be done in-between.
- Some of them might need custom parameters depending on which day it is, or other dynamic arguments, which my PHP CLI system provides.
- I don’t want to yet again be vendor-locked into KDE (or anything else) after being forced to first switch from Windows and then XFCE, which has already caused me untold amounts of suffering.
My point is that it makes no sense that this would only happen just because a PHP CLI script is doing it. It should not matter whatsoever what actually runs the command. I refuse to believe that it does. Surely the KDE autostart mechanism must be running some custom command to prevent this orange highlight annoyance?