launch it from a command line in an ssh shell
Translates to:
'runs fine if run from a login shell' (ssh did a login when you connected.)
KUAL only provides another command line shell instance, running under the same user name that it is running under (root).
It **DOES NOT** provide a new login as user name root.
You get to code that yourself in your script.
Points to keep in mind:
*) You can always 'switch user' to the user name you already have.
*) The default user name for the 'switch user' command is 'root'.
so the command (while running as 'root' - which you are) would be:
su -l
Check if it works from a command line.
If it does, it will also work in a script to get a new 'login' shell instance.
Don't forget to 'exit' from this new shell when done, if your application does not do so for you.
|