Welcome to Linux Knowledge Base and Tutorial
"The place where you learn linux"
Kitty Hooch

 Create an AccountHome | Submit News | Your Account  

Tutorial Menu
Linux Tutorial Home
Table of Contents

· Introduction to Operating Systems
· Linux Basics
· Working with the System
· Shells and Utilities
· Editing Files
· Basic Administration
· The Operating System
· The X Windowing System
· The Computer Itself
· Networking
· System Monitoring
· Solving Problems
· Security
· Installing and Upgrading
· Linux and Windows

Man Pages
Linux Topics
Test Your Knowledge

Site Menu
Site Map
Copyright Info
Terms of Use
Privacy Info
Masthead / Impressum
Your Account

Private Messages

News Archive
Submit News
User Articles
Web Links


The Web

Who's Online
There are currently, 269 guest(s) and 0 member(s) that are online.

You are an Anonymous user. You can register for free by clicking here



Current HOWTO: Kiosk HOWTO

Kiosk HOWTO : Building a Kiosk Environment Next Previous Contents

3. Building a Kiosk Environment

3.1 FVWM2

FVWM2 (FVWM, version 2 -- www.fvwm.org) is a flexible, reliable, and lightweight X Window manager that provides excellent configurability for creating a kiosk environment. For kiosk use you must change some of its default settings. You need to modify the system.fvwm2rc file to remove things like virtual desktops, title bars, exit controls, etc, leaving a relatively minimalist FVWM environment. Because the kiosk is a standalone unit, modifying the system-wide settings does not present a problem.

You can also take advantage of FVWM's settable object properties to use X Window bitmaps (xpm files) to mask the parts of Netscape Navigator you don't want users to access.

The FVWM2 file you need to modify is /etc/X11/fvwm2/system.fvwm2rc. (If you use a different distribution than Red Hat, this file may be located elsewhere.) You may have to poke around in this file to find the sections listed below.


In /etc/X11/fvwm2/system.fvwm2rc change

DeskTopSize 2X2


DeskTopSize 1X1

This eliminates the virtual desktops.

Next, in the Default Styles section, change

Style "*"           BorderWidth 7, HandleWidth 7


Style "*"           BorderWidth 0, HandleWidth 0, notitle, nohandles

This will disable most of the normal windowing controls.

Add the following two lines to the Default Styles section:

Style "xdaliclock"  StaysOnTop
Style "sxpm"        StaysOnTop 

The Default Styles part of the file should look something like this when you finish:

# default Styles:
#Style "*"           BorderWidth 7, HandleWidth 7
Style "*"           BorderWidth 0, HandleWidth 0, notitle, nohandles
Style "*"           Icon unknown1.xpm, Color lightgrey/dimgrey
Style "*"           MWMFunctions, MWMDecor, HintOverride
Style "*"           DecorateTransient, NoPPosition
Style "*"           IconBox 0 -10 -280 -1
Style "*"           FocusFollowsMouse
Style "*"           RandomPlacement, SmartPlacement
Style "xdaliclock"  StaysOnTop
Style "sxpm"        StaysOnTop

You can use the xdaliclock and sxpm programs to cover up parts of Netscape Navigator. The ``StaysOnTop'' attribute is the active ingredient.

Next, find the following four lines and comment them out as shown:

#AddToFunc InitFunction         "I" Module FvwmButtons
#+                      "I" exec xsetroot -mod 2 2 -fg \#554055 -bg \#705070

#AddToFunc RestartFunction "I" Module FvwmButtons
#+                      "I" exec xsetroot -mod 2 2 -fg \#554055 -bg \#705070

Commenting out these lines will eliminate the nice task launcher from FVWM2, which is okay because you're after as simple an environment as you can create.

3.2 Netscape Navigator

Netscape Navigator is a better choice for setting up a kiosk than Netscape Communicator. Being simpler, there are fewer objects to hide.

Under Microsoft Windows, Netscape Navigator has a kiosk mode that eliminates most of the Navigator controls but there is, at the time of this writing, no built-in kiosk mode for the Unix version of Navigator.

The Unix version can, however, be invoked with a -geometry argument that allows us to always start Netscape full screen. This forms part of our strategy for a Netscape-based kiosk.

You need to decide on our kiosk screen resolution. Using a 19- or 20-inch monitor, we found 640x480 too large, 1024x768 too small, and 800x600 just about right for public viewing (you may decide differently). Once you decide on the resolution, you are ready to begin adjusting Navigator. For the rest of this HOWTO we assume 800x600 resolution. You'll need to adjust accordingly if you select a different resolution.

Note: Navigator is going to be invoked by root during bootup, so make all of the Netscape adjustments under the root account in the /root/.netscape directory.

Invoke Netscape and click into the Edit, Preferences dialog. Under Appearance check ``Show Toolbar as Text Only.'' Under Appearance, Fonts adjust both fixed- and variable-width fonts to at least 14pt or the screen display will be too small for comfortable reading.

Under Preferences, Navigator insert the URL of your kiosk home page. If you're running a local version of Apache or another web server, make this http://localhost/ for top level access, or deeper into the html doctree if desired.

Save these options, then click View on the Navigator menu bar. Deselect Personal Toolbar and Location Bar.

Notice how much more kiosk-like the interface has become? When you exit Navigator, these settings will be saved.

3.3 Overlay Masks for Navigator

If you look closely at your adjusted Navigator screen, you'll see four areas that need to be covered and protected from mouse or trackball clicks:

  1. The Toolbar at the top
  2. The twister at the left-hand side of the navigation toolbar
  3. The rest of the navbar to the right of Home
  4. The security key in the lower left-hand corner of Navigator.

Here's a rough schematic of the areas you need to mask:

|            # 1 Toolbar                |
|#2|            |  #3 Navbar            |
+--+            +-----------------------+
|                                       |
|                                       |
|                                       |
|                                       |
|                                       |
|                                       |
|                                       |
|                                       |
|                                       |
|                                       |
+--------+                              |
|#4 Key  |                              |

To mask over the top areas (#1-3), we'll need three graphic images. To mask the security key (#4) we'll use xdaliclock.

Creating the Graphical Masks

The easiest way to create graphical masks to cover areas #1-3 is to grab a screenshot of Navigator in full 800x600 mode and then crop out areas that correspond to #1-3. I used GIMP for this.

You can then re-design the basic graphics, changing the colors if you wish, or putting your own logo on them. Save them as:

  1. topbar.xpm
  2. navleft.xpm
  3. navright.xpm

The xpm format is the native X Window bitmap format. You will use the X Window program sxpm to place them on the screen.

Creating the masks with just the right number of pixels and just the right placement on the monitor requires some experimentation. For your convenience, I have placed the xpm files we created plus our configuration files in at the following web site: http://www.rom.on.ca/kiosk/HOWTO/. You may find it simpler to download our masks and use them as a starting point for your own graphics.

3.4 /root/kiosk.xinitrc

Just as you would normally create a .xinitrc file for your personal use, you must create an X Window session initialization file for our kiosk application. The following script implements a number of features:

  • Screensaver initialization (optional)
  • Placement of graphic bitmap over Navigator menu bar (topnav.xpm)
  • Placement of graphic bitmap over navigation bar twiser (navleft.xpm)
  • Placement of graphic bitmap over rest of navbar (navright.xpm)
  • Xdaliclock placement over Navigator security key (adjusted for 800x600 screen resolution)
  • Netscape startup and loop checks to make sure Navigator is running, and to re-run it if it isn't.

This is the main file that runs the kiosk.

# kiosk.xinitrc -- Initialization script for kiosk X Window session
# Start screensaver
/usr/X11R6/bin/xscreensaver-command -exit
/usr/X11R6/bin/xscreensaver &
# Overlay over Navigator (mask #1)
sxpm /root/navtop.xpm &
# Overlay small graphic over Toolbar twister - left-hand side (mask #2)
sxpm -g +0+23 /root/navleft.xpm &
# Overlay larger graphic to cover everything to the right of
# Home on the Toolbar (mask #3)
sxpm -g +275+23 /root/navright.xpm &
# Place xdaliclock over top of Netscape security key, lower lhc (mask #4)
/usr/X11R6/bin/xdaliclock -g 38x20+0+578 -font fixed -noseconds \
-bg gray -fg black &
sleep 2

# Start fvwm2 window manager
fvwm2 &
# restart netscape if it ever exits
while true ; do
        if [ -f /.netscape/lock] ; then
                rm /.netscape/lock
        /usr/bin/netscape -geometry 800x600
# This should never be reached

3.5 /root/xkiosk

You can now start testing your kiosk setup. Since you will need to do this repeatedly, manually, as well as from an initialization script, create the following as a shell script named /root/xkiosk:

/usr/X11R6/bin/xinit /root/kiosk.xinitrc -- /usr/X11R6/bin/X \
-xf86config /root/kiosk.XF86Config bc

Because you will be testing often, and reusing this later when you automate the startup, create this command as a shell script called /root/xkiosk. Be sure to chmod ug+x it.

Next Previous Contents

The Linux Tutorial completely respects the rights of authors and artists to decide for themselves if and how their works can be used, independent of any existing licenses. This means if you are the author of any document presented on this site and do no wish it to be displayed as it is on this site or do not wish it to be displayed at all, please contact us and we will do our very best to accommodate you. If we are unable to accommodate you, we will, at your request, remove your document as quickly as possible.

If you are the author of any document presented on this site and would like a share of the advertising revenue, please contact us using the standard Feedback Form.


Looking for a "printer friendly" version?



Security Code
Security Code
Type Security Code

Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Help if you can!

Amazon Wish List

Did You Know?
You can help in many different ways.


Tell a Friend About Us

Bookmark and Share

Web site powered by PHP-Nuke

Is this information useful? At the very least you can help by spreading the word to your favorite newsgroups, mailing lists and forums.
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters. Articles are the property of their respective owners. Unless otherwise stated in the body of the article, article content (C) 1994-2013 by James Mohr. All rights reserved. The stylized page/paper, as well as the terms "The Linux Tutorial", "The Linux Server Tutorial", "The Linux Knowledge Base and Tutorial" and "The place where you learn Linux" are service marks of James Mohr. All rights reserved.
The Linux Knowledge Base and Tutorial may contain links to sites on the Internet, which are owned and operated by third parties. The Linux Tutorial is not responsible for the content of any such third-party site. By viewing/utilizing this web site, you have agreed to our disclaimer, terms of use and privacy policy. Use of automated download software ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and are therefore expressly prohibited. For more details on this, take a look here

PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.55 Seconds