get-info -class technology | write-output > /dev/web

Configuring a Solaris 10 client to print to a network printer

For weeks now, I’ve been trying to configure my Solaris client to print to a network-attached HP LaserJet 2200dn printer and I finally got it working today. It’s probably really easy for an experienced systems administrator but there were a few gotchas that caught me out – hopefully my experiences will help someone else out.

In many ways the Solaris Print Manager makes setting up a printer easy, but there were some important settings I needed to use (I found some of this on an HP support document, but there was also a lot of trial and error involved as I don’t think the advice in HP’s document applies to Solaris 10 x86):

For an HP LaserJet 2200, the recommended printer driver was Foomatic/Postscript – I didn’t use this but selected Foomatic/hpijs instead.

The destination is more than just the IP address or hostname of the print server (i.e. the LPD service on the printer’s JetDirect card) – I needed to append :RAW (LPD queues can be configured through the printer’s own web administration console).

The protocol is BSD (not TCP as I expected).

One really handy feature is the ability to show the command line console, on which all the commands issued by the print manager will be displayed. Using this, I was able to determine that the commands to configure my printer (now saved as a shell script) were:

These will, of course, vary by model. Note that the first (very long) line will wrap on this web page – each of the first three commands should begin with lpadmin.

Don’t be put off by error messages after the enable and accept commands:

UX:enable: ERROR: Can’t establish contact with the LP print service. TO FIX: Either the LP print service has stopped, or all message channels are busy. If the problem continues, get help from your system administrator.
UX:accept: ERROR: Can’t establish contact with the LP print service. TO FIX: Either the LP print service has stopped, or all message channels are busy. If the problem continues, get help from your system administrator.

These fooled me for a while but I think the problem was just that the printer had not yet been established when I tried to enable it. By waiting a few seconds and re-issuing the last two commands, everything jumped into life.

I don’t know why there is a postscript reference in there – as far as I know this is a PCL printer, but it seems to work.

Finally, the commands to remove the printer (also now saved as a shell script) are:

7 thoughts on “Configuring a Solaris 10 client to print to a network printer”

We have to be able to use HP PCL in our C code for use with printing out data from our Oracle database. Our Solaris 7 computer used /opt/hpnp and /opt/hpnpl. Do you know a way to install these (JetAdmin) (JetDirect) in Solaris 10 and will they work? Or do we even need them?

DC, Anita,
Sorry guys – would love to help out but really don’t know the answer. Unfortunately I gave up on Solaris soon after I wrote this post (because I was struggling to get answers on too many things).

A request from Mark…

I devote a lot of time to this website and the advertising doesn't even cover my hosting charges, so please don't use ad blockers that reduce this website's income (even if the ads Google serve are sometimes of dubious quality!).

I spend a lot of time creating content for this site. Please support me by adding the site us to your whitelist in your ad blocker. Thank you!

markwilson.it Cookie Policy

By using this website you allow cookies to be placed on your computer. They are harmless and never personally identify you. For more information about cookies and how they are used, visit the Privacy policy and data protection notice .