I set up my pi 2 to boot into raspbian GUI desktop when starting up (under raspi-config). However, the system boot into desktop first when starting up. And a few seconds later, the system boot into console. Is there any way to stay in GUI desktop?

  • Does a console pop up? Or does the desktop appear to crash and give you a terminal error?
    – Jacobm001
    Feb 13, 2017 at 4:05
  • The desktop appear for only about a few seconds before console takes over. No error messages. Thanks in advance!
    – ZTC
    Feb 14, 2017 at 1:53

1 Answer 1


I had the same problem when I tried to install retro-pie + rasbian desktop + rpi-update

I resolved this problem following this steps:

Configure in your retropie script setup, boot in console text insted desktop.

Configure in raspi config, boot in console too

Edit this file /home/pi/.bashrc

sudo nano /home/pi/.bashrc

Go to the bottom of the file and add startx after echo -e "\n$out"

  echo -e "\n$out
  if [ "$(tset -q)" == "linux" ]; then startx; fi

The conditional avoid run startx when you open a terminal in Desktop.

/home/pi/.bashrc file is the same file that show the temperature and others data when start rasbian console.

If you don't have retro-pie this file is different for you but you can edit similarly.

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.