Are you saying that the question you asked initially isn't the actual one you needed answering?
The initial question was:
How do I, within the .bash_profile if test, distinguish su connection vs. direct login from the login screen?
That was the real question. I needed that answered so I could manage the launching of two pairs of xeyes, each with several options. But that's messy. So to make the discussion easier, I substituted a simpler scenario by framing it as wanting to manage the launching of one ksysguard (no options). It shouldn't matter what the if block is meant to control. I'm trying to help everyone help me by simplifying the scenario.I hope that that's not a problem.
So the answer to your question is both "yes" and "no", but the "yes" part was to make things easier for everyone.
Bill.