Search:  
Gentoo Wiki

HOWTO_Canon_LBP_2900_with_Samba


This article is part of the HOWTO series.
Installation Kernel & Hardware Networks Portage Software System X Server Gaming Non-x86 Emulators Misc

Contents

Introduction

I've tried to set up a new Canon LBP 2900 printer in my office where I have nine Linux and two Windows machines in LAN and I can't do that using CUPS or Samba because I cannot find any driver for it. After a lot of googling :), I finally have found a solution for this.

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:
File: gsprint.cfg
 
  -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).

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.

Linux Configuration

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

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.

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.

[Added 21 OCT 2006] While implementing this procedure for a HP Laserjet 1020 using ghostscript 8.1.4 and ghostview 4.6, I was unable to print to the laserjet typing at the command prompt gsprint.exe anExample.ps until I edited my gsprint.cfg with the following lines:


-all
-printer
HP LaserJet 1020


This also includes a carriage return after HP LaserJet 1020. It seems that the options:


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


were unnecessary and that the option


-all


was necessary, without -all gsprint was parsing anExample.ps but was not actually sending it to the printer

Using LPD

Note, that it is not necessary to use samba. I've just done this using MS Windows LPD server, included in Windows XP SP2 (As far as I know, it works in any version of Windows 2000/XP, but there are some problems with redmon in Windows XP without SP). It is really easy:
1) Install LPD - Control Panel -> Add/Remove programs -> Add/Remove Windows components; then select "Other network file and print services", click details and select "Print services for UNIX"
2) Go to Control Panel -> Administrative tools -> Services; click on TCP/IP Print Server and select Automatical start. I've also set "Allow to interact with destkop".
3) Now, you can add your printer in CUPS with URL ldp://hostname_or_ip/printer_name; where printer name is name of the share (I think, that it is also possible to use normal printer name, but it is untested). Set the driver to RAW -> Raw Queue. It is working for me, and I think, that there should not be problem in any other systems.

I've used Canon LBP2900, Apple LaserWrite II NTX for the fake printer as suggested in this article. It works fine and I really like it. Sorry for my poor english. Someone should correct my mistakes in gramma, but the information is more important

Retrieved from "http://www.gentoo-wiki.info/HOWTO_Canon_LBP_2900_with_Samba"

Last modified: Sat, 30 Aug 2008 20:27:00 +0000 Hits: 20,040