Printer names aren't in print dialog box, AIX v3.2.5 & 4.1.x

 

DISCUSSION

The Island products use the output from the 'lpstat -v' command to get the printer names for the print dialog box.

With AIX, the lpstat -v output isn't in the expected format. To cure this, an lpstat that gives better output must be put in the $IOFFICE directory, and the PATH must be changed to find the $IOFFICE/lpstat before the system lpstat. All the necessary input is below.

SOLUTION/STEPS

Place ONE of the two following files in the $IOFFICE directory, and call it 'lpstat'. Both have worked on different AIX systems, and the difference may have to do with patches that have been loaded on the systems. The easiest approach is to try one first, and if it is truncating the printer names to seven characters, use the second file.

-------------------file 1; cut here ------------------------
#!/bin/sh
/usr/bin/lpstat -v | awk '{
        s += 1;
        if (s > 2) {
                printf($1);
                if (index($1,":") == 0) print(":");
                else print("");
        }
};'
-------------------file 1; cut here ------------------------
 

-------------------file 2; cut here ------------------------
#!/bin/sh
/bin/lsallq | awk '{
        printf($1)
        if (index($1,":")== 0) print(":")
        else print("")
        printf($1)
        if (index($1,":")==0) print(":")
        else print("")
}'
-------------------file 2; cut here ------------------------
 

In the $IOFFICE/bin directory, place the following two lines in each script that calls an Island product (for instance, the IslandWrite, IslandDraw, etc., files).

Note: these lines *must* go before the 'if [ $DISPLAY ] ; then' line, and the $IOFFICE variable must be set for this to work:

-------------------cut here ------------------------
PATH=$IOFFICE':'$PATH
export PATH
-------------------cut here ------------------------