Canon_LBP_2900_HowTo
10444
Comment:
|
10615
add for ubuntu edgy
|
Deletions are marked like this. | Additions are marked like this. |
Line 124: | Line 124: |
Ubunto Edgy is searching the driver in /usr/share/ppd/ so I created a link: {{{ $ cd /usr/share/ppd/ $ sudo ln -s /usr/share/cups/model/CNCUPSLBP2900CAPTK.ppd }}} |
This works in Ubuntu and Kubuntu 6.06 (Dapper). Based on the driver files provided I assume that this will work for Canon LBP 1120, 1210, 3000, 3200, 3210, 3300, 3600, 5000 printers as well as the Canon LBP 2900.
It also works in Ubuntu 6.10 (Edgy) amd64! See adm64 steps for details...
This was primarily taken from http://doc.ubuntu-fr.org/materiel/imprimante_canon_lbp_2900 and embelished from my own experiences and the sources listed below. Thanks to Kaleo for the heads up and the help.
This article is derived from:
http://v0xel.wordpress.com/2006/05/23/canoon-lbp-1120-on-ubuntu-510-how-to/
- And the hand book from Canon that comes with the drivers: guide-capt-1.3xE
Step 1:
Go to the following web page and download the Driver.tar.gz:
http://software.canon-europe.com/products/0010177.asp
Step 2:
Extract Driver.tar.gz either by right-clicking on the file and selecting "Extract Here", or in the Terminal in the directory you downloaded it into and entering the following command:
$ tar -xvf Driver.tar.gz
This should create a new directory called Driver which contains two files: cndrvcups-capt-1.30-1.i386.rpm and cndrvcups-common-1.30-1.i386.rpm.
These rpms need to be converted into debs so that we can install them, and to do that we need to install alien. You can do that with Synaptic (System > Administration > Synaptic) or in the Terminal:
$ sudo aptitude install alien
Then, you convert the files using alien in the Terminal:
$ sudo alien -c cndrvcups-capt-1.30-1.i386.rpm $ sudo alien -c cndrvcups-common-1.30-1.i386.rpm
Install the debs you have just created by double clicking on the files or using the Terminal:
{{{$ sudo dpkg -i cndrvcups-common_1.30-2_i386.deb cndrvcups-capt_1.30-2_i386.deb }}}
Step 3:
In order to load the new drivers we have installed we need to stop and restart CUPS. Firstly we stop CUPS:
$ sudo /etc/init.d/cupsys stop
Check that it is stopped. All the times I have done this, CUPS had stopped first time but apparently this may not always be the case due to the installation of ccp:
$ sudo ps ax | grep cupsd
Which will give you something like this:
cupsys 24897 0.0 0.1 4336 1976 ? SNs 07:35 0:04 /usr/sbin/cupsd username 24738 0.0 0.0 2896 836 pts/0 S+ 21:21 0:00 grep cupsd
If you only get a line that ends with "grep cupsd" CUPS has stopped and you can carry on. If you also get a line that ends with "/usr/sbin/cupsd", as shown above, CUPS has not stopped and you will have to try the following method to stop it:
$ sudo killall cupsd
Once it is has stopped you can start it again:
$ sudo /etc/init.d/cupsys start
The aliened debs are not perfect so we have to do some of their the work for them. Create two directories:
$ sudo mkdir /var/ccpd $ sudo mkdir /var/captmon
And a fifo:
$ sudo mkfifo /var/ccpd/fifo0
Make fifo0 accessable to everyone:
$ sudo chmod 777 /var/ccpd/fifo0
Step 4:
Register the printer driver with the print spooler with the following command, replacing [printer model] with your printer model and [printer driver file] with your driver file:
$ sudo /usr/sbin/lpadmin -p [printer model] -m [printer driver file] -v ccp:/var/ccpd/fifo0 -E
For example, the command for the Canon LBP 2900 would be:
$ sudo /usr/sbin/lpadmin -p LBP2900 -m CNCUPSLBP2900CAPTK.ppd -v ccp:/var/ccpd/fifo0 -E
If you are unsure of what your driver file is called you can get a list of the available drivers:
$ ls /usr/share/cups/model/ | grep CNCUPS
Look for the one that matches your model number. Some of them end with "K.ppd" and some end with "J.ppd". I have no idea what difference is, the K ones have worked fine for me so far.
Ubunto Edgy is searching the driver in /usr/share/ppd/ so I created a link:
$ cd /usr/share/ppd/ $ sudo ln -s /usr/share/cups/model/CNCUPSLBP2900CAPTK.ppd
Once registered your printer should appear in the System > Administration > Printing dialog.
Register the printer with ccpd daemon, once again replace [printer model] with your printer model:
$ sudo /usr/sbin/ccpdadmin -p [printer model] -o /dev/usblp0
For example, the command for the Canon LBP 2900 would be:
$ sudo /usr/sbin/ccpdadmin -p LBP2900 -o /dev/usblp0
Step 5:
Replace /etc/init.d/ccpd with the script below (taken from http://rdoursenaud.free.fr/debian/capt.html):
# # ccpd startup script for Canon Printer Daemon for CUPS # # Modified for Debian GNU/Linux # by Raphael Doursenaud <rdoursenaud@free.fr>. 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
Copy and paste the above script into a new text file, then backup and replace the old version:
$ sudo mv /etc/init.d/ccpd ccpdold $ sudo cp [text file you created] /etc/init.d/ccpd
Give everyone execution rights to the new file:
$ sudo chmod a+x /etc/init.d/ccpd
Step 6:
Start the ccpd daemon:
$ sudo /etc/init.d/ccpd start
Step 7:
Set ccpd to start when you startup your computer:
$ sudo update-rc.d ccpd defaults 20
Step 8:
Switch off the printer and reboot your computer. Once you have logged in, switch on the printer again.
Step 9:
Test your installation.
First test:
$ sudo ccpdadmin
Which should output this:
Usage: ccpdadmin [-p Printer-name -o Printer-dev-path] ccpdadmin [-x Remove-Printer-name] CUPS_ConfigPath = /etc/cups/ LOG Path = None UI Port = 39787 Entry Num : Spooler : Backend : FIFO path : Device Path : Status ---------------------------------------------------------------------------- [0] : LBP2900 : ccp : /var/ccpd/fifo0 : /dev/usblp0 :
Second test, replace [printer model] with your printer model
$ captstatusui -P [printer model]
For example, the command for the Canon LBP 2900 would be:
$ captstatusui -P LBP2900
This will launch a window that after a bit should say "ready to print".
Finally open a file and try to print it.
amd64 Steps:
First thank you for this wonderful info! Following it I managed to install LBP-1210 on Ubuntu 6.10 Edgy amd64! I taught it would be impossible, but it WORKS!
Before you start this procedure:
I had to install following ia32 libraries in my amd64 distribution, I did this using Synaptic, installed; i32-libs, i32-libs-gtk, i32-kde (don't know if this one is really needed), i32-libs-openoffice.org. I also installed some other 32-bit packages, just in case, and for the need of some other 32-bit software such as Skype; lib32asaund2, lib32gcc1, lib32stdc++6 and lib32z1
Also, during regular installation steps, Canon's driver required libcups.so.2 32-bit library which I had to provide manually because it was not included in any of standard amd64 ia32* or lib32* packages. I copied this libcups.so.2 from 32-bit Ubuntu Dapper Distribution to /usr/lib32. You can also copy this library from dchroot 32-bit distribution if you have one.
Also you can download and extract manually this file from standard 32-bit package, it is libcupsys2 package. It can be found [http://packages.ubuntu.com/edgy/libs/libcupsys2 here].
You can see how to setup dchroot environment [http://ubuntuforums.org/showthread.php?t=24575&highlight=chroot+32bit here].
After you start install procedure:
In Step 2, when you should convert these 32-bit Cannon drivers packages using alien, it will probably not work using 64-bit alien. I had to use 32-bit Dapper dchroot distribution I had set up previously. From dchroot, alien converting worked fine, using same commands. It would be fine if someone could host converted debian packages, it could save some people a lot o trouble.
Again, in Step 2 one should use --force-all install option when trying to install these 32-bit driver packages on 64-bit machine. Do this at your own risk. It worked for me without any errors.
There might be and error in Step 4, when you should register the printer driver with the print spooler (replace [printer model] with your printer model and [printer driver file] with your driver file).
$ sudo /usr/sbin/lpadmin -p [printer model] -m [printer driver file] -v ccp:/var/ccpd/fifo0 -E
If you get some error try following command, and then try to register your printer again:
$ cp /usr/share/cups/model/[printer driver file] to /etc/cups/ppd $ sudo /usr/sbin/lpadmin -p [printer model] -m [printer driver file] -v ccp:/var/ccpd/fifo0 -E
Testing your printer
In Step 9, following test might not work (replace [printer model] with your printer model):
$ captstatusui -P [printer model]
This should launch a window that should say "ready to print" or something, but in my system it required more 32-libraries such as libgtk-1.2.so.0... I didn't won to bather installing these because printer worked flawlessly. Try right-clicking you printer in System > Administration > Printing dialog, and opening Properties. Print test page should work without problems.
- Note: I tested this only on my Canon LBP-1210 printer connected to USB. My computer doesn't have Parallel port so I could not test it. Other printers mentioned at top of this page should work as well.
Canon_LBP_2900_HowTo (last edited 2008-08-06 17:01:05 by localhost)