Making use of the default printer 

Newsgroups: gmane.linux.debian.user
Date: Sun, 16 Sep 2007

What's the "Default Printer" actually means?

I've setup one of my printers to be "Default Printer", http://localhost:631/printers/

and I unset the LPDEST environment variable, in hoping the consequent lpr will be using the "Default Printer", but this is what I get:

lpr: Error - LPDEST environment variable names non-existent destination ""!

So, how can I make use of the default printer without specifying any environment variables?

*Edit:*

I thought I've unset the LPDEST environment variable, but I found I just set it empty. unset all printer related environment variables solved the problem.

Making use of the default printer 

> how can I make use of the default printer without specifying any
> environment variables?

just use "lpoptions -d foo" to set this the default for your user (if you want a special printer to be a default for a certain user)

otherwise set the default printer from the CUPS page and simply use lp as the wrapper from the command line….

Martin Marcher @marcher.name

Making use of the default printer 

> hmm, same error:
>
>  $ lp test.ps
>  lp: Error - LPDEST environment variable names non-existent destination ""!
>
> Anything wrong with my system?

there could be something that set's the LP environment variable

# echo $LP
#env |grep LP
#set |grep LP

and see which LP is set to something possibly weird/wornd

as an intermediate solution if the variable is set

# unset LP

of course for a permanent solution you should try to find the program/daemon that is setting LP (if you don't want it which i suspect)

does

# lp -d yourPrinter testfile.pdf    # yes lp handles pdf files "just right" also ps

work as you'd expect it (with LP set and LP unset) if so then you really just need to get rid of the automatically created environment variable LP…

Martin Marcher @marcher.name