13

Initially this question was limited to 11.10. Now I am in (Lubuntu) 12.10. (On the changes in the question see this meta question).

Considering 11.10

I have tried different (or not so different) approaches - that also other users commented here. My main references were:

None worked for me.

  • maybe it is not useless to point that in some cases the printing would not work for a very trivial reason (which has nothing to do with installing the drivers) but that is not easy to spot though: (1) in the printing jobs list right-click the job and then 'Release', if available; (2) run captstatusui -P LBP1120 and check 'Resume job' if active; (3) restart the printer from its power button –  Oct 24 '13 at 08:31
  • There were some cannon drivers from cannon asia site. Also look at this: http://www.unixmen.com/installation-canon-lbp2900-on-linux/ –  Feb 20 '12 at 19:02

4 Answers4

11

In time this answer became very long and cluttered as far as Ubuntu 12.04 - 13.10 are concerned. Below is an answer that presents the same solution but is much clearer.

Considering 12.04

It should work in the same way as for 12.10 below.

But trying that in the 12.04 Ubuntu-based eOS Luna, I was not able to make it work. In fact my answers here for 12.04 and 12.10 stopped working after a while in Xubuntu and Lubuntu too, but I let those here because they seem useful to others that voted this up.

I have a new solution (tested in eOS and with 2.6 driver) - presented here.

Considering 12.10, 13.04

I have followed the steps from Ubuntu Documentation page and the driver manual that comes with the driver:

(v.2.4 is not available anymore at that link. I have uploaded it here. 2,5 version here.)

  • Installing the common and the capt deb (v.2.4) [step 2 and 3 in manual]
  • Entering the terminal as root
  • Step 4: ["Restart CUPS. For rpm packages: Enter the following command:

    /etc/init.d/cups restart

For deb packages: Enter the following command:

/etc/init.d/cupsys restart

NOTE Do not register the printer using the "lpadmin" command before restarting CUPS. Depending on the distribution you are using, the "For deb packages" command may not be entered. In this case, enter the "For rpm packages" command."]

It was my case: So, I had to run :

/etc/init.d/cups restart

(i got a terminal message saying that i could just as well use service cups restart)

got this result:

cups stop/waiting
cups start/running, process 2758
  • Step 5 in the manual ("Register the printer (PPD) with the print spooler.") is amended by the Ubuntu documentation page

["making sure that you change this line accordingly: sudo /usr/sbin/lpadmin -p LBP5000 -m CNCUPSLBP5000CAPTK.ppd -v ccp://localhost:59787 -E The manual says ccp://localhost:59687 but Ubuntu by default is using 59787. This will give you a headache if you do not change it. (The file /etc/ccpd.conf defines UI_Port 59787 and PDATA_Port 59687. So, both these ports need to be open in the firewall setting.)"]

Accordingly, I had to enter

sudo /usr/sbin/lpadmin -p LBP1120 -m CNCUPSLBP1120CAPTK.ppd -v ccp://localhost:59787 -E

Ubuntu documentation says: "* Note: Ubuntu 12.04 has again blacklisted the usblp module which creates the /dev/usb/lp0 device link. To solve this problem do this sudo nano /etc/modprobe.d/blacklist-cups-usblp.conf

Then comment the file to look like this, canons driver does not talk to the printer through cups:

# cups talks to the raw USB devices, so we need to blacklist usblp to avoid
# grabbing them
# blacklist usblp

So, as I am lost using nano, i tried

sudo gedit /etc/modprobe.d/blacklist-cups-usblp.conf

and added the above (blacklist-cups-usblp.conf was an empy file and i just pasted those lines)

(At this point, verify in main menu, under System/Printers, that the name of the printer recorded there is exactly LBP1120).

  • Step 6. "Register the printer in the ccpd daemon setup file."
sudo /usr/sbin/ccpdadmin -p LBP1120 -o /dev/usb/lp0

You should get something similar to this:

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

 Entry Num  : Spooler   : Backend   : FIFO path     : Device Path   : Status 
 ----------------------------------------------------------------------------
     [0]    : LBP1120   : ccp       : //localhost:59787     : /dev/usb/lp0 : Modified
  • Step 7 in manual:

"Start ccpd daemon. Enter the following command.

sudo /etc/init.d/ccpd start

NOTE It would be convenient to set ccpd daemon to start automatically when Linux starts up."

After that, entering sudo /etc/init.d/ccpd status to see if I can see the 2 numbers (familiar from installation in previous versions): yes, there were 2 numbers. But no printing until logging out and connecting the printer after logging in.

I guess these rules have to be considered if printing doesn't work:

  • connect/start printer after login

  • /etc/init.d/ccpd status to see the 2 numbers

  • sudo /etc/init.d/ccpd start to Start ccpd daemon

What will most probably happen is that you will need to restart ccpd daemon after each reboot in order to print: unless you set ccpd daemon to start automatically when Linux starts up - as the manual suggest. To do that add the following command to the startup-applications (as in the answers under here):

sudo update-rc.d ccpd defaults

NOTE: On 12.10 this method worked for me on one computer, but failed on another. On 13.04 it didn't work at all. I succeeded to autostart ccpd deamon on 13.04 by adding sudo /etc/init.d/ccpd start to the startup-applications.

To see status by just double clicking an executable script file, make this executable:

#!/bin/bash

gnome-terminal -e "/etc/init.d/ccpd status"

Considering 13.10

Idem, but I had to install the portreserve package for this method to work.


Considering installation in Ubuntu 10.10

This really works!

The Ubuntu Documentation website mentions that this printer was tested with Ubuntu 10.10. Although I currently use 12.10, I thought giving it a try. So, I have installed 10.10 as persistent live usb and followed the procedures under "Package Repository (before 11.10)".

Finally I was successful - following these steps:

Add the PPA to your system and install the packages:

sudo add-apt-repository ppa:michael-gruz/canon
sudo apt-get update
sudo apt-get install cndrvcups-capt cndrvcups-common

System->Administration->Printing add printer. Choose "Add printer". Do not choose USB Printer found by Ubuntu here. Select "CAPT Printer". You should see "ccp" in URI. Change it so URI should become "ccp:/var/ccpd/fifo0". Click "next", find your model and add your printer. Choose English variant if you see Japanese and English variants.

Instead of GUI actions, you may try this:

sudo /usr/sbin/lpadmin -p LBP1120 -m CNCUPSLBP1120CAPTK.ppd -v ccp://localhost:59787 -E

Then:

sudo /etc/init.d/ccpd restart
sudo /etc/init.d/ccpd status

You should get 2 numbers there, but I got just one.

So, in this case:

Check in /etc/ccpd.conf (gksudo gedit /etc/ccpd.conf) that you have this:

<Printer  LBP1120>
DevicePath  /dev/usb/lp0
</Printer>

To get it:

sudo /usr/sbin/ccpdadmin -p LBP1120 -o /dev/usb/lp0

Also, in /etc/udev/rules.d/85-canon-capt.rules you should have this:

KERNEL=="lp*", SUBSYSTEMS=="usb", ACTION=="add", SYSFS{idVendor}=="04a9", RUN+="/bin/bash /etc/init.d/ccpd start"
KERNEL=="lp*", SUBSYSTEMS=="usb", ACTION=="remove", RUN+="/bin/bash /etc/init.d/ccpd stop"

(to add it

gksudo gedit /etc/udev/rules.d/85-canon-capt.rules)

and then enable rules:

sudo udevadm control --reload-rules

Then try again:

sudo /etc/init.d/ccpd restart
sudo /etc/init.d/ccpd status

If you get the two numbers, try to print. And then restart computer.

Test the 2 numbers stuff

sudo /etc/init.d/ccpd status

If you run into problems try turning your printer off, restart your computer and only turn your printer on, after you have logged in.


Considering installation in 11.10

I went back to the Ubuntu official documentation website on the LBP Canon driver package and after reinstalling version 2.3 of the driver from debian packages (using Gdebi), I followed the instructions from the section "Adding a printer" - without success. That despite the fact that I got the "two numbers" mentioned there (I quote: "You should see two numbers at the end. If you do, you are lucky :) etc").

I continued then with the commands under "Starting/stopping on USB add/Remove" but could not obtain the diagnostics cited there, nor print a test page as specified at that stage. When I followed commands under "Restart and Verify" I did not get "the two numbers" but just one.

I added the commands from the "Troubleshooting" section (in fact I stumbled over those here) - although I hadn't noticed the Status monitor reports error: I just didn't knew what to do anymore. That is:

lsmod | grep usblp
sudo modprobe usblp
ls -l /dev/usb/lp0
sudo /etc/init.d/ccpd restart

Well, that did the trick!

Upon plugging in my USB printer I got the message that the printer was seen by the system and then I was able to print perfectly.

But, according to the following note ("Note: As of Ubuntu 11.10 (Oneiric Ocelot), usblp has been deprecated and will not be automatically loaded when you connect your USB printer") after restarting my computer cannot print. This is related seemingly to the bug #842823. At the address where the bug is discussed by Till Kamppeter I found and followed these instructions and been able to print a test page - but NOTHING ELSE. And the adventure continues: those instructions WORKED when I followed them again after following again the stages "Starting/stopping on USB add/Remove", "Restart and Verify" and "Status Monitor" from the official Ubuntu documentation page.

But I fear it is still a temporary solution.

EDIT: For me this was a solution just as far as it's the best i could achieve but would not work after reboot and it's cumbersome to use. I keep it just for reference. If others find it useful or amendable, please edit this to make it work.

  • Incredible work. I hope it will work. I updated 2 commands which needed a sudo. Maybe it would be a good idea to sort in reverse order: 12.04 before 11.10 and 11.04. On Xubuntu, it is /etc/init.d/cups instead of cupsys - isn't this true for Ubuntu too? – user unknown Mar 08 '13 at 20:38
  • 1
    The part in step 5 were you have to edit /etc/modprobe.d/blacklist-cups-usblp.conf is not necessary in 12.10 an 13.04, since the file doesn't exist there. btw, thanx for this manual, I wouldn't have succeed without. – user154126 Jun 22 '13 at 11:46
  • @user154126 - in case you have tested this in raring, you might consider adding 13.04 to the list of supported printers here –  Jun 23 '13 at 10:34
  • Below steps resolved "Idle - ccp send_data error, exit" error state for x64 13.04 Raring Ringtail: 1) sudo apt-get install libpopt0:i386 libtiff4:i386 2) cd /lib/i386-linux-gnu 3) sudo ln -s libpng12.so.0 libpng.so.3 4) cd /usr/lib/i386-linux-gnu 5) sudo ln -s libtiff.so.4 libtiff.so.3 – milkywayfarer Oct 07 '13 at 20:43
  • If some of the solutions doesn't work anymore with recent system, feel free to remove them. – Braiam Nov 29 '13 at 15:02
  • May you look at this question: http://askubuntu.com/q/394620/152405 ; I followed this instruction for Ubuntu 13.10 but I cannot start ccpd!!? – mini Dec 23 '13 at 08:00
1

Considering Ubuntu 12.04, 12.10, 13.04 & 13.10

For 12.04 and 13.04 there are some additional steps. For all other releases, skip those.

For Ubuntu 12.04, do this first:

Ubuntu 12.04 has again blacklisted the usblp module which creates the /dev/usb/lp0 device link. To solve this problem edit /etc/modprobe.d/blacklist-cups-usblp.conf

Enter in terminal:

sudo gedit /etc/modprobe.d/blacklist-cups-usblp.conf

Then comment the file to look like this,canons driver does not talk to the printer through cups:

# cups talks to the raw USB devices, so we need to blacklist usblp to avoid
# grabbing them
# blacklist usblp

For Ubuntu 13.10, do this first:

  • Install the portreserve package:

    sudo apt-get install portreserve

For all other versions of Ubuntu, start here

Depending on the distribution you are using you may need to usesudo /etc/init.d/cupsys restart or sudo service cups restart to restart CUPS. You should get some kind of verification that cups indeed restarted

  • Register the printer (PPD) with the print spooler:

    sudo /usr/sbin/lpadmin -p LBP1120 -m CNCUPSLBP1120CAPTK.ppd -v ccp://localhost:59787 -E

  • Register the printer in the ccpd daemon setup file:

    sudo /usr/sbin/ccpdadmin -p LBP1120 -o /dev/usb/lp0

You should get something similar to this:

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

 Entry Num  : Spooler   : Backend   : FIFO path     : Device Path   : Status 
 ----------------------------------------------------------------------------
     [0]    : LBP1120   : ccp       : //localhost:59787     : /dev/usb/lp0 : Modified
  • Start ccpd daemon.

    sudo /etc/init.d/ccpd start

  • Test if ccpd deamon is running correcttly:

Enter sudo /etc/init.d/ccpd status to see if you can see 2 numbers. One ore no numbers means somthing's wrong. Two numbers means all should be working, but no printing until logging out and connecting the printer after logging in.

I guess these rules have to be considered if printing doesn't work:

  • connect/start printer after login

  • sudo /etc/init.d/ccpd start to Start ccpd daemon

  • sudo /etc/init.d/ccpd status to see the 2 numbers

  • When you only get one number, trysudo /etc/init.d/ccpd restart

What will most probably happen is that you will need to restart ccpd daemon after each reboot in order to print: unless you set ccpd daemon to start automatically when Linux starts up. You'll find lots of ways to do that in the answers under here):

If things still don't work

Here is another, quite similar, method. Tested on Elementary OS Luna (based on Ubuntu 12.04). This method contains a lot of useful troubleshooting tips.

user154126
  • 305
  • 1
  • 10
  • For this answer I used @cipricus answer and my own experience. – user154126 Oct 19 '13 at 16:15
  • 1
    I was not able to use your solution here, nor my older solution, to make this work in Elementary OS Luna - which is based on 12.04 TLS. - but this works for now –  Oct 21 '13 at 13:45
0

I threw together a script that you might find useful. I live booted a 32-bit Ubuntu 12.04.5 LTS usb with the printer off, then executed this:

#!/bin/bash

if [ "$EUID" -ne 0 ]; then echo "Not root" exit fi

touch /usr/lib/libcups.so.2

cd ~/Downloads wget --no-check-certificate https://files.canon-europe.com/files/soft39340/Software/CAPT_Printer_Driver_for_Linux_V200_uk_EN.tar.gz -O print_driver.tar.gz mkdir print_driver tar --strip-components=1 -C print_driver -xzvf print_driver.tar.gz cd print_driver/Driver/Debian

renames cupsys to cups in deb package requirements

function rename_libcups_in_deb { if [ ! -f $1 ]; then echo "Where is the .deb file?"; exit 1; fi ar x "$1" mkdir tmp cd tmp tar -xvzf ../control.tar.gz sed -i 's/cupsys/cups/g' control rm -f ../control.tar.gz tar cvzf ../control.tar.gz * cd .. rm -rf tmp ar r "$1" control.tar.gz rm -f control.tar.gz debian-binary data.tar.gz } chmod 0777 "cndrvcups-capt_2.00-2_i386.deb" chmod 0777 "cndrvcups-common_2.00-2_i386.deb" rename_libcups_in_deb "cndrvcups-capt_2.00-2_i386.deb" rename_libcups_in_deb "cndrvcups-common_2.00-2_i386.deb"

dpkg -i *.deb

lpadmin -p LBP1120 -m CNCUPSLBP1120CAPTK.ppd -v ccp://localhost:59787 -E ccpdadmin -p LBP1120 -o /dev/usb/lp0

/bin/cat <<EOM >/etc/udev/rules.d/85-canon-capt.rules KERNEL=="lp", SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="04a9", RUN+="/etc/init.d/ccpd start" KERNEL=="lp", SUBSYSTEMS=="usb", ACTION=="remove", RUN+="/usr/bin/killall -9 ccpd" EOM

You might not want to do this if you have other printers as it will stop their detection

cp /lib/udev/rules.d/70-printers.rules /lib/udev/rules.d/70-printers.rules.backup echo "" > /lib/udev/rules.d/70-printers.rules

/bin/cat <<EOM >/etc/init/ccpd-restart.conf

ccpd-restart

description "restart daemon ccpd for Canon printer LBP1120"

start on started cups stop on runlevel [016]

script if [ -e /dev/usb/lp* ]; then service ccpd stop killall -9 ccpd & sleep 2 service ccpd start fi end script EOM

udevadm control --reload-rules

service cups restart

Then I turned on the printer and it worked perfectly. If the printer is turned on when you start the computer you should turn it off and on. Killing the ccpd process is necessary in that case because simply doing service ccpd stop won't work

Dalius
  • 101
  • 2
0

This is a complementary answer, to be considered only as a supplement to any other.

After installing the printer, in case it does not work, consider the following actions:

  • check under Printing or Printers, right click the printer and 'View print queue', select the job, right click and click 'Release' if active

  • run captstatusui -P LBP1120 and check 'Resume job' if active

  • restart the printer from its power button


Consider creating executable scripts at hand for the main useful commands. For this gnome-terminal is needed or another terminal with a custom profile (in this case called 'new1') that would hold the terminal open after ending the command. In gnome terminal: Profile preferences - Title and command - When command opens: Hold the terminal open.

Script to see ccpd status (the two numbers):

#!/bin/bash

gnome-terminal --window-with-profile=new1 -e "service ccpd status"

Script to restart cups and see status:

#!/bin/bash

gnome-terminal --window-with-profile=new1 -e " sudo service ccpd restart && service ccpd status"

Script to open the user interface of 'capt':

#!/bin/bash

gnome-terminal --window-with-profile=new1 -e "captstatusui -P LBP1120"

I find these as useful as the main 'Printers' or 'Printing' desktop/shortcut file.