Thursday, February 21, 2008

Using Canon LBP-810 (LBP-1120) in Ubuntu

Printing wint LBP-810/1120 in Linux is not very easy but you can do it.

1. Go to http://software.canon-europe.com/ and download driver for LBP-1120. After unpacking you will see two files: cndrvcups-capt-1.30-1.i386.rpm та cndrvcups-common-1.30-1.i386.rpm.
2. For converting rpm packages to deb you will need alien utility:
sudo apt-get install alien

3. Convert they to deb:
sudo alien *.rpm

4. Now you can install they by double click.
5. Restart CUPS:

sudo /etc/init.d/cupsys stop
sudo /etc/init.d/cupsys start


6. Create necessary directories for ccpd and captmon:

sudo mkdir /var/ccpd
sudo mkdir /var/captmon
sudo mkfifo /var/ccpd/fifo0
sudo chmod 777 /var/ccpd/fifo0


7. Select System -> Administration -> Printing and add the new printer, then select /usr/share/cups/model/CNCUPSLBP1120CAPTJ.ppd and write a model name LBP-1120 CAPT ver.1.3



8. Configure ccpd for work with printer:
sudo /usr/sbin/ccpdadmin -p LBP1120-CAPT-ver.1.3 -o /dev/usb/lp0

As result will be something like that:

CUPS_ConfigPath = /etc/cups/
LOG Path = None
UI Port = 39787

Entry Num : Spooler : Backend : FIFO path : Device Path : Status
----------------------------------------------------------------------------
[0] : LBP1120-CAPT-ver.1.3 : usb : //Canon/LBP-810 : /dev/usb/lp0 : New!!


9. Then you must edit /etc/init.d/ccpd script for Ubuntu/Debian compatibility.
sudo gedit /etc/init.d/ccpd
Replace that file by this text:

#!/bin/sh
#
# ccpdstartup script for Canon Printer Daemon for CUPS
#
#Modified for Debian GNU/Linux
#by Raphael Doursenaud .

DAEMON=/usr/sbin/ccpd
LOCKFILE=/var/lock/subsys/ccpd
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
NAME=ccpd
DESC="Canon Printer Daemon for CUPS"

test -f $DAEMON || exit 0

case $1 in
start)
echo -n "Starting $DESC: $NAME"
start-stop-daemon --start --quiet --exec $DAEMON
echo "."
;;
stop)
echo -n "Stopping $DESC: $NAME"
start-stop-daemon --stop --quiet --oknodo --exec $DAEMON
echo "."
;;
status)
echo "$DESC: $NAME:" `pidof $NAME`
;;
restart)
echo -n "Restarting $DESC: $NAME"
start-stop-daemon --stop --quiet --oknodo --exec $DAEMON
sleep 1
start-stop-daemon --start --quiet --exec $DAEMON
echo "."
;;
*)
echo "Usage: ccpd {start|stop|status}"
exit 1
;;
esac

exit 0


Test new script:
sudo /etc/init.d/ccpd start

Use this command for launch CAPT monitor
sudo captstatusui -P LBP1120-CAPT-ver.1.3
where LBP1120-CAPT-ver.1.3 is the printer name (you may use other name).



ccpd deamon must start averytime when Ubuntu start. Fot configuring this you csn use Boot-Up Manager (BUM).
sudo apt-get install bum

Then go to System -> Administration -> Boot-Up Manager, launch it and select Canon CAPT Printer Driver for Linux v1.30.



Then you must configure AppArmor (for Gutsy):
sudo aa-complain cupsd

That's all. Now you can use your LBP-810/1120 in Ubuntu.

7 comments:

Anonymous said...

Hi,
I'd like to comment for Ubuntu 8.04:
1) canon now provides a debian package, so you won't need alien anymore
2) The cups configuration can be done in the printer setup dialog, but the URI is wrong in the shown picture, it should be ccp:/var/ccpd/fifo0, that is why it was created before.
3) with ccpdadmin you have to connect the printer to its physical device, correctly stated as /dev/usb/lp0
4) the init.d/ccpd script is fine, you won't need to change it
5) if the printer is turned off (or was stunned by sending postscript data directly to it) the ccpd daemon will stop, turn on the printer and start the daemon again (test with ps ax | grep ccpd).

Helmut

bum said...

Thanks for the comment! You're right.

Marco Massenzio said...

does anyone know how to create packages for Ubuntu 8.04 64-bit (amd64 arch) ?
the packages from Canon are i386 and won't get installed.

I tried to make them from source, but have run into trouble, so if anyone's got the binaries, that would be much appreciated.

Thanks

feathervane said...

thank you very much for the guided tutorial. I'm using 8.10 and somehow managed to combine yours and Helmut's instructions.

You do have useful info here. Keep up the good work.

Marco Massenzio said...

So I've been trying this all day, following this tutorial and combining with other info from the Linux Cookbook, but still no joy: all it happens when I try a Print Test Page is the printer spits out a blank page...

This is what CUPS shows for the printer:

Description: Canon LBP-810
Location: Local Printer
Printer Driver: Canon LBP1120 CAPT ver.1.5
Printer State: processing, accepting jobs, published.
Device URI: usb://Canon/LBP-810

The really annoying thing is that the USB connection is recognised by CUPS (so if I delete the printer, switch it off/on again and then use "Find Printer" in the Admin page, it correctly sees it, and configures the way it is shown above).

I have tried with the alternative URI given by Helmut: ccp:/var/ccpd/fifo0 but that does not even spit the blank page at all.

This is a Ubuntu Server distro, i386, headless (I just SSH into it).

Luneworm said...

thank you all very much, your guide helped me configure Canon LBP810 in Ubuntu 8.04. Helmut's comment is 100% true.

Luneworm said...

Also, please note that the driver versions have changed. Newer ones are available from this page:
http://software.canon-europe.com/software/0031118.asp?model=