# How do I create a 'dummy' printer?



## exeter (Dec 27, 2017)

I'm having trouble with a program I'm working on, which generates spurious printouts. I'd like to create a new entry in /etc/printcap to send the this unwanted output to. What's the best way to do that? Thanks.


----------



## shepper (Dec 27, 2017)

There are a couple of ways.

One would be

```
:if=/dev/null:\
```

Your wayward program would send the printout but it would die at /dev/null.

If you need to look at the output, you could set a second print queue.  Section 9 in the handbook describes setting up multiple queues.  Combine this with a smart filter -> postscript with print/a2ps or print/enscript-letter

Another option is to use lpc(8) to turn off the printer daemon.


----------



## exeter (Dec 28, 2017)

Thanks for that helpful post. I added this line to /etc/printcap

```
dummy:if=/dev/null
```
Now the line

```
$ lpr -Pdummy filename
```
prints NOTHING AT ALL - HURRAH!


----------

