home " subscribe " advertise " customer service " back issues " " contacts

 
Sections
  Newbies
  Reviews
  How To
    Best Defense
    Guru Guidance
    On The Desktop
  Developer's Den
    Gearheads Only
    Compile Time
    Perl of Wisdom
  Who's Who
 
Indexes
  Issue Archive
  Author Index
 
Linux Magazine
  Subscribe
  Advertise
  Customer Service
  Back Issues
  
  Contacts
 
On Stands Now Click to view Table of Contents for Linux Magazine March 2000 Issue
Newsletter
  Enter email address:
   
Subscribe to Linux Magazine

Linux Magazine / August 1999 / NEWBIES
Getting Connected
 
<< prev   page 01 02       

Connecting

You now have your computer configured to talk to the Internet. You can activate the connection and make your computer call your ISP from within linuxconf, but there's an easier way with Red Hat Linux. Go back to your shell window and type the command usernet & and you should see a window like the one in Figure 6.

Newbies 7 Chat Scrn
Figure 6: Usernet.

Click once on the "ppp0" button to make your computer call your ISP. The red box will turn yellow and you should hear your modem dialing out. If the connection is successful then the yellow box will turn green. This may take several seconds, so be patient. To hang up, press "ppp0" again and the box will turn red.

If you can't make the connection to your ISP then several things could be wrong. Is the phone line connecting your modem to the wall jack? Did you hear a dial tone? Did you hear your computer dial? Did you get a busy signal? Did you hear the ISP's computer, answer? Did you hear several seconds of tones while the two computers connected?

Assuming that your computer did dial out and reach the ISP's computer, then it's possible that the "Expect" and"Send" dialog we saw earlier has gone wrong. The most common problem here is that your ISP is not sending what your computer expects, and so we need to have a look at the dialog.

You must edit a file to do this. The text editors that come with Linux are very good, but will take a fair amount of explaining. For now I recommend the vi (or vim

) editor. See the Using vim sidebar for a quick tutorial on this. The file you need to edit is /etc/ sysconfig/network-scripts/ ifcfg-ppp0. In that file locate the line: DEBUG="no" and change the word no to yes. Save the file and exit the editor.

Using vim

The vi editor has been around for years. The version that comes with Red Hat Linux is actually named vim (for vi iMproved). You can use either command -- vi or vim -- they'll both get you to the same editor.

Vi is a modal editor. It has an insert mode and a control mode. Its normal mode is control, which means that when you type, you are not entering text into the file, but instead are sending commands to the editor. Most vi commands are a single letter. When you give the editor the i (insert) command then the mode changes and everything you type is inserted into the file. This is something that is often despised about vi. Some folks find all this switching between modes confusing. Vim has tried to clean things up a bit by displaying the word INSERT a the bottom of the screen if you're in insert mode.

No matter what mode you're in, the "Esc" key will put you in control mode. If you're ever uncertain of things, just hit "Esc." If vi beeps in response, it means that you were already in command mode. No harm done.

You start the editor with the command:

vi /etc/sysconfig/network-scripts/ifcfg-ppp0".

If you want to move the cursor around the screen in command mode, you can use the keys "h", "j", "k" and "l" to move one position left, down, up or right respectively. If you get yourself into trouble then press "Esc" to return to command mode, and then :q! to leave the editor without saving your changes.

Type /DEBUG and press "enter" to search for the word DEBUG. Next, search for "no" by typing /no . The cursor should now be over the word no in the DEBUG="no" line.

Type cw , which means change word. See that the word no disappears and you are now in insert mode. Type yes and press the "Esc" key to end the insert mode.

Typing ZZ (note the capital letters) saves your work and exits. That's all there is to it.



Normally your computer puts brief messages about what it's doing into the file /var/log/messages. This change to ifcfg-ppp0 tells your computer to put everything that happens while it's starting PPP into the message file.

Type the command tail-f /var/ log/messages. This will show you any messages that are added to the end of the message file.

Now click on the "ppp0" button in the "usernet" window. The window where you typed tail will show you your computer's conversation first with your modem and then with your ISP.

Newbies 1 Lincon Scrn
Figure 7: Debugging dialog.

At first this looks like a lot of incomprehensible nonsense, but if you take a moment to examine things, it should begin to make sense. tail is showing you the messages that your computer expects, what it actually receives, and what it sends in response.

You can see in Figure 7 that at 21:03:17 my modem said to CONNECT to my computer, meaning that it dialed to my ISP and my ISP answered. Also at 21:03:17 my computer expects to receive the word ogin:. The "l" is missing because Linux, unlike some other operating systems, is case-sensitive. I don't know if my ISP will send me Login: (with an upper case "L") or login: (lower case "l"), and it shouldn't matter. At 21:03:22 there is the message --got it. My computer sends MyUserName. At 21:03:22 you can see that my computer expects to receive password, and soon afterward it does. In responsemy computer sends MySecretPassword.

What you're looking for is a message from your ISP that your computer does not expect. Perhaps your computer receives Welcome.Please enter your user name: instead of login:. When you can see the actual messages from your ISP, you can return to the PPP configuration we saw in Figure 4 and correct the Expect/ Send sequence.

The tail -f command that you typed does not stop on its own. To end that program, put the mouse into that window and type "ctl-c" (press the "control" and "c" keys simultaneously). Don't forget to restore the "no" in the ifcfg-ppp0 file.

Netscape

If you've made it this far, then your computer can dial out to your ISP and the red "ppp0" box in "usernet" turns green. Now it's time to get your Web browser configured. The browser that comes with Red Hat is Netscape Navigator. You can start Navigator by going to a shell window and typing netscape &. You should also find it in one of the pop-up menus (try moving the mouse to a vacant area and click the left button, there will likely be a "Networking" menu option under which you will probably find "Netscape Navigator"). If you know how to configure Navigator for Windows, you should be okay here, but you'll notice that the Linux version does not have all the features of its Windows counterpart.

Once Navigator is running, select "Edit -> Preferences" and a new window will pop up. In that window, select "Mail & Groups" and then "Mail Server" [See Figure 8]. There are three fields to fill in: "Mail server user name" is the user name your ISP assigned to you; your ISP should have provided the "Outgoing mail server" and "Incoming mail server" names as well.

Also under "Mail & Groups" you can select "Identity." Fill in your name and your e-mail address so that your mail has the correct return address.

When you're finished with this configuration click on the "OK" button.

To send and receive e-mail select "Mailbox," which is probably under "Communicator" on your toolbar.

Newbies 8 Mailpref Scrn
Figure 8: Configuring Netscape mail.

You're now set up to surf the Internet with your Netscape browser, and also use it to send and receive e-mail. There are other mail programs available (Elm and Pine are two popular ones), however at this stage Netscape is the easiest to configure. Have fun on the Internet. I'll see you next month.


Hal Moroff has been developing Unix systems and applications for over 20 years. He's new enough to Linux that he's finding new things every day. He can be reached at .

<< prev   page 01 02       
 
Linux Magazine / August 1999 / NEWBIES
Getting Connected

home " subscribe " advertise " customer service " back issues " " contacts