Solaris 7 Resources at Kempston

A GUI Internet Dialer for Solaris 7 and Solaris 8

www.kempston.net/solaris/ www.kempston.org/solaris/

Dave Everly has written an excellent Internet Dialer script for Solaris that enables you to select an ISP and connect to the Net with just a few clicks of the mouse.

This script provides a graphical user interface as an alternative to using the /dialup and /hangup scripts directly and assumes that you have already configured your Solaris system to connect to the Net as described in Configuring PPP on Solaris to connect to an ISP.

Dave has kindly agreed to make the Dialer freely available and to allow it to be held on this Web site.

Dialer image

The Internet Dialer script uses the dtksh shell in /usr/dt/bin/dtksh and runs under the CDE windowing system.



Installing the Internet Dialer

1. Download the script

Download the Internet Dialer script (DtkshDialer-0.4.tar.Z) and save it in the /opt directory. The file is only about 35K in size and should download in a few seconds.


2. Installing the script

Installing the script is simply a matter of issuing the following commands:

	# cd /opt
	# uncompress DtkshDialer-0.4.tar.Z
	# tar xvf DtkshDialer-0.4.tar
	# rm DtkshDialer-0.4.tar

At this point, you'll have a directory named /opt/DtkshDialer-0.4 containing the five files: dialer.sh, ISSUES, LICENSE, stop.list and xutil.sh. The script is issued under the terms of the GNU General Public License as published by the Free Software Foundation; please see the LICENSE file for details. The ISSUES file contains details of an outstanding issue with the dialer. Read this file, especially if you're experienced at dtksh programming and can offer the author advice.

The dialer script expects, by default, that it's installed in a directory named /opt/dialer. This directory name is rather easier to type than "/opt/DtkshDialer-0.4" so it's a good idea to move the script files to /opt/dialer:

	# cd /opt
	# mv DtkshDialer-0.4 dialer


3. Configuring the script

Before using the script, you'll need to configure it with the name of its directory and information about the ISPs to which you connect. Edit the file /opt/dialer/dialer.sh and look for the line which reads:

	DIALER_PATH=/opt/dialer

If you've moved the dialer files to the /opt/dialer directory as suggested, leave this line as it is. If you've installed the dialer files anywhere else, change this line so that it identifies the name of the directory where the dialer files are located.

A few lines further on, look for the lines which read:

	function selectISP {
		ISP.SUFFIX="pcisys"	# the one you want as the
					# default when nothing was
					# selected (should match first
					# ISP_SUFFIX value below)

		XUaddbuttons $PULL \
			ISP.DISPLAYNAME "PCI Systems"  "ISP.SUFFIX=pcisys" \
			ISP.DISPLAYNAME "MCI WorldCom" "ISP.SUFFIX=wcom"
		return
	}

These lines in the script determine the ISP to which the script connects by default and produce a drop-down list enabling you to select alternative ISPs if these have been configured on your system. The ISP.SUFFIX value is simply the suffix you used to identify the ISP-specific configuration files when configuring your system to dial up an ISP as described in Configuring PPP on Solaris 7 to connect to an ISP. For example, if your ISP is named Zulu Internet, you've probably created configuration files for this ISP named resolv.conf.zulu, asppp.cf.zulu and so on. The ISP.SUFFIX in this case is zulu.

Edit the line which reads:

		ISP.SUFFIX="pcisys"	# the one you want as the

to replace pcisys with the suffix representing the ISP to which you usually connect. After editing, the line would read, for a default ISP of Zulu Internet:

		ISP.SUFFIX="zulu"	# the one you want as the

The lines:

			ISP.DISPLAYNAME "PCI Systems"  "ISP.SUFFIX=pcisys" \
			ISP.DISPLAYNAME "MCI WorldCom" "ISP.SUFFIX=wcom"

define the entries in a drop-down list which enable you to select other ISPs configured on your system. The supplied script has two entries in the drop-down list, one for PCI Systems and the other for MCI WorldCom with file suffices of pcisys and wcom respectively.

If you have configured your system to connect to just one ISP, replace these two lines with a single line that reads:

			ISP.DISPLAYNAME "Zulu Internet"  "ISP.SUFFIX=zulu"

replacing Zulu Internet with the name of your ISP and zulu with the suffix you used to identify the configuration files for this ISP.

If you've configured your system to connect to two or more ISPs, replace these two lines with one line for each ISP. Enter your usual ISP (the one you specified as the value of ISP_SUFFIX) first. Note that each line, except the last, needs the continuation character "\" at the end of the line. For example, I've configured the script on my system to connect to three ISPs by replacing the two sample lines with:

			ISP.DISPLAYNAME "Demon Internet" "ISP.SUFFIX=demon" \
			ISP.DISPLAYNAME "Netcom UK"      "ISP.SUFFIX=netcom" \
			ISP.DISPLAYNAME "BT Internet"    "ISP.SUFFIX=bti"

Save the changes to this file and that's almost all you have to do.


4. Check /etc/nsswitch.dns

The file /etc/nsswitch.dns is used by the dialer script but was omitted in early versions of Solaris 7. Check whether it exists on your system. If not, there are instructions for creating it in Connecting to any ISP with Solaris.

Alternatively, this file will be created by installing Sun's patch 107457-01 for Solaris 7 x86 or patch 107456-01 for Solaris 7 SPARC. These patches are available from Sun's SunSolve Web site and on the SunSolve CD if you have one.


5. Using the script

Note that the dialer script needs to run with root privileges but it's not advisable to connect to the Internet while logged in as root. In particular, running a Web browser as root can compromise your system's security. There's an excellent program called sudo (Super User Do) that solves this problem by enabling ordinary users to run particular programs and scripts as if they were root. Please see my Web page on installing sudo for details.

When sudo has been installed and configured to allow any user to run the dialer script, the script is started simply by typing:

	$ sudo /opt/dialer/dialer.sh &

If you haven't installed sudo, you'll need to start the dialer script from the root user by typing:

	# /opt/dialer/dialer.sh &

Check that no error messages appear in the window from which you started the script. In particular, note that the log file, /var/adm/log/asppp.log, must exist and the script will fail if it can't find the log file.

The Internet Dialer window will appear. Ensure that the required ISP is selected (if not, click the mouse on the ISP selection box and select the required entry from the drop-down list) and then click on the "Connect" button. Lines written to the asppp.log file will appear in the Dialer's window, enabling the progress of the connection to be monitored, and elapsed time is also displayed. To disconnect from your ISP, simply click on the "Disconnect" button and close down the Internet Dialer window by clicking on the "Exit" button.

The Dialer window contains a status line at the bottom that indicates when the dial-up connection has been established. This works by monitoring the asppp.log file and looking for the line containing "IP up". Note that the asppp.log file is written only when the value of "debug_level" in /etc/asppp.cf is set to a non-zero value so it's advisable to check your /etc/asppp.cf.isp file to ensure that debug_level is set to at least 1.

When you're happy that the script has been configured correctly and is working, output from the script can be suppressed by starting it with:

	$ sudo /opt/dialer/dialer.sh > /dev/null &

or:

	# /opt/dialer/dialer.sh > /dev/null &


6. Defining an icon on the desktop to run the dialer (optional)

You may like to define an icon on the desktop to start the dialer. This procedure is a little complicated but will work if you follow the instructions exactly.

Right-click on the desktop and select App Manager from the Programs menu. When the Application Manager window opens, double-click on Desktop_Apps and then double-click on Create Action.

In the box marked "Action Name (Icon Label)", type:

	Internet Dialer

and type the full path name of the dialer script in the box marked "Command When Action Is Opened (Double-clicked)":

If you've installed sudo, type:

	/usr/local/bin/sudo /opt/dialer/dialer.sh > /dev/null

If you haven't installed sudo, type:

	/opt/dialer/dialer.sh > /dev/null

Check that "Window Type" is set to "Graphical (X-Window)" and select Save from the File menu. A message box containing the text "The new action Internet Dialer has been placed in your home folder" should appear. Click OK and close down the "Create Action" window and then the Application Manager window.

Right-click on the desktop again and select File Manager from the Programs menu. You should see an Internet Dialer icon in the File Manager window. Use the left mouse button to drag this icon from File Manager and drop it on to the desktop. Finally, close down File Manager.

You should now have an Internet Dialer icon permanently on the desktop. Whenever you want to start the Dialer script, simply double-click on the Internet Dialer icon.



Has this guide been useful?

I hope these instructions prove useful. If you have any comments or suggestions for improvement, or have found any technical errors, please email me at mike@kempston.net

This page is copyright © deckrider@yahoo.com and mike@kempston.net 2000. Reproduction is forbidden without the author's permission. You are welcome to link to these pages if you wish but please point to the pages at www.kempston.net: Solaris Resources at Kempston


Home Free Solaris Connecting to an ISP
Configuring mail Configuring modem dialup Configuring a PPP server
Installing Software Solaris FAQs and Software Site Index

This page is maintained by the Kempston Webmaster
Last updated 18 March 2000