2

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.

4
  • Your script shall start on RPi startup without user login to a session? (Btw. its firefox nowadays)
    – Ingo
    Commented Sep 20, 2018 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
    Commented Sep 20, 2018 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
    Commented Sep 20, 2018 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
    Commented Nov 8, 2018 at 15:17

2 Answers 2

2

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.

3
  • 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
    Commented Sep 20, 2018 at 13:41
  • 1
    Ctrl+tab should flick between tabs. Use Xautomation in a cron task to send the keystrokes. Commented Sep 21, 2018 at 7:38
  • @AndyAnderson great suggestion. Didn't know that this is possible. If the answer was useful, please upvote it.
    – BenRoe
    Commented Sep 21, 2018 at 12:57
1

I've done this with Chromium browser, so might be similar, but the '--parameters' might be different.

I created a file named : autoChromium.desktop and placed it in:

~/.config/autostart

The contents of the autoChromium.desktop file is :

[Desktop Entry]
Type=Application
Exec=/usr/bin/chromium-browser --noerrdialogs --disable-session-crashed-bubble --disable-infobars --kiosk https://YOUR_URL.COM/
Hidden=false
X-GNOME-Autostart-enabled=true
Name[en_US]=AutoChromium
Name=AutoChromium
Comment=Start Chromium when GNOME starts

This started Chromium in kiosk mode, fullscreen with the specified URL. Might be adaptable to your setup: iceweasel / firefox.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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