Skip to content
virtualguy edited this page Mar 17, 2014 · 1 revision

Configure the PC for running the photobooth

Assume a running debian based LAMP stack with SSH

FYI this whole process is done in a rush so there are probably much better ways of doing things...

Disable automounting of the camera so gphoto can grab control

To enable or disable automount open a terminal and type dconf-editor followed by the [Enter] key.

Browse to org.gnome.desktop.media-handling.

The automount key controls whether to automatically mount media. If set to true, then Nautilus will automatically mount media such as user-visible hard disks and removable media on start-up and media insertion.

Set up user

su
usermod jnwark -aG sudo
usermod jnwark -aG dialout
usermod jnwark -aG adm

Install required packages

apt-get install apache2 php5 vim synaptic subversion nload vlc chromium gparted ntfsprogs dmraid
apt-get install gphoto2 imagemagick
apt-get install flashplugin-installer
apt-get install gimp gimp-data gimp-plugin-registry gimp-data-extras

Get dropbox from here: https://www.dropbox.com/install?os=lnx

wget https://www.dropbox.com/download?dl=packages/debian/dropbox_1.6.0_amd64.deb
dpkg -i dropbox_1.6.0_amd64.deb

Set up Apache Virtual Host file /etc/apache2/site-available/photobooth

<VirtualHost *:80>
 ServerName photobooth.bin.radicdesigns.co.nz
 ServerAlias photobooth photobooth.thebin
 DocumentRoot /var/www/photobooth
 ServerAdmin [email protected]

 LogFormat "%h %l %u %t \"%r\" %>s %b" common
 CustomLog /var/log/apache2/photobooth/access.log common
 ErrorLog /var/log/apache2/photobooth/error.log
</VirtualHost>

Create log directory

mkdir /var/log/apache2/photobooth
chown root:adm /var/log/apache2/photobooth

Checkout photobooth source

mkdir /var/www/photobooth
cd /var/www/photobooth
svn checkout https://svn.virtrnd.com/sid/photobooth .
chmod u+x -R .
chown root:root -R .
chmod 755 .

Reload apache

service apache2 reload

add photobooth to /etc/hosts (for internal redirects)

127.0.0.1 photobooth

Allow www-data to run the photobooth.sh script as rootbr

visudo

Enter the following under # Cmnd alias specification

Cmnd_Alias APACHEPHOTOBOOTH = /var/www/photobooth/photobooth.sh
www-data ALL = NOPASSWD: APACHEPHOTOBOOTH