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

Re: USB printer



On Sunday 02 October 2005 01:13, Mike Dobbs wrote:
> I have a C42UX printer.  It works great when it's plugged in and turned
> on when the system  boots.  However, if it is turned off cups just
> pauses the printer and says the printer cannot be found.

You can use a hotplug script to automatically enable/disable the printer.

Put something like the following two files in /etc/hotplug/usb
The values for the .usermap file can be found with "lsusb".

Paul

---------- printer.usermap -----------
# usb module match_flags idVendor idProduct bcdDevice_lo bcdDevice_hi 
bDeviceClass bDeviceSubClass bDeviceProtocol bInterfaceClass 
bInterfaceSubClass bInterfaceProtocol driver_info
ml1210 0x0003 0x04e8 0x300c 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 
0x00000000

---------- printer -----------
#!/bin/sh

case "$ACTION" in
    add)
        /usr/bin/enable C42UX
        if [ ! -z "$REMOVER" ]; then
          cat > "$REMOVER" << EOF
#!/bin/sh

/usr/bin/disable C42UX
EOF
          chmod +x "$REMOVER"
        fi
    ;;
esac

exit 0



Reply to: