HOWTO Canon LBP 2900 with Samba

Requirements

  1. A fully operational Cannon printer on Windows machine
  2. Ghostscript for Windows XP - You can download it from here. Ghostscript is Postscript engine that make this all work.
  3. GSView for Windows XP - This is an front-end for Ghostscript that simplifies the PostScript-to-Windows-GDI interface with its GSPrint utility. If GSView is not included in Ghostscript Instalation, you can download it from here.
  4. RedMon for Windows XP - This tool gives access to the data stream print job. Download if from this location.


Windows Installation and configuration

  1. First thing that you have to do is to install Ghostscript and GSView. It's a standard Windows procedure. I installed Ghostscript and GSView into C:\GS, but you can install it wherever you want.
  2. Next is to check that GSView is properly installed and fully finctional. Start GSView and open one example (you can find them in Ghostscript directory). If you see image clearly, try to print it on your Canon printer. It should be perfectly.
  3. Now you have to setup and test GSPrint utility:
  • Open MS-DOS prompt, and CD into directory where GSView is installed. Make sure that GSPrint is there,
  • In your favorite DOS editor, create gsprint.cfg file with the following parameters. Note that you may need to have a carriage return at the end of the last line (the one that ends in GSWIN32C.EXE"


-noquery
-printer
Your_operational_Canon_Printer_Name
-ghostscript
"C:\GS\GS8.14\BIN\GSWIN32C.EXE"


...where "Your_operational_Canon_Printer_Name" is the name of your printer EXACTLY as it appears in Control Panel... Printers, and "C:\GS\GS8.14\BIN\GSWIN32C.EXE" is the exact path and filename of the command-line executable for Ghostscript (your values for these two may be different - enter the correct values for your PC).

  • Save this file and run the following command: gsprint somefile.ps, where somefile.ps is any PostScript file (you can use the same file that you used in second step). After a few seconds, your printer shoud print that file.
  • Create and test new Postscript printer that you will use for Linux printing. This shoud be a standard PostScript printer. You can use Apple LaserWriter II for a driver because this driver exists in Linux. For now, set this printer to print to a File, do not share it at this time. After instalation, print one Test Page. Windows shoud ask you for a file name. After printing, go to the Directory where you printed it, and check if file exists and if it has non zero size.
  • Install RedMon. Extract ZipFile that you have downloaded, and run "setup.exe".
  • Create a RedMon redirected port to your Postscript printer: Open properties for your PS Printer you created above, click on Ports tab, and then click Add Port button and select Redirected port. Specify port name RDR1: for example and click OK. Now click on Configure Port, and enter the following settings:

Redirect to program: C:\GS\GSVIEW\GSPRINT.EXE
Arguments for program: - a single dash, with no spaces at all
Output: Program handles output
Run as user: [ ] (unchecked)
Use the correct path to GSprint on your PC. Save your port settings. When you return to the "Details" tab of the PS printer, set "Port" to the RedMon redirected port you just created.

  • Try to print something to your Postscript printer. Maybe you will see some DOS screen blinking. That is happend when GSPrint starts to print to your Canon printer.
  • If the page is printed correctly, share it. For share name, use some short name, PSEMU for example.

skuska


Linux Configuration

Now, we came to the part where you will configure your new printer to work on Linux.

  • First, you will have to configure SAMBA. All you need is to make smb.conf file in /etc/samba/ directory. Here is my smb.conf file:
File: /etc/samba/smb.conf
 
[global]
workgroup = WORKGROUP
netbios name = NETBIOS
server string = %h lan file server (Samba %v)
passwd program = /usr/bin/passwd %u
passwd chat =
syslog = 0
log file = /var/log/samba/log.%m
preferred master = No
local master = No
domain master = No

For WORKGROUP you have to type your Workgroup name. It is the name which contains machine with connected Canon.
For NETBIOS you have to type NETBIOS name for your machine. That name you can see on every Windows machine, that are in same Workgroup with your computer.

  • After making that file, restart samba with /etc/init.d/samba restart.
  • Now, you will have to find a driver for Apple LaserWritter II for Linux. A really good site for it is Linux Printing. You can find or make drivers for various kind of printers. To download a driver for this printer, click here.
  • After downloading, login as root, and copy downloaded .ppd file to /usr/share/cups/model directory. Restart CUPS with /etc/init.d/cupsd restart, and go onto http://localhost:631 in you favorite browser.
  • Click on Manage Printers. For Printer name, type whatever you want as your pinter name. Fill in Printer Location and Description fields if you want. Click on Continue.
  • For Device, select Windows Printer via Samba, and then click on Continue.
  • On next screen, you will have to specify printer URI. For URI type smb://username:password@workgroup/machine/PSEMU where username and password are user and pass which you are using to logon to windows machine which have Canon conected, workgroup is workgruop name which contains that machine and machine is NET-BIOS name of that machine. PSEMU is shared name of Canon printer. Click on Continue.
  • For Make, select Apple. Then click on Continue.
  • For Model, select Apple LaserWritter NT Foomatic/Pastscript (recomended) (en), click on Continue.
  • After that, you will see a screen that says that you added new printer successfully.
  • Click on printer name, and then click on Print Test Page


Finish

And that's it. Enjoy printing with your Canon LBP 2900. :)


Additional info

[Added 06 SEP 2005] This procedure can be used for any printer shared from a Windows PC. I have successfully implemented this for HP Laserjet 1020. My thanks goes to the original author of this wiki page. There is a problem if you are using WinXP and following conditions are true:

  1. Service Pack 1 for Windows XP is not installed.
  2. The Windows XP print server is configured in a Workgroup (not a Domain).
  3. The shared printer uses a RedMon redirected port.

Information regarding this situation is given here. [1]. The solution is to install SP1 or SP2 to replace the localspl.dll file that apparently causes this problem. In my case, I installed SP2 and the problem disappeared. Hope this info helps save some time for others.

 

 

 

http://gentoo-wiki.com/HOWTO_Canon_LBP_2900_with_Samba