Kan je niet "valsspelen" door su uit te voeren, ipv su - (zonder streepje vs met streepje)?
In het eerste geval worden een aantal variabelen niet veranderd naar die van de root user, in het tweede geval wel.
Ik weet verder niet of $HOME wel of niet veranderd wordt en of daar tussen distro's ook nog verschil zit.
Uit de man page van su in Ubuntu:
-m, -p, --preserve-environment
Preserve the current environment, except for:
$PATH
reset according to the /etc/login.defs options ENV_PATH or ENV_SUPATH (see below);
$IFS
reset to “<space><tab><newline>”, if it was set.
If the target user has a restricted shell, this option has no effect (unless su is called by root).
Note that the default behavior for the environment is the following:
The $HOME, $SHELL, $USER, $LOGNAME, $PATH, and $IFS environment variables are reset.
If --login is not used, the environment is copied, except for the variables above.
If --login is used, the $TERM, $COLORTERM, $DISPLAY, and $XAUTHORITY environment variables are copied if they were set.
Other environment might be set by PAM modules.
Afhankelijk van PAM en evt. andere configuraties in Suse zou je dus $HOME kunnen gebruiken.
Dus:
Java downloaden
su (of su -p)
mv $HOME/Downloads/jre-6u31-linux-i586.bin /opt/java/32
enz.