Operating System - HP-UX
1759677 Members
3608 Online
108886 Solutions
New Discussion юеВ

Re: lp: can't open default destination file

 

lp: can't open default destination file

Hi. I have an HPUX 11.0 box that I configured two network printers for. When I do an lpstat everything looks okay, but neither printer is set as default. When I do 'lp ' I get:

lp: can't open default destination file

I think this is an easy fix, I just can't find out how....

Thanks!
3 REPLIES 3
A. Clay Stephenson
Acclaimed Contributor

Re: lp: can't open default destination file

Your are missing the file /var/spool/lp/default. The simplest answer is to run lpadmin -dmyprinter and create a default destination. It is also possible that the mode or ownership of this file is wrong eventhough the file exists.

It should be 644, owner lp, group lp.
If it ain't broke, I can fix that.
V. Nyga
Honored Contributor

Re: lp: can't open default destination file

Hi,

if you a prefer graphical user interface, you also can use 'sam' - under 'Printers and Plotters' you can find a list of the configured printers. Mark one and define it under 'Actions' as default printer.

HTH
Volkmar
*** Say 'Thanks' with Kudos ***
Bill Hassell
Honored Contributor

Re: lp: can't open default destination file

This is exactly what you want on a server, that is, no default destination. The reason is that unless you are the only user, no one will agree on what the default printer should be. However, there is a VERY useful variable: LPDEST which can be set to your favorite printer. Just set LPDEST to thye name you'd like to use and now lp won't need the -d command. It is ideal in that you can set this up in .profile so every user can have their own default printer:

export LPDEST=prn22


Bill Hassell, sysadmin