12

I got a raspberry pi 2 B that came with a pre-loaded 8GB micro sd card. When I set it up, turn it on, and get to the part where I need to type in the "startx" command and press enter it does not work. This is what happens:enter image description here

How can I fix this?

2
  • You need to tell us what you have done before this.
    – Milliways
    Commented Dec 26, 2015 at 0:08
  • All i have done is set it up the way the instructions said to by plugging in a keyboard and mouse, hooking it up to a monitor with a hdmi cable, put in the sd card that came with the raspberry pi, and gave it power.
    – user38753
    Commented Dec 26, 2015 at 19:45

2 Answers 2

10

If you enter sudo raspi-config there will be an option to boot directly into the gui at boot time, enable it, reboot and you'll probably be fine.

In this picture the third option will fix your issue. Raspi-config
(source: raspberrypi.org)
.

1
  • thanks so very much. mine was messed after uninstalling retropie, and using the retropie script to replace the desktop
    – austin
    Commented Nov 7, 2018 at 1:51
2

When I set it up, turn it on, and get to the part where I need to type in the "startx" command and press enter it does not work.

That is not entirely true! It does start the X server - which fires up and then dies as it is reporting that it terminates successfully according to (the middle part of) that last line:

waiting for X server to shut down (EE) Server terminated successfully (0). Closing log file.arning:

That looks like two different output lines have been written at once which can happen if the X server is writing error output to stderr/stdout at the same time as some other process is writing out something.

It is possible your Pi has been configured NOT to start the GUI by default or (more likely IMHO) somthing is going wrong. Please try and post the contents of (the mentioned!) /var/log/Xorg.log.0 file.

You may also like to try to run startlxde-pi though I suspect startx may be trying to do that already.

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