Printing on Nevada b56
By mramcha on Jan 29, 2007
I got asked in a comment in my previous article to describe EXACTLY how I got printing working.
I've got an HP5150 USB printer. I plugged it into a convenient USB port on my Solaris server, and then used the printmgr gui to set it up. I selected Use PPD, and in the Printer-->New Attached Printer form, filled in the following:
Printer Name: unix Printer Port: /dev/printers/0 Printer Make: HP Printer Model: HP DeskJet 5150 Printer Driver: Foomatic/hpijs (recommended)
This allowed standard Unix printing to work. (In short, it pretends to be a standard postscript printer, and you can send pretty much anything to it)
Solaris - Solaris
I also turned on the ipp-listener service using svcadm. On a remote Solaris client (my laptop, also running Solaris Nevada b56), I used printmgr again, and did Printer-->Add Access to Printer. This uses the ipp service by default if available. lpstat -v shows:
# lpstat -v system for unix: zaphod (as ipp://zaphod/printers/unix)
The printer name is "unix" and my server is called "zaphod". With that, I could print from my laptop to my printer attached to my home server.
The Samba printing was a little more troublesome. In short, all the Windows machines, and any machine for that matter trying to print natively to my "unix" queue had difficulties because it was expecting either Postscript or plain text. I could have set all my printers up as generic Postscript printers, but decided I'd rather print natively. To do this I could have probably played with the filters so that it passed through everything, but that seemed too much like hard work. Instead a set up a different queue (to the same printer) which would act as a "raw" queue.
#!/bin/sh lpadmin -p hp5150 -v /dev/printers/0 -T unknown -I any accept hp5150 enable hp5150 lpadmin -p hp5150 -o nobanner
I think my smb.conf was already pretty much properly configured for printing, but I'll repeat the relevent bits just in case:
# If you want to automatically load your printer list rather # than setting them up individually then you'll need this load printers = yes # NOTE: If you have a BSD-style print system there is no need to # specifically define each individual printer [printers] comment = All Printers path = /var/spool/samba browseable = no # Set public = yes to allow user 'guest account' to print guest ok = no writable = no printable = yes
To set up the printer on the local side, I had to manually install the HP5150 drivers, and then add the printer using the Add Printer wizard in Windows. The key to getting this to work properly, is to set it up as a "Local Printer", then select a Local Port, and specify the Local port as (in my case) as: \\\\zaphod\\hp5150
I actually configured all of this when both my home server and my laptop were running Nevada B54, so it is possible that it is no longer necessary to set up 2 queues, but I've LiveUpgraded and the settings were retained, so I've had no need to change. A lot of things seem to have changed in the Solaris printing model in Solaris Nevada, but I've found it is now a lot easier than it ever was. (And it is the expectation that it is going to be really difficult that makes you do more than you need to). If you trust that it just works, and use the printmgr tool, I think it is difficult to go wrong.