digitaltom/photobooth

View on GitHub
INSTALL-RASPBIAN.md

Summary

Maintainability
Test Coverage
## Prepare a Raspberry Pi 3 with Raspbian for Photobox setup:

- Download and install raspbian: https://www.raspberrypi.org/downloads/raspbian/
  (the minimal image is enough)
- Install to SD card: https://www.raspberrypi.org/documentation/installation/installing-images/README.md

- Boot raspbian (connected to monitor and keyboard) and login (default login: pi:raspberry)

  or

  do the setup *headless*: https://hackernoon.com/raspberry-pi-headless-install-462ccabd75d0
- Use `sudo raspi-config` to set the password and timezone
- Setup Wifi: https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md
- Install needed packages: `sudo apt-get install vim ruby ruby-dev git imagemagick time sqlite3 gphoto2 libssl-dev nodejs libsqlite3-dev network-manager`


## Wifi Setup on Raspbian Stretch

### With Networkmanager

[Fedora docs](https://docs-old.fedoraproject.org/en-US/Fedora/23/html/Networking_Guide/sec-Connecting_to_a_Network_Using_nmcli.html) have a pretty good description how to handle connections with [Networkmanager](https://raspberrypi.stackexchange.com/questions/29783/how-to-setup-network-manager-on-raspbian) on the console.

To connect the raspi to an wifi network (either provided by an on site router, or an access point running on your tablet), I ran:

```
> nmcli con add con-name nexus7-photobox ifname wlan0 type wifi ssid photobox
> nmcli con modify nexus7-photobox wifi-sec.key-mgmt wpa-psk
> nmcli con modify nexus7-photobox wifi-sec.psk '<your password>'
> nmcli con modify nexus7-photobox ipv4.dns "8.8.8.8 8.8.4.4"
> nmcli con up nexus7-photobox
```

`nmcli dev status` will display the current connection state.

If you configure multiple connections, they can have assigned a priority in case multiple of them are available:

```
nmcli -f autoconnect-priority,name c
nmcli c mod "mypreferred" conn.autoconnect-p 10
nmcli c mod "xfinitywifi" conn.autoconnect-p -10
```

The available connection are stored at `/etc/NetworkManager/system-connections`. Don't forget to restart Networkmanager (`systemctl restart NetworkManager`) after changging files manually.

## Font installation

To add additional fonts for the polaroid caption, use these commands:

* `fc-list`: List available fonts
* `convert -list font` : List available fonts for ImageMagick
* `fc-cache -fv`: Run after installing new fonts to `/usr/share/fonts/`

A nice caption font for example is: https://www.dafont.com/simplicity-6.font