I am total newbie to Raspbian world and my problem is that I can't start the GUI because when I write:

> startx

I get back:

bash-: startx command not found;

using sudo returns the same error. I installed xterm, but still nothing. I started with Raspbian Jessie Lite. Any suggestions?

  • No! What is the package to add "startx" to Raspbian Jessie lite? Thus far, I've already added "xserver-xorg lightdm pciutils xinput xfonts-100dpi xfonts-75dpi xfonts-scalable upower" (granted only "xserver-xorg & lightdm" seem to be manditory)? Thank you. :) Tried both "CEA Mode 16 1920x1080 60Hz 16:9 3D:FP" & "Default Monitor preferred resolution". Thanks again.
    – colpanic73
    Apr 30, 2017 at 23:30
  • @user1228990: Welcome to the RPi flavored corner of StackExchange. As you have written it, your post was not an answer. If you have a new question, please post a question.
    – Jacobm001
    May 1, 2017 at 0:18

4 Answers 4


Jessie Lite does not contain the GUI packages just the command line. If you want a GUI you will need to install the packages to your existing SD card or reflash the card with the full Raspbian Jessie. The latter is probably the better approach. Note though that this may require a bigger SD card than you are currently using.


This is what I did for a basic "no DE (desktop environment)" setup. There are probably better posts out there for specfic DEs. But this post seems to be about simple Xorg setup and being able to run it on the command-line using startx. For my tests, I used a fresh "Raspbian Jessie lite". The packages I installed:

sudo apt-get --no-install-recommends install xserver-xorg xserver-xorg-video-fbdev xinit pciutils xinput xfonts-100dpi xfonts-75dpi xfonts-scalable

Now, xserver-xorg, an server-xorg-video-* package, and xinit are the only packages necessary for minimal startx installation, howeve the other packages are reasonable for a kiosk setup using real applications. As always, you may need to tweak packages as necessary.

For fun be sure to grab chromium-browser too. Then you can try Chromium in kiosk mode:

startx /usr/bin/chromium-browser http://www.google.com/ --window-size=1920,1080 --start-fullscreen --kiosk --

The --window-size=1920,1080 --start-fullscreen options force a resize of the browser to the resolution specified (provided the actual dimensions don't exceed 1920x1080).

Have fun!

  • 1
    When I used "--window-size=10000,10000", Chromium crashed immediately after launching. When I used the actual resolution of the display this worked perfect. Thanks!
    – Matt
    May 13, 2017 at 23:08
  • Thanks @Matt. Although I didn't have that problem, it seems reasonable to expect the user (or agent) to know the active resolution before issuing that command. I've updated my post.
    – colpanic73
    May 19, 2017 at 9:43

The steps below install PIXEL, the official Raspbian desktop environment included with the full version of Raspbian.

  1. After installing Raspbian Lite, setup your password, enable ssh, configure Locale and network etc.

  2. Ensure Raspbian is updated to the latest software.

  3. The essential step is to install the Xorg Display Server

    sudo apt-get install --no-install-recommends xserver-xorg

  4. The next (recommended) step is to install xinit which enables you to launch the Xorg Display Server from the command line (with startx)

    sudo apt-get install --no-install-recommends xinit

  5. Install PIXEL, which is the official Raspbian desktop environment included with the full version of Raspbian. (This step takes quite a while.)

    sudo apt-get install raspberrypi-ui-mods

The raspberrypi-ui-mods installs the PIXEL desktop environment, Openbox Window Manager and LightDM Login Manager.

This is a bare bones installation. Included is a Terminal, File Manager, and tools to manage the desktop environment, plus a few Panel icons (Bluetooth, Network, Audio, CPU, Clock).


I have been using various downloads of Pi for several years and I recommend downloading and installing Jessie full version.It has a beautiful desktop and installs very quickly.I am currently using it on a Pi 2 model B with a motor control interface controlled by Python scripts.

  • This answer (use the full version of Jessie) has already been covered in Steve's more comprehensive answer.
    – goobering
    Apr 3, 2017 at 13:47

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.