title: The .xauthority file is not does not exist;hence via local ssh connection display from the GCP compute engine not working
body: <p>explaining all that has been tried and double checked.</p>
  
  <p>Set up on local windows machine:</p>
  
  <ol>
  <li><p>Xming installed and running.</p></li>
  <li><p>in ssh_config ForwardX11 is set to yes.</p></li>
  <li><p>In VS code remote connection config the the Forward X11 is set to yes.</p></li>
  </ol>
  
  <p>Set up on GCP compute engine  with Debian / Linux 9 and 1 GPU[free tier]:</p>
  
  <ol>
  <li><p>xauth is installed.</p></li>
  <li><p>In the sshd_config file below is set:
  X11Forwarding yes
  X11DisplayOffset 10
  X11UseLocalhost no</p></li>
  </ol>
  
  <p>The sshserver has be restarted to ensure below setting are read .
  from local workstation I fire gcloud compute ssh --ssh-flag="-X" tensorflow-2-vm(instance name) and the response is :</p>
  
  <p>/usr/bin/xauth:  file /home/user/.Xauthority does not exist,</p>
  
  <p>So, I attempted to perform the below on the remote compute engine with instance name - tensorflow-2-vm and user trapti_kalra:</p>
  
  <pre><code>trapti_kalra@tensorflow-2-vm:~$ xauth list
  xauth:  file /home/trapti_kalra/.Xauthority does not exist
  trapti_kalra@tensorflow-2-vm:~$ mv .Xauthority old.Xauthority
  mv: cannot stat '.Xauthority': No such file or directory
  trapti_kalra@tensorflow-2-vm:~$ touch ~/.Xauthority
  trapti_kalra@tensorflow-2-vm:~$ xauth generate :0 . trusted 
  xauth: (argv):1:  unable to open display ":0".
  trapti_kalra@tensorflow-2-vm:~$ sudo xauth generate :0 . trusted 
  xauth:  file /root/.Xauthority does not exist
  xauth: (argv):1:  unable to open display ":0".
  </code></pre>
  
  <p>so, looks like something is missing, any help will be appreciated. This was working with a EC2 server before I moved to GCP.</p>