2

I ask for your help since I am on linux and when I wanted to log in normally (typing my password) it kept loading indefinitely, and when I open the "console" with the key combination (ctrl alt fn f3) and start session From there everything is fine, but when I want to start with startx it gives me the following error:

Xauth: timeout in lock authority file / home / user /. Xauthority

Try to solve it with the first two answers of (Why am I getting this message from xauth: "timeout in locking authority file /home/<user>/.Xauthority"? -authority -file-home) but it keeps giving me that error, also check the /home/user/ folder and seeing the files with the command ls -l .Xauthority didn't show me anything, it gave me the error Didn't find the file, and even typing the rm --rf Xathority command didn't give me an error, no matter how many times I ran that command, when I rebooted my computer it still didn't work like it hadn't done anything. What I can do? Thanks in advance :) and I hope I have made myself understood.

Update

Try to solve it also based on this question but it also didn't work giving me the same errors from the beginning.

I want to add that I already tried to do this:

rm -fr .Xauth- *

And also this:

rm -fr / home / user / .Xauthority

And neither way gives me an error, so I think if they are removed, but if immediately after typing those commands, I type startx, it keeps giving me the error of:

Xauth: timeout in lock authority file / home / user /. Xauthority

Second update

When I try to end the ssh session it gives me errors that are the same as some people describe in this question (https://qastack.mx/ubuntu/103889/how-do-i-restart-the-ssh-service), try to fix it with the same answers from that question but it still doesn't work where there are errors at the end of the session.

DFG
  • 145
  • 1
  • 5
  • Quit using `rm -rf`. 1) it's dangerous and 2) -f tells it to NOT give you any errors. You probably need those errors. – user10489 Oct 25 '21 at 00:43
  • if `ls -l .Xauthority` says file not found, can you try creating it? `touch .Xauthority ; rm .Xauthority` . Possibly you can't write new files? – user10489 Oct 25 '21 at 00:46
  • 1
    Sorry I'm very new in Linux, let me try it without `-f` and just `-r` and the other option – DFG Oct 25 '21 at 00:47
  • the `-r` isn't necessary either. You really shoudln't copy paste things from websites without fully understanding what they do. Especially with the `rm` command. – user10489 Oct 25 '21 at 00:53
  • 1
    @user10489 so, what sould I do then? – DFG Oct 25 '21 at 00:56
  • And I tried what you said, create the file, and I get the message `"touch: cannot touch .Xauthority : permisson denied` – DFG Oct 25 '21 at 01:00
  • The permissions on your home directory are probably wrong. – user10489 Oct 25 '21 at 01:31
  • How can I solve it? – DFG Oct 25 '21 at 01:35

1 Answers1

0

The .Xauthority lock timeout error typically is caused by problems writing to the file. Typical causes for this would include:

  • incorrect permissions on the .Xauthority file (ownership or permissions)
  • over disk quota or disk full
  • incorrect permissions on the home directory

From discussion in comments, it sounds like your problem is the last of these.

Just to be sure this is the problem, run ls -ld ~ to check the permissions on your home directory. Likely, either you don't have write access, or you don't own the directory. chmod u+w ~ would fix the former, chown $USER ~ would fix the later.

user10489
  • 5,834
  • 1
  • 10
  • 22
  • 1
    Hello, I tried what you said and it worked, the problem is that I get other errors, but I will do those better in another question – DFG Oct 25 '21 at 18:01
  • If your home directory has permissions issues, likely other files may also have the same issue. Things like this sometimes occur from sloppy and inappropriate use of sudo. – user10489 Oct 26 '21 at 00:51
  • 1
    I think that is my problem, because when I gave permissions to certain files they stopped showing errors but my computer does not work at all well, how can I return everything to how it was, how can I have all the permissions so that my computer is back well – DFG Oct 26 '21 at 01:11
  • i can't guess what you fixed on .Xauthority or what's wrong with the rest of your files without more information. – user10489 Oct 26 '21 at 02:21
  • 1
    What information do you need? I can gladly give you all the information you need. – DFG Oct 26 '21 at 02:26
  • Output from `ls -l` on broken files would probably help. – user10489 Oct 29 '21 at 03:12