Solaris: Adding a Remote Printer

Before I forget and have to resort to the man page for each option, below were steps used to setup a network printer on Solaris 10. Check the man page should more information on a particular option be needed.

bash-3.00# lpadmin -p <printer-name> -v /dev/null
bash-3.00# lpadmin -p <printer-name> -m netstandard
bash-3.00# lpadmin -p <printer-name> -o dest=<printer-hostname or ip-address>:<printer-port> -o protocol=tcp -o timeout=3
bash-3.00# lpadmin -p <printer-name> -I postscript -T PS
bash-3.00# cd /etc/lp/fd
bash-3.00# ls
a2ps.fd dpost.fd postdmd.fd postmd.fd postprint.fd pr.fd
catv.fd foomatic.fd postio.fd postpages.fd postreverse.fd
download.fd postdaisy.fd postior.fd postplot.fd posttek.fd

Add all of the above filters, optional. The below sh script will accomplish just that.

bash-3.00# for filter in *.fd; do f_name=`basename $filter .fd`; lpfilter -f $f_name -F $filter; done

Tell the printer to start accepting connections, but it still needs to be enabled before anything useful happens.

bash-3.00# accept <printer-name>
UX:accept: Destination “<printer-name>” now accepting requests.

Enable the printer, to do anything useful.

bash-3.00# enable <printer-name>
bash: enable: <printer-name>: not a shell builtin

The above error occurred because the full path needs to be specified. “enable” is a built-in sh command. Specify the full path to enable. Use “which enable” if the path is not known.

bash-3.00# /usr/bin/enable <printer-name>
printer “<printer-name>” now enabled

Check the printer status:
bash-3.00# lpstat -p <printer-name>
printer <printer-name> now printing <printer-name>-5. enabled since Fri May 11 16:13:03 2007. available.
bash-3.00# lpstat -p <printer-name>
printer <printer-name> is idle. enabled since Fri May 11 16:13:03 2007. available.

Thanks all folks! Hope that helps.

This entry was posted in *Nix. Bookmark the permalink.

4 Responses to Solaris: Adding a Remote Printer

  1. Dave Grochowski says:

    Ugh, bash.

  2. swinful says:

    🙂 You know me better than that!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s