I try to start a screen session and connect to three different machines with the same user.
Here is what I have in my .screenrc
screen -t "machine1" 0 ssh user@machine1
screen -t "machine2" 1 ssh user@machine2
screen -t "machine3" 2 ssh user@machine3
My ~/.ssh/config contains
ForwardX11 yes
I get the following error in the terminals of machine2 and machine3.
Warning: No xauth data; using fake authentication data for X11 forwarding
/usr/X11/bin/xauth: error in locking authority file /home/user/.Xauthority
If I remove only one of the machines from my .screenrc it works correctly.
How can I avoid this error and connect to multiple machines from screen.
EDIT:
The user home dir is on NFS and locking doesn't work properly with NFS.
To circumvent this I tried hard to either have the XAuthority file on a local file system (/tmp) or to have one file per ssh. I didn't manage, somehow my xauth seems to completely ignore the XAUTHORITY environment variable. Still puzzeled...
ForwardX11when you want to use graphical sessions. As far as I know,screenis just character based?) – Arjan Nov 10 '09 at 8:30ssh -f -N(in some shell script, instead of usingscreen) would be an option, then at least you can add somesleepcommand in between the 3 commands? Or maybe move the 3screencommands from.screenrcinto some shell script, usingsleepas well? – Arjan Nov 10 '09 at 15:33