old-www/HOWTO/Kiosk-HOWTO-4.html

101 lines
2.7 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
<TITLE>Kiosk HOWTO : Initializing the Kiosk</TITLE>
<LINK HREF="Kiosk-HOWTO-5.html" REL=next>
<LINK HREF="Kiosk-HOWTO-3.html" REL=previous>
<LINK HREF="Kiosk-HOWTO.html#toc4" REL=contents>
</HEAD>
<BODY>
<A HREF="Kiosk-HOWTO-5.html">Next</A>
<A HREF="Kiosk-HOWTO-3.html">Previous</A>
<A HREF="Kiosk-HOWTO.html#toc4">Contents</A>
<HR>
<H2><A NAME="s4">4. Initializing the Kiosk</A></H2>
<P>Under normal (i.e. kiosk) conditions, Linux should boot straight into
Kiosk mode. In the event of a power failure, accidental reboot, or
scheduled reboot, you need to configure the system to do this.
<P>For our kiosk we elected to use init level 4, which is normally
unused, for kiosk mode. We made the following adjustment to
/etc/inittab:
<P>
<H2><A NAME="ss4.1">4.1 /etc/inittab modifications</A>
</H2>
<P>
<HR>
<PRE>
# Default runlevel. The runlevels used by RHS are:
# 0 - halt (Do NOT set initdefault to this)
# 1 - Single user mode
# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)
# 3 - Full multiuser mode
# 4 - Kiosk mode
# 5 - X11
# 6 - reboot (Do NOT set initdefault to this)
#
id:4:initdefault:
</PRE>
<HR>
<P>
<H2><A NAME="ss4.2">4.2 /etc/rc.d/rc.4/S99xkiosk runlevel script</A>
</H2>
<P>To initialize the kiosk after everything else has been initialized,
including, in our case, Apache and MySQL, create the file
/etc/rc.d/rc.4/S99xkiosk:
<P>
<HR>
<PRE>
#!/bin/bash
#
# S99xkiosk Initialization of kiosk for runlevel 4
#
# Author: Gene Wilburn &lt;genew@rom.on.ca&gt;
#
# Display message on console
echo "Starting up the X Window Kiosk ... "
if [ -f /.netscape/lock] ; then
rm /.netscape/lock
fi
# Logging of X activity
echo %%%%%%%%%%%%%Reboot%%%%%%%%%% >> /var/log/xlog
/root/xkiosk
# This point should only be reached by pressing Ctrl-Backspace
/sbin/shutdown -r now
# All done.
</PRE>
<HR>
<P>Once this file has been created and inittab has been adjusted to boot
into init level 4, Linux will boot directly into kiosk mode. On our
kiosk we disable telnet and ftp and install ssh so we can maintain and
administer the kiosk remotely across the network with ssh and scp.
<P>
<H2><A NAME="ss4.3">4.3 Booting normally from the console</A>
</H2>
<P>There are times, especially during testing, when you'd like to work
from the console in a normal init level 3 mode. To do this, press
<B>Ctrl-Backspace</B> to reboot the system. When LILO: appears type:
<P>
<BLOCKQUOTE><CODE>
<PRE>
LILO: linux init 3
</PRE>
</CODE></BLOCKQUOTE>
<P>and log in as usual.
<P>
<HR>
<A HREF="Kiosk-HOWTO-5.html">Next</A>
<A HREF="Kiosk-HOWTO-3.html">Previous</A>
<A HREF="Kiosk-HOWTO.html#toc4">Contents</A>
</BODY>
</HTML>