I've been trying to get a libre impress presentation to start on start up and I've been failing horribly. I had a simple 2 line script working that I put in the /home/pi/.config/lxession/LXDE/autostart directory which was working but then when I modified it to be more complicated it stopped running and when I changed it back it still didn't work. I've reinstalled the OS and tried again with the simple 2 line script and it still wont run. I've also tried adding lines to /etc/rc.local and that doesn't work either. I've tried putting the location of the autostart script in there and i've tried just the shell commands niether run on startup. Both the autostart script and the rc.local script work fine when called from the terminal but don't run on startup. I am completely lost, I've changed the permissions on both files to 755 to be executable and I then also tried 777 and that didn't work either. I literally have no idea what I'm doing wrong any help would be very much appreciated.
This is the simplified script that I'm trying to run
Code: Select all
sudp rm -f /var/www.lock.slideshow.odp#
sudo libreoffice -show /var/www/slideshow.odp --norestore &
This is the code I would like to run in the completed project that checks to see if a new slideshow has been uploaded to the server, if it has the test file exists and it closes the powerpoint waits then reopens it
Code: Select all
sudp rm -f /var/www.lock.slideshow.odp#
sudo libreoffice -show /var/www/slideshow.odp --norestore &
for (( ; ; ))
do
if [ ! -e /var/www/test.txt ]
then
sleep 1
else
pkilloffice.bin
sleep 3
sudp rm -f /var/www.lock.slideshow.odp#
sudo libreoffice -show /var/www/slideshow.odp --norestore &