Web template
updated by
Christopher Spry
2 May 2014

Guide for setting up printing services on an Indy under IRIX v 6.5.*

This guide explains how I set up my Indy to print to a Hewlett Packard LaserJet III printer attached to its parallel port. I also show how I 'shared' this printer on the local network, so that other networked computers running Microsoft 'Windows' could use this printer.  Later, I also installed a Tektronix Phaser 740 Plus colour laser printer on the Indy, as described at the end of this Guide. It is simple to set up other printers in the same way, providing you have the printer drivers, which are usually supplied on CDs provided with the printer. 

 

The installation was in three parts:

  1. I installed printer software called 'CUPS' on the Indy The Indy was now able to print to this printer.

  2. I configured the Indy to 'share' the printer on the network, using 'Samba'

  3. I configuring the Windows computer to connect to the shared printer by 'redirecting' print output to the shared printer on the Indy. At this point, I was able to print files on the Windows computer using the Indy's printer.   

1. Installing the printer software on the Indy

Previously, I used the SGI software called 'Impressario'. This is not free and, in my hands, it had several problems. I used to have a guide on setting this up. As I cannot now get 'Impressario' to work properly, I have replaced the old guide with this new one, which explains how I successfully set up the free printer software called 'CUPS' and installed a 'HP LaserJet' printer. 

The 'Common UNIX Printing System' (CUPS) is available at the CUPS web site. It includes free printer drivers for HP DeskJet and LaserJet printers. If you need drivers for other printers, you can either use the ones provided with your printer (see below) or purchase them and enhanced printer software called  'ESP Print Pro' from 'Easy Software Products' . The 'ESP Print Pro' software supports over 1,600 other printers and includes a graphical interface to CUPS. 

I downloaded CUPS v 1 for IRIX 6.5.x (cups-1.0-irix-6.5-mips.tar.gz) 2.8-MB of 02/10/1999. I uncompressed and untarred it and ran the script './cups.install'. 

I noted that this installed the 'CUPS' software in '/var/cups' and it provided a web server on port 631, which can be used to configure the 'CUPS' software. The status and information on the printing device could be viewed at http://localhost:631. This included the documentation, which can be accessed at http://localhost:631/sdd.html. (Use this URL unchanged). The documentation could be read from other hosts, but not the printer status. The documentation can be viewed by opening the directory '/usr/share/cups/doc' in a web browser and clicking on the files there. These give details of the software and how to use it. It is not necessary to do so, to run the software, but it would be useful if there were any problems to resolve later. 

Next I set up the LaserJet III printer driver. I opened a shell and, as root, executed the following command, (without the apostrophes):

 '/usr/sbin/lpadmin -p LaserJet -E -v parallel:/dev/plp'

This installed the LaserJet III driver. I typed 'lpstat –t'. The response I saw was:

scheduler is running
system default destination: LaserJet
device for LaserJet: parallel:/dev/plp
LaserJet accepting requests
printer LaserJet is idle.

This showed that the printer was installed and available for use. 

The LaserJet printer installation script had created a configuration file called '/var/cups/ppd/LaserJet.ppd'. As I wanted to use A4 sized paper, instead of the default of 'Letter' sized paper, I edited the '/var/cups/ppd/LaserJet.ppd' file and altered *DefaultPageSize: from 'Letter' to 'A4'. I printed a test file from Netscape and this came out nicely on the LaserJet printer. This showed that the printer driver was installed correctly for local use on the Indy.

I then edited the printer configuration file '/var/cups/conf/mime.types' to prevent it from altering already formatted print sent from networked printers. I scrolled down to the lines below '# CUPS-specific types…' and added the line, (without the apostrophes):

'application/vnd.cups-raw application/vnd.cups-raw string(0,<1B>E)'

I noted that the startup file '/etc/rc2.d' had a line that linked 'S99cups' to /etc/software/init.d/cups'. This starts and stops the CUPS software. If you ever need to stop, start or examine the status of the CUPS software this can be done with the commands, without the apostrophes. The commands in the brackets are alternatives:

 '/etc/software/init.d/cups {reload | start | status | stop}'

2. Configuring the Indy to 'share' the printer on the network using Samba

The configuration files called '/etc/printcap' and '/usr/samba/lib/smb.conf' enable the 'LaserJet' printer to be visible on the network and for network files to be printed by commands listed in 'smb.conf'.

I edited '/etc/printcap' to contain the single line 'LaserJet:'. The colon is needed. The line can contain other printer names, if these are to be used on the computer. They are separated by colons, leaving one at the end of the line.

Beginning with Samba version 2.0.6, 'CUPS' support will be installed automatically, so that it will be only necessary to use the line: 'printing=cups' in 'usr/samba/lib/smb.conf' to configure SAMBA for CUPS. This setting will also handle sending the files through "raw". I had already installed Samba v 2.0.5a (the smb server) on the Indy see Indy_samba.html, so I edited '/usr/samba/lib/smb.conf', after making a backup of the file, in case I needed to use or refer to the original file later.

The lines referring to the printer were entered as follows: 

[global]

            load printers = yes
           
printcap name = /etc/printcap
           
printer name = LaserJet
            print command = /usr/bin/lp -d%p -oraw /var/spool/public/%s ; rm -f %s
            lpq  command = /usr/bsd/lpq -P%p %s
            lprm command = /usr/bsd/lprm -P%p %s

  [printers]

            comment = All Printers
           
path = /var/spool/public
            create mask = 0700
            guest ok = Yes
            print ok = Yes
            browseable = No

  [LaserJet]

            comment = HP LaserJet III
           
path = /var/spool/public
            read only = No
            create mask = 0700
            guest ok = Yes
            print ok = Yes
            oplocks = No
            share modes = No

I saved the file and restarted the Samba daemon with the command, (without the apostrophes):

'/usr/samba/bin/smbd -D -s /usr/samba/lib/smb.conf'

 The latest versions of Samba have a graphical interface to configuring the printer and other resources. It is called 'SWAT'. It is started by opening in a browser http://localhost:901. (Use this URL unchanged). I did this and entered my username and password. I noted that I had to click on the printer name then 'select' it, before I was able to view the settings that I had made above. However, it is not necessary to use SWAT to configure the printer, but it can be useful if you are not familiar with Samba configurations, or want to alter them later. 

3. Configuring the Windows computer to connect to the shared printer

I opened a DOS shell on the networked Windows computer and typed, (without the apostrophes):

'net view \\sprysgi'             ('sprysgi' is the name of my Indy)

The response showed that the shared resources at \\sprysgi\ included 'LaserJet'. Now I could redirect print from the Windows printer to the shared 'LaserJet' printer on the network using the command, (without the apostrophes)::

'net use lpt1: \\sprysgi\LaserJet'

I sent a test file from the Windows computer and it printer nicely on the LaserJet printer on the Indy. I hope that it now works for you too :)

An alternative method to use the networked printer, is to set up a new printer on the Windows computer and tell it to connect to the networked printer directly. In either case, you will have to have the Windows printer drivers available, so that they can be installed on the Windows computer. These are either provided with Windows, or can be found on the CDs that came with the printer. 

Additional information on how I set up a Tektronix Phaser 740 Plus colour laser printer

More recently, I have bought a new printer called the Tektronix 'Phaser 740 Plus'. I first found the 'Phaser 740 Plus' PPD postscript driver on the 'Phaser 740 and 740L Laser Printers' CD that came with the printer: It was called '\tekaddrv\TKP740P1.PPD'. The text in this file was in DOS format, so I opened it in a text editor (TextPad) and saved it in UNIX format. I put this file in '/var/cups/ppd/'. I renamed it to have lower case letters. I changed the file ownership to 'root.sys' and I altered the permissions on the file with the command 'chmod 644 tkp740p1.ppd'. I edited the file and altered '*DefaultPageSize: Letter' to be 'A4'. I then executed the next command to set it up another printer on the Indy's parallel port:

/usr/sbin/lpadmin -p Phaser740 -E -v parallel:/dev/plp -P /var/cups/ppd/tkp740p1.ppd

I entered a password. I typed 'lpstat -t' which responded:

scheduler is running
system default destination: LaserJet
device for LaserJet: parallel:/dev/plp
device for Phaser740: parallel:/dev/plp
LaserJet accepting requests
Phaser740 accepting requests
printer LaserJet is idle
printer Phaser740 is idle

The file '/etc/printcap' now contained both 'LaserJet:' and 'Phaser740:', so both printers were ready to use.

I edited '/usr/samba/lib/smb.conf' and added the Phaser740 to it: 

[Phaser740]

comment = Phaser 740 Plus
path = /var/spool/public
read only = No
create mask = 0700
guest ok = Yes
print ok = Yes
oplocks = No
share modes = No

I saved '/usr/samba/lib/smb.conf and restarted the Samba daemon with the command, (without the apostrophes):

'/usr/samba/bin/smbd -D -s /usr/samba/lib/smb.conf'

I then made the Phaser740 the default printer, rather than the LaserJet. I entered, without the quotes:

'lpadmin -d Phaser740'

This command altered '/var/cups/conf/printers.conf ' so that the line <DefaultPrinter LaserJet>' was changed to '<DefaultPrinter Phaser740>'. (If this change is made in the file by manual editing, it is then necessary to execute '/etc/software/init.d/cups reload'. The LPDEST and PRINTER environment variables can also be used to override the default. CUPS 1.1, which is in beta release, offers user-defined defaults, printers, and options).

Now 'lpstat -t' showed that the Phaser740 was the default printer. I printed test files from the Indy and from networked computers and they printed properly.

Reinstallation after IRIX software upgrades

I found that I had to reinstall the CUPS software after upgrading IRIX from 6.5.7 to v 6.5.8. I followed the details as described above. I was not able to find out what went wrong when the operating system was updated. I did not uninstall the CUPS software before reinstalling it. For this reason, it is a good idea to keep the '/var/cups/ppd/tkp740p1.ppd' file so that it can be used again to configure the printer.

Additional notes: The printer software is called '/usr/bin/lp'. 'Toolchest | System | Print Manager' provides a quick way to view what printers are available. They are listed in '/etc/printcap' and '/var/spool/lp/interfaces'. The printer configuration files are files and directories in the directory '/var/spool/lp'. The default printer is named in '/var/spool/lp/default'. It is not necessary to edit these files. 'lpstat' and 'lpadmin' are used to view and alter the 'status' of the printers. Run 'man lp/lpstat/lpadmin' after installing the CUPS software, to read their uses.


Acknowledgement: I am grateful to Michael Sweet mailto:mike@easysw.com at 'Easy Software Products' http://www.easysw.com for assistance in setting up the 'CUPS' software and printer setup commands.

If you have any corrections or additions to make to this little guide, please mail them to me, Christopher Spry at cspry@cspry.co.uk.

Return to the 'home page'

Return to the `Computing index page'

Return to the 'Indy administration index'