Howto: Canon LBP 5100 with Samba (amd64)
Posted by r0bis on Tue 8 Sep 2009 at 13:32
The method here should work for just about any printer
After a long chase for information about CAPT and amd64 and multiple failed installations (with compiling from "source") of the CAPT 1.80 driver from Canon I understood that actually colour printing from 64-bit linux would be next to impossible with this printer.
I almost got everything working but the error: pstocapt3 write errors 9 and 32 got me every time. I could not understand whether this was - likely printing to a local spool file, or was it writing to Canon printer over Samba that failed. Might be the latter, since the printer stopped responding to normal jobs from windows an I had to re-install windows driver.
Almost accidentally I came accross this excellent HOWTO_Canon_LBP_2900_with_Samba page on Gentoo wiki. It explains everything in very good detail, therefore I will put only a summary of necessary actions here.
What to do to get your Canon CAPT printer working from Linux over Samba
- Install your Canon driver for windows on the corresponding computer.
- Install Ghostscript on your Windows computer.
- Install Ghostview on your Windows computer.
- Test you can print with Ghostview (open an example file in your Ghostscript installation directory).
- Set up Ghostprint config file. (gsprint.cfg in same directory as gsprint.exe, which in turn in your Ghostview installation directory)
- Install a standard postscript driver on your Windows machine. This should be of a printer that has readily available drivers both on Windows and Linux. The author chose Apple Laser Writer II (which is a BW printer); I chose HP Color Laser Jet 8500 PS. When installing choose "Print to File" port. Test if you can print anyhing on it - the system should ask you for a file name and produce > 0 lenght output.
- Install redmon. That is download, unzip in your directory of choice, then run setup.exe.
- Create a redirected port for your PS printer driver. Properties | Add Port | Redirected port. Name port as you wish:
- Configure the redirected port.
- Redirect to program: enter / browse path to your GSPRINT.EXE
- Arguments for program: - a single dash, with no spaces at all. Alternatively you could use your options to ghostprint here.
- Output: Program handles output
- Run as user: [ ] (unchecked)
- Test if you can print anything on the PS printer. There may be cmd window blink. You should now get output in your Canon printer tray.
- If success - share the printer. The hardest part is over.
- I presume you have SAMBA set up in such a way that you can browse/use files from your Linux box on the Windows box.
- in your browser open http://localhost:631 - this is CUPS administration interface.
- Choose Add printer under Management. Enter names / dscriptions as you like. For printer device select "Windows Printer via Samba".
- then for URI you will enter smb://username:password@workgroup/machine/yourNewPSprinterShare . I created a new non-admin user on Windows specifically for not leaving my XP admin account password in CUPS config files. Might also work w/o password at all.
- Select make and model that you set for your Windows PS printer. If not readily available you can download a lot of *.ppd files + get recommendations on how they work from Linuxprinting.
- That should be it. Select your new printer in CUPS and print a test page.
- smile, if appropriate :)
A few notes:
* if there is some cutting/cropping of edges at times - remember that you cannot set page size/shrinking etc via command line options in ghostprint. That is done in the actual printer driver - so you can experiment with the new PS driver or rather the Canon driver - on windows.
* At some point I also installed Print services for Unix via Windows setup, but I did it when I was desperately trying to make CAPPT drivers work. I don't think that has any relevance.
* if you fail to find redmon download, do search for "redmon17.zip" - Google should give you quite a few working mirrors.
* Not all your linux programs will print correctly. e.g. Inkscape did not print SVG file. You enable can log & debug under the virtual PS printer if you edit (configure) the redirected port.
**** There you can set logfile; you can also set debug - if needed. And there you also can set the DOS window to be hidden.
Your Canon printer is less of paperweight now :)
Your comments and improvements are very welcome
[ Parent | Reply to this comment ]
The catch is - you have to have a postscript printer (which LBP5100 is not). But when you have a virtual postscript printer which is redirected via redmon - works like a charm, just ask PrintFile to print to the virtual Ps printer.
This program also has fairly advanced features as well; nicely done, so thanks a lot to Peter Lerup!
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
If you still want to use your printer without MS Windows, download the NEW drivers from here:
*) LBP 5000: "http://support-au.canon.com.au/EN/search?canonsearch=1&lang=E N&category=Printers&series=Laser%20Beam%20Printers%20(Col our)&model=LASER%20SHOT%20LBP5000&menu=Download";.
*) LBP 5100: "http://support-au.canon.com.au/EN/search?canonsearch=1&lang=E N&category=Printers&series=Laser%20Beam%20Printers%20(Col our)&model=LASER%20SHOT%20LBP5100&menu=Download";
I found the new drivers only in Australian site of Canon.
It works fine for me (32 bit Debian Lenny and printer Canon LBP 5000).
If you meet any problems to find the driver, please reply here and I will upload it somewhere.
I guess you know the installation procedure (32-bit), but it is also included in the downloaded file.
Regards,
Adrianos.
[ Parent | Reply to this comment ]
I am now quite used to print through windows box, because it is quieter - therefore is the one that remains on all the time. However it would be very useful to install the driver to be able to print directly to the printer share.
I am afraid that this share issue may confuse me a little in the process and in addition I have a 64-bit system. But I will give it a go some time this week. If you have any tips with regard how to compile/install the driver on 64 bits, please let me know.
Thanks,
Robert
[ Parent | Reply to this comment ]
First I would like to thanks all for this nice article.
My problem is little bit different,I am connection canon LBP-3300 with linux system with CUPS and canon linux driver and shared with linux-samba-print server.
Now we have some windows system too and wants to get print from windows to linux connected canon CAPT printer.
is there any way to do this?
thank you.
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
http://justin.yackoski.name/winp/
A little bit of trubleshooting is needed if you have a selinux distro like I do, but basically setting selinux to permissive, saving the avc error messages related to cupsd and creating new policy file with audit2allow -R works very well. Then set selinux back to enforcing mode.
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
That way almost any printer can be used ....
[ Parent | Reply to this comment ]