Requirements:
1. Any Raspberry Pi microcomputer
2. Raspbian Lite image
3. SD / microSD card (At least 4GB or higher, but it is possible to use smaller storage space depending on your configuration)
4. Keyboard and Mouse (For using the GUI, but can vary depending on how the Raspberry Pi will be used)
5. TV / Monitor (For seeing the GUI) (NOTE:For those wanting to use a touchscreen, I do not cover this in this guide. You need to research this.)
6. A normal computer with Linux, macOS, or Windows (For burning Rasbian Lite image to SD / microSD)
7. Internet connection

Introduction

There are two official Linux distributions for the Raspberry Pi which are Raspbian and Raspbian Lite. Rasbian is a full Linux distribution for the Raspberry Pi which uses Raspberry Pi Desktop (RPD) desktop environment. The desktop environment is the GUI (Graphical User Interface) of the operating system. Raspbian includes preinstalled applications for word processing, games, programming, and so on. This is great for beginners and people who just want to start using their Raspberry Pi immediately.

But, some of us don't like that. We want the ability to work with a GUI, but with our own preferences. In other words, we want to start with a clean install, and then install whatever packages we need on top. Packages can consist of desktop environments, drivers, compilers, applications, utilities, and so on.

As a reward, there would be more storage space, less usage on memory, and GUI customization! This is where Raspbian Lite comes into play.

Raspbian Lite is similar to that of a core. A core basically contains all the essential packages needed to make the hardware on the Raspberry Pi work correctly. Raspbian Lite was made so that the Pi can run as a headless system where the Pi is controlled by commands sent from an external source. Raspbian Lite does not contain a GUI but has a command line interface (CLI) which is shown automatically if it is connected to an external display. Configuration of Raspbian Lite can also be done via SSH (Secure Shell) from a computer connected to the same network as the Raspberry Pi. More information on SSH in the official Raspberry Pi documentation.

If you have ever heard of Arch Linux, Raspbian Lite is similar to that. Since Raspbian Lite is supported by the Raspberry Pi Foundation, it is the preferred operating system for most Raspberry Pi microcomputers.

To summarize, this guide talks about how to run Raspbian Lite with a GUI, in this case you choose your desktop environment, RPD, LXDE, XFCE, or MATE. There is an advanced section in this guide that talks about how to create your own desktop environment if you are interested. The official Rasbian distribution uses RPD as its default desktop environment, but reality, it is actually a fork (or a branch) of LXDE. Other distributions such as Xubuntu uses XFCE as its default desktop environment, and Ubuntu MATE uses MATE as its default desktop environment. If you are not familiar with Linux desktop environments, be sure to watch videos or research on the types of GUIs available. That way, you will have and idea of what GUI to install, if any.

For those that are really consciousness about memory usage, a desktop environment based on LXDE would be a recommended choice. For those that prefer a prettier or modern look, then XFCE or MATE would be a recommended choice. However, both do the exact same job which is to make your Raspberry Pi a simple desktop computer that is easy to use. This is assuming that you want to use a prebuilt desktop environment. Otherwise you are free to create your own desktop environment.

So why do this? Well, you decide how your desktop looks like, you decide what applications to install, and finally, you decide what do to next!

Let's begin!

Memory Usage

Before beginning to install Raspbian Lite with a GUI, let's explore memory usage. In a nutshell, the less memory your Raspberry Pi consumes, the more applications it can run. Raspbian Lite itself consumes very little memory since it is a core. As discussed earlier, a core only has the essential packages that make the hardware on the Raspberry Pi work.

NOTE:The memory used shown in the screenshots may be different than what your installation may actually use. Use this information as a reference to determine what desktop environment is right for you.

So how much memory does Raspbian Lite itself use?

*Right Click > Open Image in New Tab to see full size image.

If we take a look at the screenshot, the memory is displayed in megabytes. This Raspberry Pi has 925MB of total memory. Some of the memory is internally allocated to the GPU by default. This means that the operating system and applications can use up to 925MB of memory.

Currently, Raspbian Lite is using 30MB of memory. Very impressive. This means that the available memory to use is now 895MB.

How does this compare to Raspbian with RPD?

*Right Click > Open Image in New Tab to see full size image.

On a clean installation, Raspbian with RPD is using about 90MB of memory. That's pretty good. Now, let's see what the memory usage is with Raspbian Lite running various GUIs.

If Raspbian Lite is running RPD Desktop Environment:

*Right Click > Open Image in New Tab to see full size image.

Here we see that Raspbian Lite with RPD is using about 76MB of Memory.

If Raspbian Lite is running LXDE Desktop Environment:

*Right Click > Open Image in New Tab to see full size image.

Here we see that Raspbian Lite with LXDE is using about 97MB of Memory.

If Raspbian Lite is running the XFCE Desktop Environment:

*Right Click > Open Image in New Tab to see full size image.

Here we see that Raspbian Lite with XFCE is using about 107MB of Memory.

If Raspbian Lite is running the MATE Desktop Environment:

*Right Click > Open Image in New Tab to see full size image.

Here we see that Raspbian Lite with MATE is using about 101MB of Memory.

Running a desktop environment with Raspbian Lite can consume quite a bit of memory. Now, we have to remember that Linux operating systems are flexible. Not every package required for a desktop environment is needed to be installed. This means that memory usage (as well as storage space) can be lowered even further, but you would have to be very familiar with how a package as well as its dependencies work. Not installing a required package or dependency may bring unwanted behavior. However, the good news is that it won't break your Raspberry Pi so long it is software related!

Part 1 - Build the Foundation

In this part, we will focus on preparing Raspbian Lite.

1. Download the latest Raspbian Lite image.
2. Format the SD / microSD card with Raspbian Lite (Plenty of guides out there on how to do this. For macOS, Linux, and Windows users, Etcher is an easy to use application that can help you do this.)
3. Insert the SD / microSD card into the Pi.
4. Connect the Pi to the Internet using an Ethernet cable. If you want to use Wi-Fi instead, you will have to read on how to configure your wireless receiver using the command line after your Pi has finished booting.
5. Connect your TV / Monitor and keyboard. (Mouse is optional at this time.) Turn on the Pi. The Pi should boot up successfully and a prompt to log in will appear.
6. Log into Raspbian. The username is pi and the password is raspberry.

7. We need to expand the file system so that Raspbian takes full use of the SD / microSD space. To do this, we need to use raspi-config. Type in:

8. The Raspberry Pi Software Configuration Tool (raspi-config) main menu will appear. The option we are interested is option #7 (Advanced Options). Select that option using the arrow keys on your keyboard and press Enter. Then select option #A1 (Expand Filesystem) and press Enter. A message will appear saying that the boot partition has been resized. Select OK using arrow keys on your keyboard and press Enter. The main menu will reappear. Select Finish at the bottom of the menu and press Enter. A popup message will ask you to reboot your Raspberry Pi. Reboot the Pi.

9. Log into Raspbian again. We want to make sure we currently have the latest files and packages so type in:

and press Enter. If there are updates available, install them. To install the updates, you would type in the letter "y" when asked "Do you want to continue?" and then press Enter. When finished, the message "[email protected]:~ $" will appear signifying that the Pi is ready to receive a command. Now, type in:

If packages were updated and installed, then these packages were stored somewhere in the SD / microSD card. We need to delete them so that they don't take up valuable space. To clean up leftover packages, type in:

The option we are interested is option #4 (Localization Options). Select that option and press Enter. You will be presented with 4 different options.

Begin by selecting option #I1 (Change Locale) and press Enter. Find your locale by scrolling through the list using the up and down arrow keys on your keyboard. By default, en_GB.UTF-8 UTF8 will contain an asterisk, meaning that Raspbian Lite is using this locale. However, this may be incorrect if you live in another country, like the US. You can deselect this locale by highlighting it and pressing the Space bar on your keyboard. For example, if you live in the US, then the locale used should be en.US.UTF-8 UTF8. You would find this locale on the list and then press the Spacebar to select it. An asterisk will appear meaning that this locale will be used. Once you are ready, press Enter. A popup will appear asking you to select the default locale used for the entire system. Select the same locale you selected previously by highlighting it using the up and down arrow keys and then press Enter. Raspbian Lite will configure your system automatically and return to the main menu.

NOTE:You may notice that after you have changed your locale, if you change other internationalization settings, you may get some text randomly popping up at the bottom of the screen saying that setting the locale has failed and that LC_CTYPE, LC_Message, LC_ALL complain that there is no such file or directory. No problem. Exit out of raspi-config and type in:

and press Enter. This will reboot your Pi. Now you can reopen raspi-config and you will no longer see that weird message. Don't ask me why that hasn't been fixed yet.

Return to the Localization Options menu by selecting option #4 and press Enter. Now configure your timezone by selecting option #I2 (Change Timezone) and press Enter. Select your geological area using the arrow keys and press Enter. Select your region or city and press Enter. Raspbian Lite will configure your system automatically and return to the main menu.

Return to the Localization Options menu by selecting option #4 and press Enter. Now configure your keyboard layout by selecting option #I3 (Change Keyboard Layout) and press Enter. Select your keyboard model using the arrow keys and press Enter (In a case where you don't know what keyboard model to select, the Generic 105-key (Intl) PC keyboard model would be good choice). Now, you will select the keyboard layout. Select the appropriate keyboard layout and press Enter (If you don't see your keyboard layout, select Other and press Enter. Select the keyboard language and press Enter. Now you will be presented with various keyboard layouts corresponding to your language. Select the appropriate layout and press Enter). The next few prompts may ask you about configuring the AltGr and Compose key. This is up for you to decide. Select the appropriate options and press Enter. You will then return to the main menu.

If you are using a Raspberry Pi 3, this microcomputer come equipped with a built in Wi-Fi/Bluetooth wireless receiver. You may want to change the Wi-Fi country settings. Return to the Internationalization Options menu by selecting option #4 and press Enter. Now configure your Wi-Fi country settings by selecting option #I4 (Change Wi-Fi Country) and press Enter. Select your country using the arrow keys and press Enter. A confirmation message will appear confirming your selection. Select OK. You will return to the main menu.

12. Select Finish and press Enter. If you are asked to reboot, then reboot the Pi by selecting Yes and pressing Enter. If you are not asked to reboot, reboot anyways by typing in:

For those that know about Linux, you may be wondering why the login manager chosen here is LightDM. For the most part, it is lightweight and it looks nice. But one feature that I believe stands out from other login managers is the ability to run Synergy client without errors. Synergy is a utility that allows you to use a computer's mouse and keyboard (Windows, Mac, or Linux) and share it with another computer, in this case, a Raspberry Pi. Of course you can install another login manager if you don't want LightDM.

Some users may not want a login manager. This is perfectly fine depending on how you will use your Raspberry Pi. For example, we may want the Pi to boot into the command line always and if there is a need to launch a desktop environment, a simple command will let you launch it. Continue to read on for more information.

Since we are focusing on Raspbian Lite, then the GUI installed will also be "lite". I understand that "lite" can have different meanings, but beginners are the main focus here. The important thing here is for users to personalize their Pi, without relying on prebuilt Raspbian. I believe these are the best GUI options. As always, you are free to use whatever you want. Moving forward, we will be installing the core of RPD, LXDE, XFCE, or MATE. This will give us only the GUI. There won't be any applications installed other than the required PIXEL, LXDE, XFCE, or MATE components such as a file manager, terminal, and settings.

1. Turn on your Pi and log in. We will install Xorg. To do this type in:

and press Enter. There will be a lot of dependent packages to install but these must be installed for the GUI to work. Install the packages.

If you only install xserver-xorg, you will not have the ability to launch the Xorg Display Server from the command line. This would be a problem if you are not planning on installing a login manager. Otherwise, you do not need to do this. If this is the case, you may want to also install xinit by typing in:

and press Enter. There will be some more dependent packages to install but these must be installed so that you can have the ability to start the Xorg Display Server from the command line if no login manager is installed. Install the packages.

-----

2. Now, choose your path:

Raspberry Pi Desktop (RPD) GUI

1 (RPD). You're reading this part because you want to install RPD right? Let's continue. RPD is a desktop environment designed by the Raspberry Pi Foundation. It is designed to be easy to use, which is why it looks simple. The backend of RPD is LXDE, which is a great choice as it is known for its low memory usage. For this desktop environment, you have two choices. You can either install the basic RPD desktop environment or a stripped version of it. The basic RPD desktop environment is the same as the one included in the regular Raspbian distribution, but without preinstalled applications. Essentials such as settings, task manager, terminal and file manager are included. To install the basic RPD desktop environment, type in:

and press Enter. There will be a lot of dependent packages to install but these must be installed for the GUI to work. Install the packages.

The stripped version of the RPD desktop environment only contains the file manager and settings for appearance, audio, network, and bluetooth. There is no trash support, no mounting of drives, or terminal included since the required components are not installed by default. No other applications are included either. However, you can add these components later if you wish. If you want to install the stripped version of the RPD desktop environment, type in:

2 (RPD). Openbox Window Manager is installed by default when you install RPD. You do not need to do anything here.

LXDE GUI

1 (LXDE). You're reading this part because you want to install LXDE right? Let's continue. We will be installing the LXDE core. When you install LXDE, some essentials such as settings, terminal and file manager are included. LXAppearance is used to change the look of applications such as panels, icons, progress bars, cursors, and so on. This is optional to install but I recommend installing it in order to give yourself more customization abilities. To install LXDE with LXAppearance type in:

and press Enter. There will be a lot of dependent packages to install but these must be installed for the GUI to work. Install the packages.

2 (LXDE). Openbox Window Manager is actually installed by default when you install lxde-core. You do not need to do anything here. You can customize the look of the titlebar using the Openbox settings which is also installed by default. By using LXAppearance and Openbox settings together, you chose what LXDE looks like!

Now, go to STEP 3.

XFCE GUI

1 (XFCE). You're reading this part because you want to install XFCE right? Let's continue. We will be installing the XFCE core. When you install XFCE, some essentials such as settings and file manager are included. By default, XFCE uses XFCE4 Terminal. This is optional to install, however if you choose not to install it, then XTerm will be the default Terminal app.. To install XFCE with XFCE4 Terminal, type in:

and press Enter. There will be a lot of dependent packages to install but these must be installed for the GUI to work. Install the packages.

2 (XFCE). XFWM Window Manager is actually installed by default when you install xfce4. You do not need to do anything here!

Now, go to STEP 3.

MATE GUI

1 (MATE). You're reading this part because you want to install MATE right? Let's continue. We will be installing the MATE core. When you install MATE, some essentials such as settings, terminal, and file manager are included. To install MATE, type in:

and press Enter. There will be a lot of dependent packages to install but these must be installed for the GUI to work. Install the packages.

2 (MATE). Marco Window Manager is actually installed by default when you install MATE. You do not need to do anything here!

Now, go to STEP 3.

-------------

3 (STEP 3). Finally, we need to install LightDM login manager. If you have installed the basic or stripped version of the RPD desktop environment, then LightDM package is installed automatically so you can skip this step. As of the release of Raspbian Stretch, if you installed the XFCE desktop environment, LightDM is also installed automatically so you do not need to do this step. Otherwise, to install LightDM, type in:

If you choose not to install a login manager but you did install xinit earlier, then this means that everytime your Pi boots, you will always boot into the command line. However, the desktop environment is already set up for you and is ready to be launched at any time.

4. Everything we need to have Raspbian Lite with a GUI is ready! Fortunately, we don't have to do anything else but reboot! Reboot your Pi. When it finishes booting, you will see the LightDM login screen. From here, you will need use both a keyboard and a mouse. Log in and you should now see either RPD, LXDE, XFCE, or MATE desktop!

Otherwise, if no login manager was installed, then just login via the command line! At anytime, you can launch the Xorg Display Server by typing in:

and press Enter. You should now see either RPD, LXDE, XFCE, or MATE desktop! From here, you will need use both a keyboard and a mouse.

5. So what now? This is where you decide what you want to do with your custom Rasbian Lite installation with a GUI. You can change the look, install applications, start programming, do what is necessary to make it work the way you want it to!

Sample Screenshots

NOTE:The screenshots shown below do not represent the desktop that you will see after installation. For more information, see the GUI Customization section. Be aware that using composition effects (transparency, shadows, etc.) may impact performance and memory usage depending on your configuration.

Raspberry Pi Desktop (RPD)

Right Click > Open Image in New Tab to see full size image. Screenshot shown is a customized RPD desktop.

A clean desktop showing HTop System Monitor.

A desktop showing various windows opened.

LXDE

Right Click > Open Image in New Tab to see full size images. Screenshots shown are of a customized LXDE desktop. The memory used will vary depending on how you configure LXDE.

A clean desktop showing Terminal.

A desktop showing various windows opened.

XFCE

Right Click > Open Image in New Tab to see full size images. Screenshots shown are of a customized XFCE desktop. The memory used will vary depending on how you configure XFCE.

A clean desktop showing Terminal. No composition effects enabled.

A desktop showing various windows opened. No composition effects enabled.

So the question is, what desktop environment does the author of this thread use? I actually use my own custom desktop environment. Let's take a look at my Raspbian Lite desktop:

This a custom desktop environment using Openbox as the foundation. First impression; it looks clean, simple, and beautiful (to me of course!). The main reason I don't use a prebuilt desktop environment is because I want control over how the desktop environment looks. However, I will say that XFCE would be my preferred choice if I were to use a prebuilt desktop environment. This is how my desktop environment is laid out:

The top and bottom panels are Tint2 panels. I customized the Tint2 panels to my liking to achieve this look. The notifications displayed on the desktop are from xfce4-notifyd. I want to be notified of things such as disconnection from the Internet, or Raspberry Pi is getting hot, or other notifications thrown by Raspbian Lite. Let's see the memory usage of my custom desktop environment:

The desktop environment itself is using around ~146 MB which is very good. There is plenty of memory left for applications. Finally, here is a look of how the desktop looks when there is a lot of activities going on:

And that's my brief tour of the desktop environment I use on Raspbian Lite! That's the reason why I wrote this guide. For you to learn how to become independent from regular Raspbian and personalize Raspbian Lite to your own liking. Personalization is of the greatest things about Linux in general.

Virtual Machine Playground

Installing a GUI on Raspbian Lite can either be easy or hard. If you want a particular desktop environment, you just follow the steps to install that environment. For the majority of Raspberry Pi users, that's more than enough.

But what if we wanted to get our hands dirty? In other words, what if we want the desktop environment to be focused solely on a particular application. For example, the desktop environment should just be focused on a web browser, or it should just be focused on a music player. Is it really necessary for a file manager to be in an operating system that its primary focus is to display web pages? Is it really necessary for an operating system to be running blown desktop environment just to play music? This is where you explore ideas for what kind of GUI Raspian Lite should have.

Can you explore GUI ideas directly on Raspbian Lite? Yes, but the idea of a virtual desktop is for you to explore those GUI ideas in the comfort of your own computer. It is basically a playground. You don't need to worry about reformatting SD / microSD cards, and you can go back in time using a feature called "snapshots" included in most virtual machine virtualizers in case if you made a mistake or you broke your installation. There is no risk. Not only that, but you also learn more about the inner workings of Linux.

Once you build your desktop environment to your liking in the virtual machine, you simply follow the steps you did on the virtual machine and apply them to your Raspbian Lite installation. If you are interested in reading more on this topic, simply click on the link below to see the full tutorial:

X11 Forwarding is an SSH remote tunneling system where you can run applications installed on a Linux system remotely from another system running Windows, macOS, or Linux.

For example, let's say that you have a clean Raspbian Lite installation on your Raspberry Pi. Now, if you physically want use your Raspberry Pi like a normal computer (with monitor, keyboard, mouse), then most likely you want to install a GUI on Raspbian Lite. However, if you only care about running specific applications on Rasbian Lite and don't have a need to use it as a normal computer (no monitor/keyboard/mouse/GUI), then X11 Forwarding may be something you'd like to use.

Here's how it works. You would connect to your Raspberry Pi via SSH with X11 Forwarding option enabled from another system. When it is connected, if you type in an application name, lets say "leafpad" and press Enter, the application will open on your desktop. That's it! So in other words, your system will show you the application's GUI while the Raspberry Pi handles the workload for that application. Pretty neat right?

If you want to use X11 Forwarding, it's very simple. Follow the instructions below:

1. Follow the steps on Part 1 - Build the Foundation to have a clean installation of Raspbian Lite. If you already installed a desktop environment and still want to enable X11 Forwarding, continue to step 2.

2. You need to enable SSH on Raspbian Lite. Using the command line (or Terminal window), type in:

and press Enter. Select option #5 (Interfacing Options) and press Enter. Then select option #P2 (SSH) and press Enter. You will be asked if you want to enable the SSH server. Select "Yes" and press enter. A popup will open saying the SSH server has been enabled. Select "Ok" and you will be returned to the main menu. Select Finish and press Enter to exit raspi-config.

5. Once the Raspberry Pi has been rebooted, you no longer need to physically use the Raspberry Pi since you can now remotely log onto the Raspberry Pi via SSH.

6 (Windows). You will need to install an SSH client with X11 Forwarding capabilities on the computer you wish to run the Raspberry Pi applications on. In order for the applications to appear on the computer, you also need to install Xorg Server on the computer as well. For Windows, there is an application called MobaXterm which is free and it is an SSH client that integrates Xorg Server. No need to install Xorg Server separately.

Create a session by clicking on the "Session" icon on the toolbar.

Enter the IP address of the Raspberry Pi as well as the Raspberry Pi username. Make sure that X11 Forwarding is enabled by click on the Advanced SSH Settings tab. When ready, click OK. You will be asked to enter the password.

Once you are logged in, you are ready to launch Raspberry Pi applications remotely! To launch applications remotely, type in:

and press Enter. The "&" symbol allows you to continue to use the MobaXterm window and open multiple Raspberry Pi applications without freezing it.

6 (macOS). You will need to install an SSH client with X11 Forwarding capabilities on the computer you wish to run the Raspberry Pi applications on. In order for the applications to appear on the computer, you also need to install Xorg Server on the computer as well. On macOS, you will need to install XQuartz since no application comes with Xorg Server integrated. Once XQuartz has been installed, you can use Terminal to connect to your Raspberry Pi. To start an SSH session with X11 forwarding, type in:

where "username" is your Raspberry Pi username and "raspberrypiadrress" is your Raspberry Pi's IP address. Then press Enter. You may be asked if you are sure if you want to connect to the host. Type in "yes". Enter the Raspberry Pi password when asked.

Once you are logged in, you are ready to launch Raspberry Pi applications remotely! To launch applications remotely, type in:

and press Enter. The "&" symbol allows you to continue to use the MobaXterm window and open multiple Raspberry Pi applications without freezing it.

For those wondering about memory usage, the memory used on Raspbian Lite is only the application as well as essential processes. The usage is very small. No Xorg, no desktop environment, no login manager memory consumption. More memory, more storage space!Advanced - Remote Desktop Protocol (RDP)

If you are a Windows user, you may be interested in accessing your Raspberry Pi desktop remotely without having to connect your Raspberry Pi to a TV or monitor to use it. This is where the Remote Desktop Protocol (RDP) comes into play. With this protocol, you will be able to use the built-in Remote Desktop Connection application on Windows to access your Raspberry Pi desktop remotely.

Assuming that your Raspberry Pi is running Raspbian Lite with a desktop environment and has no installation of VNC Server or TightVNC Server, the installation and configuration should be very easy.

To use the Remote Desktop Protocol, you must install XRDP on Raspbian Lite. Simply run the command below:

Once XRDP has been installed, it will run automatically in the background and will transmit the Raspberry Pi desktop whenever Remote Desktop Connection on Windows connects to your Raspberry Pi.

Now, run Remote Desktop Connection on Windows.

On the Computer textfield, enter the Raspberry Pi IP address and then press Connect.

You may get a warning saying that the computer you are connecting to cannot be verified. Just click on Yes.

Now you will be presented with the XRDP login window.

Enter your Raspberry Pi's username and password and press OK.

And that's it! You can now remotely use the Raspberry Pi desktop on Windows!

Advanced - Custom Desktop Environment using i3 WM

Let's get serious now. The real reason to use Raspbian Lite is to make the Raspberry Pi microcomputer work for a specific application purpose. The operating system should be customized to that specific application. What kind of applications?

Anything really. Some people use the Raspberry Pi just for:

Clock and Weather
Internet Radio
Web Browser
Music Player
Surveillance
Retro Game Console

and the list goes on and on. What will you be building? To understand the idea of a custom desktop environment, I will go over some examples and maybe it can give you an idea of how to approach and implement your idea. If you are interested in reading more on this topic, simply click on the link below to see the full tutorial:

Openbox is a window manager that can run as a standalone desktop environment, or with another desktop environment. Window managers normally handle application windows as well as their window decorations and effects. If you run Openbox as a standale desktop environment, you would have control over how your desktop environment looks. Openbox does not have any panels, desktop icons, wallpapers, or other UI elements since that is not the job of Openbox. You would have to provide that yourself.

There are some benefits of going this route. The main benefit is resource usage. Since you would only have Openbox running, most of the memory used will be used for applications that you run. The second benefit is simplicity. There are many users who only want to run a single application and don't need a full desktop environment. Third benefit is customization. You can build your own desktop environment and use Openbox as its window manager.

If you think Openbox window manager sounds like something you want to use on Raspbian Lite, let's continue!

1) In order to use Openbox, you need to have Xorg Display Server installed. To install Xorg, type in:

2) Now you need to install Openbox. Remember that Openbox does not include any applications other than Openbox Configuration Manager. If you need to use Terminal in Openbox, you have to install one yourself. In the command below, I included LXTerminal. Otherwise, install your own Terminal if needed. To install Openbox with LXTerminal, type in:

However, if you plan on starting Openbox manually, then you need to do some more work. First, we need to generate an .xinitrc file. This file will have all the commands to start your custom desktop environment. For this case, we only need to implement the Openbox command to the file.

First, copy a sample xinitrc file and paste it to your home directory. To do this type in:

4) Now, restart your Raspberry Pi. For those that installed LightDM login manager, you should see LightDM appear. Login with your username and password and you should now see the Openbox desktop! Well actually, you would see nothing. If you right-click, you will see the Openbox menu.

For those that did not install a login manager, simply log onto the Raspberry Pi. To start Xorg with Openbox, type in:

and press Enter. Install the necessary packages. You may have to reboot your Raspberry Pi to see the configuration tool in your Applications menu or Preferences menu.

2. GUI Package Dependency List

Sometimes you may want to know what dependency packages are required for a primary package to work. Here I created PDF documents listing all dependency packages for the following primary packages. Packages listed under "The following additional packages will be installed" and "The following NEW packages will be installed" are installed. Packages listed under "Suggested packages" are not installed but are shown in case you want to install them manually later on. Packages listed under "Recommended packages" are installed only if you do not use the --no-install-recommends flag with apt-get. The current package lists are updated as of 3/11/2018:

thanks for the great guide.. and the shout out to the Apple Pi-Baker for OSX people .. I was using windows but with
the Apple Pi-Baker I don't need the sd format program any longer since that process is included..

When you install LXDE for the first time, the first boot will show a "default" desktop look. Why doesn't it look pretty by default is unknown but we have the tools to customize it.

The window border theme (with the titlebar, close min max buttons) can be customized using OpenBox settings. This is installed by default and can be found in the applications menu.

LXAppearance is an application that allows you to change the icons, toolbar icons, toolbar theme, progress bar, cursors, and so on when using the LXDE desktop interface. This is not installed by default which was mentioned in the guide. If you have it installed then you also find it in the applications menu.

I guess to start I would create a new blank panel and then delete the pre-existing ones. Then customize it. I mean all of this is up to you. You decide the look that you want.

What exact theme does Raspbian use I'm not sure. But there are other themes out there that look better anyways.

Hello, i have a request... Can any one make a image of clean jessie lite + LXDE or XFCE GUI and put to megaupload or something like this? I have to many problems with installing the GUI (problems with apt-get and dpkg...)

buja wrote:Great guide!
I just installed Jessie Lite and LXDE following this guide, works perfectly.

One question though: how do I start the GUI when I boot to the command line? I tried "startx", but that returns "-bash: startx: command not found".

So I'm assuming you did not install LightDM correct? Normally when the login manager is installed after LXDE or XFCE, it displays the login screen when Pi boots. Or are you intentionally wanting to boot to command line and then start the display server whenever you want?

buja wrote:Great guide!
I just installed Jessie Lite and LXDE following this guide, works perfectly.

One question though: how do I start the GUI when I boot to the command line? I tried "startx", but that returns "-bash: startx: command not found".

So I'm assuming you did not install LightDM correct? Normally when the login manager is installed after LXDE or XFCE, it displays the login screen when Pi boots. Or are you intentionally wanting to boot to command line and then start the display server whenever you want?

Okay, i see. Originally I had mentioned to install xinit in the guide but the problem was that it did install extras that probably people wouldn't have used anyways. The consequence was that the ability to launch x-server from command line wasn't available which i was not aware of. Thank you for sharing this info.

Great guide although I am surprised as this is 'lite' the author chose xfce / lxde over say something like i3 or one of the 'boxes' - anyway this gets me something akin to Arch with less bother - setting up wifi from cli was a cinch and everything else [so far] has been dead easy to setup! Top job!

I followed your guide and everything worked out but I ran into an additional issue. The network manager and Bluetooth manager were not visible. Sure i could do it via command line but i wanted a GUI in XFCE if at all possible. So i went ahead and took a full version of raspbian and attempted to install XFCE on it. I figured out how to install network-manager-gnome and that solved the network part but for the life of me bluetooth is not cooperating. I installed blueman but while it works for my mouse (with some difficulty) it will not connect to my keyboard. Switching back to LXDE, the Bluetooth applet that is part of LXDE panel works perfectly and quickly. I even tested it side by side in LXDE since i still had blueman installed ... works on the built in panel applet doesn't work on blueman. Does anyone have ideas or suggestions on how they got Bluetooth to work on these light installs on XFCE?

I followed your guide and everything worked out but I ran into an additional issue. The network manager and Bluetooth manager were not visible. Sure i could do it via command line but i wanted a GUI in XFCE if at all possible. So i went ahead and took a full version of raspbian and attempted to install XFCE on it. I figured out how to install network-manager-gnome and that solved the network part but for the life of me bluetooth is not cooperating. I installed blueman but while it works for my mouse (with some difficulty) it will not connect to my keyboard. Switching back to LXDE, the Bluetooth applet that is part of LXDE panel works perfectly and quickly. I even tested it side by side in LXDE since i still had blueman installed ... works on the built in panel applet doesn't work on blueman. Does anyone have ideas or suggestions on how they got Bluetooth to work on these light installs on XFCE?

Hi,
I don't understand why I should use this Raspian Lite + extra GUI instead fo using Raspina, as this article says that Raspian is using 93MB while the least consuming Lite + extra GUI is using 97MB. Well 93 < 97, so if I 'm not concerned about disk storage, full blown Raspian is the best choise, Right?

throstur62 wrote:Hi,
I don't understand why I should use this Raspian Lite + extra GUI instead fo using Raspina, as this article says that Raspian is using 93MB while the least consuming Lite + extra GUI is using 97MB. Well 93 < 97, so if I 'm not concerned about disk storage, full blown Raspian is the best choise, Right?

If you have an SDCard that's larger than 8GB (or a RPi3 set up to boot from an 8GB (or larger) USB stick or a USB HD) then you can freely choose whether to use Raspbian or Raspbian Lite. If you're plannng to use the GUI installing Raspbian Lite then adding the GUI stuff afterwards seems like a pointless waste of time to me.

throstur62 wrote:Hi,
I don't understand why I should use this Raspian Lite + extra GUI instead fo using Raspina, as this article says that Raspian is using 93MB while the least consuming Lite + extra GUI is using 97MB. Well 93 < 97, so if I 'm not concerned about disk storage, full blown Raspian is the best choise, Right?

It really depends on what the Raspberry Pi will be used for. If you just want the Raspberry Pi to just work, then it's pretty obvious that using Raspbian is the way to go.

But if you have time and you like to personalize it a bit more, or you just want to tinker with the operating system, then Raspian Lite would be a better choice.

If you're going to look at this from an educational perspective, its not a waste of time. You learn how Linux works. You get to learn about creating sessions, configuring xorg, services, packages. If I have to say my opinion, I didn't like the look of Raspbian. I didn't like having useless applications installed, I didn't like the overall look. From using Windows and OS X for years, Raspbian looked boring.

As for memory, you can always turn off services you don't need. That's what uses memory in the background most of the time. If you want to take it a step further, then having a tiling window manager will use less memory. Then if you want to take it another step forward, then Arch Linux would be a better choice since you can pretty much customize every aspect of it.

Anyway, I found a small lack in the post, which caused me some headache - in case i'm a starter - to get the gui:
If you install the X-Windows system, to able to launch the "xstart" command, you also have to install the X-Org system: