I recently created a wireless print server with cups and samba on raspbian. I'm able to print from every device on my home network but I noticed a strange behaviour: when I print a postscript file directly from the raspberry pi lp works perfectly, while lpr prints a lot of sheets, the majority blank, some with random lines. Has someone experienced the same? Can someone give me or point me to a clear explanation about how gs, lp, lpr and cups interoperate?
CUPS is the printing system under Linux. In particular, it provides a server and clients. The
lpr are two common commands to print files:
lpr is the BSD one, and
lp the System V one. There exist various implementations (more or less compatible with the original commands), but nowadays they should be CUPS clients. You should check that with
dpkg -S: if raspbian is like Debian,
lp should be provided by
lpr should be provided by
cups-bsd (both binary packages are from the
cups source package). AFAIK,
gs is unrelated on the client side.
Your problem is quite strange since
lpr should behave in the same way (if they are both the CUPS clients). To solve your problem, I suggest that you look at
strace output to see if there are important differences. For instance, see what files under your home directory and under
/etc are read.