Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I've just got the same problem from here, and solved it using what was stated in the first answer (akonsu's one).

However, I would love to know why ~/.Xauthority needs not to be owned by the root account in order to get past login with a regular user (in other words: why is that the reason for the login failure), and - do you have an assumption as to how akonsu found that as a solution?

share|improve this question

2 Answers 2

However, I would love to know why ~/.Xauthority needs not to be owned by the root account in order to get past login with a regular user (in other words: why is that the reason for the login failure)

Because X wants to write/replace that file when it starts your session. If you do not have write permissions on it, then it can't do that.

do you have an assumption as to how akonsu found that as a solution?

Perhaps by looking at /var/log/Xorg.[N].log, where N is (I think) the display number, probably 0. It is helpful if you are having problems getting X to start.

share|improve this answer
    
Thanks. Do you have a guess why the permissions changed? This is a clean install, and at some point I ran the startx command. –  Reflection Jan 18 at 17:02
    
Can someone make an assumption? –  Reflection Jan 24 at 15:09

.Xauthority is actually a security feature of X, the graphical system. It part of what prevents unauthorized access to your graphical session(s), key loggers or tracking mouse clicks for example.

Security is a broad topic, and .Xauthority is one part of security mind you and covers local access, not necessarily tracking of mouse clicks by web sites ;)

Xauth allows access to anyone who knows the right secret. Such a secret is called an authorization record, or a magic cookie. This authorization scheme is formally called MIT-MAGIC-COOKIE-1.

The cookies for different displays are stored together in ~/.Xauthority. Your ~/.Xauthority must be inaccessible for group/other users. The xauth program manages these cookies, hence the nickname xauth for the scheme.

For additional information, see:

http://linuxtutorial.info/modules.php?name=Howto&pagename=Remote-X-Apps/Remote-X-Apps-6.html

and

http://www.biac.duke.edu/library/documentation/xwin32/security.html

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.