August 4, 2024, 09:05
/media/usb/photosand put it into the Pi. Normally the Pi will mount under
/media/pibut if it doenst you can mount it with sudo mount /dev/sda1 /media/usb. Create a script to run the slideshow on boot: nano ~/start_slideshow.sh Add this to the script: #!/bin/bash feh --fullscreen --slideshow-delay 5 - randomize /media/usb/photos then makeit an executable chmod +x ~/start_slideshow.sh. Configure the Pi to run it on boot by editing the ~/.bashrc file with nano ~/.bashrc and add this to the end of the file
if [ "$(tty)" == "/dev/tty1" ]; then ~/start_slideshow.sh fireboot the Pi with sudo reboot. If the display looks a bit funky you might nede to adjust the HDMI settings. The following will set the resolutionto 1024x768:
hdmi_group=2 hdmi_mode=16Then you can make the Pi accessable via ssh with ssh pi@<raspberry_pi_ip>. The default username is pi, and the default password is raspberry. Make sure to name and order the photos correctly if your not randomising, and enjoy 👍
mount: (hint) your fstab has been modified, but systemd still uses the old version; use 'systemctl daemon-reload' to reload.then: systemctl daemon-reload returns:
==== AUTHENTICATING FOR org.freedesktop.systemd1.reload-daemon ==== Authentication is required to reload the systemd state. Authenticating as: ,,, (nick) Password: ==== AUTHENTICATION COMPLETE ====And I now see the content that wasn't there before:
ls /media/usb/photos/ awning.JPG fabric_to_replace.JPG IMG_2152.jpeg IMG_4625.JPG jd.jpegIf I reboot, ls /media/usb/photos returns an empty prompt. Thanks, Nick.
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS sda 8:0 1 57.3G 0 disk └─sda1 8:1 1 57.3G 0 part /media/usb mmcblk0 179:0 0 7.5G 0 disk ├─mmcblk0p1 179:1 0 512M 0 part /boot/firmware └─mmcblk0p2 179:2 0 7G 0 part /
lsblk -f NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS sda └─sda1 ext4 1.0 USB STICK 5de95c58-91cb-41a3-a5a6-939f5bf8162a 53.2G 0% /mnt/usb/photosDirectory contents are:
/mnt/usb/photos $ ls -l total 352 -rw-rw-r-- 1 nick nick 13753 Mar 9 17:59 calibration.png drwx------ 2 root root 16384 Aug 7 02:30 lost+found -rw-rw-r-- 1 nick nick 77970 Jun 4 16:50 me.png -rw-rw-r-- 1 nick nick 242531 Jan 7 2024 neil.pngScript location: /home/nick Script content: #!/bin/bash feh --fullscreen --slideshow-delay 5 - randomize /mnt/usb/photos If I run the script manually and from within the folder its stored, I get this:
./start_slideshow.sh /bin/bash: feh --fullscreen --slideshow-delay 5 - randomize /mnt/usb/photos: No such file or directoryAny other questions then please ask. Thanks, Nick.
#!/bin/bash feh --fullscreen --slideshow-delay 5 --randomize /mnt/usb/photosNote --randomize is missing a dash and have a whitespace to much. And the first row should look like this #!/bin/bash