1

I am completely new to Raspberry Pi and Raspbian. I needed to access a file from root so i followed this guide and in a terminal went

sudo su

startx

I then logged off the root account and then shut down the Pi normally. Now when I try to boot the Pi I get this error message before the screen goes blank.

Now I don't know how to access my files anymore. Does anyone have any idea how to fix this?

Edit I have added the permissions below enter image description here

7
  • Have you tried opening a virtual terminal ctrl+alt+F2. Assuming that works what are the permissions and ownership of /home/raspbian/.Xauthority you can get that info using the following command ls -la /home/raspbian. Please edit your question and add the above. Commented Oct 2, 2015 at 3:34
  • Try without "sudo su", see what it says.
    – Kachamenus
    Commented Oct 2, 2015 at 4:28
  • @SteveRobillard I have posted the permissions by logging into root and following your instructions. I can't have more than 2 pictures in my question so I had to delete the other one
    – oodan123
    Commented Oct 2, 2015 at 5:34
  • ok, try this: access the virtual terminal again. then cd /home/raspbian/ then touch .Xauthority then change ownership of the new file to root by doing chown root:root .Xauthority you can read more here askubuntu.com/questions/165921/error-on-boot-12-04/…. Commented Oct 2, 2015 at 6:05
  • Ok, i've done that while logged in as root
    – oodan123
    Commented Oct 2, 2015 at 6:08

1 Answer 1

1

I have solved my problem. Turns out the problem was caused by corrupt .Xauthority files. I fixed this by first logging on as root. I then ran the following command:

rm .Xauth*

This deleted all the .Xauthority files that were causing the pi not to boot. A simple shutdown command and restarting the Pi solved the problem.

shutdown -h now

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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