Q:

X11 Forwarding for user without home directory

I have a privileged user without home folder with ssh access. I try to do X forwarding but I get the message /usr/bin/xauth:  error in locking authority file /home/user/.Xauthority
If I don't have home folder logically .Xauthority doesn't exist.
Is there a way to replace the location or tell xauth to use a different file?

A:

You can change the location of this file by setting the XAUTHORITY environment variable.
$ export XAUTHORITY=/tmp/.Xauthority_$USER

