RASPBERRY PI SETUP for the crappy 7" screen, after burning to the SD card go to /boot/config.txt and add the following #Eleduino 7" WaveShare TouchScreen (1024*600) settings hdmi_cvt=1024 600 60 6 0 0 0 hdmi_group=2 hdmi_mode=87 max_usb_current=1 CHANGE YOUR DEFAULT PASSWORD FIRST sudo raspi-config CHANGE USER PASSWORD (1) CHANGE HOSTNAME (2) CHANGE BOOT OPTIONS (3) B1 Desktop / CLI > B3 Desktop Desktop GUI, requiring user to login, or another option depending on use case LOCALIZATION OPTIONS (4) CHANGE LOCALE (use spacebar to select and deselect locales like en_GB) leave system default as C.UTF-8 en_US,UTF-8 UTF-8 CHANGE TIMEZONE ADVANCED OPTIONS (7) A4 Audio Force audio out through HDMI or 3.5mm jack UPDATE (8) REBOOT (OR SHUTDOWN WITH sudo shutdown -h now) IF RPI IS FROZEN, THIS CAN ONLY BE DONE VIA SSH sudo reboot sudo apt-get update && sudo apt-get upgrade -y WAIT A WHILE... SANITY CHECK sudo apt-get install sudo sudo passwd sudo adduser sudo usermod -a -G sudo sudo usermod -a -G adm,dialout,cdrom,sudo,audio,video,plugdev,games,users,input,netdev,gpio,i2c,spi LOGOUT AND LOGIN TO YOUR NEW ACCOUNT sudo visudo /etc/sudoers.d/010_pi-nopasswd CHANGE THE pi USER TO REQUIRE PASSWORD ON ALL SUDO ATTEMPTS pi ALL=(ALL) PASSWD: ALL sudo passwd --lock pi IN THE FUTURE YOU CAN UNLOCK THE PI ACCOUNT IF YOU WISH sudo passwd --unlock pi TO AUTOLOGIN AS YOUR NEW USER sudo raspi-config CHANGE BOOT OPTIONS (3) B1 Desktop / CLI > B4 Desktop Autologin sudo reboot sudo vim /etc/lightdm/lightdm.conf CHANGER AUTOLOGIN USER autologin-user= sudo apt install openssh-server sudo vim /etc/ssh/sshd_config ALLOW YOUR USERNAME AllowUsers RESTART SSHD SERVICE sudo systemctl restart ssh sudo apt-get install fail2ban FOR FUTURE USE IN CASE WE NEED TO OVERRIDE DEFAULT fail2ban CONFIG sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local sudo apt-get install ufw sudo ufw default deny incoming sudo ufw default allow outgoing PORT 22 sudo ufw allow ssh PORT 80 (can add /tcp or /udp after to only allow those respective protocols) sudo ufw allow http PORT 443 sudo ufw allow https sudo ufw limit ssh sudo ufw enable TO CHECK EXISTING RULES sudo ufw status verbose TO DELETE EXISTING RULES sudo ufw delete or whatever rule you want to delete sudo apt-get install python-dev sudo apt-get install python3-dev curl -O https://bootstrap.pypa.io/get-pip.py MAKE SURE YOU RUN 2 BEFORE 3, THIS ENSURES THE pip FILENAME WILL BE TAKEN BY PYTHON 3.4 THIS SHOULD ALSO INSTALL THE pip2 COMMAND FOR PYTHON 2.7 sudo python get-pip.py sudo python3 get-pip.py sudo pip2 install --upgrade distribute sudo pip install --upgrade distribute sudo pip install --upgrade RPi.GPIO ENABLE AUDIO PLAYBACK sudo apt-get install alsa-utils sudo nano /etc/modules ADD THIS LINE TO THE FILE snd_bcm2835 sudo apt-get install mplayer Pico Text to Speech (Google Android TTS engine) sudo apt-get install libttspico-utils pico2wave -w testpico.wav "Look Dave, I can see you're really upset about this." && aplay testpico.wav Festival Text to Speech sudo apt-get install festival echo “Just what do you think you're doing, Dave?” | festival --tts hostname -I | festival --tts Espeak Text to Speech sudo apt-get install espeak CUSTOMIZE PARAMETERS espeak -ven+f3 -k5 -s150 "I've just picked up a fault in the AE35 unit" sudo apt-get install mpg123 sudo apt-get install fswebcam just lets you take a picture from webcam, use below to test it out fswebcam image.jpg sudo apt-get install motion sudo apt-get install libav-tools (use avconv instead of ffmpeg) remove to semicolon to active log file, put it back afterwards ;logfile /tmp/motion.log make sure other programs can read and write to target directory target_dir /var/lib/motion stat -c %a <<>> sudo chmod 777 <<>> change from on to something else to prevent flooding directory with JPEGs output_pictures first change to off to prevent flooding directory with recorded motion AVIs ffmpeg_output_movies off make sure USB webcam is recognized, then add it lsusb videodevice /dev/v4l/by-id/<<>> to figure out webcam maximum resolution if you don't know it sudo apt-get install v4l-utils v4l2-ctl -D v4l2-ctl --list-formats-ext stream_port 8081 allow streaming to other computers on local network stream_localhost off custom bash config for .bashrc or .bash_profile export PS1="\D{%F %R} \[$(tput bold)\]\u\[$(tput sgr0)\]@\h \w\$ " sudo pip install ipython