Open a website in fullscreen on a Raspberr Pi

    It took me a while to find something that works easily and with no hassle. This is by far the easiest way I could find. If you have questions or ideas for improvement, let me know.

    Check out my other Raspi tutorials here if you need help with other topics like setting up Wifi, SSH connection or to remove the login procedure from your Pi. If you already got these things figured out, here we go with the actual Tutorial:

    Installing dependencies

    We will have to install some tools to make our kiosk browser work:

    sudo apt-get install matchbox x11-xserver-utils unclutter midori

    After the installation we need to create a script file:

    sudo nano

    This will create and open a file called in the nano editor. We will add the following lines to this yet empty file:

    unclutter &
    matchbox-window-manager & :
    xset -dpms
    xset s off
    while true; do
    /usr/bin/midori -e Fullscreen -a

    Close the edited file by hitting ctrl - X and save your changes by pressing y and enter. We now have a script that will open a Midori browser with the given url for us. Remember to customize the url in the code snippet ( with the actual website you want to open in the browser, otherwise it will open this website here.

    To make our dashboard script an executable file (that we will run automatically during the next step) we type first change the chmod settings:

    sudo chmod 755

    Now we will see if it works by running the script manually:

    xinit /home/pi/

    To exit press ctrl + alt + F1 and then ctrl + c

    Opening a website automatically on boot

    Now we only need to add the following lines to the /home/pi/.profile file. We open it using sudo nano /home/pi/.profile and add this to the bottom of the file after the existing content:

    ifconfig | grep 192
    if [ $? -eq 0 ]
    xinit /home/pi/
    echo "Network connection could not be established."
    echo "Resolve the connection problems and manually "
    echo "execute xinit /home/pi/ to open the website"

    This code will check if the Pi has a working internet connection and then open up the dashboard. Or display the error message, typed below, if no connection is available.

    Now save these changes (again by pressing ctrl + X and confirming with y) and reboot your Raspi by typing sudo reboot.

    It should now restart opening the website you have defined in the script. You made it!