lpq, lpr

Erik Christiansen erik at dd.nec.com.au
Tue Jun 20 02:28:20 UTC 2006


On Mon, Jun 19, 2006 at 11:03:35AM -0400, boricua at despiertapr.com wrote:
> when i try to view lpq from command line i get this 
> prlibre at mobile:~$ lpq
> lpq: error - no default destination available
> 
> for some reason i have to specify -P option.
> prlibre at mobile:~$ lpq -P hp640c
> hp640c is ready
> no entries
> 
> from the server i dont have this issue but i also tried from another linux
> machine with the same problem,
> 
> from the gui and openoffice i can see the printer but i would like to solve this
> for the command line since i use it a lot ...
> any idea how to avoid having to specify -P option???

Beyond somewhat bypassing the dysfunctional ubuntu CUPS setup, I've only
made an /etc/printcap entry for lp, with alias, which for your case
would start:

lp|hp640c:\
   :four lines of site-specific stuff

For me, that is enough for this response:
$ lpq
no entries

As a last resort, if you have only one printer, you could (for the moment) hack
in ~/.bashrc:

alias lpq='lpq -Php640c'

Hopefully either of these approaches can be applied to your case.

Erik




More information about the ubuntu-users mailing list