Yet Another Raspberry Pi Photo Booth




Recently, my company (cubitux) had the opportunity to participate to a contest to present a photo booth solution to a client. Because I'm an open-source fan, I picked Raspberry Pi technology and started creating something around it.


Everything runs with a customized Raspbian - Desktop Edition (Special Linux flavor for Raspberry Pi)
An already made SD card image is available on the following GitHub repository:


However, this guide will show all the steps that we did to customize our Raspbian and make it very close to an embedded system...

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Required Hardware Component


Additional tool

  • A screw driver to fix the LCD screen on the stand
  • A keyboard (I prefer that over a touch screen virtual keyboard, however, both options are available...)

Total hardware requirements cost around: $182 USD

Note: I suggest getting hardware from the Adafruit Industries because they highly support open source technologies, and also provide nice and fast support


At this point, you should have a working Raspberry Pi with Raspbian Desktop and a working Camera module enabled.

You can test the Camera module by following this manual:

Step 2: Splash Screen Customization

Everyone who runs Raspberry Pi knows that, when the device boot, the raspberry images shows up with bunch of ugly text lines (boot message).


Because the photo booth was design to be use by the public, we changed the default "start screen" to hide those information and we replaced them with a nice image. (Long story short, the text messages still output somewhere, but we display an image above it)


As root, go to "raspi-config":

  • Enable "Console Autologin"
  • Disable "Splash Screen" (we use different method than plymouthd)


Based on the following guide (

  1. Create a 800 x 480 splash screen images. (We placed our image in /etc/splash.jpg)
  2. Edit /boot/cmdline.txt and change the line "console=tty1" to "console=null"
  3. Edit /boot/cmdline.txt and add "logo.nologo quiet" at the end of the command line
  4. Edit /boot/config.txt and add "disable_splash=1" at the end of the file
  5. Create a startup script (/etc/init.d/splash)
  6. Call "sudo insserv /etc/init.d/splash"


Dont worry, the console is still there. If you press "enter" or move to different terminal (for ex, ALT + F3), you will see the shell and be able to run X.


At this point, the device should boot and show the splash screen instead of the default (raspberry image + init text message)

Step 3: Install 3rd Party Applications

To make this work, we will install a little custom website that will be used as graphical interface (GUI) for the user. (Web is an awesome lightweight technology that can be easily created and customized...)

Therefor, we need will need apache webserver, PHP and "uv4l" (UV4L is used to stream the webcam live to the user and take pictures)

The following commands should install all them nicely:

(more documentation to install UV4L available here: )

You might need to give permission to the apache user to use "video / webcam" hardware

In order to do that, add the user "www-data" to the group "video". The following command should do the trick...

  • sudo usermod -G video www-data

Now, start apache and make sure it persist on reboot:

  • sudo /etc/init.d/apache2 start
  • sudo /etc/init.d/uv4l_raspicam start

To test that apache is installed and working, open the following URL from within your RPi:

To test that uv4l is installed, open the following URL from within your RPi:

(as shown on the screenshot)

Now, make this persistant when device reboot:

  • sudo update-rc.d apache2 enable
  • sudo update-rc.d uv4l_raspicam enable

Reboot your device, and test that both apache and uv4l are started...

Step 4: Deploy Photobooth Website Application

Open a shell and type the following command:

# Install various tools for splash screen

sudo apt-get install xscreensaver feh

# Remove default homepage

sudo mv /var/www/html/index.html /var/www/html/index.html.orig

# Clone repository

git clone

# Move all site's content to the /var/www/html folder

sudo mv RPi_Photoboth/source/www/* /var/www/html/

# Allow apache to create files in the "snaps" folder

mkdir /var/www/html/img/snaps

sudo chown www-data:www-data /var/www/html/img/snaps


The default website installed on the Pi should now show the RPi Booth web application


You can now configure various settings of the "config.php" (such as SMTP, Virtual Keyboard, etc...)


Now if you reboot, everything should work nicely!

I hope you enjoy this tutorial

Step 5: Create Custom Auto-login Procedure at Startup

Now that we have all in place, we need to customize the RPi, so it will automatically run X and open that website for us.

To do that, I enabled "shell auto-login" on the RPi. And I create 2 specials files: .xinitrc and .bashrc,,,


This file is parsed everytime a shells open.


This file is parsed everytime X runs

The idea here is to run X with special options... (not the defaut Gnome interface)

Have a look at the Github repo to see what are the options to make:



    • Indoor Lighting Contest

      Indoor Lighting Contest
    • Make It Fly Challenge

      Make It Fly Challenge
    • Growing Beyond Earth Maker Contest

      Growing Beyond Earth Maker Contest

    25 Discussions


    11 months ago


    I have just come across this after being asked to build a photo booth , is the disc image still available , I get no response when clicking on the link.

    The project is just what I am after with the web interface.

    1 reply

    Question 10 months ago

    Is there a way for the photos to be saved on the SD card and then taken off at a later time, instead of emailed? I might use this project for a photo booth for me and my fiance's wedding, but we don't know if there is an internet/WiFi source for the purpose of the website things your project talks of. This is a brilliant project, because we want to save money on a photo booth, and I already have the materials needed for this! Also, this program is already an image for the SD card? Can we change the languages provided. we have people of many languages coming who understand english, but most importantly, we have 2 indonesian guests that don't know english. Is there a was to edit the Cubitux logo on the picture frame, to show our wedding emblem and hashtag instead? Can we remove the photo frame all together, so guests can just have the pictures and nothing else fancy?


    Question 1 year ago

    I love this project and want to play around with making it.

    Is it configurable to put in my own Logo and change the interface?

    1 answer

    Answer 1 year ago

    is a gret idea , i do bad fot me have a little problems, i use 5 inch display and cat fix this error, i dont know php

    That is really cool. You could probably make one of these much cheaper than renting a photo booth for a special event.

    12 replies
    Wei HaoOPierreH23

    Reply 1 year ago

    i am having problem with the email attached image.please help


    Reply 1 year ago

    Hi, how did you manage to fix it senting images in the email?


    Reply 1 year ago

    I have received the email without my photo.


    Reply 1 year ago

    Did you manage to get the photo in your email?

    I am having the same issue, everything seems ok except there is a broken image tag in the email


    Reply 1 year ago


    Sorry for the delay to reply

    Perhaps wkhtmltoimage is not installed ? (or not working as expected?) It could be a permission issue as well..

    The generated image attached to the email comes from "card.php"

    The code to send email and attach the generated image is in "sendmail_form.php"

    If you could provide more trace / debug information.. It would help


    Reply 1 year ago

    after more digging, I found the following in my apache error log

    No protocol specified
    QXcbConnection: Could not connect to display :0

    I do have - putenv("DISPLAY=:0"); - in my sendmail_form.php


    Reply 1 year ago


    I have tested wkhtmltoimage in the command line to create an image of a webpage, that works okay... although i do first have to type

    export DISPLAY=:0


    Reply 1 year ago

    Ive tried chmod all directory/files to 777 but unable to chmod snaps directory/files. It shows as owner www-data. I tried adding user 'pi' to the group but still am unable to change chmod


    1 year ago

    Thank you for the tutorial. But what do I have to do at this point:

    1. Create a startup script (/etc/init.d/splash)

    Do you have the line of code?

    Thank you :)

    1 reply