Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Adding PIXEL to Raspbian Lite

Adding PIXEL/GUI to Raspbian Lite

These 'notes' were primarily intended for my own consumption but since there have been surprisingly many comments to it over the years I wanted to do some updates and clarifications. Thanks for all comments.

These instructions will require you to have connection to internet from your pi, WiFi, Ethernet or by some other means like a 3G USB dongle or something.

Preparations

Download and flash Raspbian Lite as normal. Run raspi-config and setup whatever you would to for console only mode. I usually change password, hostname and activate SSH server as a initial setup.

Adding wifi from console (optional)

This can be done in at least 2 ways and I would recommend using raspi-config but you could also...

Edit wpa_supplicant manually

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf Add the bottom of the file

network={
  ssid="YOUR_SSID"
  psk="YOUR_PASSWORD"
}

Save and reboot

Touchscreen

If you have any other that the original Raspberry Pi touchscreen you might have to install the correct drivers.

Rotate Touchscreen (optional)

These instructions are for the original Raspberry Pi touchscreen and if you have to change it's rotation, wich you might have to do depending on the case you mount it in.

  • Edit /boot/config.txt on the newly flashed card and add the line lcd_rotate=2 at a location of your choice in the file.
  • Save and reboot

Run all updates

Reduces that anything goes wrong int the following steps

sudo apt update
sudo apt upgrade

# you only have to reboot if there were any updates that needed it
# if unsure do it anyway
sudo reboot

Adding GUI

This will get you a really stripped down PIXEL installation Tested on Jessi and Stretch

sudo apt-get install -y raspberrypi-ui-mods rpi-chromium-mods
sudo reboot

This will pull in all packages needed for GUI + rpi modified Chromium web browser and is all you need for a "basic" setup. It will take some time though. The download will go fast but decompressing and installing is tough even on a Rpi 3.

I will do some tests but you might have to install lightdm manually using sudo apt-get install lightdm as well. It should be a part of the installation of raspberry-ui-mods though.

There might be some issues with icons being installed for programs that isn't installed and when new programs not showing up in the menu. This is probably due to some missing package that I yet have to figure out which one.

Enable autologin (optional)

If you want autologin you have to run raspi-config again and select "Boot option"->"Desktop / CLI"->"Desktop autologin"

Xinit (optional)

If you do not want autologin but want to be able to start the gui manually sudo apt-get install --no-install-recommends xinit so that you can boot to the console start the desktop as required using the command startx.

@HABuild

This comment has been minimized.

Copy link

@HABuild HABuild commented Feb 18, 2018

Thanks for this. Simple and easy instructions. Worked smoothly on a fresh build of stretch lite on pi3

@mapko105

This comment has been minimized.

Copy link

@mapko105 mapko105 commented Mar 18, 2018

thanks 1000, following your simple instruction i successfully installed a GUI on my raspbian lite

@themzlab

This comment has been minimized.

Copy link

@themzlab themzlab commented Apr 19, 2018

This is great!
For my purposes I needed to do one more thing:
sudo apt-get install --no-install-recommends xinit

so that I could boot to the console for most things and only start the Pixel desktop as required using the command startx

@carlostico

This comment has been minimized.

Copy link

@carlostico carlostico commented May 5, 2018

Works perfect but the installed programs are not working for example Archiver to unzip , just doesn't work , and new programs don't show up either , any ideas ?

@Tomoli75

This comment has been minimized.

Copy link

@Tomoli75 Tomoli75 commented Jul 26, 2018

VNC??

@tommylees112

This comment has been minimized.

Copy link

@tommylees112 tommylees112 commented Aug 6, 2018

Is there any way of doing it if we can't connect the pi to wifi?

@jukefr

This comment has been minimized.

Copy link

@jukefr jukefr commented Aug 8, 2018

@tommylees112 grab all the necessary packages as deb, look for a list of raspbian mirrors (ex: http://apt.pinet.org.uk/pool/main/r/raspberrypi-ui-mods/ i dont know if its safe just googled 1 sec)
then dpkg -i

@alessioscand

This comment has been minimized.

Copy link

@alessioscand alessioscand commented Aug 28, 2018

Hello,
I'm trying to get a clean installation of Raspian Stretch with hardware acceleration.
Starting from LITE, I updated everything (apt-get update, dist-upgrade etc.).

I installed Xorg Display Server and Xinit
sudo apt-get install --no-install-recommends xserver-xorg xinit

...then Raspbian Desktop (RPD)
sudo apt-get install raspberrypi-ui-mods

...and the experimental OpenGL driver
sudo apt-get install xcompmgr libgl1-mesa-dri

But if I activate OpenGL driver in raspi-config, it doesn't work: I get very low performance on glxgears, same as if driver it's not active. Something is missing... any help? :(
Thanks

@texadactyl

This comment has been minimized.

Copy link

@texadactyl texadactyl commented Dec 30, 2018

Lately, Raspbian Stretch raspi-config takes care of wpa_supplicant.conf entries and requires only the router SSID and password entry.

If you want a static address, append /etc/dhcpcd.conf similarly to what follows:

                # Assumptions:
		# 1. You are using Wifi and your wireless device is named wlan0.
		# 2. The desired IP address for the Raspberry Pi = 192.168.1.104 
                #     (Don't duplicate or you will be assigned a DHCP address automatically!)
		# 3. The router and DNS server IP addresses = 192.168.1.1
		interface wlan0
		static ip_address=192.168.1.104/24
		static routers=192.168.1.1
		static domain_name_servers=192.168.1.1

Then, restart network services or reboot.

@texadactyl

This comment has been minimized.

Copy link

@texadactyl texadactyl commented Dec 30, 2018

Excellent write-up. Thank you.

@texadactyl

This comment has been minimized.

Copy link

@texadactyl texadactyl commented Dec 30, 2018

Note that lightdm comes in automatically in Raspbian Stretch package raspberrypi-ui-mods.

@hhojatansari

This comment has been minimized.

Copy link

@hhojatansari hhojatansari commented May 14, 2019

Thanks a lot.

@ELepolt

This comment has been minimized.

Copy link

@ELepolt ELepolt commented Jun 16, 2020

After using raspi-config to set it to boot to 'desktop autologin' I am simply getting a black screen. It may be worth noting that I'm using an attached touchscreen and not an HDMI cable.

EDIT: I ran the proper program from here, https://github.com/goodtft/LCD-show and when I rebooted after that it was good to go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment