su - -c mc not respecting custom root prompt anymore...

I've been using "konsole -e" to open an konsole window to a password protected root mc shell for years. Usually with a keybinding.
But something changed with my mageia application of this.
It was my understanding that the option "-" in the su command
was supposed to simulate a login shell which would should, amongst other things, result in my custom root $PS1 prompt being used.
But while this works that way with my other distros, and I think used to work on Mageia:
It no longer respects the $PS1 var exported from my root .bashrc on mageia.
Since I use that prompt as a visual cue that the shell involved had root permissions. {Which reminds me NOT to use it for regular user commands...} I had to resort to this form:
Where the file "/root/bin/medosumcFIX" is a copy of the part of root's .bashrc from which the $PS1 var was already exported...
That worked! Though when I closed the resulting root "mc" shell {and it's konsole session terminated} The shell from which I called it, displayed an error??
My question is: Is there some new security policy in mageia that prevents the "su - -c mc" form from honoring the custom PS1 prompt? And if so, why???
I note that the custom PS1 prompt is respected if instead, I simply use:
But I explicitly use mc, because I tweaked my root's mc configs to use a distinctive background color that works even better than the PS1 prompt at reminding me that it's a root shell (unless, of course, I hit ^O and toggle to the large command window where the prompt is my only clue...
But something changed with my mageia application of this.
It was my understanding that the option "-" in the su command
- Code: Select all
su - -c mc
was supposed to simulate a login shell which would should, amongst other things, result in my custom root $PS1 prompt being used.
But while this works that way with my other distros, and I think used to work on Mageia:
- Code: Select all
JtWdyP -> ~
> konsole -e su - "-c mc"
JtWdyP -> ~
>
It no longer respects the $PS1 var exported from my root .bashrc on mageia.
Since I use that prompt as a visual cue that the shell involved had root permissions. {Which reminds me NOT to use it for regular user commands...} I had to resort to this form:
- Code: Select all
JtWdyP -> ~
> konsole -e su - "-c /root/bin/medosumcFIX"
JtWdyP -> ~
> X Error: BadWindow (invalid Window parameter) 3
Major opcode: 20 (X_GetProperty)
Resource id: 0x1e00017
X Error: BadWindow (invalid Window parameter) 3
Major opcode: 20 (X_GetProperty)
Resource id: 0x1e00017
JtWdyP -> ~
>
Where the file "/root/bin/medosumcFIX" is a copy of the part of root's .bashrc from which the $PS1 var was already exported...
That worked! Though when I closed the resulting root "mc" shell {and it's konsole session terminated} The shell from which I called it, displayed an error??
My question is: Is there some new security policy in mageia that prevents the "su - -c mc" form from honoring the custom PS1 prompt? And if so, why???
I note that the custom PS1 prompt is respected if instead, I simply use:
- Code: Select all
JtWdyP -> ~
> konsole -e su -
JtWdyP -> ~
>
But I explicitly use mc, because I tweaked my root's mc configs to use a distinctive background color that works even better than the PS1 prompt at reminding me that it's a root shell (unless, of course, I hit ^O and toggle to the large command window where the prompt is my only clue...