element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Pi IoT
  • Challenges & Projects
  • Design Challenges
  • Pi IoT
  • More
  • Cancel
Pi IoT
Blog [Pi IoT] Hangar Control #5 -- Raspberry Pi Kiosk
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: rhavourd
  • Date Created: 13 Aug 2016 5:55 PM Date Created
  • Views 488 views
  • Likes 2 likes
  • Comments 0 comments
  • pi-iot kiosk hangar-control
Related
Recommended

[Pi IoT] Hangar Control #5 -- Raspberry Pi Kiosk

rhavourd
rhavourd
13 Aug 2016

Setting up a status display

As part of the Hangar Control project, I would like to be able to provide pilots and operations staff the ability to see the status of all the hangars. The Raspberry Pi 7" Touch Display makes a perfect candidate for this. As delivered, there is no enclosure for the display so we are left to build or buy something suitable. There are many fine examples of 3D-printable designs, but I do not have a 3D printer so I decided to purchase one. I chose a case from The Pi Hut https://thepihut.com/collections/raspberry-pi-screens/products/raspberry-pi-official-7-touchscreen-case for less than $20 USD, including shipping. Installing the the display is easy, but I did have a problem with the USB power adapter. The opening on the case is too small to accommodate the majority of connectors that I had -- Even those that ship with RPi's from  various sources. Not to be thwarted, I simply used a dremel tool to enlarge the opening.

 

Pi Hut Display, emptyPi Hut Display
Pi Hut Display, rear

Once the display was enclosed and the power connected, I booted the the RPi only to discover that the display was presenting everything "upside down". The designers of the case chose to orient the Raspberry Pi such that the HDMI and power connectors were pointing up. Unlike your iPad or phone, the display does not automatically adjust itself based on the orientation of the display. You'll find many attempts to resolve this issue, but the most concise and efficient, performance-wise, is:

 

sudo nano /boot/config.txt

 

Navigate to the bottom of the file and add...

# rotate the display (and touchscreen)

lcd_rotate=2

Use "control-x" to save the changes and then reboot...

 

sudo shutdown -r now

 

Full Screen Browser Kiosk

Now that we have a touchscreen display ready for mounting on the wall, we need to set it up such that the status of HangarControl is always available. We are going to do this with a bit of X11 display alchemy. I was hoping to be able to be able to simply launch a browser from a script and supply a few command line parameters to force it into full screen mode and hide its various decorations and navigation menus. Alas, this was not to be. In the end, I decided on a dash of alchemy.

Be Aware!

This is not a solution for a "hardened" kiosk as one might release to the general public. It is intended as an easy-to-use display for a targeted and (mostly) trustworthy audience.

 

Install System Packages

 

sudo apt-get install epiphany-browser x11-xserver-utils xautomation unclutter

 

PackagePurpose
epiphany-browserWeb browser. By default, it ships with raspian and its ilk. I just included it here for completeness.
x11-server-utilsThis package provides a miscellaneous assortment of X Server utilities that ship with the X Window System.
xautomationA set of command lines programs to control X and do "visual scraping" to find things on the screen. The control interface allows mouse movement, clicking, button up/down, key up/down, etc.
unclutter

Remove the cursor image from the screen so that it does not obstruct the area you are looking at after it has not moved for a given time.

 

Launch the browser and set full screen mode

Create a script using your favorite editor and enter its contents as follows:

pi@raspberrypi:~ $ nano fullscreen.sh

#!/bin/bash

url=${1:-"http://hangarcontrol.com"}

sudo -u pi epiphany-browser -a -i --profile ~/.config $url --display=:0 &

sleep 5s;

xte "key F11" -x:0

 

Make the file executable

pi@raspberrypi:~ $ chmod +rx fullscreen.sh

 

Go ahead and test the script from the command line:

pi@raspberrypi:~ $ ./fullscreen.sh

 

You will, most likely, see some warning messages on the screen. I ignored them as they do not impact the operation of the kiosk, nor will they be seen during the course of normal operations.

(epiphany-browser:1007): WARNING **: Error caching form data: Cannot autolaunch D-Bus without X11 $DISPLAY

(epiphany-browser:1007): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

(epiphany-browser:1007): Wnck-WARNING **: Unhandled action type _OB_WM_ACTION_UNDECORATE

(epiphany-browser:1007): Wnck-WARNING **: Unhandled action type _OB_WM_ACTION_UNDECORATE

(epiphany-browser:1007): Wnck-WARNING **: Unhandled action type _OB_WM_ACTION_UNDECORATE

(epiphany-browser:1007): Wnck-WARNING **: Unhandled action type _OB_WM_ACTION_UNDECORATE

Regardless, your RPi touchscreen display should present your web page and nothing else.

 

 

Automatically launch the browser with system startup

The final step is have the RPi boot right into kiosk mode. Depending on your use, you can choose whether or not the display should "go blank" after a period of not being used.

 

pi@raspberrypi:~ $ nano .config/lxsession/LXDE-pi/autostart

 

If you do not want the screensaver to be active:

Remove this line:

@xscreensaver -no-splash

Add these lines (turn off screensave, disable energy star power management, and do not blank screen, respectively):

@xset s off

@xset -dpms

@xset s noblank

 

Regardless of whether you have the screensaver enabled, we need to launch the web browser and place it in full screen mode. Add the final line to the end of the file.

@/home/pi/fullscreen.sh

When you reboot, your screen should appear something like:

image

That wraps up this installment. I hope you are able to use the information presented to setup your own dedicated Raspberry Pi Information Kiosk.

 

- Rick

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube