I work at an organisation where the fileserver containing /home sometimes fails to start in the morning. I can still log in on the console but get an error message something like $HOME not available, using /. In this case my workaround is
cd /tmp
mkdir home
chmod 700 home
export HOME=/tmp/home
# wget a copy of my "emergency" rc files that I keep online
# xinit, twm etc.
so I can still read e-mails through a web browser and if the file server is down for long, checkout my current projects from gitlab into /tmp and continue there.
Xterm and twm seem to respect $HOME and happily work in my temporary setting, cd with no parameters and ~ in bash work fine. chromium-browser does not and still complains about /home/organisation-specific-stuff/my-username not being available. (Chromium will run with --user-data-dir=/tmp/home/chromium but launching it still causes dbus to throw a fit about non-existent /home).
My questions:
What other ways besides
$HOMEare there for programs to reference the "home directory", and are there good reasons (for example security implications) why some programs choose one over the other?Is there a way to tell e.g. chromium, dbus to temporarily use
/tmp/homeinstead? I cannot use the solution in [1] due to lack of root rights. For the same reason,chrootseems out of the question. Or is this a stupid/dangerous thing to do?
My system is Ubuntu "precise" if that makes a difference.