Raspberry Pi LCD Setup

After quite a long pause in content, I have another article! This time I'll be documenting my process for setting up a programmable LCD display of sorts.

The original idea for this was that I wanted some kind of display small enough to be at my desk that could be used to show whatever kind of content I wanted to display for the time being. I received a new Raspberry Pi 4 for Christmas, so I quickly got to work planning how it would be used.

Parts Used

As with the previous article, this project doesn't necessarily have to be completed using a Raspberry Pi 4. The particular display I used works fine with the 2/3/3b(+) models as well.Raspberry Pi 4USB Type C CableUSB Power Brick AdapterMicro SD Card for the OS* – Longrunner Raspberry Pi Touch Screen with Case Holder – An extra computer with access to a microSD card adapter

* As with the last article, it doesn't matter how big the SD card is. Just find a good deal on a good brand and use those. I've recommended the same ones.

Software Used

OS Installation

If you're following along, I recommend installing the OS and getting the Raspberry Pi up and running before you start assembly of the case and LCD. You can use the cables provided to power the display and connect it via HDMI to the Raspberry Pi when testing.

Using dd on Linux, I flashed the OS image onto the microSD cards each individually. After flashing, I made sure to test the installation by inserting the microSDs into each of the Pis and powering them on. The command was something like: dd -if=/path/to/raspbian.img -of=/dev/sdx && sync

In order to be able to reliably access the device, I once again recommend you go to your router's settings if possible and ensure the device has been given a static IP address. If you are unsure how to do this, try looking up your router's instruction manual.

In order to test the OS, I plugged in the device to an alternate display to ensure that it was working properly. This is because the LCD may require some system settings tuning before it will display properly.

If I remember correctly, Raspbian should already have an SSH server running once it boots. I connected the device to a wired ethernet connection to ensure I could access both it and the internet.

Since this is the first boot of the image, it was set to the default username and password. I followed these directions to change the defaults to my liking.

Once the defaults were changed, I configured my other device that I wanted to use to manage the Pi so that it would be able to connect via SSH using an SSH key. I then configured the SSH server to only allow users to log in using SSH keys, and changed the listening port for good measure.

After my SSH server was configured, I got to work setting up a simple firewall and Fail2Ban. This was configured so that I would only allow connections through ports 80, 443, and my custom SSH port.

I also set Fail2Ban to be fairly strict with the number of attempts when connecting via SSH. This was mainly to prevent snooping from coworkers, staff, or others that may be connected to the same network as the device wherever I took it.

Finally, since this was meant to be a display, I set up a RealVNC server on the Pi to enable remote desktop control.

Screenshot of the active VNC connection to the display.

If you recall, I didn't configure my firewall to allow incoming connections on the default VNC port. This is because I planned on using the Remmina client to connect to the Pi, using an SSH tunnel. That way, I ensure the connection is encrypted and I don't have to open anymore unnecessary ports.


An image of the LCD sitting on my desk at work.

An image showing the back of the LCD with the Raspberry Pi mounted.

This turned out to be a pretty fun little project! I had some difficulty trying to find a way to remotely connect to the display, but eventually found what I think was a pretty elegant solution. I've included some pictures of the device in use, and I think overall it went really well.