Make your own free website on Tripod.com
A Brief Beginner's Guide

to

Using Debian GNU/Linux
(2.1 Slink)








Version 4.0c


Introduction:


This brief and basic guide assumes you have already successfully installed Debian GNU/Linux, and have a root and at least one user account (called here user1) with the X server configured.

It is not intended to be a complete guide to using Debian GNU/Linux but rather a brief collection of helpful  practical notes to help you to use Debian.  This guide will enable you to, among other things, connect to the Internet, and configure proper E-mail facilities using superb packages like Exim and Fetchmail.

The guide assumes that IceWM (a fast, simple and very elegant Window Manager) is the default X Window Manager - but the notes apply to most X Window Managers.
 

Note: for clarity, commands which are typed in (to an xterminal, for example) are given in italics.



 

Powering On and Logging In:


When you turn the system on (boot the machine) there will be a brief pause at Lilo boot... and then GNU/Linux will load, with information scrolling down the screen until the xdm graphical prompt is reached which will read:

Debian GNU/Linux

login:
password:

To login, type either root or user1, press the Return key, then enter the password. Note - passwords when typed on GNU/Linux systems are not echoed/shadowed by ******** as on  some Operating Systems. If you make a mistake, you will simply be returned to the login prompt and will need to login again and then enter the password.

When logged in, the default Window Manager will start  and you will be presented with a 'desktop' with some icons. You are now ready to use GNU/Linux.

For the IceWM  you will find a 'start' button at the bottom left (Debian 2.1) and then various other icons. To open an Xterminal (or xterm) left click once on the icon that shows a small computer (it will say XTerm when you place your cursor over it). The numbers 1,2,3,4 represent the four virtual desktops available by default, and the xconsole will show system messages. The window at extreme right shows the CPU Status and can be very useful for monitoring the system - for instance, if a process is misbehaving you will be able to spot it here.

Learning About GNU/Linux:


The best way to learn is to use GNU/Linux. If you login as, and use, a user account, you can move around the system and discover how things work without doing any damage to the system itself (unlike some other Operating Systems). At the very worst, your X Window will  freeze - and you can simply exit by pressing the Control, Alt and Backspace keys. And if ever the system itself seems to you to be frozen, then press Alt and Fx (where x is 2, 3, 4,  5 or 6) and you will open another virtual terminal with a prompt - or, if you are already using an X Window, Control-Alt-Fx which will again bring you to a command prompt.
 
 
 

Xterminals and the Su Command:


Xterminals are a powerful feature of GNU/Linux - they give you access to the shell, the 'command line',  where you can enter (i.e. type in) commands. Such commands enable you to start processes ('programmes') and interact with your system.  A lot of the power and flexibility of GNU/Linux derives from using the shell, and by using it, you can configure and control your system.

When logged in as an ordinary user, there is a special command - su - which allows you access to the root shell (if you know and enter the root password). To use this, open an Xterminal and type su - you will be asked for the root password.

The su command is very useful, and saves logging out as a user and logging in as root. Be aware, though, that when you are logged in as root, either directly or when using the  su command, it is possible to cause problems or damage your  GNU/Linux Operating System, especially when editing configuration files.
 
 

Using IceWM:


If you are using Linux for the first time, a good way to find your way around is to use FTE, for which there is an icon in IceWM.  However, you may find this a little daunting, as it is also a powerful editor, in which case an icon-based File-Manager may be better.  An excellent one is included in Tkdesk - enter tkdesk in an xterm. It is recommended to place a space after this command and then the symbol & after the space. This returns the xterm to a prompt and gives you a PID (process ID) which can be useful (see Top and Kill Commands, below). You can do this with all similar commands which are non-interactive (i.e. which do not require further input).
 

Adding New Users:


To add a new user, login/su as root, then type:

adduser  <username>

where <username> is the name of the user.  This will create a directory for the user in /home and other directories, and you will be prompted for a full name and then asked to specify a password.
 

To change the password for a user at any time, login as the user, and type:

passwd

You will then be prompted to enter a new password.
 
 

Editing Files as Root:


You will often need to edit or create files. You must login as root, or (better) use the su command in a user Xterminal.  The easiest editor to use is Vim - see the Vim manual page (enter man vim in an Xterminal).  To start Vim simply enter

vim

followed by the path to the file you want to edit (e.g. /etc/fstab ).

Vim starts in Command mode - to enter text, press the i key, and then move the cursor to the desired position. When finished editing, press the Escape key (Esc), which brings you back to command mode. To save and exit, you must be in command mode, and enter

:wq

where w means 'write' and q, quit.  Remember to add the :  symbol also before wq. To delete text, enter command mode - pressing the x key deletes what is under the cursor.
 

Some Basic Commands:


A command can be a combination of letters,  a single letter, a name, or a combination of all these.  The basic structure of commands is:

commandname/indicator    <flag(s)>     <argumentA>    <argumentB> .......  <argumentX>

Simple commands consist of just a name or some letters - such as cd. Most simple commands can have a flag and arguments applied to them which can be said to 'refine' the basic command or make it perform a specific function.  The flags and arguments for a particular command are given in the man page (manual page) associated with the command - enter man <command> in an xterminal to view the manual. Flags are often preceded by a minus sign, or two minus signs ( --) and the flag is always separated from the command, and the arguments from the flags, by a space.  Note that all directories begin with a / and this must be written - e.g. to specify the /home/user1 directory, it must be written with / first.

cd  <name>     change to the directory <name>.     Here, cd is the command, and <name>  an argument of the command

ls                   list the files in the current directory (except hidden ones)

ls   -a            list all the files in the current directory

mkdir  <name>           create a new directory with the name <name>
 
 
 

Accessing Floppy and CD-ROM Drives:


The default installation of Debian does not allow you to directly access these drives.  To access them you can, as root, or via su, edit the /etc/fstab file and change it to read:
 

/dev/hda1       /           ext2            default,errors=remount-ro          0           1

/dev/hda2       none     swap          sw                                                 0           0

proc                /proc     proc            defaults                                       0           0

/dev/hdc          /cdrom   iso9600      ro,noauto,user                           0           0

/dev/fd0          /floppy     auto           noauto,user                               0           0
 

Note: hda1, hda2 will vary depending on the partitions on your hard drive. hdc is a CD-ROM drive as master on secondary IDE controller.

This will allow users access to both drives.
 

To access the floppy drive, use the su command, enter the root password, then

mount  /floppy

When finished, you must unmount the floppy using

umount  /floppy

Please note the space after mount and before /floppy; and after umount and before /floppy.  Such spaces are important when entering commands in GNU/Linux. To mount the CD-ROM drive:

mount   /cdrom

This must also be unmounted when finished with:

umount  /cdrom
 
 

Hostname:


To find your hostname (needed for IP and mail configuration - see later) enter

hostname

in an xterm.  The name is also given in the /etc/hostname file.
 
 

Adding New Software:


On Debian, new software should be installed in /usr/local/

To install software from CD-ROM (e.g. Applixware Office) you can mount the CD-ROM manually from the command line, as root, or use the command su in a user Xterminal which will bring you to a root prompt. You can then type:
 

mount  /dev/hdc  -o  ro  /cdrom
 

This will give execute access to the CD-ROM. Alternatively, you could, as root, change (by adding 'exec') the /etc/fstab file, then change it back after the install. To do this, change the /dev/hdc /cdrom line to read:
 

/dev/hdc  /cdrom  iso9660  noauto,ro,exec  0 0
 

Note: It is best to use dselect to install .deb packages to update the system, either from the supplied CD's or via the Internet using the apt method of dselect.
 

Logging Out:


To logout - e.g. to change from root to user1 and vice versa - either use the  Close button after opening the Debian 'start menu' or right click on an empty Desktop area,  then click on 'Close'.

If you are using a text console (e.g. the display has frozen and/or you used  Ctrl-Alt-Fx ) then to logout - e.g. to change from root to user1 and vice versa - type

logout
 

Shutting Down:


It is important to shut GNU/Linux down correctly, otherwise the file system may be damaged. To shut down, login/su as root  then type:
 

shutdown -h now
 

When you see:

system halted

it is safe to turn the system off.

If you just wish to re-boot the system, enter

shutdown -r now
 
 
 

Internet Configuration:


If you are new to GNU/Linux, writing your own configuration scripts to enable your system to connect to the Internet may seem daunting, but it is fairly simple and does not take much time. Once done, and your connection is up and running, you will have a sense of achievement - something you do not get by simply clicking on an icon. You will also have developed a better understanding of how your system - and GNU/Linux - works. You will have completed your first adventure in a new world.

Several web browsers are installed by default - including Mozilla and Amaya [go Programs->Apps->Net]. Amaya is good, but  remember that this is still 'beta' software and so may have some 'bugs' - once connected to the Internet, you can download the latest version (currently 2.1 which is good but does not support frames) from ftp://ftp.w3.org/pub/amaya. [Note:  For how to install the Amaya file once downloaded, see below. ]

You can also use a text browser such as lynx (see below Using the Lynx Browser), or install Xemacs and the w3 packages (if not already installed) and then use Xemacs for browsing (see below Using Xemacs). Lynx is a very good and much underestimated browser, although it does not show images and does not work with those badly designed image-rich sites whose GNU/Linux unaware designers wrongly and somewhat ignorantly assume everyone uses a MS Internet Explorer type, frames-aware, Java-enhanced  browser.  Xemacs/W3 is also a good browser and will work with some of these badly designed sites.

Before you start your Internet configuration you will need to have connected a modem to a serial port (or installed an internal modem) and know:
(1) the telephone number of your ISP
(2) your login name and password
(3) details of the DNS servers - domain name (e.g. dial.pipex.com) and the primary and secondary DNS (e.g. 158.44.246.4)
(4) the port your modem is set on (e.g. ttyS1)
(5) the type of authentication - either CHAP or PAP.
 

The configuration is divided into two stages, as follows, and is for a 'stand-alone' system with a modem connected to a serial port. It assumes you have set your system, during install, in loopback mode - i.e. you are not on a network and intend to use a modem to connect to your ISP.

I - Configuring Apache:


The first thing you need to do is install the Apache webserver (using dselect) and then configure it.

Apache configuration is very simple.  Once Apache is installed enter, in an xterminal,

apacheconfig

and then set the options to those of your system (usually you can accept the defaults).

If Apache still does not work after this, then check the /etc/apache/httpd.conf file. This must have an uncommented line which says:

Server Name                   localhost

If necessary, remove the # before ServerName and add 'localhost', deleting anything else on that line.

Check also that the file contains:
 

ServerType                        standalone

Port 80

Hostnamelookups               off
 

ServerRoot             /etc/apache
 

Then re-run apacheconfig if you have edited the file.
 
 
 

II - Editing Internet Configuration Files:


The important configuration files for internet connection on Debian are: (1) /etc/ppp/peers/provider; (2) /etc/ppp/chap-secrets [or pap-secrets]; (3) /etc/resolv.conf; (4) /etc/chatscripts/provider. These are the files you must check and if necessary edit. You should also check the /etc/ppp/options file and make sure that 'lock' (some way down the file) is commented out - place a # in front of it if one is not there.
 

(1) .../provider

Under 'debug' you will find the lines you may have to edit. Note: the text in square brackets is  not in these files, but  notes to inform you what the line means, or what to add/change. For clarity the actual content of the files is given in bold.

/dev/ttySx      [Note- change this to the port your modem is on: for example to /dev/ttyS1

115200         [Note:- modem speed. Usually set to this.]

defaultroute        [Note:-  if this is not present, add]

noipdefault           [Note:- if this is not present, add

user <your ISP login name>    [Note:- if not present, add  followed by a space and then your login name. If your login name has characters e.gUk/zza29 - enclose in '    ' ( e.g. 'UK/zza29' )]

(2) .../chap-secrets [or pap-secrets if PAP is used]

Make sure this contains your ISP login name followed on the same line (after some spaces) by * and then your ISP password, e.g.:

'UK/zza29'       * mypassword

[Note: you  should add another line below this, exactly the same, if you enclosed your login name as above, but this time leaving out the '   ' .]
 

(3) .../etc/resolv.conf

This should be empty (or anything else commented out with #) except for

Nameserver     <xxx.xx.xxx.x>
Nameserver      <xxx.xx.xxx.x>
 

'Nameserver' should be followed - after some spaces - by first the primary and  then the secondary numbers given to you by your ISP (e.g. 158.44.246.4). Thus the line would read:    Nameserver    158.44.246.4

(4)  /etc/chatscrips/provider

Under

" " ATZ

there should be

OK  ATDT<number to be dialled>
Connect  \d\c
 

Note: you might also want to check that the /etc/ppp/peers/provider file has the line:

connect  "/usr/sbin/chat  -v  -f  /etc/chatscripts/provider"
 

Once these files are configured, you can connect to the Internet by opening an Xterminal,  entering the su command, and typing

pon

To disconnect, enter

poff

(Note: watch, or open, the Xconsole window, for it will tell you a lot.)
 

If you have all these scripts configured correctly, and still cannot connect, check the following:

(a) /etc/hosts

This should contain only one line such as:

127.0.0.1        spacetime    localhost

(replace spacetime with the name you have given to your system)

(b) /etc/hosts.conf

This should contain only:

order        hosts,bind
multi         on

(c) /etc/networks

This should have only:

localnet       127.0.0.0
 
 
 

WVDIAL:

Also installed on the system is an Internet dial-up utility called WVDial. This is very good, and easy to configure.  If not already configured, enter wvdialconf in an xterm. The configuration script is in /etc/wvdial.conf and should be along the following lines, depending on your modem:

Phone = < your ISP telephone number, with no space>
Username = <your ISP username>
Password = <your ISP password>
New PPPD = yes
Modem = /dev/ttySx     <replace x with correct number, as above>
Baud =  115200
Init1 = ATZ
Init2 = ATQO V1 E1 SO=O &C1 &D2  S11=55  +FClass=0

You should also have a /etc/ppp/peers/wvdial file which contains only:

noauth
name   wvdial
 

To start wvdial - open xterminal,  su, and enter

wvdial

To stop wvdial, the best way is to click on the xterminal where you entered the wvdial command, then press the Control key and the c key together.
 
 

Using the Lynx Browser:


The lynx browser is very fast, and ideal for viewing and retrieving information from the Internet. To start lynx, simply enter lynx in an xterm. Note that if you try to start lynx without being connected to the Internet and it fails to start, returning a message like 'cannot connect' than you have probably specified a URL during install and need to edit the /etc/lynx.cfg file if you want to use lynx off-line. You need to change the Startfile line to read exactly as the Helpfile line below (after Helpfile), and then restart lynx.

To set your options, enter the single letter o (small letter o ). This allows you to reject/accept cookies, set an editor for html files (such as emacs) and turn the colour setting off (this can make text easier to read).  The user mode enables you to disable the bottom two lines of help text.

To fetch a URL, press the g key, then type in the full URL (i.e. with http:// ) then press the Return key. Links are highlighted (if colour mode is off) or in a different colour (if colour mode is on) - to follow a highlighted link, press the right arrow key. To move to another link and highlight it, use the up or down arrow keys. To go back, use the left arrow keys.

To bookmark a URl, press the a key, then choose from the list. To view browsing history, press the backspace key (on most UK keyboards; if this does not work, use the delete key).  To download a page, press the d key, then choose from the options.

You can view the html of the viewed page by pressing the \ (forward slash) key - and edit this by pressing the e key (if you have entered an editor in the Options file).  You can also view files on the local disk - press g key then enter the local path to the file after entering

file://localhost/<file path>
 

You can use lynx for ftp sessions as well. Press the g key then enter

ftp://<ftp server>

where <ftp server> is the name of the ftp site you wish to connect to - e.g. ftp.debian. org (for help on using ftp - see Using FTP below).

If you want to view pages in a slightly larger format than the default xterm size, then before you start lynx, re-size the xterm window you are going to use, then start lynx.
 
 

The Top and Kill Commands:


Sometimes, you may find that you cannot stop a process (or 'program') that you have been running when clicking the 'close/exit' button. To stop the process, you need to know what is called its PID (Process ID).

There are two ways of finding this. First, enter

ps f

in an xterminal. The second way is to enter

top

then the single letter

u

(for user) followed by your user name. This will show the processess you are running and the PID's. To quit top, simply enter the single letter

q
 

To stop - kill - the process enter

kill <PID>

If this does not work (and it usually does) enter

kill -9  <PID>

which will certainly terminate the process.

Unless you know what you are doing do not ever use the kill command when logged in as root,  either directly or via the su command
 
 
 

Installing Amaya:


You should download the tar.gz file into /usr/local (or your home directory - e.g. /home/user1).  Make sure you download the Linux Elf 2.1 file.

Then change to that directory by entering:

cd   /usr/local

Then enter the following command to uncompress the file <filename>:

tar -xvzf  <filename>.tar.gz
 

This creates a new Amaya directory within the local directory and unpacks the Amaya files into that directory.

[Note: A tar.gz file is a compressed tarball, and a tarball is basically a collection of files which are bundled together.  Here, the command is tar - the option x means uncompress; the option v means verbose - show list of files; the option z extract, and the option f creates and names the folder that the files are extracted into. ]

Change to this new directory (if you wish you can look for it using a File Manager).

To run  Amaya, open an Xterminal and simply enter the path:

/usr/local/Amaya/<.......>/bin/amaya

Currently the full path is:

/usr/local/Amaya/Linux-Elf/bin/amaya

It is best to create a link to this file from the /usr/local/bin directory which will enable you to just type in 'amaya' in an xterminal. You could also remove the old 1.3 version which is installed by default. To remove the old version, use the Remove option in dselect.

To create a symlink the easy way, start Tkdesk (enter tkdesk in an xterm) then using the browser, select the file you wish to make the link from, then right click, select the Copy option and enter the directory for the link (usually /usr/local/bin) then click on Link (symbolic) option.
 

Default Window Manager:


 

Edit the /etc/X11/window-managers file and place the WM you want as default at the top of the list.
 

Window Manager Configuration:


 

The file for configuration of a particular WM  (~/preferences) is in /etc/X11. Thus, for Icewm, the file is /etc/X11/icewm/preferences.

If you wish to configure Icewm  then edit the /etc/X11/icewm/preferences file. Anything that can be configured, can be done here.

For example, to remove the clock, simply change

TaskbarShowClock =1

to

TaskbarShowClock = 0

To set the default appearence, simply edit the

Theme=gtk/default.theme

line. For example, if you want Motif as the default,

Theme=motif/defualt.theme
 
 

Executing Commands:


On Debian, the system searches the pattern given in the /etc/profile file when a command is entered. The default is:

/usr/local/bin:/usr/bin:/bin:/usr/bin/X11

which means /usr/local/bin is searched first for executables (binaries), then /usr/bin and so on.  Thus, if you install programmes, you would usually install the binary of the programme in /usr/local/bin
 
 

Dselect - Apt:

 

 
 

To use the apt method of dselect in Debian 2.1 to install packages from the CD-ROM  drive, start dselect, then go to Apt and add the following entry to the sources list:

file:/cdrom/debian

Then go to the packages - e.g. 'slink', 'main'.
 
 

Installing Netscape:


If you wish to use Netscape, please note:  (1) What follows applies to version 4.61 and assumes you wish to download this from the Netscape site/ftp, or copy this from a CD,  as a  tar.gz file.  Also note, that such a file is not a .deb package and can sometimes cause problems on a Debian system. (2) Make sure you download/copy the glibc2.0 version. (3) There are many bugs in Netscape - some to do with Java - so you may find that Netscape crashes, does odd things, or not work at all. (4) Netscape is not free software, and there are GNU Copyleft browsers available such as lynx and Xemacs-W3.

Note: If you have problems with Netscape, try disabling Java (Go 'Preferences' from the Edit menu) and if you have downloaded or copied Netscape, then delete it, and install the netscape  .deb packages from the Slink CD's then fetch the rest by ftp.

To install: first, create a new directory called netscape by using su command and then entering

mkdir  /usr/local/netscape

If you are downloading Netscape, download into this directory. If you have Netscape on CD Rom,  first mount the CD Rom drive, then copy the file of Netscape - which will be a tar.gz file -  into this directory, using the cp command followed by a space, then by the path to the source file, then a space and then the path to the directory where the file is to be copied to. Then  change to the netscape directory by entering:

cd   /usr/local/netscape

Then enter the following command to uncompress the file <filename>:

tar -xvzf <filename>.tar.gz
 

This creates a new directory within the netscape directory, named after the filename. Change to the new directory  by using the cd command followed by the path to the new directory, then simply enter

./ns-install

[Note: the dot (.) before the / is important, as is the first / when giving the path.]

This will install Netscape. To run Netscape, open an Xterminal and simply enter the path:

/usr/local/netscape/netscape
 

You can add a link from here to /usr/local/bin which in Debian 2.1 will place a Netscape icon in Icewm and enable you to run Netscape by clicking on this icon.

To make the link enter the following in an xterminal (su first):
 

ln  /usr/local/netscape/netscape  /usr/local/bin/netscape
 

Or you can use the symlink option in  Tkdesk - see Amaya, above.
 
 
 
 

Busy CD-ROM:


Sometimes you may find the CD-ROM drive busy - you may have mounted it as a different user. To find out, enter

fuser -v  /cdrom
 
 

Configuring LILO:


The default Debian installation boots straight into GNU/Linux without offering a prompt or much of a delay.  If you need a prompt, then when LILO boots, press the Alt key which should bring you to a prompt. If this does not work, try the Shift, Ctrl and Alt keys together. However, some users prefer a permanent prompt followed by a set delay so that if necessary certain boot options can be set. This is useful if you need to boot into single user mode, which is a root shell on a console (no X ) - this is necessary on the rare occasions when you need to recover a crashed system or if you need to change monitors and do not wish to boot straight into an X window session  (because xdm is configured by default and you need to re-edit the /etc/X11/XF86config file).

To enable a prompt and a delay, as root, edit the  /etc/lilo.conf file and add the single word

prompt

after vga=normal and before delay=

Then change the delay to 100 (tenths of a second).  Save changes, and then as root run the following command which will re-install LILO:

/sbin/lilo

If you need to boot into single user mode, then at the prompt enter

linux  single
 
 

Mail: Configuring and Using Exim


While Netscape can be used for E-mail it is better to use a proper MTA - Mail Transfer Agent. One of the easiest to use and configure is exim which is installed by default. To configure,  you need to make sure that your system has a fully qualified domain name. To check, in an xterm enter

hostname --long

It should come back with something like

spacetime.space

That is, there will be a dot (.) somewhere. If it comes back with a short name (like spacetime) you need to edit the /etc/hosts file, which will probably say something like

127.0.0.1       spacetime       localhost

You need to first decide on a domain name in the form <name.anothername> and change the file to

127.0.0.1      localhost
127.0.0.2      <name.anothername>    <name>

Here, the first part of the second line is the fully qualified domain name (long name) you have chosen, and the second part the short, or host, name.  Note that  <name>in the long name should be the same as <name> in the short name.

Next, you need to as root enter eximconfig in an xterm.  Usually Option 2 should be chosen (smarthost with dial-up connection).

Set the visible name to the domain name (it should come up as the default option). Set the smart host to the smtp server  where you have your ISP account - usually something like smtp.<ISP name>.  For instance - smtp.dial.pipex.com. You should accept the default values for the rest, and choose a user account for admin when prompted.
 

You  also need to edit the new  /etc/exim.conf file so that it reads

local_domains = < short domain name> :  localhost

where < short domain name> is the name <name> you entered in the 127.0.0.2 line above.
 

Next, you need to add several things at the end of the exim.conf file - at the very end of the #Rewrite Config ....  section. You need the following entry:

<local user name>@*          <ISPusername>@<ISP domain>    Ffs

Thus, if your local name on the system is orion, and if your ISP E-mail address is orion@dial.pipex.com then this would be:

orion@*          orion@dial.pipex.com       Ffs

Note the three letters - Ffs - at the end. The entry you make should be just before the #End of Exim conf....
 

You can check that all is well by entering the following in an xterm:

telnet   localhost   25

This should return something like

220    <hostname>      ESMTP     Exim   2.05

To quit, enter quit.
 

The easiest way to use exim is to have or create an account for yourself with the username which is the first part of your provided or chosen ISP E-mail address. For instance, if you have orion@dial.pipex.com as your E-mail address, then create user orion.

To send mail, you need to use a Mail User Agent (MUA) - either elm which is installed by default, or another MUA such as Mutt or Pine. elm is easy to use - just enter elm in an xterm and it will create the folders required. Note that when you are composing a mail, elm drops you into Command mode (see Editing Files as Root above) - press i to enter text, and Esc when finished, etc.

Another good mailer, VM,  is included with Xemacs - enter xemacs in an xterm, then from the top menu bar choose Apps, then Read Mail (VM). To compose, click once on the Compose icon. To send, click on the Mail option from the top menu bar, then Send. You can also use mail which is the Unix default - just enter mail in an xterm.
 
 
 

Fetchmail:


To retrieve mail from your ISP, you can use Fetchmail, which is installed by default.  All that needs to be done is create a file, in the home directory of the user, called .fetchmailrc (note the dot - . - before the filename). Thus if the user is orion, this would be in /home/orion. This must be owned by the user, and have the following permissions:

rw-  --- ---

(Note:  You can use Tkdesk to create the file, and change/set the permissions - click on the Info icon to change/set permissions.)

The .fetchmailrc file should be along the following lines:

set  postmaster  "<username>"

poll  <POP mail server> with proto POP3

user  "<POP username>"  there with password  "<POPpassword>"   is  <username>  here

This assumes POP3 protocol is being used. The username is the username on the localhost, the POP mail server the  ISP mail server domain name (e.g. pop.dial.pipex.com); and the POP username your ISP/mail username. Postmaster, POP username, and POP password should be enclosed in quotes (".......").

To run fetchmail, connect to the ISP, enter fetchmail in an xterm and it will collect and deliver your mail to /var/spool/mail/<username> where it can be read by elm or any other  MUA.

Many options can be entered in the .fetchmailrc file - see the documentation in /usr/doc/fetchmail. For instance, you can set a logfile (e.g. /var/log/fetchmail.log), set a daemon to poll for mail at regular intervals, and poll several mail accounts.

Also, if you have multiple accounts on one POP server, and another account on another POP server, you should create a root .fetchmailrc (in /root) which is like this:

set   postmaster   "postmaster"
poll  pop <POP mail server>  with  proto POP3
   user <POP username1>  there  with password   <POPpasswd1>  is  <username>  here
   user <POP username2>  there  with password   <POPpasswd2>  is  <username>  here
poll  pop <POP mail server2>  with  proto POP3
   user <POP username3>  there  with password   <POPpasswd3>  is  <username>  here
 

You can then su, and run fetchmail which will poll the different accounts and deliver the mail to the correct users.  When fetchmail exits it issues an exit code - the normal (error free) ones are 0 (mail retrieved) and 1 (no mail on server).  If you want to see what fetchmail is doing, start fetchmail with the flag -v thus:

fetchmail  -v
 

You can also adapt the sample fetchmail-up and fetchmail-down scripts given in /usr/doc/fetchmail, adding them to  /etc/ppp/ip-up.d and /etc/ppp/ip-down.d to run and quit fetchmail when you connect/disconnect to your ISP.
 
 
 
 

Using Xemacs:


Xemacs (a variant of the original GNU emacs) is a fully-featured environment which enables you, among many other things, to create, edit and spell-check text and html files; read, compose and send E-mail and, via W3, browse the Internet.

When you start Xemacs (and emacs) you will see two buffers - the main, larger, one ('scratch') and a mini-buffer at the bottom where commands
appear and where commands can be entered.  The basis of both emacs (and thus Xemacs) is the buffer -  which is basically a 'container' which contains whatever you are working on, such as a file. It is possible to have many buffers open at the same time, and also have buffers open which are doing different things so that, for example, you can edit a file in one buffer, read and compose E-mail in another buffer, and browse the Internet in another one. As an editor, emacs/Xemacs has a very useful multiple undelete.

To open a file, click on the Open icon, then place the cursor over the directory or file that you want, left click once, then press the Return key. This will
load the file - if it is a html file, it will open in html (code mode) and you will find a HTML icon on the menu which will allow you to view it in a browser.

To close the file, go to File menu, then Delete Buffer <file-name>. To create a new file, press the Control and x keys at the same time, then the Control
and f keys and enter the path and file name in the mini-buffer at the bottom (where it will say find file). If you specify a htm or html extension, a new html file will be created, with the html doc tags already inserted.

If you ever find that you seem to be 'hung' in a buffer and that whatever you do you just get an error beep, press Control and the g key together which will cancel whatever operation you may have started.
 

It is possible to set security levels when using W3 to browse the Internet.  To start W3, from the Apps menu, go Browse the Web. To set your level,
choose Preferences from the Edit menu, then Url, then Privacy level. Once there, place the cursor over the Value in [       ] brackets and right click. This
will open a menu, and choose the level you require. Then click Save, then Done.

To set the default option (blank page/home page etc.) go Edit Preferences from the Options menus. Change, then save and exit. To fetch a URL, either
press the Control and o keys at the same time, or from the File menu choose Open location. Then enter the URL you want in the mini-buffer at the
bottom and press Return. If you have set the blank page option then when you start a new Browse session from xemacs you will find the main scratch
buffer still open while the mini-buffer inserts the beginning of a URL - just enter the URL required and press Return.

Note than when using W3 to follow a link, place the cursor over the link, then press the return key.
 
 

Using FTP:


To start a ftp session, connect to your ISP, then enter, in an xterm (or switch to a text console)

ftp

followed by the ftp server you wish to connect to. For instance, for ftp.tripod.com it would be

ftp  ftp.debian.org

When connected, you will be asked to login and provide a password. For anonymous ftp, the login name is anonymous, and the password your E-mail
address. You will then get the ftp prompt:

ftp >

To view files in directories, use the cd (change directory) command, then ls (list files).

When downloading files, make sure that if you are downloading binary (programme) files you are in binary mode - to make sure, at the ftp prompt enter

bin

To retrieve text files, enter

ascii

To download,  enter

get   <remote file-name>

If you wish to upload a file:

put   <localfile path and name>

If you want to upload a file and change its name:

send  <local file name>     <new remote file name>

It is useful to see download/upload progress - to do this, before you download/upload, enter the command

hash

which  print to screen a # character for every 1024 bytes which are downloaded/uploaded.

To get several files use the mget command followed by a list of the files.  To upload several files, the command is mput.

To quit, enter quit.
 
 

Multiple ISP Dial-Up

If you have several ISP accounts it is possible to configure Debian so that you can connect using

pon <ISP name>

1) You need to create a new file in /etc/ppp/ and name it something like the name of your ISP - e.g. pipex. Then change the permissions (using Tkdesk is the easy way) to be

rw-      r--   ---

The owner should be root and the group dip.

Copy over the the contents of the etc/ppp/provider file and then change only the user and the last part of the connect line. Change this last part from provider to the name you have given to the new file - e.g.. pipex.

2) Add the numbers of the ISP nameserver to the /etc/resolv.conf file, under the ones already there and in the same format.

3) Add your ISP name and password to the /etc/ppp/chap-secrets (or pap-secrets) file in the same format as those already there.

4) Create a new file in /etc/chatscripts/ and name it as in (1) - e.g. pipex. Copy over the contents of the /etc/chatscripts/provider file and change the telephone number to that of your ISP. Change the permissions etc. as you did for (1).

To connect to this ISP simply enter pon <name> - for example,

pon   pipex
 

Disconnect in the usual way with poff.
 
 
 



 
 

Copyright 1999 by Muhammad Yusuf.

This work may be freely distributed and freely republished in any format without any prior notification being required, provided the above copyright and this free distribution notice are added either at the beginning or the end of the distributed/published document.

There is no warranty or guarantee of any kind offered or implied in or by this work.