0

I am trying to get Raspberry Pi to startup running a slideshow of various JPEGs on a USB stick

I can get the shell (below) to run no problem from terminal

I set crontab to execute the shell (shown below)

The Xsession-errors log and a log file I have it create when executing the shell script in crontab indicate it can't find the memory stick (USBSTICK) or the /home/pi/pictures folder to access the picture files???

What am I doing wrong?

Shell script:

#!/bin/sh

echo "Starting Slide Show"

feh -z -Z -r -F -D 5 --auto-rotate /home/pi/pictures

echo "slide show started"

cron file:

@reboot sleep 30 && sudo /home/pi/RunSlideshow.sh > /home/pi/RunSlideshowlog.log 2>&1

RunSLideShow log file:

Starting Slide Show
feh WARNING: /home/pi/pictures does not exist - skipping
feh: No loadable images specified.
See 'man feh' for detailed usage information
slide show started

*************xsession-errors file******************

Xsession: X session started for pi at Sat 28 Sep 2019 12:13:54 PM EDT
dbus-update-activation-environment: setting DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
dbus-update-activation-environment: setting DISPLAY=:0
dbus-update-activation-environment: setting XAUTHORITY=/home/pi/.Xauthority
localuser:pi being added to access control list

Starting Slide Show
feh WARNING: /home/pi/pictures does not exist - skipping
feh: No loadable images specified.
See 'man feh' for detailed usage information
slide show started

dbus-update-activation-environment: setting USER=pi
dbus-update-activation-environment: setting LANGUAGE=en_US.UTF-8
dbus-update-activation-environment: setting TEXTDOMAIN=Linux-PAM
dbus-update-activation-environment: setting XDG_SESSION_TYPE=x11
dbus-update-activation-environment: setting HOME=/home/pi
dbus-update-activation-environment: setting DESKTOP_SESSION=lightdm-xsession
dbus-update-activation-environment: setting XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
dbus-update-activation-environment: setting DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
dbus-update-activation-environment: setting LOGNAME=pi
dbus-update-activation-environment: setting XDG_SESSION_CLASS=user
dbus-update-activation-environment: setting PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
dbus-update-activation-environment: setting XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
dbus-update-activation-environment: setting XDG_RUNTIME_DIR=/run/user/1000
dbus-update-activation-environment: setting DISPLAY=:0
dbus-update-activation-environment: setting LANG=en_US.UTF-8
dbus-update-activation-environment: setting XDG_SESSION_DESKTOP=lightdm-xsession
dbus-update-activation-environment: setting XAUTHORITY=/home/pi/.Xauthority
dbus-update-activation-environment: setting XDG_GREETER_DATA_DIR=/var/lib/lightdm/data/pi
dbus-update-activation-environment: setting SHELL=/bin/bash
dbus-update-activation-environment: setting GDMSESSION=lightdm-xsession
dbus-update-activation-environment: setting NO_AT_BRIDGE=1
dbus-update-activation-environment: setting GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1
dbus-update-activation-environment: setting LC_ALL=en_US.UTF-8
dbus-update-activation-environment: setting PWD=/home/pi
** Message: 12:14:03.345: main.vala:101: Session is LXDE-pi
** Message: 12:14:03.346: main.vala:102: DE is LXDE
** Message: 12:14:03.675: main.vala:133: log directory: /home/pi/.cache/lxsession/LXDE-pi
** Message: 12:14:03.676: main.vala:134: log path: /home/pi/.cache/lxsession/LXDE-pi/run.log
  • Linux is generally case-sensitive. By default the pictures path is /home/pi/Pictures (note the capital 'P') – Dirk Sep 28 '19 at 18:17
  • Are you sure the USB will have mounted on boot? You might need to add it to /etc/fstab manually to ensure it's available on boot. – Fred Sep 28 '19 at 19:05
  • Thank you....Yes it needed to be "Pictures" not "pictures" – Larry Mackey Sep 29 '19 at 3:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.