TMPDIR is set in /etc/profile with Busybox 1.19.3power1 (*not* the recently updated version) TMPDIR is set correctly when opening X-Terminal (login shell, -sh). How are you starting bash? If bash doesn't think it's a login shell it might not load /etc/profile. When you run "sh" (Busybox) from bash (or from -sh) TMPDIR is not (or should not be) set again. If you want bash to read /etc/profile you need "bash --login".