Set up a Lightweight Desktop Environment on the Raspberry Pi
The Raspberry Pi is an amazing little device, but when it comes to running a desktop environment it can be a little sluggish. Here I will show you how to set up a responsive desktop environment, complete with web-browser, network access, file sharing and incoming remote desktop capabilities.
cNQF And for those that have, thank you for enabling my addiction! You all know who you are!
Lets install Raspian LiteLets grab the latest release version of Raspian Lite from here. https://www.raspberrypi.org/downloads/raspbian/ Once downloaded, write the image to your SD card. If your new to writing images, there is a great cross-platform program called Etcher you can use to write to the SD card. It can be found here. https://etcher.io/ Once your have written to the SD card, lets insert and start our Raspberry Pi.
Configure Raspian LiteOn first boot, we will need to do some initial configuration on the Raspberry Pi. First we need to log into the system with the following. User: pi Pass: raspberry This will log us in with the default user/pass. Now at the command prompt, enter the following.
sudo raspi-configChange your default password. (You may want to set your keyboard layout first under localization options) Configure your network options. Configure your Localization settings. Under Interfacing Options, set SSH to be active. Once complete, select Finish to reboot the system. Once restarted, lets now login to our Raspberry Pi again using SSH or the console again with User: pi Pass: (new password) Now lets see if there are any updates for Raspian using the following commands.
sudo apt-get update sudo apt-get upgrade -y sudo apt-get dist-upgrade -y sudo reboot
Lets Install our Desktop EnvironmentOnce restarted, lets login back in and install the packages needed to get our desktop up and running.
sudo apt-get install xfce4 #installs the XFCE4 desktop environment sudo apt-get install xfce4-terminal #install the xfce4-terminal application sudo apt-get install gvfs-fuse gvfs-backends -y #Allows our desktop to understand NTFS file systems sudo apt-get install exfat-fuse #Allows our desktop to understand exFat file systems sudo apt-get install firefox-esr #Installs Firefox web-browser (Extended Support Release) sudo apt-get install xrdp #Installs remote desktop server (Allow incoming desktop connections) sudo apt-get install samba #Allows us to create file shares sudo apt-get install xarchiver #Allows us to work with archive files ie. zip etc sudo apt-get install thunar-archive-plugin #Allows archives management with Thunar
Lets configure xRDP to allow connectionsWith the initial installation of xRDP, it is not configured to allow incoming connections. We can fix that by making the following changes.
sudo nano /etc/X11/Xwrapper.configChange the allowed_users=console to be allowed_users=anybody Press CTRL + x, y to save, and overwrite the file.
Now lets set our Raspberry Pi to boot into the desktopNow we are going to set our Raspberry Pi to boot directly into the desktop. We can do this by going into our Raspberry Pi Configuration.
sudo raspi-configSelect Boot Options, Desktop/CLI, and select Desktop or Desktop Autologin. Select Finish, and Yes to Reboot.