[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#311774: lprng: Fails to print to localhost when named pipe is missing



>>>>> "CS" == Craig Small <csmall@enc.com.au> writes:

 CS> On Thu, Mar 16, 2006 at 12:38:16PM +0100, Anders Boström wrote:
 >> OK, this is from the chroot:
 >> 
 >> /etc/printcap:
 CS> The bounce will cause problems, as it will try to loop back through
 CS> localhost.

 CS> With a chroot, you want to print just like you are out of the chroot.
 CS> To do this, you need to tell lprng clients two things:
 CS> 1) Where the "real" print queue is
 CS> 2) Don't use the unix socket.

 CS> LPRng tries to be too clever. force_localhost would work, except
 CS> that it sees "localhost" as the remote printer and "helps" you by using
 CS> the Unix socket.

 CS> So, for the first part.  Outside the chroot, my printcap looks like:

 CS> lp|epson600|Epson Stylus Color 600:\
 CS>       lp=/dev/lp0: \
 CS>       :sd=/var/spool/lpd/%P: \
 CS>       :if=/usr/bin/foomatic-rip: \
 CS>       :filter_options= --lprng $Z /etc/lprng/Epson-Stylus_Color_600-gutenprint-ijs.5.0.ppd: \
 CS>       :log=/tmp/foo:\
 CS>       :mx#0:sh:

 CS> Then, inside the chroot, I have as my /etc/printcap
 CS> lp:\
 CS>         lp=lp@localhost

 CS> Last of all, within the chroot, tell it not to use the Unix socket,
 CS> this in /etc/lprng/lpd.conf

 CS> unix_socket_path=off

This did it! The only change I have to do is to add
unix_socket_path=off to /etc/lprng/lpd.conf .

 CS> That tells the lprng clients to not go "oh its localhost, I'll use the
 CS> socket". It uses the TCP port to connect to the outside lpd which then
 CS> runs it through the filters to /dev/lp0

 CS> I've tested this setup, it works within a chroot.

Fine, just document it, as unix_socket_path=off isn't documented in
lpd.conf(5). Also, please write a note about this in README.Debian, as
it isn't that easy to find the solution. You might also note that an
alternative work-around is to add a line similar to the following to
/etc/fstab:
/var/run        /mnt/linux32/var/run none bind                  0       0

Thanks!

/ Anders




Reply to: