How to display NFT with Raspberry Pi in 3 “easy” steps

Cansy
2 min readDec 12, 2022

--

For this tutorial you need a Raspberry Pi fully set up and connected to a monitor or TV. We will use the Pi’s Chromium browser as it is the most convenient and flexible solution I came across.

Without further ado let’s start!

Step 1: Create NFT Display

Create a simple mynft.html file in a text editor of your choice and add your image or video. In our case I am adding an animated Gif — myAwesomeNFT.gif

<html>
<head>
<style>
body {
background-color: #000;
text-align: center;
cursor: none;
overflow: hidden; /* hides scrollbar */
}
img {
height: 100%;
}
</style>
</head>
<body>
<img src="myAwesomeNFT.gif" alt="">
</body>
</html>

Test the page in your browser until you are happy with the layout.

Start your Raspberry Pi and transfer your html and NFT files with a usb drive to the Pi’s desktop. Double click the html file to open Chromium browser and make sure it works on the Raspberry Pi as intended.

If your NFT looks good we can proceed…

Step 2: Setup Autostart

Now we set up the autostarter, so you don’t have to open your project manually every time you restart the Pi.

Copy the file path by right clicking the html file and “Copy Path(s)”

Open Terminal…

…and type in the folowing to open autostart with the nano editor.

nano /home/pi/.config/lxsession/LXDE-pi/autostart

Next add this to autostart (Here you can paste the file path we copied earlier):

@chromium-browser -kiosk /path/filename

Sate the autostart file and restart your Pi to enjoy your NFT displayed on the screen…

But wait! why does the screen turn black after 10 minutes?

Step 3 Disable Screen Blanking

Fire up the terminal again and open lightdm.conf

sudo nano /etc/lightdm/lightdm.conf

Scroll down to the “[SeatDefaults]” section and add following line

xserver-command=X -s 0 -dpms

Safe it and voila, your exhibition is ready to go!

Would love to see what you are creating tag me on:
Instagram: @cansy.land
Twitter: @CansyLand
TikTok: @cansy.land

Disable Chromium Notification

Work in progress…
https://stackoverflow.com/questions/56883737/how-to-disable-all-notifications-in-chromium-kiosk-mode-on-raspberry-pi

--

--