linuxcrypt, linux, oss

ubuntu1.gif

By following these steps, you will be able to share a printer from your Ubuntu computer so that Windows XP and Windows 2000 computers can print to it. This document has been tested with Ubuntu versions 5.10, 6.06, 6.10, and 7.04.

1) Install the printer on the Ubuntu computer by using the printer wizard (System -> Administration -> Printers then double-click on “Add new printer” icon when the “Printers” window opens).

2) Open a terminal.

3) Modify /etc/cups/cupsd.conf with your favourite editor, for example

gksudo gedit /etc/cups/cupsd.conf

or

sudo nano -w /etc/cups/cupsd.conf

4) Now you need to edit this file in order to allow connections from your network. Assuming that your network uses addresses starting with “192.168.0.” you need to add the following: (you only need to modify the top level (first) Location tag because other Location tags seem to inherit permissions)

<Location />

Order Deny,Allow

Deny From All

Allow From 127.0.0.1

#Modify 192.168.0.* to match your configuration.

Allow From 192.168.0.*

</Location>

Now, you need to set the TCP port that the printer system will accept connections on.

In Ubuntu 5.10 (Breezy) and Ubuntu 6.10 (Edgy) add this line under the Network Options part of the file (somewhere around line 420), or in Ubuntu 6.06 (Dapper) add the following line to /etc/cups/cups.d/ports.conf:

Port 631

and comment out:

Listen 127.0.0.1:631

5) Save the file and exit the editor. Now restart the printing system with this command:

sudo /etc/init.d/cupsys restart

6) Now add the printer to the Windows computer by using the Windows “Add Printer” Wizard. Type in the following for the printer URL:

http://192.168.0.100:631/printers/Deskjet-940C

Replace “192.168.0.100″ with the IP address of the Ubuntu box. Replace “Deskjet-940C” with your printer’s name.

If you add this entry to C:\WINDOWS\system32\drivers\etc\hosts

192.168.0.100 printer-server

, replacing “192.168.0.100″ with the IP address of the Ubuntu box, then you can use a URL like

http://printer-server:631/printers/Deskjet-940C

instead.

You should use the appropriate Windows printer driver for your printer.

No TweetBacks yet. (Be the first to Tweet this post)



Reader's Comments

  1. Cory | October 8th, 2007 at 1:49 pm

    Awesome, this got it working for me, thanks so much for the info, greatly appreciated :)

    Cory.

  2. Dequan Dubeau | February 18th, 2008 at 10:20 am

    Sacred cows make the best hamburger

Leave a Comment