monnier
31-07-2004, 20:19
My HP's driver installer, as well as my Mac OS X system makes it pretty difficult to use port 9101 instead of 9100 (with the Mac I have to manually edit the config file after creating the printer to turn the 9100 into 9101, with the HP driver installer on XP I haven't figured out how to do it yet).
Would it be possible to do the following:
if [ -f /dev/usb/lp0 ]; then
p910nd -f /dev/usb/lp0 0
p910nd -f /dev/printers/0 1
else
P910nd -f /dev/printers/0 0
fi
it could even be generalized to more USB printers, something like
(beware: pseudo sh code ahead):
port=0
while [ -f "/dev/usb/lp$port" ]; do
p910nd -f "/dev/usb/lp$port" $port
port=(( $port + 1 ))
done
p910nd -f /dev/printer/0 $port
The point is to make sure that if you have only 1 printer connected
(i.e. the common case) the port to use is the normal 9100.
Would it be possible to do the following:
if [ -f /dev/usb/lp0 ]; then
p910nd -f /dev/usb/lp0 0
p910nd -f /dev/printers/0 1
else
P910nd -f /dev/printers/0 0
fi
it could even be generalized to more USB printers, something like
(beware: pseudo sh code ahead):
port=0
while [ -f "/dev/usb/lp$port" ]; do
p910nd -f "/dev/usb/lp$port" $port
port=(( $port + 1 ))
done
p910nd -f /dev/printer/0 $port
The point is to make sure that if you have only 1 printer connected
(i.e. the common case) the port to use is the normal 9100.