old-www/HOWTO/Public-Web-Browser-2.html

254 lines
8.5 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
<TITLE>Linux web browser station (formerly "The Linux Public Web Browser mini-HOWTO"): OLD GUIDE: The Linux Public Web Browser mini-HOWTO by Donald B. Marti Jr.,</TITLE>
<LINK HREF="Public-Web-Browser-3.html" REL=next>
<LINK HREF="Public-Web-Browser-1.html" REL=previous>
<LINK HREF="Public-Web-Browser.html#toc2" REL=contents>
</HEAD>
<BODY>
<A HREF="Public-Web-Browser-3.html">Next</A>
<A HREF="Public-Web-Browser-1.html">Previous</A>
<A HREF="Public-Web-Browser.html#toc2">Contents</A>
<HR>
<H2><A NAME="s2">2. OLD GUIDE: The Linux Public Web Browser mini-HOWTO by Donald B. Marti Jr.,</A><CODE>dmarti@best.com</CODE></H2>
<P>v0.3, 5 January 1998
<P>The basic idea here is to give web access to people who wander by,
while limiting their ability to mess anything up.
<P>
<P>
<P>
<P>
<H2><A NAME="ss2.1">2.1 Copyright and Disclaimer</A>
</H2>
<P>Copyright 1997 Donald B. Marti Jr.
This document may be redistributed under the terms of
the Linux Documentation Project license.
<P>This document currently contains information for Netscape Navigator
only, but I plan to add notes for other browsers too as I get the
necessary information. If you try this with a different browser,
please let me know.
<H2><A NAME="ss2.2">2.2 Introduction</A>
</H2>
<P>The basic idea here is to give web access to people who wander by,
while limiting their ability to mess anything up.
<P>This setup was originally intended for trade shows, but it might be
applicable other places you want to have a web browser going without
having to babysit a computer.
<P>Following these instructions
does <B>not</B> make your system bulletproof or idiot-proof.
<H2><A NAME="ss2.3">2.3 Before you begin</A>
</H2>
<H3>You need a graphical browser</H3>
<P>This document assumes that you already have a running graphical web browser,
such as Netscape Navigator, on your system.
You should have permission to use your graphical web browser.
If you want to use Netscape Navigator in a commercial setting,
you can buy a copy with appropriate license through Caldera.
<H3>You need to be able to add an account</H3>
<P>If you don't have the right to be <B>root</B>,
get the system administrator to add the ``<CODE>guest</CODE>'' account
and give you ownership of <CODE>guest</CODE>'s home directory.
Skip to the ``Create or edit the following files'' step
(
<A HREF="#CreateEditHomeGuestFiles">Create or edit the following files in /home/guest</A>)
when he or she is done.
<H3>You need <CODE>httpd</CODE> for a stand-alone web browsing station</H3>
<P>If you are setting up a web browsing station to run stand-alone,
without a network connection,
you should have <CODE>httpd</CODE> working and the web documents installed.
To tell if this is the case, enter:
<BLOCKQUOTE><CODE>
<PRE>
lynx -dump http://localhost/
</PRE>
</CODE></BLOCKQUOTE>
You should get the text of the home page on your system.
<H2><A NAME="AddGuestAccount"></A> <A NAME="ss2.4">2.4 Add the guest account</A>
</H2>
<P>As <B>root</B>, run <CODE>adduser</CODE> to add a user named <CODE>guest</CODE>.
Then enter
<BLOCKQUOTE><CODE>
<PRE>
passwd guest
</PRE>
</CODE></BLOCKQUOTE>
to set the password for the <CODE>guest</CODE> account.
This should be something easy to remember, like ``<CODE>guest</CODE>''.
You will be telling people this password.
Don't make it the same as your own password.
<P>Then make <CODE>guest</CODE>'s home directory owned by you.
Enter
<BLOCKQUOTE><CODE>
<PRE>
chown me.mygroup /home/guest
</PRE>
</CODE></BLOCKQUOTE>
Replace ``<CODE>me</CODE>'' with your regular username and ``<CODE>mygroup</CODE>''
with your group name.
(On Red Hat Linux, these will be the same,
since every user has his or her own group.)
<P>You should now exit and do the rest of the steps as yourself,
not <B>root</B>.
<H2><A NAME="CreateEditHomeGuestFiles"></A> <A NAME="ss2.5">2.5 Create or edit the following files in <CODE>/home/guest</CODE></A>
</H2>
<H3>File name: <CODE>.bash_login</CODE></H3>
<P>
<BLOCKQUOTE><CODE>
<HR>
<PRE>
exec startx
</PRE>
<HR>
</CODE></BLOCKQUOTE>
This means that when <CODE>guest</CODE> logs in,
the login shell will start up the X Window System right away.
<H3>File name: <CODE>.Xclients</CODE></H3>
<P>
<BLOCKQUOTE><CODE>
<HR>
<PRE>
netscape
</PRE>
<HR>
</CODE></BLOCKQUOTE>
This means that when X starts, <CODE>guest</CODE> just gets the web browser,
no window manager. If you prefer another web browser, do something else.
<P>The file <CODE>.Xclients</CODE> should be executable by <CODE>guest</CODE>.
Enter
<BLOCKQUOTE><CODE>
<PRE>
chmod 755 /home/guest/.Xclients
</PRE>
</CODE></BLOCKQUOTE>
to make it so.
<H3>File name: <CODE>.xsession</CODE></H3>
<P>
<BLOCKQUOTE><CODE>
<HR>
<PRE>
#!/bin/sh
netscape
</PRE>
<HR>
</CODE></BLOCKQUOTE>
If you use <CODE>xdm</CODE>(1) to log people in,
this file should make guest get the web browser
as if he or she had logged in normally.
The file <CODE>.xsession</CODE> should be executable by <CODE>guest</CODE>.
Enter
<BLOCKQUOTE><CODE>
<PRE>
chmod 755 /home/guest/.xsession
</PRE>
</CODE></BLOCKQUOTE>
to make it so.
<H3>File name: <CODE>.Xdefaults</CODE></H3>
<P>
<BLOCKQUOTE><CODE>
<HR>
<PRE>
! Disable drag-to-select.
*hysteresis: 3000
! Make visited and unvisited links the same color by default
*linkForeground: #0000EE
*vlinkForeground: #0000EE
Netscape.Navigator.geometry: =NETSCAPE_GEOMETRY
! Disable some of the keyboard commands.
*globalTranslations:
! Mouse bindings: make all mouse buttons do the same thing.
*drawingArea.translations: #replace \
&lt;Btn1Down>: ArmLink() \n\
&lt;Btn2Down>: ArmLink() \n\
&lt;Btn3Down>: ArmLink() \n\
~Shift&lt;Btn1Up>: ActivateLink() \
DisarmLink() \n\
~Shift&lt;Btn2Up>: ActivateLink() \
DisarmLink() \n\
~Shift&lt;Btn3Up>: ActivateLink() \
DisarmLink() \n\
Shift&lt;Btn1Up>: ActivateLink() \
DisarmLink() \n\
Shift&lt;Btn2Up>: ActivateLink() \
DisarmLink() \n\
Shift&lt;Btn3Up>: ActivateLink() \
DisarmLink() \n\
&lt;Btn1Motion>: DisarmLinkIfMoved() \n\
&lt;Btn2Motion>: DisarmLinkIfMoved() \n\
&lt;Btn3Motion>: DisarmLinkIfMoved() \n\
&lt;Motion>: DescribeLink() \n\
</PRE>
<HR>
</CODE></BLOCKQUOTE>
This file disables blink tags, drag-to-select,
and some of the keyboard commands.
It also makes all mouse buttons do the same thing,
hides the menu bar, and makes visited and unvisited links the same color,
so each visitor gets nice clean blue links,
not ones that other people have been thumbing through and staining purple.
<P>You should replace the <CODE>NETSCAPE_GEOMETRY</CODE> in this file
with an X geometry that looks like this: <CODE>XxY+0-0</CODE>,
where <CODE>X</CODE> is the width of your screen and <CODE>Y</CODE> is the height
of your screen <CODE>+ 32</CODE>.
This will position the Netscape menu bar off the top of the screen,
so the user won't be distracted.
For example, if your screen is 800x600,
the geometry should be <CODE>800x632+0-0</CODE>.
<H2><A NAME="ss2.6">2.6 Make a <CODE>.netscape</CODE> directory for <CODE>guest</CODE></A>
</H2>
<P>Enter
<BLOCKQUOTE><CODE>
<PRE>
mkdir /home/guest/.netscape
chmod 777 /home/guest/.netscape
</PRE>
</CODE></BLOCKQUOTE>
<P>to create <CODE>guest</CODE>'s <CODE>.netscape</CODE> directory and make it
world-writable.
<P>
<H2><A NAME="ss2.7">2.7 Try it</A>
</H2>
<P>Log out, then log in as <CODE>guest</CODE>.
<H2><A NAME="ss2.8">2.8 Changing preferences</A>
</H2>
<P>Since you won't be able to use the menu bar as <CODE>guest</CODE>,
you should edit guest's preferences manually if you need to change them,
or change your own preferences to what you want <CODE>guest</CODE>'s to be
and copy the preferences file.
<HR>
<A HREF="Public-Web-Browser-3.html">Next</A>
<A HREF="Public-Web-Browser-1.html">Previous</A>
<A HREF="Public-Web-Browser.html#toc2">Contents</A>
</BODY>
</HTML>