Clustered printers.
I hope you have managed to stick with me through this rather long introduction.
The subject of remote printing is considerably more complex than it might seem at
first. Consequently I felt it was necessary to describe a number of terms and concepts
that might have been new to some people, so that we could all "start on the
same page".
File and Print Services
-
Overview
-
During the installation of both OS/2 Warp 3 Connect and OS/2 Warp 4 the user was
given the option of installing a feature called "File and Print Services",
often referred to as "Peer Networking".[¹]
Peer networking is installed by default with eCS 1.1, although it can be
disabled on the "Network Configuration" screen by de-selecting the "Share
files and printers" option. See the screenshot below.
(Click on image to expand
to full size.)
-
The File and Print Services software package gives the workstation and user the
ability to share files, printers, and serial ports with other workstations that
have operating systems with compatible software installed. There are a number of
techniques by which the user and/or the network administrator can place limitations
on which files can be copied, printed, or viewed.
-
Peer networking requires that one or both of the NIC driver protocols NETBIOS or
NETBIOS over TCP/IP are installed.
-
File and Print Services is also compatible with most versions of Windows so that
it is possible to have a mixed LAN consisting of both OS/2-eCS and Windows machines,
all able to share files and printers with each other. In fact I have been running
such a LAN in my home for about two years.
-
Command Line Setup and Use
There are two ways to set up a printer connection. One is to use the OS/2 NET command
in a Command Line Window. The other is use to the GUI interface consisting of the
"Sharing and Connecting" object [²]
and a few utilities.
Even if you only use the GUI Interface to share files and printers, it is a good
idea to have a working knowledge of the basic command line techniques. This is because
you can do a number of things that are difficult-to-impossible with the GUI object
interface. For example, you can build the NET commands into the STARTUP.CMD and
other batch or REXX programs, making them much more flexible than their GUI counterparts.
Finally the NET xxx interface is much older than the GUI and therefore tends to
be more reliable than the GUI interface. However, if all the fixpaks and convenience
packs are applied to Warp 4 and eCS, the GUI interface is quite stable: IBM has
done quite a bit of work "under the covers" in fixing a lot of the bugs
that used to exist.
Now here's a very brief tutorial on the basics of the command line system:[³]
-
Make sure Peer Services is running, and then go to a command line on the system
to which the printer is physically connected and enter the following command:
net share HPLASERJ=LPT1: /REMARK:"Monochrome Laser Printer"
-
"HPLASERJ" is the physical name of the printer as defined in the
printer object of the printer you want to share with other workstations. (The physical
name should be carefully distinguished from the printer's title and the name
of the driver. One helpful clue is to note that the physical name is limited
to 8 characters; the other two can be almost any length.) The printer will be accessed
by the other workstations using this name
-
LPT1: is the physical port to which the printer is connected.
-
/REMARK allows for an optional comment. If you have multiple printers on your lan
it's a good idea to put a brief description of the printer here. (Additional information
on the NET SHARE command is available in the "Command Reference" document
in the "Help Center"
folder of your system.)
-
The printer is now available for access by other workstations on the LAN.
-
If a remote user wants to use (i.e. access) this printer all he or she needs to
do is to enter the following command at an OS/2 command line:
net use LPT2: \\WALTER-DESKTOP\HPLASERJ
-
LPT2: is the port name (of the remote system) to which you want the system to attach
the printer. Note that this port doesn't have to physically exist.
-
WALTER-DESKTOP is the host name of the computer to which the printer is connected.
(Host name is set to a value chosen by the user when networking is installed. This
value is reflected both in the HOSTNAME parameter in the system's CONFIG.SYS file
and in the TCP/IP Configuration object. See the screen shot below.)
(Click on image to expand
to full size.)
-
HPLASERJ is the name of the printer object as defined in the NET SHARE statement.
(See previous section.)
-
GUI Interface Setup and Usage
-
Setup or Sharing
The primary vehicle by which access to the GUI interface is gained is the "Sharing
and Connecting" object, called the "Shared Resources and Network Connections"
object in Warp 4.x. (I am grateful to Serenity Systems Intl. for changing that hideous,
unwieldy IBM name to something a little more manageable.) However, in this article
I will frequently shorten it even further to "S & C Object".
-
To get started, double-click on the S&C object. If you have not logged onto
the system, you will be asked to do so before you can proceed. Once the logon has
been validated, you will need to double-click on the S & C object again. If
the "Description" field is blank, it's a good idea to enter a short phrase
that describes your machine.
-
Depending on whether you have a user or administrator userid, you will see either
three or eight tabs. In order to set up Shares, you will need to be logged on as
an administrator. Henceforth I will assume you have the required userid and password,
and are logged on as an administrator.
-
Now that you are logged in as an administrator and have edited the Description if
desired, click on the "Shares" tab, and you will see a screen that looks
something like this:
(Click on image to expand
to full size.)
-
When you first install Warp or eCS the window will be empty. If you wish to share
any of your drives or printers with other workstations, you must first make them
"shareable". This is exactly analogous to using the "net share"
command we looked at previously. It is also very similar to the techniques used
in Windows 9x and 2000. The Windows 9x "Network Neighborhood" object is
equivalent to the OS/2-eCS "Sharing and Connecting" object. For some reason
Windows 2000 changed the name of the object to "My Network Places". The
functionality has not changed, however.
-
To set up a device for sharing, click on the "Create Share" button. The
following window is displayed:
-
In most cases you would enter a drive letter and optionally a directory into the
top window, which would set up a share for a disk drive or directory.
-
However, since this article is about printing, we click on the "Printer"
button, and then click on the down-arrow to expand the drop-down list. Here is the
result:
-
The drop-down list shows the three printers attached to the system called Walter-Desktop.
(On this computer, only HPLaserJ is actually connected to a physical port. The others
are set up using special techniques. For example FaxPrint refers to the PMfax for OS/2 program installed on the system; this pseudo
driver allows the user to fax a document simply by printing it using this "printer"
or by dragging it to the FaxPrint object. HPColour is a networked printer which
we will discuss in detail later in the series.)
-
To make a printer shareable, click on the desired printer in the list, in this case
HPLaserJ, and click on the "OK" button. This screen will appear.
-
I have included some text in the Description field, however this is optional. The
Description field corresponds to the "/REMARKS:" parameter on the Net
Share command. I recommend you fill this in with some text that will distinguish
this printer from others on your LAN. On my system the "Start sharing at workstation
startup" is checked by default. If it is not checked, you might as well check
it because then it's one less thing you to have to worry about.
(Click on image to expand
to full size.)
-
If the OK button is greyed-out, then check the "Audit this resource" box.
Now click on OK. The purpose of this window is to set up permissions for the shared
device. By default the printer is set up so that all users are treated equally.
You can override this by checking the "Customized" radio button near the
top of the window.
-
Click on "OK" to finish setting up the share by defining the permissions.
-
You will be returned to the "Create a Share" screen; click on the "OK"
button to conclude the "Create a Share" session. Close the window to exit
the session.
-
Accessing or Connecting
To access or use the printer we just set up as shareable, we have to go to another
computer on the LAN and "connect" to it.
-
To do so we go once more to the Sharing and Connecting object. There is one difference,
however; to connect you can use any valid userid: an administrative userid is not
required.
-
Click on the "Connections" tab, and then on the "Create Connection"
button, and you will see the following screen:
(Click on image to expand
to full size.)
-
Click on the "Printer" radio button; next, click on the down-arrow in
the "Servers" field to display the list of available of workstations:
(Click on image to expand
to full size.)
-
Select the workstation which is directly connected to the printer on which you want
to print, then click on the desired printer in the drop-down list.
-
Now check the window beside "Local printer port", and make sure it is
correct. (Remember: this is the port on your machine, not the one on the computer
to which the printer is actually connected.) The default, LPT1, is acceptable in
most cases.
-
When you are satisfied everything is correct, click on the OK button. You should
be returned to the "Connections" screen of the S&C object, where you
will see a list of the connections currently defined on your system and their status:
(Click on image to expand
to full size.)
-
Check to be sure your printer connection is present and defined correctly. Once
you are satisfied with everything, click on the "Close" button in the
top right corner to exit the S&C session.
-
Usage (Printing)
-
Now that you have the printer share and connection defined correctly, all that remains
is to print something to it.
-
When you click on the "File" item on the main menu of most applications,
you will see either a "Print Setup", "Page Setup", or "Print"
item, perhaps more than one. If you click on one of these, you will find a drop-down
window labelled "Printer". (You may have to look around a bit.) Click
on the down arrow, and select the printer to which you just connected. Note that
the name specified within an application is often the title you used when creating
the printer or the description you gave the printer when you set up the share. So
you have to be a little flexible.
-
Now you should be able to start the application and print a document on the printer
you set up as shareable.
-
There is a simpler way to print which does not require an application. If you want
to print a pure text file, you can go to a Command Line on the remote computer and
simply type:
COPY file.txt LPTx:
where file.txt is the text file, and x the number of the parallel port assigned
to the remote printer.