Can't log in via GUI. Suspect .Xauthority issue
I have had Ubuntu 15.04 running for a week or so fine now. Most of the time I have been accessing it remotely with TeamSeer. All good.
Today I went to log in and no joy, it could not be found. I went to the PC physically and had a look, it was sitting on the login screen, so logged in, all fine for about 10 seconds or so then it kicked me out back to the login screen! I could log back in fine, however after a few seconds it logged me out again. I could get in via the guest account and that was fine, I was not kicked out. After reading about this I saw someone say they had a similar issue and it was a corrupted .Xauthority file. They fixed the issue by deleting it and the system auto created a new one. So I deleted the .Xauthority file via the tty (CTRL+ALT+F1) and now I can't log in at all via the GUI. I can still get in via tty however I can't see a .Xauthority file in my home directory. Yes, I am using the -a modifier. So my question is how do I recover from this? How do I create a new .Xauthority file? Many thanks for any help Tim |
Removing any Xauth files with the X session running for the logged in user causes bad things to happen.
You need to log out, switch to a vt, rm any stale .Xauthority and .serverauth.* files and then log back in. The display manager can be running, as you're only working with a specific user's dotfiles. |
Quote:
Unfortunately I am very new to Linux and I'm not sure how exactly to do the above.
Regards Tim |
Quote:
Quote:
1) Log out first - so get back to where you see the display manager logon screen (or boot the system and don't login from the display manager). 2) Switch to any vt (so yes CTRL+ALT+F1) and login as your normal user (i.e. the user with the problem). 3) - Code:
$ cd ~ 4) Switch back to the X server usually CTRL+ALT+F7 but not necessarily (see above) 5) Login and see if that fixes it. Quote:
|
Quote:
I logged back on using the GUI and as before I got a black screen for a few seconds then back to the GUI log in screen. Is there anything else I can try? Thanks again for the help with this issue. Tim |
You need to be in your user's home directory to find those. Also file names are case sensitive. Removing those does no harm by the way. X.org creates and removes those files when it starts/stops. Ensure that you have removed them. i.e. enter your home directory and
Code:
$ ls -al |
Quote:
When I do the remove command it does not find these files, strongly suggesting they have gone. I have entered the case correctly BTW. Therefore these files simply do not exist in my home directory. This is confirmed if I do the ls - al command. Ie other files and directories of mine from the home folder such as documents, pictures, videos etc are present. So I'm confident I'm in the correct directory. I don't think the issue is that I have not deleted the aforementioned files A directory listing of all files including hidden ones does not show them. Using rm results in an error saying they can't be found. They are not there. As I understand it the system should detect they are missing and generate new ones yes? If so why is this not happy happening is the question. Cheers Tim |
I've mentioned case specifically as you have not differentiated even in the latest post.
I suggest having a look at error logs next. The ones to look at first are ~/.xsession-errors and /var/log/Xorg.0.log Warnings and errors in the latter are indicated by "WW" and "EE" respectively. It's worth looking as it might pinpoint the problem exactly. |
Quote:
I don't believe I have ever mixed up the case. I am CERTAIN that there are no .Xauthority or .serverauth.* in any combination of case in my home directory, and I suspect that is why I can't get the GUI to work. Reading about these files they appear to be integral to the GUI working. I need to find some way to replace these files. I asked before if the system should automatically replace these critical files, do you know if it should? You asked me to delete them which I did, but missed the part about getting them back. :) How do I create a new .Xauthority file? I have tried 'transplanting' one from another Ubuntu 15.04 system I have, however this did not work and I suspect they may be unique for each install. Regards Tim |
Quote:
Your problem lies elsewhere, which is why you need to look at the log files... Also: create another user and try to login via your display manager as that other user. |
Quote:
Thanks for the help. Tim |
All times are GMT -5. The time now is 02:13 AM. |