'Chromium Auto Refresh command line

Using a digital signage setup on my raspberry pi with raspian OS. Currently have the webpage displayed and full screen however, after 20 minutes it stops reloading and if the webpage changes, the display doesn't change. How can I setup an automatic refresh timer every minute or whatever interval is needed?

Current coding :

File: /etc/xdg/lxsession/LXDE/autostart

@lxpanel --profile LXDE
@pcmanfm --desktop --profile LXDE
@xscreensaver -no-splash
# Auto run the browser
@xset s off
@xset -dpms
@xset s noblank
#@midori
@sed -i 's/"exited_cleanly": false/"exited_cleanly": true/' ~/.config/chromium/$
@chromium --noerrdialogs --kiosk http://www.XXXXX/sign.cgi


#--inactivity-reset=60 -e fullscreen


Solution 1:[1]

I have not tested this, but I am after the same sort of goal. I have bits and pieces working.

One thing to note is that the autostart that you listed will not work on the newest version of pi. Instead your autostart should be put in the LXDE-pi folder instead:

/etc/xdg/lxsession/LXDE-pi/autostart

Now, to answer your question...

In theory you should be able to create a script that creates the results that you want.

Put the following in a file called .restart-chromium.sh and put something like the following in it:

#!/bin/bash

# sleep is on seconds, so 20min * 60sec
sleep 1200 
# this will kill all chromiums running
killall chromium
# Since running from CLI, chromium doesn't know where to display, this fixes that
export DISPLAY=:0.0 
# now fire up chromium again.
chromium --noerrdialogs --kiosk http://www.XXXXX/sign.cgi &

Then do a chmod 755 ~/.restart-chromium.sh to make it executable

Then place a @~/.restart-chromium.sh inside your /etc/xdg/lxsession/LXDE-pi/autostart

Or if you're still running old version LXDE instead of LXDE-pi.

Good luck!

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1