March 02, 2024

Raspberry Pi OS Lite with GUI, RDP, VNC, Chrome

Updated 2024-03-02 !

I like the Raspberry Pi(RPi), with Raspberry Pi OS Lite (no Desktop is included), headless operation, and then adding the software You need. Until now I haven't had a use case where I needed a Desktop but now was time. 

Why don't use the Raspberry Pi OS with Desktop ?? In that package there is a lot of software I don't need and I really want to optimize the RPi. I think that the less software You install the happier RPi will be...
😉

So after some Googling inspired from this guide I came up with the following setup.

Prerequisites
Start up with a fresh Raspberry PI OS Lite installation, and don't forget to update with 

sudo apt update && sudo apt full-upgrade -y && sudo apt clean

Adding Desktop/GUI
Standard
Before Bookworm Pixel was the standard RPi desktop but it changed to Wayland.

Both variants are installed, depending on your RPi OS, using the same command

sudo apt install raspberrypi-ui-mods

Other variants
The easiest way to install other Desktops, and some other software, is using

sudo
 tasksel

Remote access
Wayvnc(Bookworm)
There is a new VNC server which is installed together with Wayland. Anyway, the command is 

sudo apt install wayvnc

and setup. The recommended client is TigerVNC with binaries.

2024-03-02 !!!! 
  • Did a fresh install of VNC via sudo raspi-config and RealVNC was installed ? and works fine.
  • RealVNC and RPi 5 will for the moment not work.

VNC(Before Bookworm)
You have to install the software for the VNC server and the easiest way is to use 

sudo raspi-config

and then in the menu

3 Interface Options
    P3 VNC
2 Display Options
    D1 Resolution
        DMT Mode 16


For Bullseye 

D5 VNC Resolution

Finish and reboot

Please note that two systemd services are initiated via 


vncserver-x11-serviced.service
vncserver-virtuald.service    


Access the RPi with VNC Viewer from Your PC/Mac/Phone.

RDP(Problem with Bookworm....)
If You want o use RDP instead, more lightweight than VNC, install the following server software

sudo apt-get install xrdp

Please note that two systemd services are initiated via

xrdp-sesman.service

xrdp.service


Then install the RDP on your client. I prefer the Microsoft package which works well on both PC/Mac/iPad/iPhone

Add WEB-browser ?
 
Chrome
Install the default one with 

sudo apt install chromium-browser --yes

Firefox(Smaller application compared to Chrome)

sudo apt install firefox

SD Card Copier
Install with 


sudo apt install piclone

or use the command line one

Remote access from outside
A really nice software solution for http, ssh, vnc, rdp, SAMBA.... is remote.it  Quick installation is found here.

Remark
If using Stretch delete the following package (In Buster it is not installed)

sudo apt-get purge xserver-xorg-legacy

Sems to bee a problem with Bullseye ?

18 comments:

  1. unfortunatley sudo apt-get install raspberrypi-ui-mods does not work on my rpi i get the error massage unable to locate package raspberry-ui-mods. i tried sudo apt-get install raspberrypi-gui-mods but that gives the same result.
    what did I do wrong?

    ReplyDelete
  2. Thanks for this. I set up my Pi4 as a NAS and wanted to keep it completely headless but trying to move files around drives via the terminal was getting old, quick. Using samba file browsers on other systems was slow and often failed. Now I can use vnc to control my pi with the familiar interface.

    ReplyDelete
  3. Hi, I followed all the instructions, but when I try connecting from my PC using realvnc client, the mouse cursor spins for a moment and nothing happens. No error messages or anything.
    I'm running the client on Win10 Pro, and vnc server is on an rpi zero W

    ReplyDelete
    Replies
    1. Hi, since "ssh" seems to work, check the log with "cat /var/log/syslog". Another approach is to use RDP instead or just connect mouse/keyboard/screen to the Zero, and troubleshoot from there.

      Delete
  4. After logging on to the RPi, Pixel is installed with

    "sudo apt install raspberrypi-ui-mods"

    ...Do not forget that you need "sudo apt install xinit" in order to get startx command needed to start pixel

    ReplyDelete
    Replies
    1. Thanks for your feedback, but "xinit" is by default installed via "raspberrypi-ui-mods". Just tested with Bullseye.

      Delete
    2. I am on Buster (reverted to that because of possible compatibility problems with the RTL-SDR stick I was using) I reinstalled raspberrypi-ui-mods but startx would not work until I installed xinit properly.

      Delete
    3. OK, not a "standard" installation ! ;-)

      Delete
    4. Yes, I had tried everything else, but in the end it was a hardware problem. I learned a lot but had to give up.

      Delete
    5. Sorry guy but you must apt install xinit, i have a new fresh install of raspberry OS lite, and the startX is not installed with raspberrypi-ui-mods

      Delete
  5. ..and piclone needs to be started with:
    "sudo dbus-launch piclone"

    ReplyDelete
    Replies
    1. Thanks for your feedback. I start "SD card copier" from the Application menu. Just tested with Bullseye.

      Delete
    2. Yes, normally so do I now that the gui is running.. it's just that at that point in the instructions it seemed useful to have a way of kicking off a backup from the console to save everything done up to that point. :-)

      Delete
    3. OK then I understand, but it doesn't work with "ssh", using headless, so I really recommend https://pysselilivet.blogspot.com/2017/11/rpi-clone-raspberry-boot-disk.html

      Delete
  6. Yes, thanks for your great work here. I only wish I had had more luck with the hardware :-)

    ReplyDelete

Feel free to leave a comment ! ... but due to a lot of spam comments I have to moderate them. Will reply ASAP !