Raspberry Pi

Get Pi Model

To get the Pi Model from the command line.

cat /sys/firmware/devicetree/base/model

Kiosk Mode

If you want to setup a Raspberry Pi running Raspbian into Kiosk mode.

Edit the LXDE autostart file sudo nano /etc/xdg/lxsession/LXDE-pi/autostart

Disable the screensaver by commenting the line:


#@xscreensaver -no-splash

Then disable power management:

@xset s off
@xset -dpms
@xset s noblank

Finally set chromium browser to auto start in kiosk mode


@chromium-browser --noerrdialogs --kiosk http://kioskwebsite.site --incognito

WPA_Supplicant.conf

When setting up a raspberry pi in headless mode, adding a wpa_supplicant.conf file in the boot drive will automatically connect setup the wireless access.


country=AU
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
    ssid="test_ssid"
    psk="test password"
    id_str="Id String"
    key_mgmt=WPA-PSK
    priority=1
}

For extra points you can use the encrypted form of the PSK by using wpa_passphrase.


wpa_passphrase <ssid> <password>

And use the output psk for the psk.

Automount Samba Share

Use this to mount Samba/Windows shared folders.

First install samba packages.

$ sudo apt update
$ sudo apt-get install cifs-utils samba-common smbclient samba-common-bin smbclient

Next create a mount folder. For media something like

$ sudo mkdir /media/videos

Next to setup automount you need to edit your /etc/fstab file so and add the following if using a guest (passwordless) account

//serveraddress/folderonserver  /media/video cifs guest 0 0

or if using password,

//serveraddress/folderonserver  /media/video cifs username=username,password=password 0 0

Once saved mount using mount -a