Language

English
Ubuntu 9.04 amd64 and Canon LBP2900 Print E-mail
Written by myOltrans    Sunday, 31 May 2009 18:31    Last Updated on Sunday, 22 January 2012 07:59

For full instructions, please, see

 

0. Compile the driver and produce amd64 debs.

0.1 Get CAPT source code from Laser Shot LBP2900

0.2.Untar it

tar xfz CAPTDRV180.tar.gz
cd  CAPTDRV180/src/
tar xfz cndrvcups-common-1.70-1.tar.gz
tar xfz cndrvcups-capt-1.70-1.tar.gz

0.3. Install required libraries and (development packages) listed in the readme files in cndrvcups-common-1.70 and cndrvcups-capt-1.70

NOTE: libbuftool will be provided by cndrvcups-common

Install packages build-essential and gettext:

sudo apt-get install build-essential & gettext

0.4. Build cndrvcups-common-1.70

cd cndrvcups-common-1.70

Change “Architecture: i386” in debian/control to “Architecture: amd64”

In cndrvcups-common-1.70 run

dpkg-buildpackage 

The debian package will be placed in CAPTDRV180/src

0.5. Build cndrvcups-capt-1.70

cd cndrvcups-capt-1.70

Change “Architecture: i386” in debian/control to “Architecture: amd64”

Change “    dh_shlibdeps” in debian/rules to “#    dh_shlibdeps”

In cndrvcups-capt-1.70 run

dpkg-buildpackage 

The debian package will be placed in CAPTDRV180/src

1. Install the appropriate deb packages in this order, cndrvcups-common_1.70-1_amd64 package first, then cndrvcups-capt_1.70-1_amd64 package (these debs are compiled under Ubuntu 8.10 Intrepid, amd64). For your convenience, debs are attached below, also older i386 versions are available. Note that I have already included updated version of ccpd script in amd64 cndrvcups-capt deb.

  • cndrvcups-common_1.70-1_amd64.deb
  • cndrvcups-capt_1.70-1_amd64.deb
  • cndrvcups-common_1.80-1_amd64.deb
  • cndrvcups-capt_1.80-1_amd64.deb
sudo dpkg -i cndrvcups-common_1.70-1_amd64.deb
sudo dpkg -i cndrvcups-capt_1.80-1_amd64.deb

2. Install printer manually.

$ sudo /etc/init.d/cups restart
$ sudo /usr/sbin/lpadmin -p LBP1210 -m CNCUPSLBP1210CAPTK.ppd -v ccp:/var/ccpd/fifo0 -E
$ sudo /usr/sbin/ccpdadmin -p LBP1210 -o /dev/usb/lp0
$ sudo /etc/init.d/ccpd restart

3. Check if it works. Time to turn your printer on! System -> Administration -> Printing -> LBP1210 -> Print Test Page. Or, in command line:

$ captstatusui -P LBP1210

If the printer does not start (didn't start for me), another fix is needed (see next step), try restarting ccpd daemon while test job is still in the print queue:

$ sudo /etc/init.d/ccpd restart

Now it should start printing, if not, you did something wrong in previous steps... ;) It did print on Jaunty amd64, without any segfault errors by the way.

4. If ccpd daemon restart fix is needed, you can add monitoring script into ~/bin/ You will need to allow everyone in lpadmin group the right to automatically clean up old print processes and restart the ccpd:

$ sudo visudo

and add the following four lines to the end of the file:

%lpadmin ALL=NOPASSWD: /etc/init.d/ccpd restart

Also, make sure you set your printer as a default one, or the script will not work (System -> Administration -> Printing -> LBP1210, right click, Set As Default). Here is the monitoring script, you can name it "ccpd_monitor" or whatever. This is somewhat simplified version of that script below, no GUI feedback here, so zenity or KDE is not needed, but expect 10-15 seconds extra time needed for printing to start in the case of the error and it should work in Gnome as well. Execute permission must have been given to the script, and it can be added into startup programs (System -> Preferences -> Sessions -> Add).

# A script to check whether the user is trying to print, and if so help them around any errors.
#
# This script is intended only for use with the Canon CAPT printing system
# John C, McCabe-Dansted (2008) gmatht at gmail dot com, modified for Debian/Ubuntu/Gnome by Samir

dir=~/.tmp
mkdir -p $dir
lpq=$dir/lpq
new=$lpq.new
age=0

restart() { # Restart the Canon Capt Printer Driver and Cups.
        (
                sleep 1
                # sudo /usr/bin/killall -9 captfilter ccpd
                echo " # Restarting ccpd!"
                sudo /etc/init.d/ccpd restart
                # sudo /etc/init.d/cupsys restart
        ) 2>&1 | tee > $dir/tmp
}

active_jobs() { #Count the active print jobs listed in $1
        grep "^active" < $1 | wc -l
}

lpq > $lpq
while true
do
        lpq > $new
        if diff $lpq $new
        then # no changes
                echo " # No changes..."
                rm $new
                age=$(($age+1))
                test "$age" = 3 &&
                        grep "^active" < $lpq &&
                        restart
        else # new job added or removed
                echo " # New jobs added / removed..."
                echo if test `active_jobs $lpq` -le`active_jobs $new`
                if [ `active_jobs $lpq` -le `active_jobs $new` ]
                then # A new job has been added or replaced
                        rm $lpq
                        mv $new $lpq
                        age=0
                fi
        fi

        ps -C "captfilter ccpd"  -o time | grep .5:.. && (
                #Server has taken over 5 minuts of CPU time
                echo " # Server has taken over 5 minuts of CPU time, retarting!" 
                restart
        )

        sleep 5
done

 

* Note: I tested this only on my Canon LBP2900 printer connected to USB.


blog comments powered by Disqus
 

© Copyright 2008-2015 Oltrans. Translation Agency Recourse Portal.
All rights reserved. Various trademarks held by their respective owners.

Oltrans, 152, 6-ti septemvri Bul., Plovdiv 4000 Bulgaria
General Inquiries: (Bulgaria) +359 32 511 272 | skype: Oltrans.org My status