home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Enter 1999 June / enter_06_1999.iso / doc / HOWTO / mini / Public-Web-Browser < prev    next >
Text File  |  1998-10-14  |  7KB  |  191 lines

  1.   The Linux Public Web Browser mini-HOWTO
  2.   Donald B. Marti Jr., dmarti@best.com
  3.   v0.3, 5 January 1998
  4.  
  5.   The basic idea here is to give web access to people who wander by,
  6.   while limiting their ability to mess anything up.
  7.  
  8.   1.  Copyright and Disclaimer
  9.  
  10.   Copyright 1997 Donald B. Marti Jr.  This document may be redistributed
  11.   under the terms of the Linux Documentation Project license.
  12.  
  13.   This document currently contains information for Netscape Navigator
  14.   only, but I plan to add notes for other browsers too as I get the
  15.   necessary information.  If you try this with a different browser,
  16.   please let me know.
  17.  
  18.   2.  Introduction
  19.  
  20.   The basic idea here is to give web access to people who wander by,
  21.   while limiting their ability to mess anything up.
  22.  
  23.   This setup was originally intended for trade shows, but it might be
  24.   applicable other places you want to have a web browser going without
  25.   having to babysit a computer.
  26.  
  27.   Following these instructions does not make your system bulletproof or
  28.   idiot-proof.
  29.  
  30.   3.  Before you begin
  31.  
  32.   3.1.  You need a graphical browser
  33.  
  34.   This document assumes that you already have a running graphical web
  35.   browser, such as Netscape Navigator, on your system.  You should have
  36.   permission to use your graphical web browser.  If you want to use
  37.   Netscape Navigator in a commercial setting, you can buy a copy with
  38.   appropriate license through Caldera.
  39.  
  40.   3.2.  You need to be able to add an account
  41.  
  42.   If you don't have the right to be root, get the system administrator
  43.   to add the ``guest'' account and give you ownership of guest's home
  44.   directory.  Skip to the ``Create or edit the following files'' step
  45.   (``Create or edit the following files in /home/guest'') when he or she
  46.   is done.
  47.  
  48.   3.3.  You need httpd for a stand-alone web browsing station
  49.  
  50.   If you are setting up a web browsing station to run stand-alone,
  51.   without a network connection, you should have httpd working and the
  52.   web documents installed.  To tell if this is the case, enter:
  53.  
  54.        lynx -dump http://localhost/
  55.  
  56.   You should get the text of the home page on your system.
  57.  
  58.   4.  Add the guest account
  59.  
  60.   As root, run adduser to add a user named guest.  Then enter
  61.  
  62.   passwd guest
  63.  
  64.   to set the password for the guest account.  This should be something
  65.   easy to remember, like ``guest''.  You will be telling people this
  66.   password.  Don't make it the same as your own password.
  67.  
  68.   Then make guest's home directory owned by you.  Enter
  69.  
  70.        chown me.mygroup /home/guest
  71.  
  72.   Replace ``me'' with your regular username and ``mygroup'' with your
  73.   group name.  (On Red Hat Linux, these will be the same, since every
  74.   user has his or her own group.)
  75.  
  76.   You should now exit and do the rest of the steps as yourself, not
  77.   root.
  78.  
  79.   5.  Create or edit the following files in /home/guest
  80.  
  81.   5.1.  File name: .bash_login
  82.  
  83.        ______________________________________________________________________
  84.        exec startx
  85.        ______________________________________________________________________
  86.  
  87.   This means that when guest logs in, the login shell will start up the
  88.   X Window System right away.
  89.  
  90.   5.2.  File name: .Xclients
  91.  
  92.        ______________________________________________________________________
  93.        netscape
  94.        ______________________________________________________________________
  95.  
  96.   This means that when X starts, guest just gets the web browser, no
  97.   window manager. If you prefer another web browser, do something else.
  98.  
  99.   The file .Xclients should be executable by guest.  Enter
  100.  
  101.        chmod 755 /home/guest/.Xclients
  102.  
  103.   to make it so.
  104.  
  105.   5.3.  File name: .xsession
  106.  
  107.        ______________________________________________________________________
  108.        #!/bin/sh
  109.        netscape
  110.        ______________________________________________________________________
  111.  
  112.   If you use xdm(1) to log people in, this file should make guest get
  113.   the web browser as if he or she had logged in normally.  The file
  114.   .xsession should be executable by guest.  Enter
  115.  
  116.        chmod 755 /home/guest/.xsession
  117.  
  118.   to make it so.
  119.  
  120.   5.4.  File name: .Xdefaults
  121.  
  122.        ______________________________________________________________________
  123.        ! Disable drag-to-select.
  124.        *hysteresis:                            3000
  125.  
  126.        ! Make visited and unvisited links the same color by default
  127.        *linkForeground:                        #0000EE
  128.        *vlinkForeground:                       #0000EE
  129.  
  130.        Netscape.Navigator.geometry: =NETSCAPE_GEOMETRY
  131.  
  132.        ! Disable some of the keyboard commands.
  133.        *globalTranslations:
  134.  
  135.        ! Mouse bindings: make all mouse buttons do the same thing.
  136.        *drawingArea.translations:              #replace                        \
  137.        <Btn1Down>:                     ArmLink()                       \n\
  138.        <Btn2Down>:                     ArmLink()                       \n\
  139.        <Btn3Down>:                     ArmLink()                       \n\
  140.        ~Shift<Btn1Up>:                 ActivateLink()                  \
  141.                                        DisarmLink()                    \n\
  142.        ~Shift<Btn2Up>:                 ActivateLink()                  \
  143.                                        DisarmLink()                    \n\
  144.        ~Shift<Btn3Up>:                 ActivateLink()                  \
  145.                                        DisarmLink()                    \n\
  146.        Shift<Btn1Up>:                  ActivateLink()                  \
  147.                                        DisarmLink()                    \n\
  148.        Shift<Btn2Up>:                  ActivateLink()                  \
  149.                                        DisarmLink()                    \n\
  150.        Shift<Btn3Up>:                  ActivateLink()                  \
  151.                                        DisarmLink()                    \n\
  152.        <Btn1Motion>:                   DisarmLinkIfMoved()             \n\
  153.        <Btn2Motion>:                   DisarmLinkIfMoved()             \n\
  154.        <Btn3Motion>:                   DisarmLinkIfMoved()             \n\
  155.        <Motion>:                       DescribeLink()                  \n\
  156.        ______________________________________________________________________
  157.  
  158.   This file disables blink tags, drag-to-select, and some of the key¡
  159.   board commands.  It also makes all mouse buttons do the same thing,
  160.   hides the menu bar, and makes visited and unvisited links the same
  161.   colour, so each visitor gets nice clean blue links, not ones that
  162.   other people have been thumbing through and staining purple.
  163.  
  164.   You should replace the NETSCAPE_GEOMETRY in this file with an X
  165.   geometry that looks like this: XxY+0-0, where X is the width of your
  166.   screen and Y is the height of your screen + 32.  This will position
  167.   the Netscape menu bar off the top of the screen, so the user won't be
  168.   distracted.  For example, if your screen is 800x600, the geometry
  169.   should be 800x632+0-0.
  170.  
  171.   6.  Make a .netscape directory for guest
  172.  
  173.   Enter
  174.  
  175.        mkdir /home/guest/.netscape
  176.        chmod 777 /home/guest/.netscape
  177.  
  178.   to create guest's .netscape directory and make it world-writable.
  179.  
  180.   7.  Try it
  181.  
  182.   Log out, then log in as guest.
  183.  
  184.   8.  Changing preferences
  185.  
  186.   Since you won't be able to use the menu bar as guest, you should edit
  187.   guest's preferences manually if you need to change them, or change
  188.   your own preferences to what you want guest's to be and copy the
  189.   preferences file.
  190.  
  191.