# Sharing a printer?



## iMan (Jan 26, 2003)

Hi all.

I want to set up a smal network with one PC and a PowerBook. Is it possible to share the USB printer connected to the PC, so I can print from my PowerBook? Or should i just buy a ethernet printer?
Say if I buy another mac, like an cheap imac, and use that as a printer station, would that be easier?
Or buy a airport extreme and use the usb printer sharing on that, will the PC be able to print on that?

Thanks

Viktor


----------



## Kluster (Jan 26, 2003)

Good question! I'm looking for the same answer as you.

How to print from the Mac when the shared printer is connected on the PC?

Cheers,
Matt


----------



## wiz (Jan 27, 2003)

i have a solution... its based on what i got from macosxhints.com site


```
[HOWTO] Print to a Jaguar connected printer from windows and other linux/unix systems

1] Turn on Printer Sharing (in "System Preferences")
   to do this open /Applications/System Prefrences
   click "Sharing"
   select "Printer Sharing" (check it)
   (its activated. you may now close System Preferences if u wish)
   
2] open the Terminal
   to do this open "/Applications/Utilities/Terminal"
   
3] note the Device URI of your printer
   to do this type this in your Terminal:
     lpinfo -v
   and note the line that looks something like an address, for example:
     usb://HEWLETT-PACKARD/DESKJET%20930C?serial=XXXXXXXXXXX
     
4] cd to /etc/cups directory
   to do this type "cd /etc/cups" in the Terminal
   
5] use a text editor such as vi, pico, emacs, etc (save changes after editing)
   i recommend backing up your mimes.convs and mime.types files
   - open mimes.convs file int the editor of your choice
     + uncomment the line:
       #application/octet-stream       application/vnd.cups-raw        0       -
   - open mime.types file in the editor of your choice
     + uncomment the line:
       #application/octet-stream
   - open printers.conf file in the editor of your choice
     + change the line:
       DeviceURI file:///dev/null
     + to this:
       DeviceURI the_Device_URI_of_your_printer
     where the_Device_URI_of_your_printer is the line you noted down in step 3
     
6] finally restart the cups daemon.
   - to do this type this in the Terminal:
       ps aux | grep -i cup
     note the "pid" of "cupsd"
   - then type this in the Terminal:
       sudo kill pid_of_cupsd
     where pid_of_cupsd is the value you noted down
   - then type this in the Terminal:
       sudo cupsd &
   - press return. part one completed.
   
Setting up your windows systems.
1] Open the printers panel in windows.
2] Click "Add Printer" and choose "Network Printer" (you can only do this as admin)
3] Choose the "Connect to a printer on the Internet or on your intranet"
4] Enter the URL of your mac printer, something like this:
      [url]http://192.168.xxx.xxx:631/printers/queue_name[/url]
   where queue_name is the queue name for your printer.
   you can find out your printer queue name by typing this in your terminal:
      lpq
   and note the "queue_name is ready" line
   use that queue_name as the queue name.
5] after click next, you will be prompted for a driver for the printer.
   now you have to choose the correct driver from the list, if not present and if the
   printer comes with a windows driver of its own, use that instead.
6] once windows has finished installing the driver, it's complete.
   You can now print from windows.


[Troubleshooting...]
It so happens that sometimes changing the DeviceURI of your printers.conf file, 
causes the printer to NOT work on your mac, although it could still work through the network.
That is it prints from other machines but not from your mac!
To solve this problem you need to do a little more tweaking.
1] First of all reset the DeviceURI value to its default (the value before the tweaking)
2] open your browser and go to: [url]http://localhost:631/[/url]
   - click "Manage Printers"
   - click "Add Printer"
     + type in a name for this printer, ex: LAN_PRINTER
     + the location, this could be any value
     + the description, this could be any value
   - choose the device, if you have a USB printer choose "USB Printer (usb)"
   - now type in the device URI of your printer noted down from step 3
   - choose the appropriate model
   - choose the best matching driver
     + [tip: you can install gimp-print for additional printer drivers]
   - now you need to setup your network printers to the new printer
     + on windows follow the same steps in "Setting up you windows systems"
       except the new queue_name is the name you chosed for the printer, as
       in the example I said above: LAN_PRINTER
3] restart the cupsd, follow the steps in step 6
   or simply restart you mac
4] note now the new printer queue is listed in the "Print Center" on the mac, you can use this
   queue or the original. Using the original will let you use the printer's original drivers,
   the new queue uses genreic drivers or gimp-print drivers.
   You may set the default queue you want to use when you print, of your choice, for your mac.
   This will not affect the queue the network uses.
```


----------



## iMan (Jan 28, 2003)

Thanks wiz, but that was for printing from a PC when the printer is connected to the Mac. I want to know how to print from a Mac when the printer is connected to a PC with USB


----------



## Ubermoose (Jan 28, 2003)

My guess is that you will need to install "Optional Networking Components". By default Windows Xp does not communicate well with non-windows networks. This, by design, is to make networking a little more idiot-proof for the average Windows user.

-Since OSX is primarily a UNIX OS, you will need to install "Other Network  File and Print Services".
These are found (in WinXP Home or Pro) by going to the start panel then Control Panel then select "Network and Internet Connections".
-Now select "Network Connections"
-At the top of the open window showing your network connections there is an "Advanced" menu; Select "Optional Networking Components" from this menu.
-Place a check next to "Other Network File and Print Services" then click "Next". 
-Now the UNIX File and Print Services are installed on your Windows XP machine.

You will probably need to install the appropriate OSX drivers on your Mac for things to work out allright.

I have not tested this yet, but hope to before this weekend.

I will post my success or failure using Windows' built-in UNIX support.


----------



## wiz (Jan 29, 2003)

> * from macosxhints.com *
> To enable printing from Jaguar via Samba to Windows machines, you've got to include "smbspool" as cups backend. Grab Terminal as root and enter:
> 
> % cd /usr/libexec/cups/backend
> ...


----------



## iMan (Jan 30, 2003)

Thanks for the tips guys...


----------

