Using Raspberry Pi as an Internet Kiosk

Following up on this morning post explaining how to get the kernel and minimal rootfs to run debian in qemu emulating an ARM1176 processor, I’ll show how to make a minimal rootfs to run Chrome browser in this platform.

I tested it in QEMU, but this should also run on the Raspberry Pi hardware.

First, you’ll have to complete the step I provided in Raspberry Pi Emulator in Ubuntu with Qemu.

Start qemu:

sudo qemu-system-arm -M versatilepb -cpu arm1176 -m 256 -hda rootfs.ext2 -kernel zImage -append “root=/dev/sda” -serial stdio

Once you login to the console as root, create a new user (e.g guest):

adduser guest

This user will be needed to login with the graphical interface and ssh.

In order to get an Internet Kiosk, we’ll need a web browser (Chromium) and a window manger. I chose fluxbox instead of gnome because of the size difference (8651 KB vs 1739 MB).

I installed the required package in qemu with apt-get:

apt-get install xorg gdm fluxbox chromium-browser chromium-browser-l10n

Here’s the installed size for each package (and dependencies) according to apt-get:

  • xorg – 27 MB
  • gdm – 66.6 MB
  • fluxbox – 8651 KB
  • chromium-browser and chromium-browser-l10n – 228 MB

I’ve also installed dropbear to be able to access qemu via ssh.

Once everything is installed, there is only 759MB used.

If we were to run this in an SD card as it would be the case wit the Raspberry Pi board, we would just have to add the kernel (2MB) and reserve space for the web browser cache.  So a 1 or 2 GB SD card would most probably be sufficient to run this system.

Once, everything is installed, shutdown qemu and restart it.

sudo qemu-system-arm -M versatilepb -cpu arm1176 -m 256 -hda rootfs.ext2 -kernel zImage -append “root=/dev/sda” -serial stdio -redir tcp:2222::22

Note I added the redir option. This is to access the board (qemu) via ssh:

ssh -p 2222 guest@hostip

where hostip is the IP address of the host running qemu.

After the board boots, you should get the login screen below after a while.

Gnome GDM Login Screen
GDM Login Screen in QEMU

Now logging as guest, (don’t be confused by the grey screen) and right click to access the menu. Select Applications->Network->Web Browsing->Chromium to start Chrome.

Rasperry PI Web Browser in Qemu
http://www.raspberrypi.org rendered by Chromium in Qemu for ARM11

If we want to autostart Chromium after login, edit /home/guest/.fluxbox/init and change the line with session.screen0.rootCommand to:

session.screen0.rootCommand: chromium-browser &

Missing features and known issues:

  • Color problem (as seen on screenshot above). I’m not sure exactly what may cause this, probably a wrong colorspace has been selected.
  • No flash support. Adobe/ARM apparently only support Cortex A8/A9.
  • No java support. I tried to install sun java runtime, but apt-get could not find a candidate. Maybe it would be possible to install another implementation of java.
  • Only support English for now. For other languages, some language packs and fonts would have to be installed.

If you want the binaries to try it out:

The root password is ‘raspberry’, guest user password is ‘guest’.

Share this:
FacebookTwitterHacker NewsSlashdotRedditLinkedInPinterestFlipboardMeWeLineEmailShare

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK Pi 4C Plus

7 Replies to “Using Raspberry Pi as an Internet Kiosk”

  1. Hello , Thanks for this informative and clearly written article. I have been trying to use the binaries provided by you on my installed QEMU emulator, just as startup to familiarise myself with the qemu environment. But after issuing the command as mentioned in the post
    sudo qemu-system-arm -M versatilepb -cpu arm1176 -m 256 -hda rootfs-chromium.ext2\(2\) -kernel zImage -append “root=/dev/sda” -serial stdio

    I am getting this error : Unable to find CPU definition
    Is it a compatibility issue as my QEMU version QEMU PC emulator version 0.12.3 (qemu-kvm-0.12.3) is older than what you mentioned in the previous post.
    Thanks

  2. I am curious if there is a way to have it auto-login and bypass the need to enter a username. We have a place where this would be perfect if it could boot up and go directly to the web browser without prompting the user for a login. Also, in addition to SSHD, is it possible to run a VNC server as well for remote access and monitoring? Any way to force Chrome into a kiosk mode on start (e.g. no browser chrome or controls, just the viewing area). This is a great start for a true “kiosk” deployment, but missing a few things to really be deployable as such. Thanks for the info!

  3. @ Justin Scott
    For autologin you can try that: https://wiki.archlinux.org/index.php/LXDE#Autologin or/and that https://wiki.archlinux.org/index.php/GDM#Automatic_login

    Yes, you can run vnc: http://www.cnx-software.com/2012/04/19/how-to-setup-a-vnc-remote-connection-to-a-raspberry-pi/

    For Chrome Kiosk mode – http://think2loud.com/868-google-chrome-full-screen-kiosk-mode/
    But a knowledgable user would apparently still be able to close it with Alt+F4.

    That’s something I should try when I get a real Raspberry Pi board.
    If in the meantime, you managed to do it, it would be nice to let others know about you did it.

Leave a Reply

Your email address will not be published. Required fields are marked *

Khadas VIM4 SBC
Khadas VIM4 SBC