Configuration HOWTO By Guido Gonzato, guido@ibogfs.cineca.it v0.99.3, 4 November 1997 This HOWTO aims at making the fine-tuning of your newly installed Linux box quicker and easier. Here you will find a set of configura­ tions for the most common applications, so you can start to work with a well-usable system. 1. Introduction I have installed Linux on many PCs, and I've noted that current distributions are terrific, but often come with annoying lack of basic configuration. Most programs will work out of the box, but some won't. This is a shame: I don't see any reason why the newcomer should bear with the old and trite ``backspace problem'', or think that emacs doesn't have colours, or list directories contents in black and white. To help myself remember what needs to be configured first, I wrote a summary that I later expanded to become this HOWTO. Here you will find a handful of configuration examples for the most common applications. These examples are based on my personal experience installing Red Hat- based Linux boxes, so if you use other distributions, be aware. Please don't take any tips in this work as gospel: they just happen to work for me. In any case, if you want to know more you'll have to read the package docs and one of more HOWTOs on the subject. This HOWTO is just a summary---hopefully, handy and useful. There can be endless hardware configurations for a PC, but in my experience one is quite common: a PC fitted with a large HD split into three partitions (one for DOS/Windows, one for Linux, one for the swap), modem, CD-ROM drive, printer, mouse. This is the hardware I'll assume you want to configure, but it's easy to adapt the following tips to different configurations. It's implicitly assumed that you'll be root when editing/fixing/hacking. And now, sleeves up. 2. General System Setup 2.1. Keyboard First of all, how to configure the keyboard. If you missed this step during installation or have changed your keyboard, you'll have to: · choose a suitable key table from /usr/lib/kbd/keytables/; for example, it.map selects the Italian keyboard · edit the file /etc/sysconfig/keyboard so as it reads: KEYTABLE="/usr/lib/kbd/keytables/it.map" · to set up the keyboard repeat rate and delay time, add this line to /etc/profile or to one of your rc files : /sbin/kbdrate -s -r 16 -d 500 # or whatever · and finally, do this to get the permission to set up the keyboard: ~# chmod 666 /dev/port Upon the next reboot, the keyboard will work fine. 2.2. Kernel IMHO, the first thing to do next is build a kernel that best suits your system. It's very simple to do but, in any case, refer to the README file in /usr/src/linux/. Hints: · consider carefully what your needs are. It's more productive to choose a suitable kernel and to apply patches once and for all, instead of reconfiguring and recompiling each month; this is especially true if your Linux box is a server. Don't forget to include support for all the hardware you might likely add in the future; · if your PC is a Cyrix-based one, apply appropriate patches to improve performance. Information on http://www.linuxhq.com/patch/20-p0591.html; · notebook users will want to improve legibility of their screen by applying the noblink patch; · again for notebook users, if you plan to use a PCMCIA modem/fax don't compile serial support as a module; compile it in the kernel or your PCMCIA modem won't work. 2.3. Bootup Messages If you want to customise the bootup messages, check whether your /etc/rc.d/rc.local overwrites /etc/issue and /etc/motd. If so, get your hands on your editor and go. 2.4. Hostname Issuing the command hostname new_host_name is not enough. Edit /etc/sysconfig/network and change the hostname therein. 2.5. Sendmail Lock On some systems, sendmail locks the machine at boot time. Make sure your /etc/hosts contains a line that reads 127.0.0.1 localhost 2.6. Device Drivers Devices in /dev (or better, links to the actual device drivers) may be missing. Check what devices your mouse, modem, and CD-ROM drive correspond to, then do what follows: ~# cd /dev /dev# ln -s /dev/cua0 mouse /dev# ln -s /dev/cua1 modem /dev# ln -s /dev/hdb cdrom and, if you want, do chmod 666 to these devices to make them fully accessible by every user. Tip: in some laptops the mouse device is /dev/psaux: take this into account also when configuring X11. In addition, you'll want to make the floppy accessible by non-root users with chmod 666 /dev/fd*. This is bound to cause security problems, but I don't know the details. Comments on this are welcome. 2.7. Mouse gpm mouse services are useful to perform cut and paste in console and to use the mouse in some apps. Check that you have a file called /etc/sysconfig/mouse and that it reads: MOUSETYPE="Microsoft" XEMU3=yes Moreover, you must have a file /etc/rc.d/init.d/gpm. Of course, make sure this configuration is right for your mouse type. Tip: in some laptops, MOUSETYPE is ``PS/2''. 2.8. Mount Points It's handy to have mount points for the floppy, the CD-ROM, the DOS partition, and other devices. For example, you may do the following: ~# cd /mnt /# mkdir a: ; mkdir floppy ; mkdir cdrom ; mkdir win ; mkdir zip This creates mount points for an MS-DOS floppy, an ext2 floppy, the CD-ROM, the DOS partition, and the parallel port Zip drive. Now edit the file /etc/fstab and add the following entries: /dev/fd0 /mnt/a: msdos user,noauto 0 1 /dev/fd0 /mnt/floppy ext2 user,noauto 0 1 /dev/cdrom /mnt/cdrom iso9660 ro,user,noauto 0 1 /dev/hda1 /mnt/dos msdos user,noauto 0 1 /dev/sda4 /mnt/zip vfat user,noauto 0 1 Obviously, you must use the correct device in the first field. To access Win95 long names, use vfat instead of msdos in the last line. This doesn't (yet) apply to vfat32, though. 2.9. LILO and Loadlin Many users want their PC to run both Linux and DOS/Windows, and want to choose at boot time which os to use. Let's suppose that /dev/hda1 contains DOS/Windows and that /dev/hda2 contains Linux. Do what follows: ~# fdisk Using /dev/hda as default device! Command (m for help):a Partition number (1-4): 2 Command (m for help):w ~# This makes the Linux partition bootable; this step ought to be carried out by activate when running LILO's QuickInst, but it won't work with my Red Hat. Write this basic /etc/lilo.conf file: boot = /dev/hda2 compact delay = 50 # message = /boot/bootmesg.txt # write your own root = current image = /boot/vmlinuz label = linux other = /dev/hda1 table = /dev/hda label = dos Now issue /sbin/lilo and you're set. Being LILO a crucial part of your installation, you're strongly advised to read its documentation anyway. To boot Linux from DOS without resetting, put LOADLIN.EXE in a directory (in the DOS partition!) included in the DOS path; then copy your kernel to, say, C:\DOS\VMLINUZ. The following .BAT file will boot linux: rem linux.bat smartdrv /C loadlin c:\dos\vmlinuz root=/dev/hda2 r I you use Windows 95, set the properties of this .BAT so as it starts in MS-DOS mode. 2.10. Printer Configuration Red Hat has a fine configuration tool that worked wonderfully for my HP DeskJet 400; if you don't use Red Hat, manual configuration follows. Let's suppose you have a non-PostScript printer you want to use to print raw text (e.g., C source files) and PostScript files via GhostScript, which is assumed to be already installed. Setting up the printer involves a few steps: · check which one the parallel print device is: try ~# echo "hello, world" > /dev/lp0 ~# echo "hello, world" > /dev/lp1 and take note which one works. · make two spool directories: ~# cd /var/spool/lpd /var/spool/lpd/# mkdir raw ; mkdir postscript · if your printer exibits the ``staircase effect'' (most inkjets do), you'll need a filter. Try printing two lines with ~# echo "first line" > /dev/lp1 ; echo "second line" > /dev/lp1 if the output is like first line second line then save this file as /var/spool/lpd/raw/filter: #!/bin/sh # This filter does away with the "staircase effect" awk '{print $0, "\r"}' and make it executable with chmod 755 /var/spool/lpd/raw/filter. · make a filter for PostScript emulation. Write the following filter as /var/spool/lpd/postscript/filter: #!/bin/sh DEVICE=djet500 RESOLUTION=300x300 PAPERSIZE=a4 SENDEOF= nenscript -TUS -ZB -p- | if [ "$DEVICE" = "PostScript" ]; then cat - else gs -q -sDEVICE=$DEVICE \ -r$RESOLUTION \ -sPAPERSIZE=$PAPERSIZE \ -dNOPAUSE \ -dSAFER \ -sOutputFile=- - fi if [ "$SENDEOF" != "" ]; then printf "\004" fi (in this example an HP DeskJet printer is assumed. Fix it to suit your printer). · finally, add the following entries in /etc/printcap: # /etc/printcap lp|ps|PS|PostScript|djps:\ :sd=/var/spool/lpd/postscript:\ :mx#0:\ :lp=/dev/lp1:\ :if=/var/spool/lpd/postscript/filter:\ :sh: raw:\ :sd=/var/spool/lpd/raw:\ :mx#0:\ :lp=/dev/lp1:\ :if=/var/spool/lpd/raw/filter:\ :sh: For more complex or exotic printing configurations, the Printing-HOWTO awaits you. For Red hat users: be aware that the GSDEVICE chosen by Printtool will work, but is not necessarily the best for your printer. You may consider fiddling a bit with the file postscript.cfg; for instance, I changed GSDEVICE from cdj500 to djet500 and now my prints come out much quicker. 3. Software Configuration 3.1. bash(1) To tailor bash's behaviour, these are the files to edit: · /etc/bashrc contains system wide aliases and functions; · /etc/profile contains system wide environment stuff and startup programs; · $HOME/.bashrc contains user's aliases and functions; · $HOME/.bash_profile contains user's environment stuff and startup programs; · $HOME/.bash_logout contains actions to be performed at logout; · $HOME/.inputrc contains key bindings and other bits. Examples of these files are shown below. First, the most important: /etc/profile. It's used to configure a lot of features in your Linux box, as you will see in the following sections. ______________________________________________________________________ # /etc/profile # System wide environment and startup programs # Functions and aliases go in /etc/bashrc # This file sets the following features: # # o path # o prompts # o a few environment variables # o colour ls # o less behaviour # o keyboard settings # # Users can override these settings and/or add others in their # $HOME/.bash_profile # set a decent path echo $PATH | grep X11R6 > /dev/null if [ $? = 1 ] ; then # add entries to the path PATH="$PATH:/usr/X11R6/bin:$HOME/bin:." fi # notify the user: login or non-login shell. If login, the prompt is # coloured in blue; otherwise in magenta. Root's prompt is red. USER=`whoami` if [ $LOGNAME = $USER ] ; then COLOUR=44 else COLOUR=45 fi if [ $USER = 'root' ] ; then COLOUR=41 fi # put a real escape character instead of ^[ PS1='^[[$COLOUR;37;1m$HOSTNAME:^[[37;40;1m\w\$ ' PS2="Continue> " # no core dumps, please ulimit -c 0 # set umask if [ `id -gn` = `id -un` -a `id -u` -gt 14 ]; then umask 002 else umask 022 fi # a few variables USER=`id -un` LOGNAME=$USER MAIL="/var/spool/mail/$USER" EDITOR=jed HOSTNAME=`/bin/hostname` HISTSIZE=1000 HISTFILESIZE=1000 export PATH PS1 PS2 USER LOGNAME MAIL EDITOR HOSTNAME HISTSIZE HISTFILESIZE # enable colour ls eval `dircolors /etc/DIR_COLORS -b` export LS_OPTIONS='-F -s -T 0 --color=tty' # customize less LESS='-M-Q' LESSEDIT="%E ?lt+%lt. %f" LESSOPEN="| lesspipe.sh %s" VISUAL=jed LESSCHARSET=latin1 export LESS LESSEDIT LESSOPEN VISUAL LESSCHARSET # customise the keyboard /sbin/kbdrate -s -r 16 -d 500 for i in /etc/profile.d/*.sh ; do if [ -x $i ]; then . $i fi done ______________________________________________________________________ This is /etc/bashrc: ______________________________________________________________________ # /etc/bashrc # System wide functions and aliases # Environment stuff goes in /etc/profile alias which="type -path" alias d="ls" alias dir="d" ______________________________________________________________________ This is .bashrc: ______________________________________________________________________ # $HOME/.bashrc # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi # this is needed to notify the user that they are in non-login shell COLOUR=45 # put a real escape character instead of ^[ PS1='^[[$COLOUR;37m$USER:^[[37;40m\w\$ ' # aliases alias cp='cp -i' alias l=less alias lyx='lyx -width 900 -height 700' alias mv='mv -i' alias rm='rm -i' alias x=startx # A few useful functions inst() # Install a .tar.gz archive in the current directory. { gzip -dc $1 | tar xvf - } cz() # List the contents of a .zip archive. { unzip -l $* } ctgz() # List the contents of a .tar.gz archive. { for file in $* ; do gzip -dc ${file} | tar tf - done } tgz() # Create a .tgz archive a la zip. { name=$1 ; tar -cvf $1 ; shift tar -rf ${name} $* gzip -S .tgz ${name} } ______________________________________________________________________ This is .bash_profile: ______________________________________________________________________ # $HOME/.bash_profile # User specific environment and startup programs # This file contains user-defined settings that override # those in /etc/profile # Get aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # re-get PS1 settings if [ $USER = 'root' ] ; then COLOUR=41 else COLOUR=44 fi # put a real escape character instead of ^[ PS1='^[[$COLOUR;37;1m$HOSTNAME:^[[37;40;1m\w\$ ' export PS1 ______________________________________________________________________ This is .bash_logout: ______________________________________________________________________ # $HOME/.bash_logout clear ______________________________________________________________________ This is .inputrc: ______________________________________________________________________ # $HOME/.inputrc # key bindings "\e[1~": beginning-of-line "\e[3~": delete-char "\e[4~": end-of-line # (F1 .. F5) are "\e[[A" ... "\e[[E" "\e[[A": "info \C-m" set bell-style visible # please don't beep set meta-flag On # allow 8-bit input (i.e, accented letters) set convert-meta Off # don't strip 8-bit characters set output-meta On # display 8-bit characters correctly set horizontal-scroll-mode On set show-all-if-ambiguous On ______________________________________________________________________ To make the backspace and delete keys work correctly in in xterm and other X11 applications, the following is also needed: · put this in your .xinitrc: usermodmap=$HOME/.Xmodmap xmodmap $usermodmap · put this in your .Xmodmap: keycode 22 = BackSpace keycode 107 = Delete this fixes the console. To fix xterm: · put this in your .Xdefaults: xterm*VT100.Translations: #override BackSpace: string(0x7F)\n\ Delete: string(0x1b) string("[3~")\n\ Home: string(0x1b) string("[1~")\n\ End: string(0x1b) string("[4~")\n\ CtrlPrior: string(0x1b) string("[40~")\n\ CtrlNext: string(0x1b) string("[41~") nxterm*VT100.Translations: #override BackSpace: string(0x7F)\n\ Delete: string(0x1b) string("[3~")\n\ Home: string(0x1b) string("[1~")\n\ End: string(0x1b) string("[4~")\n\ CtrlPrior: string(0x1b) string("[40~")\n\ CtrlNext: string(0x1b) string("[41~") More info in bash(1) and readline(3) man pages. Don't expect every application to work correctly! If you run joe in xterm, for instance, some keys won't work; the same goes for rxvt. Rumour has it that it's a termcap problem. 3.2. ls(1) ls can display directory listings using colours to highlight different file types. To enable this feature, add these lines to /etc/profile: eval `dircolors /etc/DIR_COLORS -b` export LS_OPTIONS='-F -T 0 --color=tty' This sets the environment variable LS_COLORS that contains the colour list set up in /etc/DIR_COLORS. Note: don't ask me why, but this won't work with some versions of rxvt; use some flavour of xterm instead. It looks like rxvt has a bug that prevents it from inheriting the environment correctly in some circumstances. 3.3. less(1) With this excellent pager you can browse not only plain text files, but also gzip compressed, tar and zip archives, man pages, and so on. Its configuration involves a few steps: · to use it with the movement keys, have this plain ASCII file .lesskey in your home directory: ^[[A back-line ^[[B forw-line ^[[C right-scroll ^[[D left-scroll ^[OA back-line ^[OB forw-line ^[OC right-scroll ^[OD left-scroll ^[[6~ forw-scroll ^[[5~ back-scroll ^[[1~ goto-line ^[[4~ goto-end ^[[7~ goto-line ^[[8~ goto-end then run the command lesskey. This creates a binary file .less con­ taining the key bindings. · write the following file as /usr/bin/lesspipe.sh: ___________________________________________________________________ #!/bin/sh # This is a preprocessor for 'less'. It is used when this environment # variable is set: LESSOPEN="|lesspipe.sh %s" lesspipe() { case "$1" in *.tar) tar tf $1 2>/dev/null ;; # View contents of .tar and .tgz files *.tgz|*.tar.gz|*.tar.Z|*.tar.z) tar ztf $1 2>/dev/null ;; *.Z|*.z|*.gz) gzip -dc $1 2>/dev/null ;; # View compressed files correctly *.zip) unzip -l $1 2>/dev/null ;; # View archives *.arj) unarj -l $1 2>/dev/null ;; *.rpm) rpm -q -p -i -l $1 2>/dev/null ;; *.1|*.2|*.3|*.4|*.5|*.6|*.7|*.8|*.9|*.n|*.man) FILE=`file -L $1` FILE=`echo $FILE | cut -d ' ' -f 2` if [ "$FILE" = "troff" ]; then groff -s -p -t -e -Tascii -mandoc $1 fi ;; *) FILE=`file -L $1` ; # Check to see if binary FILE1=`echo $FILE | cut -d ' ' -f 2` FILE2=`echo $FILE | cut -d ' ' -f 3` if [ "$FILE1" = "Linux/i386" -o "$FILE2" = "Linux/i386" \ -o "$FILE1" = "ELF" -o "$FILE2" = "ELF" ]; then strings $1 fi ;; esac } lesspipe $1 ___________________________________________________________________ and remember to make it executable with chmod 755 lesspipe.sh. · put these lines in /etc/profile: LESS="-M-Q" # long prompt, silent LESSEDIT="%E ?lt+%lt. %f" # edit top line LESSOPEN="| lesspipe.sh %s" # filter VISUAL=jed # default editor---insert your favourite LESSCHARSET=latin1 # display accented letters if needed export LESS LESSEDIT LESSOPEN VISUAL LESSCHARSET The variable LESSCHARSET depends on the fact that I live in Italy and want to use the ISO 8859/1 character set. You fellow Americans, Japanese, Russians and so on had better not set it. 3.4. emacs(1) Some emacs distributions don't come preconfigured for colours and syntax highlighting. Write this in your .emacs: (global-font-lock-mode t) (setq font-lock-maximum-decoration t) This only works in X11. I'll leave it to you to peruse all of emacs' documentation to discover how to tailor it to your needs---potentially, it can take months of hacking... 3.5. joe(1) Check in /usr/bin/ whether jmacs, jstar, and jpico are symlinks to joe or standalone binaries; in the latter case, you may turn them to symlinks to save some disk space: ~# cd /usr/bin /usr/bin# ln -sf joe jmacs ; ln -sf joe jstar ; ln -sf joe jpico Then, all you have to do is copy /usr/lib/joe/joerc to your home dir as .joerc and tailor it. 3.6. jed This is my favourite editor: it does what I need, it's lighter and easier to configure than emacs, and IMHO emulates other editors quite better. Many users at my university want jed to emulate EDT, VMS' system editor. The configuration files are .jedrc and /usr/lib/jed/lib/*; the former can be adapted from jed.rc in the latter directory. · to make jed use some keys correctly, create /usr/lib/jed/lib/defaults.sl whose only line reads: () = evalfile("linux"); · edit /usr/lib/jed/lib/linux.sl; remove the comment from the line that reads Info_Directory = "/usr/info"; and add /bin/mail after UCB_Mailer =; · configuring jed to make it emulate EDT (or other editors) is straightforward: you just have to edit a couple of lines in .jedrc. If you want to use the numeric keypad `+' to delete words instead of a single character, add this in .jedrc: unsetkey("\eOl"); unsetkey("\eOP\eOl"); setkey("edt_wdel", "\eOl"); setkey("edt_uwdel", "\eOP\eOl"); after the line that reads () = evalfile("edt");. · making xjed use the numeric keypad for EDT emulation requires inserting the following in .Xmodmap: keycode 77 = KP_F1 keycode 112 = KP_F2 keycode 63 = KP_F3 keycode 82 = KP_F4 keycode 86 = KP_Separator Moreover, make sure that your /etc/X11/XF86Config contains the follow­ ing lines: # ServerNumLock # must be commented out XkbDisable This applies to XFree 3.2. Unless you use a standard American keyboard though, note that ``XkbDisable'' brings some little problems. You'll find out by yourself. · colour customization for xjed is done adding lines like these in .Xdefaults: xjed*Geometry: 80x32+150+50 xjed*font: 10x20 xjed*background: midnight blue More info in xjed.doc, included in the package. 3.7. TeX and Friends I'll assume you have the TeTeX distribution. Just a couple of things here: · To configure the hyphenation pattern for your language, edit the file /usr/lib/texmf/texmf/tex/generic/config/language.dat, then do: ~# texconfig init ; texconfig hyphen · If you add a LaTeX package, after adding the files under /usr/lib/texmf/texmf/tex/latex/ run the command texhash to make TeTeX recognise the new package. · To tailor dvips, the file to edit is /usr/lib/texmf/texmf/dvips/config/config.ps. Be aware that the fields regarding the default resolution also affect xdvi's behaviour; if you experience annoying attempts to create fonts each time you run it, put in .Xdefault the line XDvi*mfmode: This should help. 3.8. PPP I'll take it for granted that your kernel has PPP + TCP/IP support compiled in, that loopback is enabled, and that you already have the pppd package correctly installed. (These requirements should be there by default.) There are now two ways to get PPP to work: a) manual configuration, and b) using a program that automagically sees to it. First, the manual option. Let's suppose that your ISP's specifications are the following: · Phone number: 1234567 · Name server: 123.231.112.111 · Mail server: mbox.supernet.edu · Domain: supernet.edu · Remote hostname: www.supernet.edu · Your username: John · Your password: _Loo%ny To configure manually your PPP connections, you'll do: · write this file /usr/local/bin/ppp-on, which will be used to connect to your ISP: #!/bin/sh # ppp-on: script to connect to an ISP INIT=ATX3 # or whatever your modem wants PHONE=1234567 /usr/sbin/pppd connect "/usr/sbin/chat '' $INIT OK ATDP$PHONE \ CONNECT '' " user John then make it executable with chmod 755 /usr/local/bin/ppp-on. If your ISP doesn't use the PAP protocol, the following script applies: #!/bin/sh # ppp-on: script to connect to an ISP INIT=atx3 # or whatever your modem wants PHONE=1234567 /usr/sbin/pppd connect "/usr/sbin/chat '' $INIT OK ATDT$PHONE \ CONNECT '' 'ogin' John 'word' _Loo%ny ''" /dev/modem 38400 \ modem defaultroute · write this file /usr/local/bin/ppp-off, used to terminate a ppp session: #!/bin/sh # ppp-off DEVICE=ppp0 if [ -r /var/run/$DEVICE.pid ]; then kill -INT `cat /var/run/$DEVICE.pid` if [ ! "$?" = "0" ]; then echo "removing stale $DEVICE pid file." rm -f /var/run/$DEVICE.pid ; exit 1 fi echo "$DEVICE link terminated" ; exit 0 fi # link not active echo "$DEVICE link is not active" ; exit 1 then make it executable with chmod 755 /usr/local/bin/ppp-off. · write this file /etc/ppp/options: # /etc/ppp/options /dev/modem 38400 lock crtscts modem asyncmap 0 remotename www.supernet.edu defaultroute · if your ISP uses the PAP protocol (most ISPs do), write the file /etc/ppp/pap-secrets: # /etc/ppp/pap-secrets # username remotehost secret John www.supernet.edu _Loo%ny · edit /etc/resolv.conf: # /etc/resolv.conf search supernet.edu nameserver 123.231.112.111 · edit /etc/sendmail.cf. Look for the line starting with DS, and make it like the following: DSmbox.supernet.edu Phew! If you're lucky, this should work. Otherwise, be prepared to study the PPP-HOWTO. So much for manual configuration. There's a fine package that makes all this drudgery a thing of the past, though: it's called ezppp and you'll find it at http://www.serv.net/~cameron/ezppp/index.html . Download it at once. 3.9. POP Client To retrieve your mail from a POP server, use a POP client like fetchpop or fetchmail. The latter is probably the only option if your provider's PPP server has problems with the command LAST. To configure these clients: · fetchpop: the first time you run it, you'll be prompted for some information. Answer the questions and you're set. · fetchmail: adapt this sample .fetchmailrc: # $HOME/.fetchmailrc poll mbox.supernet.edu with protocol pop3; user john there with password _Loo%ny is john here mda "/usr/bin/procmail -f fetchmail" The last line may not be required. You must set the permissions to this file with the command chmod 600 .fetchmailrc, otherwise fetchmail will rightly refuse to start. 3.10. X Window System Once you've managed to make X work (right video card etc.), there are endless possibilities of configuration; it depends on the window manager you use. In any case, it's all down to editing one or more ASCII files in your home directory. As for the window manager: · fvwm: copy /etc/X11/fvwm/system.fvwmrc to your home directory as .fvwmrc, browse it and start experimenting. This contributed system.fvwmrc is IMHO a wee bit too simple and doesn't do justice to fvwm. · fvwm95-2: copy /etc/X11/fvwm95-2/fvwm2rc95 to your home as .fvwm2rc95, then edit it. The contributed example is quite good. · TheNextLevel: this is rather harder to configure. Copy /etc/X11/TheNextLevel/.* to your home dir, browse them carefully, then try and tailor them. The first one to look at is .fvwm2rc.defines. In addition, be sure you have a proper .xinitrc. An example: #!/bin/sh # $HOME/.xinitrc # set a few keys correctly usermodmap=$HOME/.Xmodmap xmodmap $usermodmap xset s noblank # turn off the screen saver xset s 300 2 # screen saver start after 5 min xsetroot -solid "medium blue" & # rxvt saves memory, but has a few bugs: # - home and end keys are not recognised; # - backspace and delete don't work as in console; # - colours are not properly inherited by the environment; # - problems with the environment in general; # xterm is therefore better in many cases. However, rxvt is best # for running some colour apps like mc. xterm -ls -bg black -fg white -sb -sl 500 -j -ls -fn 10x20 -fb 10x20bold \ -title "Color xterm" -geometry 80x25+150+0 & fvwm95-2 3.11. Fortran In my experience, if you need Fortran a good alternative to g77 is the Fortran-to-C translator f2c and the front-end yaf77. Get yaf77 from ftp://sunsite.unc.edu/pub/Linux/devel/languages/fortran/yaf77-1.4.tgz and its mirrors. 3.12. Users' Configurations It's a good idea to let new users have a few configuration files ready when they first log in. Put the following files in /etc/skel: bashrc, bash_profile, bash_logout, inputrc, less, xinitrc, fvwmrc, fvwm2rc95, Xmodmap, Xdefaults, jedrc, joerc, emacs. (Note: due to formatting problems, I had to remove the leading dot (`.') from each of these files.) Note that .pinerc can't be fully tailored; make sure that at least the fields user-domain, smtp-server, and nntp-server are set up. 4. The End 4.1. Copyright Unless otherwise stated, Linux HOWTO documents are copyrighted by their respective authors. Linux HOWTO documents may be reproduced and distributed in whole or in part, in any medium physical or electronic, as long as this copyright notice is retained on all copies. Commercial redistribution is allowed and encouraged; however, the author would like to be notified of any such distributions. All translations, derivative works, or aggregate works incorporating any Linux HOWTO documents must be covered under this copyright notice. That is, you may not produce a derivative work from a HOWTO and impose additional restrictions on its distribution. Exceptions to these rules may be granted under certain conditions; please contact the Linux HOWTO coordinator at the address given below. In short, we wish to promote dissemination of this information through as many channels as possible. However, we do wish to retain copyright on the HOWTO documents, and would like to be notified of any plans to redistribute the HOWTOs. If you have questions, please contact Greg Hankins, the Linux HOWTO coordinator, at gregh@sunsite.unc.edu via email. 4.2. Feedback Perhaps even more than other HOWTOs, this one needs and welcomes your suggestions, criticisms, and contributions. Not only is feedback welcome: it's necessary. If you think something is missing here, please email me. If you have a distribution other than Red Hat and your config files are different or placed in other directories, please tell me and I'll include your tips. My aim is making life with Linux as easy as possible. Linux has a huge number of packages, so it's impossible to include directions for all of them. Please keep your requests/suggestions pertinent to the ``most reasonable'' programs---I'll leave it to your common sense. 4.3. Disclaimer ``Configuration HOWTO'' was written by Guido Gonzato, guido@ibogfs.cineca.it. Many thanks to all other HOWTO authors and man pages writers/maintainers, whose work I've cheeklessly pilfered. This document is provided ``as is''. I put great effort into writing it as accurately as I could, but you use the information contained in it at your own risk. In no event shall I be liable for any damages resulting from the use of this work. I hope you'll find this work useful. Whenever I install a new Linux box, I actually do... Enjoy, Guido =8-)