These notes are by Grant B. Gustafson April 12, 1997 This file contains information on making a PPP connection under linux, especially for the ANNEX.math.utah.edu server. Examples are given for running KERMIT, NETSCAPE, REMOTE XMAPLE and other programs. This file was edited from Steve Worcester's email notes of early 1996. He successfully installed netscape, following advice given earlier by Professor Dragan Milicic. =========================LINUX SYSTEM ASSUMED=========================== ROOT. All of the following supposes a single user linux system with a dial-up connection to the Internet. Everything here is done as root, which could be dangerous with another method of connection. KERNEL. A Linux kernel 1.2.8 or later is needed to have PPP in the kernel. It should show up on screen during the boot process. The command "dmesg" will reprint the last boot messages, in case it scrolled off the screen. KERMIT AND PPPD. Kermit is used to make a connection to the dial-up host. The steps duplicate a normal login for a terminal session, up to the point of "rlogin" to the remote host; instead, the command "ppp" is given to the server. What happens at this time is completely different from a remote login. The details appear below. This ppp connection is used by local applications TELNET, FTP, LYNX, NETSCAPE, MOSAIC, ARENA, MAIL, simultaneously. Remote applications like XMAPLE that display X windows on your linux machine also use this PP connection. Kermit 192 or later (July 1996) can be used when PPP is running, but only as a telnet simulator. Programs that use the modem port cannot be used when PPP is enabled (examples: old kermit, minicom, dip). ======================CHECK FOR PPP SUPPORT============================== KERNEL SUPPORT. Issue the command "dmesg |more" and look for "ppp" on the screen. If it's not there, then reboot with a kernel that has it (look on your distribution CD), and repeat this test. Slackware IDE kernels by default don't have PPP; look for the "idenet" kernels and check the "config" file for PPP. ==========================CHECK FOR PPPD================================ CHECK FOR PPPD. Do the command "which pppd". You should get a printout like /usr/sbin/pppd This means the file "pppd" exists. If not, then look first in /usr/lib/ppp, it might be there already. Otherwise, hunt around your linux CD for the ppp package and install it. If you are running kernel 2.0.0, then expect problems. It is known that older pppd's don't work; you need a new one, compiled from new sources. A safe bet is to get SlackWare 3.1 or later, or RedHat 4.0 or later, which already use kernel 2.0. ================================INSTALL KERMIT========================== INSTALL KERMIT. A usual command to get the kermit files efficiently is lynx ftp://ftp.cc.columbia.edu/kermit/archives/ or for development binaries lynx ftp://ftp.cc.columbia.edu/kermit/test/bin/ The files at Columbia tend to be of type TEXT, which causes netscape and lynx to make transfer errors. If you have this trouble, then use FTP to get the file, in BINARY mode. The older linux binaries do not support telnet, only the ones after June 1996. This means that older kermits become useless when the daemon "pppd" is active. If you have MSDOS Windows 3.1 netscape, then use it instead of lynx. If that is not available, then use kermit to a local host, get the file with lynx or ftp and download it with kermit. Deposit the files as follows: /bin/kermit ~/.kermrc (from Columbia as ckermit.ini) ~/.mykermrc (created by you) The content of file ".mykermrc" is short. A main function of ".kermrc" from Columbia is to set up file transfer defaults and to input the text of ".mykermrc": set line /dev/modem set speed 38400 set send pack 400 set rec pack 2000 set rec timeout 4 set block 3 set window 5 set file type binary set retry 8 set file names literal set send pathnames off set rec pathnames off set control prefix all ; Prefix all control characters. set file collision rename ; Don't overwrite existing files set exit warning off ; don't ask questions in scripts define math take /root/.kermrc-math ; Login script to math dept The device file /dev/modem is a symbolic link in /dev to the modem port device file. Reset the link if in doubt, choosing of course the right port /dev/cua0, /dev/cua1, ... for com1:, com2:, ... (use MSD.EXE under DOS to figure out the ports). The syntax: ln -sf /dev/cua0 /dem/modem This is for com1: ln -sf /dev/cua1 /dem/modem This is for com2: ===========================ENABLE NETWORKING======================= Redhat linux has files in /etc/sysconfig that enable networking, causing a sequence of daemons to be loaded on boot. The system information is kept in a file called /etc/sysconfig/network, with contents that look like this: NETWORKING=yes HOSTNAME=myhost.redhat.com (the name of your machine) Slackware: There are files in the /etc directory with the same name as the uppercase words above, and they are supposed to have the contents appearing after the equal sign. If you want to send email, then the "inedtd", "rpc.portmap" and "sendmail" daemons should appear on the screen from the shell command "ps -aux". You can eliminate sendmail if using exclusively netscape mail; see below. All others, such as "smbd" and other "rcp.*" are not being used for this function. Their existence will not affect your ability to send email and read News. In fact, News uses no daemons at all (well, it may implicitly use "pppd" because of the required ppp connection). To test the sendmail networking setup, in a terminal window, use the "mail" program and send yourself a message at math.utah.edu. Using telnet, connect to solitude and read mail, to see if it worked. Please observe that this may fail but still netscape mail may work. By experiment it is found that running "inetd", "rpc.portmap" and "sendmail" is enough to use the POP mail server at annex.math.utah.edu. This setup requires some netscape settings, for example, in the OPTIONS menu, select SERVERS and set for the POP client as follows: pop.math.utah.edu username@math.utah.edu When netscape gets mail it will ask for your annex password. Sending mail requires no password, if you are using the "sendmail" daemon. If you never want to use unix mail, only netscape mail, then sendmail is not required. In this case, eliminate it in the startup files. In netscape, replace "localhost" by "pop.math.utah.edu" choose the pop client as outlined above. Then mail can be sent and received from PC to unix account. SlackWare linux. A minimal setup using unix mail requires "sendmail" to be running as a daemon; see the report "ps -aux". If you want to receive mail, using the POP client, then setup as above, with networking ON. Most Slackware 2 and 3 configurations have sendmail problems, which only affect the unix "mail" program. The solution is to grab the files /etc/alias*, /etc/sendmail*, /usr/sbin/sendmail files from a ReDhat 3.0.3 distribution (get the right ones from http://www.math.utah.edu/~gustafso/ - search for sendmail). ===========================EDIT /ETC/RESOLVE.CONF======================= EDIT /ETC/RESOLVE.CONF. In the file /etc/resolve.conf you need something like the following for your system to work. These IP addresses are valid only for math.utah.edu. # Not checked with Pieter Bowman; these may be in error # Your dial-up host's name. # Then some choices, in case one machine is busy. domain math.utah.edu # csc-sun nameserver 128.110.198.2 # sundown nameserver 128.110.198.153 # ns nameserver 128.110.124.120 ===========================INSTALL NETSCAPE============================= INSTALL NETSCAPE. First, get the distribution: netscape*linux.tar.gz about 2.3mb on disk Use: lynx ftp://ftp.netscape.com/ Connect to pub/navigator/3.0/unix/ Find the proper file. It may be elsewhere in the future. The netscape*tar.gz file contains; LICENSE README java_30 movemail-src/ Netscape.ad XKeysymDB movemail* netscape* Create a new directory as root, /usr/lib/netscape, and issue the commands cd /usr/lib/netscape tar -xzf netscape*linux.tar.gz ln -s /usr/lib/netscape/netscape /bin/netscape mkdir ~/.netscape ln -s /usr/lib/netscape/java_30 ~/.netscape/java_30 That's it! =======================STEPS IN STARTING NETSCAPE======================= START X-WINDOWS. Since netscape runs under X, you can't test it otherwise. Start a term window (xterm). START KERMIT. Typing 'kermit' will get you into Kermit. It is assumed that you have kermit set up to allow a remote login terminal session at 57600 baud. This baud rate is not the rate of your modem, but an internal setting for the software, so it runs faster than the modem. Other settings could be 38400, 19200, 9600. REMOTE LOGIN. Login as though for a terminal session, but instead of "rlogin" issue the command "ppp". Typical typing, in order: username password ppp [where you would do "rlogin"] EXIT KERMIT. Break back to the Linux kermit prompt, using the Kermit Escape sequence Ctrl-\ c, and at the C-Kermit> prompt type the following string: redirect pppd /dev/modem defaultroute 57600 Then exit kermit with the "exit" command. Note: If you connected with kermit at 38400, then replace 57600 by 38400 (rates must match). TESTING SUCCESS. To see if it worked, do "ps -aux" in a terminal window, and look for the absence of kermit and the presence of the new task "pppd". You are now ready to turn on netscape. A second test is to do "ifconfig ppp0", which prints the status of the PPP connection, including the internet address for your linux maxchine. This address is normally a dynamically assigned address, so it should change time to time. It is the address on the LEFT side of the screen. START NETSCAPE. In a terminal window issue the command netscape & The ampersand is used to run netscape as a separate task in its own window, freeing the terminal window for other things. Netscape will pop a window up. Resize the window for your monitor. Click in the middle of the window to get netscape to try its defaults. Hit the stop button. Type in "http://www.math.utah.edu/" and press return to connect to the UofU math dept. If you can't wait for images, select the "options" menu and toggle "auto load images" followed by "Save options". While at it, go through the options menu and change preferences. =====================WHAT TO DO IF IT DOESN'T WORK====================== Failure is generally due to a lost or improper connection. The pppd may be lost: run "ps -aux" to see if its still active. Check your modem to see if its alive or dead. It may be necessary to repeat the steps until a solid connection is obtained. If two "pppd" tasks appear in the table printed by "ps aux", then issue commands like "kill 1022" (1022 is the process ID number in column 2) until "pppd" no longer appears. Then repeat the steps until exactly one "pppd" appears in the table. Cycle the modem power after killing "pppd" to insure that the modem port gets reset (the "hangup" command in kermit does the same thing, for internal modems). If you think netscape is faulty, then try the "OTHER TESTS" below. If they work, then pppd is working properly but netscape is not properly configured. ===========================OTHER TESTS================================== TELNET. In an xterm window, with netscape running or just pppd active (use "ps -aux" to see if pppd is running and watch the lights on your modem), issue this command: telnet solitude.math.utah.edu A prompt for remote login should appear and login at this site should be successful. Run your favorite text editor and the mail program, to test the connection. This command also works in a linux console, you don't need X to run it. FTP. In an xterm window, with netscape or telnet running or just pppd active, issue this command: ftp solitude.math.utah.edu A prompt for remote login should appear and login at this site should be successful. Try to transfer a file, in each direction, as a test. cd ~ pwd get .cshrc foo.cshrc send foo.cshrc quit This command (ftp) also works in a linux console, you don't need X to run it. LYNX. In an xterm window or linux console, with pppd active, issue this command: lynx http://www.math.utah.edu/ When done, enter "q" to quit, or just hit ctrl-C. Downloading files with lynx is usually very fast with low system overhead. MAIL. Unix mail depends upon a properly installed "sendmail" program, which has been started as a daemon during boot of your linux machine. Do "ps -aux" and look for a line similar to the following: root 97 0.0 4.7 132 704 ? S < 07:01 0:00 sendmail: accepting If this appears, then there is a chance that MAIL will work. An example: mail root subject: test testing . This will deliver local mail to user "root". Read it using "mail", then "r" to read it, and "q" to quit the mail program. Repeat the test for remote mail, replacing "root" by your remote email address. To read that mail, use telnet (see above) to connect to that host. KERMIT. In an xterm window or linux console, with pppd active, issue this command: kermit telnet solitude You should be able to login normally. This command requires kermit 1.92 or later (1996 issue). The Aug 21 1996 release had a problem that prevented its us in scripts; look for a bug fix in a later release. REMOTE XTERM. To run a remote Xterm on solitude.math.utah.edu, do the following steps: a. Be in linux X-windows (Xfree86), in an Xterm window. Issue the local linux command "xhost +solitude.math.utah.edu" b. Issue "ifconfig" on your linux local host, and write down the IP number on the left in the PPP0 report section. Example: 128.110.198.133 In particular, one address is for ANNEX and the other is the dynamic IP assigned to your login job on ANNEX; use the dynamic one. c. Telnet to solitude.math.utah.edu and issue these commands: setenv DISPLAY 128.110.198.133:0 xterm & In about 7 seconds (28800 modem speed), the xterm window should appear on your local linux host. In three more seconds, the Xterm should be ready to accept commands. To get rid of this window, issue the command "exit" on solitude. XMAPLE. To run a remote Xmaple session on ceslab05.math.utah.edu, do the following steps: a. Be in linux X-windows (Xfree86), in an Xterm window. Issue the local linux command "xhost +ceslab05.math.utah.edu" b. Issue "ifconfig" on your linux local host, and write down the IP number of the left in the PPP report section. Example: 128.110.198.133 In particular, one address is for ANNEX and the other is the dynamic IP assigned to your login job on ANNEX; the dynamic one is the one we are after. c. Telnet to ceslab05.math.utah.edu and issue these commands: setenv DISPLAY 128.110.198.133:0 xmaple & In about 30 seconds (28800 modem speed), the xmaple window should appear on your local linux host. In 45 more seconds, Xmaple should be ready to accept commands, for example, plot(sin(x),x=0..Pi); is supposed to bring up a 2D plot window with the sine function. To get rid of the plot window, type Q in that window. To exit xmaple, issue the command "quit" in the xmaple window or use the FILE menu and the mouse. To print the local plot, use linux "xwpick". This program lets you define the area on the screen to capture. It is much faster than printing to a file on ceslab05, followed by FTP and local linux postscript printing (because no modem resources are used). For details see "man xwpick" and try command lines like "xwpick -format ps plot.ps" "xwpick -gray -reverse -pause -format ps | lpr" ============================ AUTOMATION ================================ It is posible to automate the setup of PPP, getting the PPP address for use in remote X applications like Xmaple, and killing the phone connection (useful on internal modems especially). See http://www.math.utah.edu/~gustafso/linuxnet.txt Of particular utility is pppaddress, which prints out the command line required at the remote host for running remote X applications on your local linux machine. The ppp command can be issued from menus inside X, eg, the fvwm menu that has the netscape launch. ========================================================================