Setting Up A Raspberry Pi Storefront Display

Finally your customers can know the weather without having to go outside

I recently set up a TV for a storefront that rotates through Chrome tabs. I didn’t want to have to mess with it at all when I powered it on — so this thing requires no keyboard or mouse once you’ve finished setup. Just turn it on and it fires up like a charm!

What you’ll need

Step 1: Install the Raspberry Pi Operating System

Before using your Raspberry Pi, youll have to install its operating system (OS) called Raspbian. The easiest way to do so is with New Out Of Box Software (NOOBS), which you can get here:

Download the ZIP and extract (unzip) it.

Unzipping side quest instructions: On Mac you can just double click the ZIP file and it will extract itself. On Windows, follow these instructions. On Linux, follow these instructions.

Once you’ve unzipped and opened the NOOBS folder, you’ll see a file called INSTRUCTIONS-README.txt. Open this up and follow all the instructions. By the end you’ll have a working Raspberry Pi! This will involve formatting your SD card, which can take some time for your computer to do.

Step 2: Format the Raspberry Pi so it never sleeps

Now you should have a working Raspberry Pi. Yay! Let’s make sure it never falls asleep while it’s displaying your tabs. While we’re at it, we’ll also make sure it doesn’t freak out when starting up if it was powered off incorrectly.

Open up the terminal by clicking the icon at the top of the screen that looks like it’s used for coding. It’s black and has these characters: >_

Time to hack into the mainframe! We’re going to edit the file that tells the Pi what to do whenever it starts up. Type the following and then press Enter in order to open up the autostart settings:

sudo nano /etc/xdg/lxsession/LXDE-pi/autostart

You should now be in an editor window that says /etc/xdg/lxsession/LXDE-pi/autostart at the top. You won’t be able to use the mouse to move the cursor around, just the arrow keys.

[Side note: If you’re having trouble getting this part to work, you may want to check out a tutorial on nano or vim. Both of these are text editors you can use to edit the autostart file. If you want to use vim, replace nano with vim.]

Edit the file so that it looks like this:

@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
@xset s off
@xset -dpms
@xset s noblank
@sed -i 's/"exited_cleanly": false/"exited_cleanly": true/'

Now press Ctrl+X to exit. You will be asked to save — enter Y for yes. Then press Enter and it will save and exit.

Step 3: Find your Chromium (Chrome) tabs

Fun part incoming! Open up the browser with the globe icon and find all the tabs that you’ll want to display. This browser is Chromium, which is essentially Google Chrome.

These tabs can be images if you want to just display an image — just right click any image and click Copy Image Address, then paste into your url bar.

If you want any of the tabs to start out zoomed in, press Ctrl+Plus multiple times (and/or Ctrl+Minus) until you’re as zoomed in as much as you want. This zoom setting will be saved and applied each time this url is opened.

Step 4: Hide the Chromium scrollbar

Follow the instructions here. The actual instructions start under a reddish orange header that says “How to Hide the Scrollbar in Google Chrome.”

Step 5: Make the Raspberry Pi open Chromium on startup

If you closed the Terminal, open it back up. To repeat the last command you entered, press Up on the keyboard. Then press enter to execute it. Here’s the command again if you don’t see it in your history:

sudo nano /etc/xdg/lxsession/LXDE-pi/autostart

Underneath all the other text, add the following:

@chromium-browser --noerrdialogs --kiosk --incognito

Replace with the urls of the sites you want to automatically open to. You can have as many or as few as you’d like — just have a space between each url. If the urls are too long and unwieldy, you can use to shorten them.

From now on, Chromium will open in kiosk mode whenever you start your Raspberry Pi. Kiosk mode means it will be full screen and won’t show the url bar. To switch between tabs, use Ctrl+Tab and Ctrl+Shift+Tab. To exit to the desktop, press Alt+F4.

If you restart and wait a minute and Chromium doesn’t open, it’s possible that you’re using the wrong autostart file. Open it up again, open another terminal window, and enter:

sudo nano /etc/xdg/lxsession/LXDE/autostart

Then copy everything from the LXDE-pi autostart file into this one. Anytime you see LXDE-pi, change it to LXDE. Save it and restart and it should work now!

Step 6: Make the tabs automatically switch around every so often

We’ll create a super simple script to switch to the next tab every 10 seconds (or 15 or 40, whatever you want!).

In the terminal, run sudo apt-get install xdotool. This will install the ability to trick your computer into thinking that you’re pressing keys or clicking the mouse. Then run sudo apt-get install unclutter. This will install a program that can hide your mouse pointer if it hasn’t moved in a while.

In the terminal, run nano revolvetabs. You will now be editing a file called revolvetabs. Type the following:

#!/bin/bashunclutter -idle 0.1 -root
while sleep 10; do xdotool search --onlyvisible --class "Chromium-Browser" windowactivate key Ctrl+Tab; done

The first line at the top just lets it know that it’s a script that should be able to be executed.

The second line hides the mouse after 0.1 seconds of inaction.

The third line that starts with while sleep is one line, don’t press enter after “Chromium-. It uses xdotool to switch tabs every 10 seconds. If you want to change the amount of time between tab switches, change the 10 to any number of seconds you’d like.

Press Ctrl+X then Y then Enter to save the file. Now to make the script executable, run the following command in the terminal:

chmod u+x revolvetabs

If that doesn’t work try the same thing but with sudo at the front.

Now go back into the autostart file and add the following to the bottom:


Then use Ctrl+X, Y, Enter to exit and save. Now the revolvetabs script will run every time the Raspberry Pi starts up.

If you want to test out the script, open Chromium with several tabs open, then go into Terminal and run ./revolvetabs.

Step 7: Finishing up

At this point you can mount your Raspberry Pi to your TV with an HDMI cable. If your tv has a USB input you can plug the Pi’s power cable right into there too! At this point the Pi should turn on whenever you turn on the TV, no setup required.

No need to plug the Pi into the wall!

If you’d like to be able to access the Pi without plugging in a mouse and keyboard, you can follow these directions, but it’s not necessary.

That’s it, you’re done! Now your customers can finally come into your store and stare at this screen for hours on end!

Join my email list with six trillion other tech geeks for more roundabout technology ideas.

I wrote this article because I couldn’t find any other article/tutorial that taught everything I wanted to do. Here are the main sources I used while trying to figure it out:

Friendship and heavy metal.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store