3

I have been given access to a system where I have no home folder. I've asked the administrator to create a home folder for me but due to some complexity he is unable to.

Therefore, I have no .Xauthority file and I cannot open a X11 gui. Is there a way for me to regenerate a .Xauthority file after login without root priv? I can change my env HOME and XAUTHORITY variable to a folder in /tmp however I don't know how to create a .Xauthority. I tried "xauth generate :10 . trusted" but it says "X11 connection rejected because of wrong authentication."

  • Since the default for XAUTHORITY is $HOME/.Xauthority, don't you need to set it to a file in /tmp? As long as the parent directory exists and is writeable it shouldn't be necessary for the file to pre-exist AFAIK – steeldriver Jan 25 '17 at 18:20
  • How do you login (ssh)? Which X server do you wish to connect to? The one running on the host where you execute ssh? What's the content of HOME? Can you set HOME to /tmp/mydir or something? Note that .Xauthority is a shared secret between the X server you want to connect to and you as a user. You can't just generate your own. – dirkt Jan 25 '17 at 18:33
  • 1
    I am connecting via SSH to the server where I dont have a home folder from my client (running cygwin). I want to be able to connect back to the cygwin X server over SSH. There is no content in HOME because HOME does not exist. I can set HOME to /tmp/mydir but only AFTER login. I understand that .Xauthority is a "shared secret" but doesn't it get generated at login? I had hoped I could rerun whatever program generates that file (after I have set HOME or XAUTHORITY to /tmp/mydir) – eng3 Jan 26 '17 at 13:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.