( uzsolt | 2017. 12. 28., cs – 06:32 )

LPD nem jó CUPS helyett? Egy RPi nálam a nyomtatószerver egy régi Samsung ML-2010-hez (FreeBSD-vel). Az /etc/printcap fájl RPi-n:

lp|Samsung|Samsung ML-2010:\
	:sh:\
	:mx=0:\
	:lp=/dev/samsung-ml2010:\
	:sd=/var/spool/lpd:\
	:lf=/var/log/lpd-errs:\
	:sr=/var/log/lpd-statr:\
	:ss=/var/log/lpd-stats:

A gépeken, amikről nyomtatunk:


lp|Samsung|Samsung ML-2010:\
    :sh:\
    :mx=0:\
    :lp=:\
    :rm=192.168.2.102:\
    :rp=Samsung:\
    :sd=/var/spool/lpd:\
    :lf=/var/log/lpd-errs:\
    :if=/usr/local/libexec/own/lpd-filter:

Az /usr/local/libexec/own/lpd-filter tartalma:

#!/bin/sh

# Samsung ML-2010 filter for LPD

/usr/local/bin/gs -dSAFER -dNOPAUSE -q -sDEVICE=gdi -sOutputFile=- -

És nem kell semmilyen ppd-fájl. Annyi még, hogy az RPi-n van egy devd-fájl, ami létrehozza a /dev/samsung-ml2010 fájlt:

attach 20 {
	match	"vendor"	"0x04e8";
	match	"product"	"0x326c";
	action	"ln -sf /dev/$device-name /dev/samsung-ml2010";
};

detach 20 {
	match	"vendor"	"0x04e8";
	match	"product"	"0x326c";
	action	"rm -f /dev/samsung-ml2010";
};