Chapter 4: Email and the Web
Overview
If you are like me, the first thing youll want to do when you get your
new Linux system up and running is to surf the Web. The next thing will be to
send and receive email.
Under the Gnome desktop environment, you can run Netscape Messenger to send
and receive email. Netscape Communicator or Navigator 4.51 for Linux can be
used to browse the Web. These products work the same wayand have the same
look and feelas their counterparts in other visual operating systems,
such as Windows. They are automatically installed as part of the standard Red
Hat installation.
But before you can use these programs to do these things, you must first configure
your system so you are connected to the Internet. In this chapter, Ill
show you how to configure a dial-up connection.
If you have a direct LAN connection to the Web (orthe functional equivalentare
connected via a cable modem), you may have already configured the appropriate
network settings during the Red Hat installation. However, if you skipped this
step during the Red Hat installation, or if you need to make changes to the
settings you did enter, Ill show you how to configure your network settings
for direct Internet access.
Then youll launch the Netscape product suite and configure Messenger
for incoming mail (by specifying a POP server) and outgoing mail (by specifying
a SMTP server).
Becoming Root
Changing system settings, such as the modem or network configurations, generally
requires root access. Root is the term used for the all-powerful Linux superuser.
(For more information on Linux users and privileges, see Chapter 12.)
If you are not logged on as root, you can log off and log back on as root.
Or, you can suchange your effective user identityto root.
To su to root:
- Open a terminal window, either by clicking the terminal icon on
the Gnome panel or by choosing Gnome Terminal from the Gnome Utilities menu
(Figure 4.1).
- Click in the Terminal window, so that it has the focus of keyboard
entries.
- With the terminal window open, type su
root at the prompt.
- Enter the root password at the prompt.
Youll see at the next prompt that you are effectively logged on as root
(Figure 4.1).
Tip
- Its better practice to log on with your own identity and
su to root, rather than logging on as root, even if you are the only user
of your Linux machine. (For instructions on creating your own identity as
part of your initial installation, see Chapter 1.) The main reason for getting
in the habit of logging on with your identity and using su to change to root
access, if necessary, is to save you from yourselfyou are less likely
to inadvertently make changes to the system that you will regret later. In
addition, this approach is preferable for security reasons, particularly if
you are logging on remotely.
Figure 4.1 Use a terminal window to su to root, giving yourself the
privileges of a system administrator.
Configuring Your System with Control Panel
The Gnome control panel is used to configure most aspects of your system. Each
button on the control panel opens a different configuration applet (Figure
4.2). This control panel functions in much the same way as the Windows control
panel.
The configuration applets include the following:
- Printer Configurator
- Network Configurator
- Modem Configurator
- System Configurator
To open the control panel:
With the terminal window still open, and while you are still logged on as root
(Figure 4.2), enter control-panel
at the terminal prompt.
Tip
The System Configurator applet (Figure 4.3) presents a hierarchical
window that allows you to change many settings, including those that can be
changed by the Network and Modem Configurator applets. However, the separate
applets are easier to work with.
Figure 4.2 The Gnome control panel allows you to configure most systems
settings.
Figure 4.3 The System Configurator applet allows you to edit most settings,
but it is more complicated to use than individual applets.
Configuring a Modem
If you are going to connect to the Internet using a modem that works over phone
lines, sometimes called a dial-up adapter, you have to tell Linux what serial
port your modem is connected to. You also have to set various network configuration
settings. Your Internet service provider (ISP) should supply these. Its
a good idea to make sure you have all the configuration information supplied
by your ISP before you try to enter your settings in Linux.
To choose a serial port:
- Open the Modem Configurator applet (Figure 4.4).
- Select the serial port your modem is connected to.
- Click OK to close the dialog box.
Tips
- For information on using Windows to determine your hardware
settings before you install Linux, see Chapter 1.
- The defaultand most usualserial port for a modem
is com 2. The Linux device name for com 2 is ttyS1.
- If all else fails, use trial and error. After all, there are
only four possible settings.
- Youll know you have the right serial portafter you
have entered the other network settingsif you hear a dial tone and the
modem starts to dial when you turn on networking. Ill explain this and
show you how to test your connection to the Internet later in this chapter.
To enter DNS information:
- Open the Network Configurator applet.
- Select the Names tab (Figure 4.5).
- Type the tuplets (series of numbers) provided by your ISP in the
Nameservers box.
- Click Save to close the dialog box.
Tips
- Domain name servers (DNSs) are used to look up locations on
the Internet based on text the URL supplied. Locations on the Internet are
indicated by a series of four numbers, called a tuplet. For example, www.bearhome.com
translates (or resolves) to 204.0.134.135.
- The tuplets entered on the Names tab of the Network Configurator
applet are used to tell your system where to look for DNS resolutionin
other words, the translation of text URLs to physical tuplets.
- Generally, your ISP will supply a primary and a secondary DNS
tuplet. Enter the primary DNS tuplet in the Nameservers box above the secondary
tuplet.
- To find this information if it has been entered on a Windows
computer, right-click on the Network Neighborhood icon and select Properties.
On the Configuration tab, select the TCP/IP component that you use to access
the Internet. Choose Properties. To read the information, select the DNS Configuration
tab of the TCP/IP Properties dialog.
Figure 4.4 Use the Modem Configurator Applet to tell your system what
serial port your modem is connected to.
Figure 4.5 Enter the DNS information provided by your ISP in the Nameservers
box.
Configuring a Modem
To add a PPP interface:
- Click the tab to open the Interfaces page of the Network Configurator
dialog box (Figure 4.6).
- Click the Add button at the lower left of the Interfaces page.
The Interface Type dialog will open (Figure 4.7).
- Select PPP and click OK.
The Create PPP Interface dialog will open (Figure 4.8).
- Enter your ISPs phone number, your user name, and your password
in this dialog box.
- Click Done.
The new PPP Interface will now appear on the Interfaces page (Figure 4.9).
- Use your mouse to highlight the interface (labeled PPP0) and click
the Edit button.
- Enable the Allow Any User to De(Activate) Interface setting (Figure
4.10).
This allows any usernot just rootto dial and hang up.
- Click Done.
- Click Save on the Interfaces page (Figure 4.9).
To dial your ISP:
- Open a Terminal window (Figure 4.11).
- Enter the following at the prompt:
/sbin/ifup ppp0
If all is well, you should hear your modem dialing, following by the connection
tones.
To check the connection:
With the terminal window still open (Figure 4.11), enter the following
command to attempt to communicate with an important domain at Compaq computers:
ping gatekeeper.dec.com
You should receive a series of reply messages with the time of a round-trip
journey to the computer you are pinging (Figure 4.11). If you receive
a message back, it verifies that the two computers can communicate.
Tip
- You can ping any computer you want to test your connectivity.
For example, enter
ping informix.com
To close the connection:
- In the terminal window (Figure 4.11), type
/sbin/ifdown ppp0
Figure 4.6 The Interfaces tab of the Network Configurator dialog box
is used to add and modify network connections.
Figure 4.7 Use the Interface Type dialog box to select the type of network
interface.
Figure 4.8 Your ISP phone number and identification information should
be entered in the Create PPP Interface dialog box.
Figure 4.9 Once a new interface has been added, you can edit its properties
using the Interfaces tab.
Figure 4.10 It's a good idea to allow any user - not just root - to
activate and deactivate the network connection.
Figure 4.11 Use a terminal window to enter the commands to dial up your
ISP, test the connection, and disconnect.
Configuring a Direct Connection
If you have a director broadband connection to the Internet,
there are a few things you have to configure differently than when you use a
dial-up connection.
A broadband connection typically means that you are interfaced with the Internet
via a LAN or a cable modem.
There is no reason that you cant have multiple connections: for example,
one dial-up connection and one via a LAN.
To add an Ethernet interface:
- Open the Interfaces page of the Network Configurator applet (Figure
4.12).
- Click Add to add a new interface.
- Select Ethernet from the Interface Type dialog box (Figure 4.13).
- Click OK.
The Edit Ethernet/Bus Interface dialog will open (Figure 4.14).
- Enter the IP for your machine and the netmask that should be used.
Enable the Activate Interface at Boot Time option if you want Internet access
to automatically be available when you boot up your computer.
- Click Done.
- Click Save on the Interfaces page of the Network Configurator applet.
- Select the Names tab to open the Names page of the Network Configurator
(Figure 4.15).
- Enter your host name, domain, and name servers.
- Click Save.
- Select the Routing page of the Interface Configurator. Enter the
default gateway. (Figure 4.16).
- Click Save.
- Close the Interface Configurator and reboot your system by entering
the following at the command prompt in the terminal window:
shutdown r now.
Tips
- Even though you might think that a cable modem is a modem-style
connection, actually the cable modem functions as a gateway between your computer
and a network that is connected to the Internet. The cable modem connects
to a network card in your computer. Thus, a cable modem connection should
be set up as an Ethernet interface.
- Youll need to enter an Internet protocol (IP) and netmask
for your machine, since in a direct connection your computer functions as
a node on a TCP/IP network. Your system administrator or cable modem provider
should supply this information.
- Your system administrator or cable modem provider should also
supply IP addresses for your name servers, host name, domain, and default
gateway.
- If you need to specify different gateways for different interfacesas
opposed to one default gatewayyou can use the Routers page of the Network
Configurator to do so.
Figure 4.12 Open the Interfaces page of the Configurator to add a direct
connection.
Figure 4.13 Select Ethernet as the interface type for a direct connection.
Figure 4.14 You'll need to enter a unique IP for your machine in the
Edit Ethernet/Bus Interface dialog box.
Figure 4.15 Enter your host name, domain, and IP addresses for your
name servers on the Names page of the Configurator.
Figure 4.16 Enter your default gateway on the Router page of the Configurator.
Configuring and Using Netscape Communicator
From here, the process of configuring and launching the Netscape product suite
to browse the Web and to send and receive email is the same as in any environment.
To launch the Netscape browser:
- Select the Netscape icon on the Gnome panel or select Netscape
Communicator from the Internet folder on the Gnome Start menu.
- Now you can open any site youd like. For example, enter www.peachpit.com
to go to that site (Figure 4.17).
To configure the Netscape products:
- With the Netscape browser open, select Preferences from the Edit
menu.
Youll see a hierarchy of options that can be configured (Figure 4.18).
- For example, to configure Navigators home page, select Navigator
from the list on the left and enter the home page on the right (Figure
4.18).
To configure Messenger to send and receive mail:
- With the Netscape Preferences dialog still open, expand Mail and
Newsgroups.
- Scroll down and select Identity on the left-hand menu (Figure
4.19).
- Enter your name and your email address on the right.
- Select Mail Servers on the left
(Figure 4.20).
- Enter the name of your incoming mail server (this is usually a
POP server) and the name of your outgoing (SMTP) mail server.
- Click OK.
To receive email:
- Select Messenger from the Communicator menu on the browser.
Netscape Messenger will open (Figure 4.21).
- Click the Get Msg button (Figure 4.21).
- Enter your email password when prompted (Figure 4.22).
To send email:
- With the main Messenger window open, select New Msg (Figure
4.21).
The Compose dialog box will open (Figure 4.23).
- Address and compose your email.
- Click the Send button.
Figure 4.17 You can browse any site you like by opening it in Linux
Navigator.
Figure 4.18 The Netscape Preference dialog box is used to configure
the Netscape product suite.
Figure 4.19 To configure Messenger, enter your identity.
Figure 4.20 You'll need to identify your incoming (POP) mail server
and your outgoing (SMTP) mail server.
Figure 4.21 The main Netscape Messenger window is used to organize your
email.
Figure 4.22 When you get your messages, you will be prompted for your
email password.
Figure 4.23 The Messenger Compose window is used to create and send
email.
Summary
In this chapter, you learned how to:
- Change your effective identity to root (using su).
- Use the Gnome control panel.
- Configure a modem.
- Add a PPP interface.
- Configure a direct connection.
- Add an Ethernet interface.
- Configure Netscape Communicator
- Use Netscape Messenger to send and receive email.