Code Monkey home page Code Monkey logo

raspberry-pi-kiosk-screen's Introduction

Create Raspberry Pi Kiosk on Raspbian Debian Wheezy

Table of Contents

  1. Raspbian Wheezy
    1.1. Chromium Browser
    1.2. Epiphany Browser
    1.3. Midori Browser
    1.4. Firefox (Iceweasel)
  2. Raspbian Jessie
    2.1. Chromium Browser
  3. Connecting to Wi-Fi on boot
  4. Splashscreen
  5. References
  6. Sources

Raspbian Wheezy

*Chromium is not available in Debian Wheezy on the armhf architcture for the Raspberry Pi 3. If you get a "package not found" error when attempting to install chromium, try another browser below."

Chromium Browser

  1. Install Raspbian Debian Wheezy

  2. sudo raspi-config

    • Update the Raspi config tool (Advanced Options)
    • Enable SSH
    • Disable overscan. (Advanced Options)
    • Change your boot to desktop environment.
  3. Now start the terminal and update your system:

    sudo apt-get update
    sudo apt-get upgrade
    
  4. Install chromium (browser), x11 server utils and unclutter (hide the cursor from the screen)

    sudo apt-get install chromium x11-xserver-utils unclutter
    
  5. When the GUI starts up chromium needs to boot in kiosk-mode and open the webpage. Because of that we edit the autostart file:

    nano ~/.config/lxsession/LXDE-pi/autostart
    

    The autostart files needs to look like this:

    @lxpanel --profile LXDE
    @pcmanfm --desktop --profile LXDE
    @xset s off
    @xset -dpms
    @xset s noblank
    @sed -i 's/"exited_cleanly": false/"exited_cleanly": true/' ~/.config/chromium Default/Preferences
    @chromium-desktop --noerrdialogs --kiosk [URL] --incognito --disable-translate
    

Epiphany Browser

  1. Install Raspbian Debian Wheezy

  2. sudo raspi-config

    • Update the Raspi config tool (Advanced Options)
    • Enable SSH
    • Disable overscan. (Advanced Options)
    • Change your boot to desktop environment.
  3. Now start the terminal and update your system:

    sudo apt-get update
    sudo apt-get upgrade
    
  4. Install Epiphany (browser), x11 server utils, xautomation and unclutter (hide the cursor from the screen)

    sudo apt-get install epiphany-browser x11-xserver-utils xautomation unclutter
    
  5. Save this shell script: /home/pi/fullscreen.sh

    nano /home/pi/fullscreen.sh
    

    Fullscreen shell script should look like this: (example replace [URL] http://github.com/elalemanyo/raspberry-pi-kiosk-screen)

    sudo -u pi epiphany-browser -a -i --profile ~/.config [URL] --display=:0 &
    sleep 15s;
    xte "key F11" -x:0
    

    Change file mode:

    chmod 755 /home/pi/fullscreen.sh
    
  6. Edit the autostart file to run the script:

    nano ~/.config/lxsession/LXDE-pi/autostart
    

    The autostart files needs to look like this:

    @xset s off
    @xset -dpms
    @xset s noblank
    @/home/pi/fullscreen.sh
    
  7. Reload the page (if needed) every hour:

    crontab -e
    

    Add this:

    0 */1 * * * xte -x :0 "key F5"
    

Midori Browser

  1. Install Raspbian Debian Wheezy

  2. sudo raspi-config

    • Update the Raspi config tool (Advanced Options)
    • Enable SSH
    • Disable overscan. (Advanced Options)
  3. Now start the terminal and update your system:

    sudo apt-get update
    sudo apt-get upgrade
    
  4. Install Midori (browser), x11 server utils, matchbox and unclutter (hide the cursor from the screen)

    sudo apt-get install midori x11-xserver-utils matchbox unclutter
    
  5. Save this shell script: /home/pi/fullscreen.sh

    nano /home/pi/fullscreen.sh
    

    Fullscreen shell script should look like this:

    unclutter &
    matchbox-window-manager &
    midori -e Fullscreen -a [URL]
    

    Change file mode:

    chmod 755 /home/pi/fullscreen.sh
    
  6. Edit the autostart file to run the script:

    nano ~/.config/lxsession/LXDE-pi/autostart
    

    The autostart files needs to look like this:

    @xset s off
    @xset -dpms
    @xset s noblank
    @/home/pi/fullscreen.sh
    
  7. Auto StartX (Run LXDE):

    sudo nano /etc/rc.local
    

    Scroll to the bottom and add the following above exit 0:

    su -l pi -c startx
    

Firefox (Iceweasel)

  1. Install Raspbian Debian Wheezy

  2. sudo raspi-config

    • Update the Raspi config tool (Advanced Options)
    • Enable SSH
    • Disable overscan (Advanced Options)
    • Memory Split (Advanced Options)
  3. Now start the terminal and update your system:

    sudo apt-get update
    sudo apt-get upgrade
    
  4. Install Firefox (Iceweasel), Gnash, x11 server utils, matchbox, xautomation and unclutter (hide the cursor from the screen)

    sudo apt-get install iceweasel gnash gnash-common browser-plugin-gnash x11-xserver-utils matchbox xautomation unclutter
    
  5. Save this shell script: /home/pi/fullscreen.sh

    nano /home/pi/fullscreen.sh
    

    Fullscreen shell script should look like this:

    unclutter &
    matchbox-window-manager &
    iceweasel http://www.domradio.de/foyer/wrapper --display=:0 &
    sleep 15s;
    xte "key F11" -x:0
    

    Change file mode:

    chmod 755 /home/pi/fullscreen.sh
    
  6. Edit the autostart file to run the script:

    sudo nano ~/.config/lxsession/LXDE-pi/autostart
    

    The autostart files needs to look like this:

    @xset s off
    @xset -dpms
    @xset s noblank
    @/home/pi/fullscreen.sh
    
  7. Auto StartX (Run LXDE):

    sudo nano /etc/rc.local
    

    Scroll to the bottom and add the following above exit 0:

    su -l pi -c startx
    
  8. Reload the page (if needed) every hour:

    crontab -e
    

    Add this:

    0 */1 * * * xte -x :0 "key F5"
    

Raspbian Jessie

Chromium Browser

  1. Install Raspbian Debian Jessie

  2. sudo raspi-config

    • Update the Raspi config tool (Advanced Options)
    • Enable SSH
    • Disable overscan. (Advanced Options)
  3. Now start the terminal and update your system:

    sudo apt-get update
    sudo apt-get upgrade
    
  4. Install unclutter (hide the cursor from the screen)

    sudo apt-get install unclutter
    
  5. When the GUI starts up chromium needs to boot in kiosk-mode and open the webpage. Because of that we edit the autostart file:

    nano ~/.config/lxsession/LXDE-pi/autostart
    

    or

    sudo nano /etc/xdg/lxsession/LXDE-pi/autostarts
    

    The autostart files needs to look like this:

    @lxpanel --profile LXDE-pi
    @pcmanfm --desktop --profile LXDE-pi
    @xset s off
    @xset -dpms
    @xset s noblank
    @sed -i 's/"exited_cleanly": false/"exited_cleanly": true/' ~/.config/chromium-browser Default/Preferences
    @chromium-browser --noerrdialogs --kiosk [URL] --incognito --disable-translate
    

Connecting to Wi-Fi on boot

You may wish to have your Kiosk device connect automatically both to your home wifi (where you test it) as well as the wireless network where you deploy it.

In /etc/network/interfaces Add a line that says to cause wireless to connect automatically auto wlan0.

Then edit /etc/wpa_supplicant/wpa_supplicant.conf to define one or more wireless networks, changing the SSIDs and passwords to match your networks. The id_str values just need to be unique.

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
	ssid="SCHOOLS NETWORK NAME"
	psk="SCHOOLS PASSWORD"
	id_str="school"
}

network={
	ssid="HOME NETWORK NAME"
	psk="HOME PASSWORD"
	id_str="home"
}

Splashscreen

  1. Install Frame Buffer Imageviewer (FBI):

    sudo apt-get install fbi
    
  2. Upload splash.png:

    scp splash.png pi@[IP raspberry pi]:splash.png
    
  3. Move splash image to /etc/:

    sudo mv splash.png /etc/
    
  4. Add script:

    sudo nano /etc/asplashscreen
    
    do_start () {
    	/usr/bin/fbi -T 1 -noverbose -a /etc/splash.png
    	exit 0
    }
    case "$1" in
    	start|"")
    do_start
    ;;
    restart|reload|force-reload)
    echo "Error: argument '$1' not supported" >&2
    exit 3
    ;;
    stop)
    # No-op
    ;;
    status)
    exit 0
    ;;
    *)
    echo "Usage: asplashscreen [start|stop]" >&2
    exit 3
    ;;
    esac
    :
    
  5. Run:

    sudo mv asplashscreen /etc/init.d/asplashscreen
    
  6. Run:

    sudo chmod a+x /etc/init.d/asplashscreen
    sudo insserv /etc/init.d/asplashscreen
    

References:

Sources

raspberry-pi-kiosk-screen's People

Contributors

andre0512 avatar elalemanyo avatar export-mike avatar gregjohnstewart avatar markstos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

raspberry-pi-kiosk-screen's Issues

How to restart iceweasel if closed by user

I've setup a pi-kiosk using iceweasel, and it works great ... except if the user closes the last tab on the browser there is no way to reload it/get it back -- you're just left with a black screen. You can restart the pi and get it back, but I'd rather have the user be able to do it.

Is there a way to link the browser restart to an F key? Or create a cron job that checks every minute to see if the browser is open, and if not restart it? There is the cron job to refresh to F5, but not restart from scratch.

Other than this, the setup has been perfect for me. Thanks in advance.

Remove Kiosk Mode

I have a Raspberry Pi that is configured into kiosk mode. I want to revert to booting to desktop.

I have cleared autostart file, but it boots to filesystem /home/pi in desktop.

Chronium has been removed and replace with a new package.

When trying to install chronium on newer raspbian images, you'll get this error:
$ sudo apt-get install chromium
sudo: unable to resolve host raspberrypi
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package chromium is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or is only available from another source
However the following packages replace it:
chromium-inspector chromium-bsu

E: Package 'chromium' has no installation candidate

They added chronium as a new package to the raspberry pi repo, so use this instead:
sudo apt-get install chromium-browser

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.