I was logged into my raspberry pi and downloading some python packages. At one point the raspberry pi froze and I could not do anything to safely shutdown etc, so I pulled the power cord.
Now I cannot log into the raspberry pi through the GUI. I can login using the command line but the command startx does not work.

p.s: I've tried most of the solutions already presented (sudo chown -R pi.pi *)

  • So, do you mean that when you turn on the raspberry pi, it stock on shell mode and doesn't go to GUI mode(startx) like this image? – M. Rostami Jan 14 at 15:40
  • Does the startx command fail with a specific error message ? Log ? – Anonymous Jan 14 at 19:44

Try entering sudo raspi-config on boot then select the first option which should say B1 Desktop / CLI then you can pick B4 Desktop autologin this option lets you boot directly into the GUI on boot time. Once you enable it reboot the pi and you'll see if it works. This has actually happened to me when I first got my pi, all I did was re-install raspbian but that is alot of un-needed work, hopefully this option helps.

enter image description here

|improve this answer|||||

reboot in SSH ? .

sudo reboot
|improve this answer|||||
  • 1
    We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed or you risk to get down votes. – Ingo Jan 15 at 8:54

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.