Write 5.0: No printer names in printer dialog box/lpstat not working


On Solaris 2.x, no printers show up in the printer dialog box.

In IslandWrite 5.0, printer names which don't appear in the printer list cannot be entered in the Print dialog box's printer field.  This makes IslandWrite unable to print to any printer in this situation.  This problem is logged as B#9801.  This issue is resolved in Write 6.0 by removing the printer validation check.


On Solaris 2.x and other platforms which support the SYSV lpstat command, IslandWrite uses the standard 'lpstat -v' command to determine the printers available on the system. If 'lpstat -v' doesn't return a printer list something like the above, IslandWrite will not be able to figure out the printers on your system, so the printer dialog box will come up empty.

Note: If lpstat is not working on your system, then lp (the standard SysV print command) probably isn't working.  If you are using lpr on Solaris, then make sure to set the IPRINTSYS environment variable to "bsd" before running the Island products.  In csh:

Doing so will cause a bsd print script to be called upon a print request, Print scripts exist for each product and are located in the $IOFFICE/bin. IslandWrite's PostScript print scripts are called: iw.{print,sysv,bsd}.ps If IPRINTSYS isn't set, iw.print.ps will be called.

So, setting IPRINTSYS to "bsd" causes IslandWrite to call iw.bsd.ps when a file is to be printed.  iw.bsd.ps uses /usr/ucb/lpr as its print command. If you are using lpr under HPUX or some other SYSV platform, this path will may not be available.  You may have to modify each *.bsd.ps print script to point at your lpr.


Following are some steps for creating an lpstat script to be used by Island products in place of the system lpstat.  This lpstat script should be used to generate the output that the Island products expect to get from lpstat in order to build the printer list.

1) Create a file for the script below called lpstat in the $IOFFICE/bin.
Note: The IOFFICE environment variable should be set to the directory containing the Island distribution.

# lpstat script for Island products
# Set IPRINTERS variable to a space separated list of priner names
# The defaults "printer1 printer2" may be hardcoded to your printer
# names, or set the IPRINTERS environment variable before running
# this script, or starting the Island product.
IPRINTERS=${IPRINTERS:-"printer1 printer2"}

for printer in $IPRINTERS
 echo "system for $printer: foo"

# end of script

2) Make the script executable.

3) Make sure to set the the IPRINTERS environment variable or hardcode valid defaults in the script.  Test the script.

4) Set your PATH environment variable to include $IOFFICE/bin before the system paths.  This will insure that our lpstat replacement will get picked up instead of the system lpstat.  In csh:

5) Optionally, set your IPRINTERS environment variable in your environment to contain a space separated list of printers available on your system.

6) Start IslandWrite.  If everything goes well, you should now notice the printers specified in the lpstat script in the printer dialog box.