0

I have a script that starts iceweasel with a certain webpage if iceweasel is not already running. It should start iceweasel on the local screen, in other words the screen plugged directly into the Raspberry Pi. The Pi is running Raspbian Stretch lastest update.

A cron job (see code below) runs every minute to check if iceweasel is running. I know the script is running but the browser does not appear on the screen. I can see from pgrep that iceweasel has a running process but can't be found anywhere. Cron is run from regular user pi.

* * * * * export DISPLAY=:0 && /home/pi/netcheck.sh &

After a lot of research I am still stuck and have no clue how to fix it. I have read several solutions here and on other forums but haven't found anything even close to a solution.

Several Raspberry Pi with older versions of Raspbian works without problem.

Any help would be appreciated.

  • Your script shall start on RPi startup without user login to a session? (Btw. its firefox nowadays) – Ingo Sep 20 '18 at 12:55
  • @Ingo Anyway will work as long as the script can start and kill the program and the webpage can update every minute. It is a regular Wordpress page and shouldn't be a problem. – Diego Sep 20 '18 at 13:39
  • What do you mean with: " the script can start and kill the program". I thought there is only a script running. Is there another program? Does the script terminates after some seconds without error? I was thinking to use a systemd unit that can do many things but now I'm unsure if it's the right way. – Ingo Sep 20 '18 at 14:14
  • @Ingo The script starts a browser program to show a webpage from a webserver, and in case the webserver for some reason is unreachable the script will kill the program and then start it with an error-page. – Diego Nov 8 '18 at 15:17
1

I wrote a tutorial "Auto start Midori Browser in Fullscreen Kiosk Modus"

I use Midori as Browser alternative and matchbox to display the browser window without the need of Desktop environment.
Better performance and less storage usage.

It's to long to post it here, so i included the link to the tutorial.
Hope it helps.

  • Thank you for your suggestion. Will check it out and see if it works. Maybe Iseweasel (Firefox) isn't the best solution for this setup. Do you know if there is a function for Midori to roll through tabs? – Diego Sep 20 '18 at 13:41
  • 1
    Ctrl+tab should flick between tabs. Use Xautomation in a cron task to send the keystrokes. – Andy Anderson Sep 21 '18 at 7:38
  • @AndyAnderson great suggestion. Didn't know that this is possible. If the answer was useful, please upvote it. – BenRoe Sep 21 '18 at 12:57

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.