Thursday, 31 January 2013

Using the GUI

In my previous post "First Boot" I went through how to boot up the Raspberry Pi to the Linux command line. However for someone (like me) who is accustomed to using Windows, the Linux command line interface is not very user friendly! So now I will go through how to access the Graphical User Interface (GUI) which is provided as part of the Raspbian "wheezy" operating system.

Follow the procedure outlined in my previous post to get to the Linux command line prompt and then type the following and press Enter:

pi@raspberrypi ~ $ startx_

This will launch the LXDE desktop GUI which should be a more familiar environment for Windows users. LXDE stands for "Lightweight X11 Desktop Environment" and it is one of the many GUI's which can be used with Linux. It is very well suited to the Raspberry Pi because it is small (in terms of resource usage) and fast. For full details have a look at

Click on the rather strange looking icon on the bottom left corner of the screen to display the "Start Menu" where you can browse through the various preinstalled applications. There are some shortcuts already on the desktop and you can add more while browsing through the items in the "Start Menu" simply by right-clicking on a menu item and selecting "Add to Desktop".

Double click on the "LXTerminal" icon on the desktop. This opens a terminal window with the familiar Linux command line prompt, so even when using the desktop GUI you still have easy access to the command line.

Close the LXTerminal by clicking on the "x" at the top right corner of the window or by clicking File>Quit, or if you prefer you can use the keyboard shortcut Shift+Ctrl+Q.

To close the LXDE GUI and go back to the Linux command line prompt click on the strange looking icon on the bottom left corner of the screen and then click on "Logout". You will then see the following confirmantion window:

Click on "Logout" to exit the LXDE GUI and return to the Linux command line prompt where you can safely shut your Raspberry Pi down using the "sudo halt" command as explained in my previous post.


  1. Thanks so much for this helpful info. But, I am having problems with the startx. The screen goes blank and after a few minutes it returns to the command mode with a list of errors:
    "No protocol specified"
    "xserver is not available".
    AS some background, I also connect to this RPi using RDP from my Windows 7 system and that runs the Desktop just fine. But I cannot get it to run on the main console.

  2. OK - I did some searching and found a clue that maybe file space was an issue. I discovered that root was 100% consumed - all 4GB's. I found some large log files and removed them and now I have 90% consumed. That was sufficient to get me past this problem. startx now works. Any suggestion how I find out what is consuming my SIM card? Do you know a utility to analyze it and find the large files? Many thanks.

    1. Hi Edward, thanks for your comments. This isn't a problem I've come across (yet) but it is certainly worth bearing in mind. I believe that if the system does not shut down properly then this can lead to temporary files being dumped on to the SD card. Sorry but I'm not aware of a utility to clean up the file system and delete unnecessary files, but I'm sure there must be one out there somewhere.


  3. Hi, I did something in the past (that I cant remember :) ) to automatically start the GUI when I power the Pi on. Now I cant logout from the GUI to get to the initial terminal window. I just get to a log-in screen from which I can choose Default Xsession/LXDE/Openbox my login and password. How can I set it back to "normal"?

    1. Hi,

      The way your Raspberry Pi boots up can be changed by running "raspi-config" and selecting the "boot_behaviour" option.

      Please see for full details of how to do this.

      However even if you boot straight to the GUI you should still be able to logout to the command line...