There appears to be something wrong with your root login scripts. As a test, try doing sudo su
without the -
. This will change users without creating a login shell.
To figure out what your root login scripts are doing, run
printenv > /tmp/before
sudo su -
printenv > /tmp/after
diff /tmp/before /tmp/after
and then do the same thing again from a new user shell, but without the -
arg to su
. I bet you will see something.
However every program on a Linux system should be able to run with a root login shell. You need to configure your system in a way that it works with both su
and su -
. Meaning settings paths and permissions the right way. Have a look on a vanilla Ubuntu for example. It will work with su
and su -