When I boot my Pi Zero, it's going on until the desktop and when I want to login, the password is accepted but the login comes back again and again, and I can't go further? What happened?

  • Sounds like the password you entered is wrong. – SiKing Dec 30 '16 at 19:26

To me this sounds like a broken file system or a full disk. Which Operating System are you using?

Try to press <ctrl><alt><F1> at the login prompt. This should bring you to the console login. If you are able to login from there you get access to the logs and file system information.

If you succeed to login try the following:

  1. Issue the df command to get a listing of your disk filesystem layout. Make sure /dev/root is not 100% used and has enough free space to store log data and login information. In case it's 100% full try to delete some large logfiles in /var/log. Use the commend ls -alR /var/log to get a list of all log files. Use the command sudo rm -r /var/log/* to remove all log files.

  2. Issue ls -al after the $ prompt to get a list of the files in your users home directory. Make sure the file .Xauthority is contained in the listing and your user has read/write access to it. In case your user is "pi" the line should look something like this:

    -rw------- 1 pi pi 56 Dez 30 19:31 .Xauthority

  3. In case this looks different, e.g. no write access (rw) for user pi, then try to delete the file with sudo rm .Xauthority. The file will be recreated the next time you try to login.

  4. Issue cat .xsession-errors and cat .xsession-errors.old to display X session information and errors.

  5. The same as mentioned in step 2 applies for the files x.session-errors and x.session-errors.old. Remove the files if you dont have write access. The files will be recreated the next time you try to login.

  6. Try to start a desktop session with the command startx at the command prompt. This might give you some error information.

In case you are out of diskspace make sure you have expanded your filesystem to make all of the SD card storage available to the OS. However, it depends on the Operating System and version whether you have to do this or not. In general, in case you have missed this step, you can do this with sudo raspi-config from the command prompt.

Your Answer

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

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