The script then runs the browser
15.11
232 Chapter 15: Building a Kiosk
program??”which could just as easily be any other full-screen program of your choosing
??”and then the network monitoring code in the background.
Finally, the script monitors the application (Firefox) to see if it terminates??”which
shouldn??™t happen, but many programs have slow memory leaks or other problems
that may cause them to fail after extended periods of use. An X server failure should
automatically cause the application to terminate. Nonetheless, the script watches for
this condition, and rather than leave anything to chance, it kills off all of the child
processes and restarts all of them.
Note that display :1 is used here; this facilitates testing of the kiosk script while display
:0 is active on the system.
15.11 Booting a Kiosk
Most kiosk systems boot directly into the configured kiosk application. This can easily
be configured and tested on a system that supports runlevels.
Traditionally, runlevel 4 is unused, so it is a perfect candidate for a kiosk mode. It??™s
easiest to start off by copying the scripts for a working runlevel. On a Fedora system,
you could copy the runlevel 5 configuration with this command:
blue$ cp -l /etc/rc.
Pages:
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354