home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Enter 1999 June / enter_06_1999.iso / doc / HOWTO / Config-HOWTO < prev    next >
Text File  |  1998-10-14  |  39KB  |  1,717 lines

  1.   Configuration HOWTO
  2.   By Guido Gonzato, guido@ibogfs.cineca.it
  3.   v1.2.2, 10 April 1998
  4.  
  5.   This HOWTO aims at making the fine--tuning of your newly installed
  6.   Linux box quicker and easier. Here you will find a set of configura¡
  7.   tions for the most common applications, so you can start to work with
  8.   a well-usable system.
  9.   ______________________________________________________________________
  10.  
  11.   Table of Contents
  12.  
  13.  
  14.   1. Introduction
  15.  
  16.      1.1 Why This HOWTO
  17.      1.2 What We Will Be Configuring
  18.  
  19.   2. General System Setup
  20.  
  21.      2.1 Keyboard
  22.      2.2 Kernel Matters
  23.      2.3 (TT
  24.      2.4 Hard Disk Performance
  25.      2.5 Parallel Port Zip Drive
  26.      2.6 Device Drivers
  27.      2.7 Bootup Messages
  28.      2.8 Hostname
  29.      2.9 Mouse
  30.      2.10 Mount Points
  31.      2.11 (TT
  32.         2.11.1 Security Tip
  33.      2.12 Printer Configuration
  34.  
  35.   3. Software Configuration
  36.  
  37.      3.1 (TT
  38.      3.2 (TT
  39.      3.3 (TT
  40.      3.4 (TT
  41.      3.5 (TT
  42.      3.6 (TT
  43.      3.7 (TT
  44.      3.8 TeX and Friends
  45.      3.9 PPP
  46.      3.10 POP Client
  47.      3.11 X Window System
  48.      3.12 Fortran
  49.      3.13 Users' Configurations
  50.      3.14 Upgrading
  51.  
  52.   4. The End
  53.  
  54.      4.1 Copyright
  55.      4.2 Feedback
  56.      4.3 Disclaimer
  57.  
  58.  
  59.   ______________________________________________________________________
  60.  
  61.   1.  Introduction
  62.  
  63.  
  64.  
  65.  
  66.  
  67.   1.1.  Why This HOWTO
  68.  
  69.  
  70.   I have installed Linux on many PCs and noted that current
  71.   distributions are terrific but, annoyingly, lack some basic
  72.   configuration. Most applications will work out of the box, but some
  73.   won't. Moreover, I have noted that the same questions crop up on
  74.   c.o.l.setup over and over again.
  75.  
  76.   To try and remedy this situation, and to have a memorandum for fresh
  77.   installations, I wrote a do--this--and--that list that I later
  78.   expanded to become this HOWTO. Here you will find a handful of
  79.   configuration examples for the most common applications, programs, and
  80.   services, which should save you a fair amount of time and work.
  81.  
  82.   A few of the examples outlined in this HOWTO are somewhat distribution
  83.   dependent. I only have access to Red Hat and Caldera OpenLinux
  84.   machines, so don't take any of my tips as gospel if you have
  85.   Slackware, Debian or other distributions. In any case, reading
  86.   documentation and the HOWTOs always pays off, so you're advised to do
  87.   so anyway.
  88.  
  89.  
  90.  
  91.   1.2.  What We Will Be Configuring
  92.  
  93.  
  94.   There can be endless hardware configurations for a PC, but in my
  95.   experience one is quite common: a PC fitted with a large HD split into
  96.   three partitions (one for DOS/Windows, one for Linux, one for the
  97.   swap), sound card, modem, CD--ROM drive, printer, mouse. A parallel
  98.   port Zip Drive is also becoming commonplace.
  99.  
  100.   This is the hardware I'll assume you want to configure, but it's easy
  101.   to adapt the following tips to different configurations. It's
  102.   implicitly assumed that you'll be root when editing/fixing/hacking.
  103.  
  104.   And now, lads, sleeves up.
  105.  
  106.  
  107.  
  108.   2.  General System Setup
  109.  
  110.  
  111.  
  112.  
  113.   2.1.  Keyboard
  114.  
  115.  
  116.   First of all, how to configure the keyboard. If you missed this step
  117.   during installation or have changed your keyboard, you'll have to:
  118.  
  119.  
  120.   ╖  choose a suitable key table from /usr/lib/kbd/keytables/; for
  121.      example, it.map selects the Italian keyboard;
  122.  
  123.   ╖  edit the file /etc/sysconfig/keyboard so as it reads:
  124.      KEYTABLE="/usr/lib/kbd/keytables/it.map";
  125.  
  126.   ╖  to set up the keyboard repeat rate and delay time, add this line to
  127.      /etc/rc.d/rc.sysinit or, if you have Caldera, /etc/rc.d/rc.boot:
  128.  
  129.  
  130.  
  131.        /sbin/kbdrate -s -r 16 -d 500  # or whatever you like
  132.  
  133.   Upon the next reboot, the keyboard will work fine. To avoid rebooting
  134.   and load the key table only, cd to /etc/rc.d/init.d and issue the
  135.   command ./keytable start.
  136.  
  137.  
  138.  
  139.   2.2.  Kernel Matters
  140.  
  141.  
  142.   IMHO, the first thing to do next is build a kernel that best suits
  143.   your system. It's very simple to do but, in any case, refer to the
  144.   README file in /usr/src/linux/ or the Kernel HOWTO. Hints:
  145.  
  146.  
  147.   ╖  consider carefully your needs. Choosing a kernel configuration,
  148.      applying the patches, and compiling it once and for all is more
  149.      productive than reconfiguring and recompiling each month; this is
  150.      especially true if your Linux box is a server. Don't forget to
  151.      include support for all the hardware you might likely add in the
  152.      future (e.g. SCSI, Zip, net cards, etc);
  153.  
  154.   ╖  if your PC is based on a Cyrix CPU, apply appropriate patches to
  155.      improve performance. Information on
  156.      <http://www.linuxhq.com/patch/20-p0591.html> ;
  157.  
  158.   ╖  notebook users will want to improve their LCD screen legibility by
  159.      applying the Noblink patch. The latest version is called noblink-
  160.      X.X.tar.gz and is available on
  161.      <ftp://sunsite.unc.edu/pub/Linux/kernel/patches/console> .  Install
  162.      the package, then add to your /etc/profile the line
  163.  
  164.  
  165.  
  166.        /usr/local/bin/cursor bgreen  # or other colour
  167.  
  168.  
  169.  
  170.  
  171.  
  172.   ╖  again for notebook users, if you plan to use a PCMCIA modem/fax
  173.      don't compile serial support as a module; compile it in the kernel,
  174.      otherwise your PCMCIA modem won't work;
  175.  
  176.   ╖  remember, Linux won't see your sound card unless you configure it
  177.      properly. It's easy in most cases, but remember to enable all
  178.      options (don't forget /dev/dsp and /dev/sound);
  179.  
  180.   ╖  if you get those pesky messages from modprobe indicating that some
  181.      modules can't be located, that means that your /etc/conf.modules
  182.      needs mending. If you don't use the ipx and appletalk modules, add
  183.      these lines:
  184.  
  185.  
  186.  
  187.        alias net-pf-4 off
  188.        alias net-pf-5 off
  189.  
  190.  
  191.  
  192.  
  193.  
  194.   ╖  to save time the next time you reconfigure and recompile the
  195.      kernel, it's a good idea to save your configuration on a file and
  196.      keep it in a safe place.
  197.  
  198.  
  199.   2.3.  sendmail  Lock
  200.  
  201.  
  202.   On some systems, sendmail locks the machine at boot time. Quick fix:
  203.   make sure your /etc/hosts contains a line that reads
  204.  
  205.  
  206.  
  207.        127.0.0.1 localhost
  208.  
  209.  
  210.  
  211.  
  212.   See also Section ``Hostname''.
  213.  
  214.  
  215.  
  216.   2.4.  Hard Disk Performance
  217.  
  218.  
  219.   Your hard disk's performance can be greatly enhanced by carefully
  220.   using hdparm(8). If your Linux distribution doesn't include it, you'll
  221.   find on   <ftp://sunsite.unc.edu/pub/Linux/system/hardware> ; look for
  222.   a file called hdparm-X.Y.tar.gz.
  223.  
  224.   I can't give you a general recipe, as many details depend on your hard
  225.   disk and HD controller. Since you risk to toast your filesystem,
  226.   please read the man page carefully before using some options. At its
  227.   simplest, you could add the following line to /etc/rc.d/rc.sysinit:
  228.  
  229.  
  230.  
  231.        /sbin/hdparm -c1 /dev/hda  # first IDE drive assumed
  232.  
  233.  
  234.  
  235.  
  236.   which enables (E)IDE 32-bit I/O support. As for the `-m' option, this
  237.   is what hdparm author Mark Lord emailed me:
  238.  
  239.        (...) if your system uses components from the past couple of
  240.        years, it will be fine.  Older than that, there *may* be a
  241.        problem (unlikely).  The really buggy chips were the CMD0646
  242.        and RZ1000 chips, used *extensively* on 486 and (early) 586
  243.        motherboards about 2-3 years ago.
  244.  
  245.  
  246.  
  247.   2.5.  Parallel Port Zip Drive
  248.  
  249.  
  250.   To use the parallel port version of the Zip drive you can use the
  251.   default driver that comes with recent (2.x.x) kernels. During kernel
  252.   configuration, make sure that SCSI support and SCSI disk support are
  253.   enabled (either in the kernel or as a module). Remember, there can be
  254.   conflicts between the printer and the Zip drive on the same parallel
  255.   port.
  256.  
  257.   Zip disks are sold preformatted on partition /dev/sda4. To enable the
  258.   Zip, all you have to do is issue
  259.  
  260.  
  261.  
  262.        #~ chmod 666 /dev/sda4  # everyone can access the Zip Drive
  263.        #~ insmod ppa
  264.  
  265.   and the Zip can now be mounted as usual (better write the last line in
  266.   /etc/rc.d/rc.sysinit). You also access the Zip drive via mtools adding
  267.   this line to your /etc/mtools.conf:
  268.  
  269.  
  270.  
  271.        drive z: file="/dev/sda4" exclusive
  272.  
  273.  
  274.  
  275.  
  276.   There's a better ppa driver than the standard one, though: have a look
  277.   at   <http://www.torque.net/~campbell> .
  278.  
  279.  
  280.  
  281.   2.6.  Device Drivers
  282.  
  283.  
  284.   Devices in /dev (or better, links to the actual device drivers) may be
  285.   missing. Check what devices your mouse, modem, and CD--ROM drive
  286.   correspond to, then do what follows:
  287.  
  288.  
  289.  
  290.        ~# cd /dev
  291.        /dev# ln -s /dev/cua0 mouse
  292.        /dev# ln -s /dev/cua1 modem
  293.        /dev# ln -s /dev/hdb cdrom
  294.  
  295.  
  296.  
  297.  
  298.   and, if you want, do chmod 666 to these devices (not the links, the
  299.   actual devices!) to make them fully accessible by every user. Tip: in
  300.   some laptops the mouse device is /dev/psaux: take this into account
  301.   when configuring X11.
  302.  
  303.   In addition, you'll want to make the floppy accessible by non-root
  304.   users with chmod 666 /dev/fd*. This is bound to cause security
  305.   problems, but I don't know the details. Comments are welcome.
  306.  
  307.  
  308.  
  309.   2.7.  Bootup Messages
  310.  
  311.  
  312.   If you want to customise the bootup messages, check whether your
  313.   /etc/rc.d/rc.local overwrites /etc/issue and /etc/motd. If so, fire up
  314.   your editor and go ahead.
  315.  
  316.  
  317.  
  318.   2.8.  Hostname
  319.  
  320.  
  321.   Issuing the command hostname new_host_name may not be enough. To avoid
  322.   the dreaded sendmail lock, follow these steps:
  323.  
  324.  
  325.   ╖  edit /etc/sysconfig/network and change the hostname therein (e.g.
  326.      new_host_name.localdomain);
  327.  
  328.   ╖  edit /etc/HOSTNAME appropriately;
  329.  
  330.  
  331.   ╖  append the new hostname in the line in /etc/hosts:
  332.  
  333.  
  334.        127.0.0.1       localhost  new_host_name.locadomain
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.   2.9.  Mouse
  343.  
  344.  
  345.   gpm mouse services are useful to perform cut and paste in tty mode,
  346.   and to use the mouse in some applications. Check that you have a file
  347.   called /etc/sysconfig/mouse and that it reads:
  348.  
  349.  
  350.  
  351.        MOUSETYPE="Microsoft"
  352.        XEMU3=yes
  353.  
  354.  
  355.  
  356.  
  357.   Moreover, you must have a file /etc/rc.d/init.d/gpm. Of course, make
  358.   sure this configuration is right for your mouse type. Tip: in some
  359.   laptops, MOUSETYPE is ``PS/2''.
  360.  
  361.   For Caldera, all you have to do is append this line to
  362.   /etc/rc.d/rc.boot:
  363.  
  364.  
  365.  
  366.        /usr/bin/gpm
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.   2.10.  Mount Points
  374.  
  375.  
  376.   It's handy to have mount points for the floppy and other devices. For
  377.   example, you can do the following:
  378.  
  379.  
  380.  
  381.        ~# cd /mnt
  382.        /# mkdir a: ; mkdir floppy ; mkdir cdrom ; mkdir win ; mkdir zip
  383.  
  384.  
  385.  
  386.  
  387.   This creates mount points for an MS-DOS floppy, an ext2 floppy, the
  388.   CD-ROM, the DOS partition, and the parallel port Zip drive.
  389.  
  390.   Now edit the file /etc/fstab and add the following entries:
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.   /dev/fd0        /mnt/a:         msdos           user,noauto 0 1
  398.   /dev/fd0        /mnt/floppy     ext2            user,noauto 0 1
  399.   /dev/cdrom      /mnt/cdrom      iso9660         ro,user,noauto 0 1
  400.   /dev/sda4       /mnt/zip        vfat            user,noauto 0 1
  401.   /dev/hda1       /mnt/win        vfat            user,noauto 0 1
  402.  
  403.  
  404.  
  405.  
  406.   Obviously, you must use the correct device in the first field. To
  407.   access fat32 partitions, there's a kernel patch and information on
  408.   <http://bmrc.berkeley.edu/people/chaffee/fat32.html> .
  409.  
  410.  
  411.  
  412.   2.11.  lilo (8) and LOADLIN
  413.  
  414.  
  415.   Many users run both Linux and DOS/Windows on their PC, and want to
  416.   choose at boot time which os to use. Let's suppose that /dev/hda1
  417.   contains DOS/Windows and that /dev/hda2 contains Linux.
  418.  
  419.   Do what follows:
  420.  
  421.  
  422.  
  423.        ~# fdisk
  424.        Using /dev/hda as default device!
  425.  
  426.        Command (m for help):a
  427.        Partition number (1-4): 2
  428.  
  429.        Command (m for help):w
  430.        ~#
  431.  
  432.  
  433.  
  434.  
  435.   This makes the Linux partition bootable; this step ought to be carried
  436.   out by activate when running LILO's QuickInst, but it won't work with
  437.   my Red Hat.
  438.  
  439.   Write this basic /etc/lilo.conf file:
  440.  
  441.  
  442.  
  443.        boot = /dev/hda2
  444.        compact
  445.        delay = 50
  446.        # message = /boot/bootmesg.txt  # write your own
  447.        root = current
  448.        image = /boot/vmlinuz  # boot linux by default as this entry comes first
  449.          label = linux
  450.        other = /dev/hda1
  451.          table = /dev/hda
  452.          label = dos
  453.  
  454.  
  455.  
  456.  
  457.   Now issue /sbin/lilo and you're set. Being lilo a crucial part of your
  458.   installation, you're strongly advised to read its documentation
  459.   anyway.
  460.  
  461.   To boot Linux from DOS/Windows without resetting, put LOADLIN.EXE in a
  462.   directory (in the DOS partition!) included in the DOS path; then copy
  463.   your kernel to, say, C:\DOS\VMLINUZ. The following .BAT file will boot
  464.   Linux:
  465.  
  466.  
  467.  
  468.        rem   linux.bat
  469.        smartdrv /C
  470.        loadlin c:\dos\vmlinuz root=/dev/hda2 r
  471.  
  472.  
  473.  
  474.  
  475.   If you use Windows 95, set the properties of this .BAT so as it starts
  476.   in MS-DOS mode.
  477.  
  478.  
  479.   2.11.1.  Security Tip
  480.  
  481.  
  482.   Making a backup copy of your MBR before installing Linux could save
  483.   your bacon. Use restorrb (included in the FIPS package) before
  484.   installation, or you can use a Linux rescue floppy and issue this
  485.   command:
  486.  
  487.  
  488.  
  489.        rescue:~# dd if=/dev/hda of=MBR bs=512 count=1
  490.  
  491.  
  492.  
  493.  
  494.   then make at least two copies of the file MBR on floppies. Should
  495.   disaster strike, you'll be able to restore your old MBR by issuing:
  496.  
  497.  
  498.  
  499.        rescue:~# dd if=/mnt/MBR of=/dev/hda bs=446 count=1
  500.  
  501.  
  502.  
  503.  
  504.   assuming that a floppy containing MBR is mounted under /mnt.
  505.   Alternatively, use a DOS rescue floppy to issue FDISK /MBR.
  506.  
  507.  
  508.  
  509.   2.12.  Printer Configuration
  510.  
  511.  
  512.   Red Hat and Caldera have a fine configuration tool, printtool; if you
  513.   don't use these distributions, manual configuration follows.
  514.  
  515.   Let's suppose you have a non-PostScript printer you want to use to
  516.   print raw text (e.g., C source files) and PostScript files via
  517.   Ghostscript, which is assumed to be already installed.
  518.  
  519.   Setting up the printer involves a few steps:
  520.  
  521.  
  522.   ╖  find out which one the parallel print device is: try
  523.  
  524.  
  525.  
  526.        ~# echo "hello, world" > /dev/lp0
  527.        ~# echo "hello, world" > /dev/lp1
  528.  
  529.   and take note which one works.
  530.  
  531.   ╖  make two spool directories:
  532.  
  533.  
  534.  
  535.        ~# cd /var/spool/lpd
  536.        /var/spool/lpd/# mkdir raw ; mkdir postscript
  537.  
  538.  
  539.  
  540.  
  541.  
  542.   ╖  if your printer exibits the ``staircase effect'' (most inkjets do),
  543.      you'll need a filter. Try to print two lines with
  544.  
  545.  
  546.  
  547.        ~# echo "first line" > /dev/lp1 ; echo "second line" > /dev/lp1
  548.  
  549.  
  550.  
  551.  
  552.  
  553.   if the output is like this:
  554.  
  555.  
  556.  
  557.        first line
  558.                  second line
  559.  
  560.  
  561.  
  562.  
  563.  
  564.   then save this script as /var/spool/lpd/raw/filter:
  565.  
  566.  
  567.  
  568.        #!/bin/sh
  569.        # This filter does away with the "staircase effect"
  570.        awk '{print $0, "\r"}'
  571.  
  572.  
  573.  
  574.  
  575.  
  576.   and make it executable with chmod 755 /var/spool/lpd/raw/filter.
  577.  
  578.   ╖  make a filter for PostScript emulation. Write the following filter
  579.      as /var/spool/lpd/postscript/filter:
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.   #!/bin/sh
  596.  
  597.   DEVICE=djet500
  598.   RESOLUTION=300x300
  599.   PAPERSIZE=a4
  600.   SENDEOF=
  601.  
  602.   nenscript -TUS -ZB -p- |
  603.   if [ "$DEVICE" = "PostScript" ]; then
  604.           cat -
  605.   else
  606.           gs -q -sDEVICE=$DEVICE \
  607.                   -r$RESOLUTION \
  608.                   -sPAPERSIZE=$PAPERSIZE \
  609.                   -dNOPAUSE \
  610.                   -dSAFER \
  611.                   -sOutputFile=- -
  612.   fi
  613.  
  614.   if [ "$SENDEOF" != "" ]; then
  615.           printf "\004"
  616.   fi
  617.  
  618.  
  619.  
  620.  
  621.  
  622.   (in this example an HP DeskJet printer is assumed. Fix it to suit your
  623.   printer).
  624.  
  625.   ╖  finally, add the following entries in /etc/printcap:
  626.  
  627.  
  628.  
  629.        # /etc/printcap
  630.        lp|ps|PS|PostScript|djps:\
  631.                :sd=/var/spool/lpd/postscript:\
  632.                :mx#0:\
  633.                :lp=/dev/lp1:\
  634.                :if=/var/spool/lpd/postscript/filter:\
  635.                :sh:
  636.        raw:\
  637.                :sd=/var/spool/lpd/raw:\
  638.                :mx#0:\
  639.                :lp=/dev/lp1:\
  640.                :if=/var/spool/lpd/raw/filter:\
  641.                :sh:
  642.  
  643.  
  644.  
  645.  
  646.  
  647.   For more complex or exotic printing configurations, the Printing-HOWTO
  648.   awaits you.
  649.  
  650.   If you use printtool, be aware that the GSDEVICE chosen by Printtool
  651.   will work, but not necessarily at its best for your printer. You may
  652.   consider fiddling a bit with the file postscript.cfg; for instance, I
  653.   changed GSDEVICE from cdj500 to djet500 and now my prints come out
  654.   much quicker.
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.   3.  Software Configuration
  662.  
  663.  
  664.   These are the the configuration files we are going to custimise:
  665.   /etc/profile /etc/bashrc .bashrc .bash_profile .inputrc .less .lessrc
  666.   .xinitrc .fvwmrc .fvwm2rc95 .Xmodmap .Xdefaults .jedrc. .abbrevs.sl
  667.   .joerc .emacs . Don't add users until you have completed your system
  668.   configuration; you'll put the dot files in /etc/skel.
  669.  
  670.  
  671.  
  672.   3.1.  bash (1)
  673.  
  674.  
  675.   To tailor bash's behaviour, these are the main files to edit:
  676.  
  677.  
  678.   ╖  /etc/bashrc contains system wide aliases and functions;
  679.  
  680.   ╖  /etc/profile contains system wide environment stuff and startup
  681.      programs;
  682.  
  683.   ╖  $HOME/.bashrc contains user aliases and functions;
  684.  
  685.   ╖  $HOME/.bash_profile contains user environment stuff and startup
  686.      programs;
  687.  
  688.   ╖  $HOME/.inputrc contains key bindings and other bits.
  689.  
  690.   Examples of these files are shown below. First, the most important:
  691.   /etc/profile. It's used to configure a lot of features in your Linux
  692.   box, as you will see in the following sections.
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.   ______________________________________________________________________
  728.   # /etc/profile
  729.  
  730.   # System wide environment and startup programs
  731.   # Functions and aliases go in /etc/bashrc
  732.  
  733.   # This file sets up the following features:
  734.   #
  735.   #   o path
  736.   #   o prompts
  737.   #   o a few environment variables
  738.   #   o colour ls
  739.   #   o less
  740.   #
  741.   # Users can override these settings and/or add others in their
  742.   # $HOME/.bash_profile
  743.  
  744.   # set a decent path
  745.  
  746.   echo $PATH | grep X11R6 > /dev/null
  747.   if [ $? = 1 ] ; then   # add entries to the path
  748.     PATH="$PATH:/usr/X11R6/bin:$HOME/bin:."
  749.   fi
  750.  
  751.   # notify the user: login or non-login shell. If login, the prompt is
  752.   # coloured in blue; otherwise in magenta. Root's prompt is red.
  753.  
  754.   USER=`whoami`
  755.   if [ $LOGNAME = $USER ] ; then
  756.     COLOUR=44
  757.   else
  758.     COLOUR=45
  759.   fi
  760.  
  761.   if [ $USER = 'root' ] ; then
  762.     COLOUR=41
  763.   fi
  764.  
  765.   # put a real escape character instead of ^[. To do this:
  766.   # emacs: ^Q ESC   vi: ^V ESC   joe: ` 0 2 7   jed: ` ESC
  767.   # Remove `;1' if you don't like the `bold' attribute.
  768.   ESC=^[
  769.   PS1='$ESC[$COLOUR;37;1m$USER:$ESC[37;40;1m\w\$ '
  770.   PS2="Continue> "
  771.  
  772.   # no core dumps, please
  773.  
  774.   ulimit -c 0
  775.  
  776.   # set umask
  777.  
  778.   if [ `id -gn` = `id -un` -a `id -u` -gt 14 ]; then
  779.     umask 002
  780.   else
  781.     umask 022
  782.   fi
  783.  
  784.   # a few variables
  785.  
  786.   USER=`id -un`
  787.   LOGNAME=$USER
  788.   MAIL="/var/spool/mail/$USER"
  789.   EDITOR=jed
  790.   HOSTNAME=`/bin/hostname`
  791.   HISTSIZE=1000
  792.   HISTFILESIZE=1000
  793.   export PATH PS1 PS2 USER LOGNAME MAIL EDITOR HOSTNAME HISTSIZE HISTFILESIZE
  794.  
  795.   # enable colour ls
  796.  
  797.   eval `dircolors /etc/DIR_COLORS -b`
  798.   export LS_OPTIONS='-F -s -T 0 --color=tty'
  799.  
  800.   # customise less
  801.  
  802.   LESS='-M-Q'
  803.   LESSEDIT="%E ?lt+%lt. %f"
  804.   LESSOPEN="| lesspipe.sh %s"
  805.   VISUAL=jed
  806.   LESSCHARSET=latin1
  807.   export LESS LESSEDIT LESSOPEN VISUAL LESSCHARSET
  808.  
  809.   for i in /etc/profile.d/*.sh ; do
  810.     if [ -x $i ]; then
  811.       . $i
  812.     fi
  813.   done
  814.   ______________________________________________________________________
  815.  
  816.  
  817.  
  818.   This is a sample /etc/bashrc:
  819.  
  820.  
  821.   ______________________________________________________________________
  822.   # /etc/bashrc
  823.  
  824.   # System wide functions and aliases
  825.   # Environment stuff goes in /etc/profile
  826.  
  827.   alias which="type -path"
  828.   alias d="ls"
  829.   alias dir="d"
  830.   ______________________________________________________________________
  831.  
  832.  
  833.  
  834.   This is a sample .bashrc:
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.   ______________________________________________________________________
  860.   # $HOME/.bashrc
  861.   # Source global definitions
  862.  
  863.   if [ -f /etc/bashrc ]; then
  864.     . /etc/bashrc
  865.   fi
  866.  
  867.   # this is needed to notify the user that they are in non-login shell
  868.  
  869.   if [ "$GET_PS1" = "" ] ; then
  870.     COLOUR=45
  871.   # put a real escape character instead of ^[
  872.     ESC=^[
  873.     PS1='$ESC[$COLOUR;37m`whoami`:$ESC[37;40m\w\$ '
  874.     export PS1
  875.   fi
  876.  
  877.   # aliases
  878.  
  879.   alias cp='cp -i'
  880.   alias l=less
  881.   alias lyx='lyx -width 900 -height 700'
  882.   alias mv='mv -i'
  883.   alias rm='rm -i'
  884.   alias x=startx
  885.  
  886.   # A few useful functions
  887.  
  888.   inst() # Install a .tar.gz archive in the current directory.
  889.   { gzip -dc $1 | tar xvf - }
  890.  
  891.   cz() # List the contents of a .zip archive.
  892.   { unzip -l $* }
  893.  
  894.   ctgz() # List the contents of a .tar.gz archive.
  895.   {
  896.     for file in $* ; do
  897.       gzip -dc ${file} | tar tf -
  898.     done
  899.   }
  900.  
  901.   tgz() # Create a .tgz archive a la zip.
  902.   {
  903.     name=$1 ; tar -cvf $1 ; shift
  904.     tar -rf ${name} $*
  905.     gzip -S .tgz ${name}
  906.   }
  907.   ______________________________________________________________________
  908.  
  909.  
  910.  
  911.   This is a sample .bash_profile:
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.   ______________________________________________________________________
  926.   # $HOME/.bash_profile
  927.  
  928.   # User specific environment and startup programs
  929.   # This file contains user-defined settings that override
  930.   # those in /etc/profile
  931.  
  932.   # Get the aliases and functions
  933.   if [ -f ~/.bashrc ]; then
  934.     GET_PS1="NO"  # don't change the prompt colour
  935.     . ~/.bashrc
  936.   fi
  937.  
  938.   # set a few `default' directories
  939.   export CDPATH="$CDPATH:$HOME:$HOME/text:$HOME/text/geology"
  940.  
  941.   # fix rxvt 2.45 backspace
  942.   if [ "$COLORTERM" != "" ] ; then
  943.     stty erase ^?
  944.     ESC=^[  # put a real escape character instead of ^[
  945.     echo -n "$ESC[36l"
  946.   fi
  947.   ______________________________________________________________________
  948.  
  949.  
  950.  
  951.   This is a sample .inputrc:
  952.  
  953.  
  954.   ______________________________________________________________________
  955.   # $HOME/.inputrc
  956.  
  957.   # key bindings
  958.  
  959.   "\e[1~": beginning-of-line
  960.   "\e[3~": delete-char
  961.   "\e[4~": end-of-line
  962.   # (F1 .. F5) are "\e[[A" ... "\e[[E"
  963.   "\e[[A": "info \C-m"
  964.  
  965.   set bell-style visible          # please don't beep
  966.   set meta-flag On                # allow 8-bit input (i.e, accented letters)
  967.   set convert-meta Off            # don't strip 8-bit characters
  968.   set output-meta On              # display 8-bit characters correctly
  969.   set horizontal-scroll-mode On   # scroll long command lines
  970.   set show-all-if-ambiguous On    # after TAB is pressed
  971.   ______________________________________________________________________
  972.  
  973.  
  974.  
  975.   To make the backspace and delete keys work correctly in in xterm and
  976.   other X11 applications, the following is also needed:
  977.  
  978.  
  979.   ╖  put this in your .xinitrc:
  980.  
  981.  
  982.        usermodmap=$HOME/.Xmodmap
  983.        xmodmap $usermodmap
  984.  
  985.  
  986.  
  987.  
  988.  
  989.   ╖  put this in your .Xmodmap:
  990.  
  991.   keycode 22 = BackSpace
  992.   keycode 107 = Delete
  993.  
  994.  
  995.  
  996.  
  997.   this fixes the console. To fix xterm:
  998.  
  999.   ╖  put this in your .Xdefaults:
  1000.  
  1001.  
  1002.        xterm*VT100.Translations: #override <Key>BackSpace: string(0x7F)\n\
  1003.                <Key>Delete:        string(0x1b) string("[3~")\n\
  1004.                <Key>Home:          string(0x1b) string("[1~")\n\
  1005.                <Key>End:           string(0x1b) string("[4~")\n\
  1006.                Ctrl<Key>Prior:     string(0x1b) string("[40~")\n\
  1007.                Ctrl<Key>Next:      string(0x1b) string("[41~")
  1008.  
  1009.        nxterm*VT100.Translations: #override <Key>BackSpace: string(0x7F)\n\
  1010.                <Key>Delete:        string(0x1b) string("[3~")\n\
  1011.                <Key>Home:          string(0x1b) string("[1~")\n\
  1012.                <Key>End:           string(0x1b) string("[4~")\n\
  1013.                Ctrl<Key>Prior:     string(0x1b) string("[40~")\n\
  1014.                Ctrl<Key>Next:      string(0x1b) string("[41~")
  1015.  
  1016.  
  1017.  
  1018.  
  1019.  
  1020.   rxvt is a wee bit more complicated, as some compile--time options
  1021.   influence its behaviour. See the above .bash_profile.
  1022.  
  1023.   More info in bash(1) and readline(3) man pages.
  1024.  
  1025.   Don't expect every application to work correctly! If you run joe in
  1026.   xterm, for instance, some keys won't work; the same holds for versions
  1027.   of rxvt older than 2.21.
  1028.  
  1029.  
  1030.  
  1031.   3.2.  ls (1)
  1032.  
  1033.  
  1034.   ls can display directory listings using colours to highlight different
  1035.   file types. To enable this feature, add these lines to /etc/profile:
  1036.  
  1037.  
  1038.  
  1039.        eval `dircolors /etc/DIR_COLORS -b`
  1040.        export LS_OPTIONS='-F -T 0 --color=tty'
  1041.  
  1042.  
  1043.  
  1044.  
  1045.   (If you don't have the file /etc/DIR_COLORS, remove the reference to
  1046.   it in the first line.) This sets the environment variable LS_COLORS
  1047.   that contains the colour list set up in /etc/DIR_COLORS.  Note: don't
  1048.   ask me why, but this won't work with rxvt older than v. 2.21; use some
  1049.   flavour of xterm instead. It looks like rxvt has a bug that prevents
  1050.   it from inheriting the environment correctly in some circumstances.
  1051.  
  1052.   Caldera's ls doesn't have colours, but there's an equivalent color-ls.
  1053.   Add this in /etc/bashrc:
  1054.  
  1055.  
  1056.  
  1057.   alias ls="color-ls $LS_OPTIONS"
  1058.  
  1059.  
  1060.  
  1061.  
  1062.  
  1063.  
  1064.   3.3.  less (1)
  1065.  
  1066.  
  1067.   With this excellent pager you can browse not only plain text files,
  1068.   but also gzip compressed, tar and zip archives, man pages, and what
  1069.   have you. Its configuration involves a few steps:
  1070.  
  1071.  
  1072.   ╖  to use it with the movement keys, have this plain ASCII file
  1073.      .lesskey in your home directory:
  1074.  
  1075.  
  1076.  
  1077.        ^[[A   back-line
  1078.        ^[[B   forw-line
  1079.        ^[[C   right-scroll
  1080.        ^[[D   left-scroll
  1081.        ^[OA   back-line
  1082.        ^[OB   forw-line
  1083.        ^[OC   right-scroll
  1084.        ^[OD   left-scroll
  1085.        ^[[6~  forw-scroll
  1086.        ^[[5~  back-scroll
  1087.        ^[[1~  goto-line
  1088.        ^[[4~  goto-end
  1089.        ^[[7~  goto-line
  1090.        ^[[8~  goto-end
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.   then run the command lesskey. This creates a binary file .less con¡
  1097.   taining the key bindings.
  1098.  
  1099.   ╖  write the following file as /usr/bin/lesspipe.sh:
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.      ___________________________________________________________________
  1124.      #!/bin/sh
  1125.      # This is a preprocessor for 'less'.  It is used when this environment
  1126.      # variable is set:   LESSOPEN="|lesspipe.sh %s"
  1127.  
  1128.      lesspipe() {
  1129.        case "$1" in
  1130.        *.tar) tar tf $1 2>/dev/null ;; # View contents of .tar and .tgz files
  1131.        *.tgz|*.tar.gz|*.tar.Z|*.tar.z) tar ztf $1 2>/dev/null ;;
  1132.        *.Z|*.z|*.gz) gzip -dc $1  2>/dev/null ;; # View compressed files correctly
  1133.        *.zip) unzip -l $1 2>/dev/null ;; # View archives
  1134.        *.arj) unarj -l $1 2>/dev/null ;;
  1135.        *.rpm) rpm -q -p -i -l $1 2>/dev/null ;;
  1136.        *.cpio) cpio --list -F $1 2>/dev/null ;;
  1137.        *.1|*.2|*.3|*.4|*.5|*.6|*.7|*.8|*.9|*.n|*.man) FILE=`file -L $1`
  1138.          FILE=`echo $FILE | cut -d ' ' -f 2`
  1139.          if [ "$FILE" = "troff" ]; then
  1140.            groff -s -p -t -e -Tascii -mandoc $1
  1141.          fi ;;
  1142.        *) file $1 | grep text > /dev/null ;
  1143.          if [ $? = 1 ] ; then # it's not some kind of text
  1144.            strings $1
  1145.          fi ;;
  1146.        esac
  1147.      }
  1148.  
  1149.      lesspipe $1
  1150.      ___________________________________________________________________
  1151.  
  1152.  
  1153.  
  1154.   and remember to make it executable with chmod 755 lesspipe.sh.
  1155.  
  1156.   ╖  put these lines in /etc/profile:
  1157.  
  1158.  
  1159.        LESS="-M-Q"                     # long prompt, silent
  1160.        LESSEDIT="%E ?lt+%lt. %f"       # edit top line
  1161.        LESSOPEN="| lesspipe.sh %s"     # filter
  1162.        VISUAL=jed                      # default editor---insert your favourite
  1163.        LESSCHARSET=latin1              # display accented letters if needed
  1164.        export LESS LESSEDIT LESSOPEN VISUAL LESSCHARSET
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.   The variable LESSCHARSET depends on the fact that I live in Italy and
  1171.   want to use the ISO 8859/1 character set. You fellow Americans,
  1172.   Japanese, Russians and so on had better not set it.
  1173.  
  1174.  
  1175.  
  1176.   3.4.  emacs (1)
  1177.  
  1178.  
  1179.   I don't use emacs, so I have only one piece of advice to give you.
  1180.   Some emacs distributions don't come preconfigured for colours and
  1181.   syntax highlighting. Write this in your .emacs:
  1182.  
  1183.  
  1184.        (global-font-lock-mode t)
  1185.        (setq font-lock-maximum-decoration t)
  1186.  
  1187.  
  1188.  
  1189.   This only works in X11. I'll leave it to you to peruse all of emacs'
  1190.   documentation to find out how to tailor it to your
  1191.   needs---potentially, it can take months of hacking...
  1192.  
  1193.  
  1194.  
  1195.   3.5.  joe (1)
  1196.  
  1197.  
  1198.   Some people report that joe works with colours under X11, but not in
  1199.   tty.  In addition, some special keys don't work. To my knowledge, no
  1200.   one has found a solution to the former small nag; someone suggested
  1201.   hacking on /etc/termcap.
  1202.  
  1203.   If you experience that problem, a quick and dirty (and inelegant)
  1204.   solution is this:
  1205.  
  1206.  
  1207.  
  1208.        ~$ export TERM=vt100
  1209.        ~$ joe myfile
  1210.           (edit your file)
  1211.        ~$ export TERM=linux
  1212.  
  1213.  
  1214.  
  1215.  
  1216.  
  1217.  
  1218.   3.6.  jed (1)
  1219.  
  1220.  
  1221.   This is my favourite editor: it does what I need, it's lighter and
  1222.   easier to configure than emacs, and IMHO emulates other editors quite
  1223.   better.  Many users at my university want jed to emulate EDT, VMS'
  1224.   system editor.
  1225.  
  1226.   jed's configuration files are .jedrc and /usr/lib/jed/lib/*; the
  1227.   former can be adapted from jed.rc in the latter directory.
  1228.  
  1229.  
  1230.   ╖  to make jed use the special keys correctly, write the file
  1231.      /usr/lib/jed/lib/defaults.sl whose only line reads:
  1232.  
  1233.  
  1234.  
  1235.        () = evalfile("linux");
  1236.  
  1237.  
  1238.  
  1239.  
  1240.  
  1241.   ╖  edit /usr/lib/jed/lib/linux.sl; remove the comment from the line
  1242.      that reads Info_Directory = "/usr/info"; and add /bin/mail after
  1243.      UCB_Mailer =;
  1244.  
  1245.   ╖  making jed emulate EDT (or other editors) is straightforward: you
  1246.      just have to edit a couple of lines in .jedrc.  If you want to use
  1247.      the numeric keypad `+' to delete words instead of a single
  1248.      character, add this in .jedrc:
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.   unsetkey("\eOl");
  1256.   unsetkey("\eOP\eOl");
  1257.   setkey("edt_wdel", "\eOl");
  1258.   setkey("edt_uwdel", "\eOP\eOl");
  1259.  
  1260.  
  1261.  
  1262.  
  1263.  
  1264.   after the line that reads () = evalfile("edt");.
  1265.  
  1266.   ╖  to make xjed use the numeric keypad for EDT emulation, insert the
  1267.      following in .Xmodmap:
  1268.  
  1269.  
  1270.  
  1271.        keycode 77  = KP_F1
  1272.        keycode 112 = KP_F2
  1273.        keycode 63  = KP_F3
  1274.        keycode 82  = KP_F4
  1275.        keycode 86  = KP_Separator
  1276.  
  1277.  
  1278.  
  1279.  
  1280.  
  1281.   Moreover, make sure that your /etc/X11/XF86Config contains the follow¡
  1282.   ing lines:
  1283.  
  1284.  
  1285.  
  1286.        #    ServerNumLock  # must be commented out
  1287.            XkbDisable
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.   This applies to XFree 3.2. Unless you use a standard American keyboard
  1294.   though, note that ``XkbDisable'' brings some little problems. You'll
  1295.   find out by yourself.
  1296.  
  1297.   ╖  colour customization for xjed is done adding lines like these in
  1298.      .Xdefaults:
  1299.  
  1300.  
  1301.  
  1302.        xjed*Geometry: 80x32+150+50
  1303.        xjed*font: 10x20
  1304.        xjed*background: midnight blue
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.   ╖  the ``abbreviation'' feature is an invaluable timesaver. Write a
  1311.      file like the following as $HOME/.abbrevs.sl:
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.   create_abbrev_table ("Global", "");
  1322.   define_abbrev ("Global", "GG", "Guido Gonzato");
  1323.   create_abbrev_table ("TeX", "\\A-Za-z0-9");
  1324.   define_abbrev ("TeX", "\\beq", "\\begin{equation}");
  1325.   define_abbrev ("TeX", "\\eeq", "\\end{equation}");
  1326.   % and so on...
  1327.  
  1328.  
  1329.  
  1330.  
  1331.  
  1332.   and type ESC x abbrev_mode to enable it. To have the abbreviation on
  1333.   by default, add entries like these in your .jedrc:
  1334.  
  1335.  
  1336.  
  1337.        define text_mode_hook ()
  1338.        {
  1339.          set_abbrev_mode (1);
  1340.        }
  1341.        %
  1342.        define fortran_hook ()
  1343.        {
  1344.          set_abbrev_mode (1);
  1345.          use_abbrev_table ("Fortran");
  1346.        }
  1347.        % and so on...
  1348.  
  1349.  
  1350.  
  1351.  
  1352.  
  1353.  
  1354.  
  1355.  
  1356.   3.7.  efax (1)
  1357.  
  1358.  
  1359.   This package is probably the most convenient for simple
  1360.   sending/receiving of faxes. You'll have to tailor the script
  1361.   /usr/bin/fax; easy job, but a couple of quirks caused me quite an
  1362.   headache:
  1363.  
  1364.  
  1365.   ╖  DIALPREFIX: chances are that simply putting `T' or `P' won't work
  1366.      in many countries. Put `ATDT' or `ATDP' instead;
  1367.  
  1368.   ╖  INIT and RESET: these strings contain the initialisers `-i' and
  1369.      `-k', needed by efax. If you want to add an AT command, add it to
  1370.      the appropriate string leaving out `AT' and preceding the rest with
  1371.      either `-i' or `-k'. For example: to add the `ATX3' command to
  1372.      INIT, you'll append `-iX3'.
  1373.  
  1374.  
  1375.  
  1376.   3.8.  TeX and Friends
  1377.  
  1378.  
  1379.   I'll assume you have the teTeX distribution. Just a couple of things
  1380.   here:
  1381.  
  1382.  
  1383.   ╖  to configure the hyphenation pattern for your language, edit the
  1384.      file /usr/lib/texmf/texmf/tex/generic/config/language.dat, then do:
  1385.  
  1386.  
  1387.   ~# texconfig init ; texconfig hyphen
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.   ╖  if you add a LaTeX package, after adding the files under
  1394.      /usr/lib/texmf/texmf/tex/latex/ run the command texhash so that
  1395.      teTeX recognises the new package;
  1396.  
  1397.   ╖  to tailor dvips, the file to edit is
  1398.      /usr/lib/texmf/texmf/dvips/config/config.ps. Be aware that the
  1399.      fields regarding the default resolution also affect xdvi's
  1400.      behaviour; if you experience annoying attempts to create fonts each
  1401.      time you run it, put the line
  1402.  
  1403.  
  1404.  
  1405.        XDvi*mfmode:
  1406.  
  1407.  
  1408.  
  1409.  
  1410.  
  1411.   in .Xdefault. This should help.
  1412.  
  1413.  
  1414.  
  1415.   3.9.  PPP
  1416.  
  1417.  
  1418.   I'll take it for granted that your kernel has PPP + TCP/IP support
  1419.   compiled in, that loopback is enabled, and that you already have the
  1420.   pppd package correctly installed and suid root. Obviously, your ISP
  1421.   must support PPP.
  1422.  
  1423.   There are now two ways to get PPP to work: a) manual configuration,
  1424.   and b) a configuration program that automagically sees to it.
  1425.   Whichever option you choose, have the following information on hand:
  1426.  
  1427.  
  1428.   ╖  your ISP's telephone number;
  1429.  
  1430.   ╖  your ISP's name server;
  1431.  
  1432.   ╖  your ISP's mail and news server;
  1433.  
  1434.   ╖  your ISP's domain;
  1435.  
  1436.   ╖  your username and password.
  1437.  
  1438.   Manual configuration is a drudgery. It's about editing files and
  1439.   writing scripts; not too much work, but it's easy to make mistakes and
  1440.   newcomers are often intimidated. The PPP HOWTO is there for you.
  1441.   Alternatively, there are tools that ask for the information above and
  1442.   do all the work.
  1443.  
  1444.   You'll be surely better off if you reach out for a friend who's
  1445.   already connected and download one of the following nice tools:
  1446.  
  1447.  
  1448.   ╖  an X11--based tool is EzPPP, whose home page is
  1449.        <http://www.serv.net/~cameron/ezppp/index.html> .  Very easy to
  1450.      use, almost self--explanatory;
  1451.  
  1452.  
  1453.   ╖  for tty--based connections, try the tools available on
  1454.        <ftp://sunsite.unc.edu/pub/Linux/system/network/serial/ppp>. One
  1455.      of the finest is pppsetup-X.XX.tar.gz.
  1456.  
  1457.   ╖  the simplest configuration tool to date is surely wvdial.  You feed
  1458.      it your ISP's phone number, your username, your password, and
  1459.      you're in business. From the README file: ``There is a (currently
  1460.      cheesy) web page for wvdial at:
  1461.      <http://www.worldvisions.ca/wvdial>''.  Very fine tool.
  1462.  
  1463.  
  1464.  
  1465.   3.10.  POP Client
  1466.  
  1467.  
  1468.   To retrieve your mail from a POP server, you use a POP client like
  1469.   fetchpop or fetchmail. The latter is more advanced, and is probably
  1470.   the only option if your ISP's PPP server can't deal with the command
  1471.   LAST. They're available on
  1472.   <ftp://sunsite.unc.edu/pub/Linux/system/mail/pop>.
  1473.  
  1474.   To configure these clients:
  1475.  
  1476.  
  1477.   ╖  fetchpop: the first time you run it, you'll be prompted for some
  1478.      information. Answer the questions and you're set.
  1479.  
  1480.   ╖  fetchmail: adapt this sample .fetchmailrc:
  1481.  
  1482.  
  1483.  
  1484.        # $HOME/.fetchmailrc
  1485.        poll mbox.myisp.com with protocol pop3;
  1486.          user john there with password _Loo%ny is john here
  1487.  
  1488.  
  1489.  
  1490.  
  1491.  
  1492.   You must set the permissions to this file with the command chmod 600
  1493.   .fetchmailrc, otherwise fetchmail will rightly refuse to start. This
  1494.   example is very basic and assumes that you have a running sendmail;
  1495.   there are endless possibilities of configuration. Check out on .
  1496.  
  1497.  
  1498.  
  1499.   3.11.  X Window System
  1500.  
  1501.  
  1502.   Once you've managed to make X work (right video card etc.), there are
  1503.   endless possibilities of configuration; it depends on the window
  1504.   manager you use. In any case, it's all down to editing one or more
  1505.   ASCII files in your home directory. As for the window manager:
  1506.  
  1507.  
  1508.   ╖  fvwm: copy /etc/X11/fvwm/system.fvwmrc to your home directory as
  1509.      .fvwmrc, browse it and start experimenting. This contributed
  1510.      system.fvwmrc is IMHO a wee bit too simple and doesn't do justice
  1511.      to fvwm.
  1512.  
  1513.   ╖  fvwm95-2: copy /etc/X11/fvwm95-2/fvwm2rc95 to your home as
  1514.      .fvwm2rc95, then edit it. The contributed example is quite good.
  1515.  
  1516.   ╖  TheNextLevel: this is rather harder to configure. Copy
  1517.      /etc/X11/TheNextLevel/.* to your home dir, browse them carefully,
  1518.      then try and tailor them. The first one to look at is
  1519.      .fvwm2rc.defines.
  1520.  
  1521.   In addition, make sure you have a proper .xinitrc. An example:
  1522.  
  1523.  
  1524.  
  1525.        #!/bin/sh
  1526.  
  1527.        # $HOME/.xinitrc
  1528.  
  1529.        # set a few keys correctly
  1530.  
  1531.        usermodmap=$HOME/.Xmodmap
  1532.        xmodmap $usermodmap
  1533.  
  1534.        xset s noblank  # turn off the screen saver
  1535.        xset s 300 2    # screen saver start after 5 min
  1536.        xsetroot -solid "medium blue" &
  1537.  
  1538.        # rxvt saves a lot of memory, but versions older than 2.21 have bugs
  1539.        # affecting the keys and the way the environment is inherited. Upgrade
  1540.        # or use xterm instead.
  1541.  
  1542.        xterm -ls -bg black -fg white -sb -sl 500 -j -ls -fn 10x20 -fb 10x20bold \
  1543.        -title "Color xterm" -geometry 80x25+150+0 &
  1544.  
  1545.        fvwm95-2
  1546.  
  1547.  
  1548.  
  1549.  
  1550.  
  1551.  
  1552.   3.12.  Fortran
  1553.  
  1554.  
  1555.   In my experience, if you need Fortran a good alternative to g77 is the
  1556.   Fortran-to-C translator f2c and the front end yaf77.
  1557.  
  1558.   Get yaf77-X.Y.tgz from
  1559.   <ftp://sunsite.unc.edu/pub/Linux/devel/lang/fortran> .
  1560.  
  1561.  
  1562.  
  1563.   3.13.  Users' Configurations
  1564.  
  1565.  
  1566.   It's a good idea to let new users have a few configuration files ready
  1567.   when they first log in. Put the following files in /etc/skel:
  1568.    .bashrc .bash_profile .bash_logout .inputrc .less .xinitrc
  1569.    .fvwmrc .fvwm2rc95 .Xmodmap .Xdefaults .jedrc .abbrevs.sl. joerc
  1570.    .emacs
  1571.  
  1572.   Note that .pinerc can't be fully tailored; make sure that at least the
  1573.   fields user-domain, smtp-server, and nntp-server are properly set up.
  1574.  
  1575.  
  1576.  
  1577.   3.14.  Upgrading
  1578.  
  1579.  
  1580.   If you upgrade your machine, remember to save a few additional files
  1581.   beforehand. Some of them are: /etc/X11/XF86Config, /usr/bin/fax, ...
  1582.  
  1583.  
  1584.  
  1585.   4.  The End
  1586.  
  1587.  
  1588.  
  1589.  
  1590.   4.1.  Copyright
  1591.  
  1592.  
  1593.   Unless otherwise stated, Linux HOWTO documents are copyrighted by
  1594.   their respective authors. Linux HOWTO documents may be reproduced and
  1595.   distributed in whole or in part, in any medium physical or electronic,
  1596.   as long as this copyright notice is retained on all copies. Commercial
  1597.   redistribution is allowed and encouraged; however, the author would
  1598.   like to be notified of any such distributions.
  1599.  
  1600.   All translations, derivative works, or aggregate works incorporating
  1601.   any Linux HOWTO documents must be covered under this copyright notice.
  1602.   That is, you may not produce a derivative work from a HOWTO and impose
  1603.   additional restrictions on its distribution. Exceptions to these rules
  1604.   may be granted under certain conditions; please contact the Linux
  1605.   HOWTO coordinator at the address given below.
  1606.  
  1607.   In short, we wish to promote dissemination of this information through
  1608.   as many channels as possible. However, we do wish to retain copyright
  1609.   on the HOWTO documents, and would like to be notified of any plans to
  1610.   redistribute the HOWTOs.
  1611.  
  1612.   If you have questions, please contact Tim Bynum, the Linux HOWTO
  1613.   coordinator, at linux-howto@sunsite.unc.edu via email.
  1614.  
  1615.  
  1616.  
  1617.   4.2.  Feedback
  1618.  
  1619.  
  1620.   Perhaps even more than other HOWTOs, this one needs and welcomes your
  1621.   suggestions, criticisms, and contributions. Not only is feedback
  1622.   welcome: it's necessary. If you think something is missing or wrong,
  1623.   please email me.  If you have a distribution other than Red Hat or
  1624.   Caldera and your config files are different or placed in other
  1625.   directories, please tell me and I'll include your tips. My aim is
  1626.   making life with Linux as easy as possible.
  1627.  
  1628.   Linux has a huge number of packages, so it's impossible to include
  1629.   directions for all of them. Please keep your requests/suggestions
  1630.   pertinent to the ``most reasonable'' programs---I'll leave it to your
  1631.   common sense.
  1632.  
  1633.  
  1634.  
  1635.   4.3.  Disclaimer
  1636.  
  1637.  
  1638.   ``Configuration HOWTO'' was written by Guido Gonzato,
  1639.   guido@ibogfs.cineca.it.  Many thanks to all other HOWTO authors and
  1640.   man pages writers/maintainers, whose work I've shamelessly pilfered.
  1641.  
  1642.   This document is provided ``as is''. I put great effort into writing
  1643.   it as accurately as I could, but you use the information contained in
  1644.   it at your own risk. In no event shall I be liable for any damages
  1645.   resulting from the use of this work.
  1646.  
  1647.   I hope you'll find this work useful. Whenever I install a new Linux
  1648.   box, I actually do...
  1649.  
  1650.  
  1651.   Enjoy,
  1652.  
  1653.   Guido   =8-)
  1654.  
  1655.  
  1656.  
  1657.  
  1658.  
  1659.  
  1660.  
  1661.  
  1662.  
  1663.  
  1664.  
  1665.  
  1666.  
  1667.  
  1668.  
  1669.  
  1670.  
  1671.  
  1672.  
  1673.  
  1674.  
  1675.  
  1676.  
  1677.  
  1678.  
  1679.  
  1680.  
  1681.  
  1682.  
  1683.  
  1684.  
  1685.  
  1686.  
  1687.  
  1688.  
  1689.  
  1690.  
  1691.  
  1692.  
  1693.  
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.