SUMMARY: Printer alias on Solaris

From: Alan Chan (
Date: Fri Sep 08 1995 - 07:48:03 CDT

----------------------Original Question------------------------

Hi Sun-managers,

        How do you set up a printer alias on Solaris? On SunOS 4.1, you`
do this in /etc/printcap in the form of:

printer_name | alias1 | alias2 .....

        I read through the whole section on printing and all manpages on lp,
no where did I find the alias option being mentioned. They did mention an
option for "printwheel alias" and "character set alias", but no printer
aliases. I work around this before by adding a new printer for each alias,
but there got to be a more elegant way of doing this.

----------------------Responders------------------------------- (Nils Kalvatn Larsen) (Tuan Sinh Ho) (Anthony Worrall) (Michael Baumann) (Vicky Lau) (Gary L. Berger) (Glenn Satchell)


        Thanks for all those that responded. The common consensus seemed
to be you cannot do it in Solaris System V unix. Two of the replies said
Sun told them you cannot do it. We are once again going to prove that
Vendors are not always right.

Solution 1:
        Add a printer for every aliases using admintool or lpadmin. This
is basically the work around that I have been doing.

Solution 2:
        Use admintool or lpadmin -s print_server_name\!printer_name
command. This command only map the local printer name to a remote
printer that has a different name. Not quite the same as giving
several aliases to a local printer.

Solution 3:
        Use lpadmin -p printer -c class:
        This command put a number of existing printers into the same class.
Again, one would have to create one printer for each aliases.

Solution 4:
        Thanks (Nils Kalvatn Larsen), who came up with
a truely elegant solution. I tried it and it works great:

If you want to make an alias for, say, my_printer to my_printer_alias, do this:

<login as root>
# /usr/lib/lpshut
# ln -s /etc/lp/printers/my_printer /etc/lp/printers/my_printer_alias
# /usr/lib/lp/lpsched
# /usr/ucb/lpc enable my_printer_alias
# /usr/ucb/lpc accept my_printer_alias

PS: /etc/lp/printers is the catalog for printer definitions.

        Now you can add as many printer aliases as you want to you heart's
desire. Thanks again Nils, you have saved me many sleepless nights.

Alan Chan | Phone: 604-279-2900
Canadian Airline International | Fax: 604-279-2905
System Administrator (Contractor) | Email:
Alan Chan Consulting Services |

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:10:33 CDT