Peter's Blog

Redefining the Impossible

Sharing printer on Ubuntu Linux Server with Windows XP


Got Ubuntu Linux server to share it's printer with Windows XP. After setting up samba (i.e. installing the samba package) and getting it to a state where the server PC appeared in the workgroup (make sure workgroup has same name on all computers). Also make sure Ubuntu knows about the printer. CUPS, the unix printing thing, is installed by default on Ubuntu and all the above is too trivial to comment on. Unfortunately, sharing the printer is not so trivial, you have to edit config files and reboot daemons: but, hey, we love that or we wouldn't use Linux?

  • Edit /etc/samba/smb.conf as follows:
    # add to [General] section:
      printcap name = cups
      printing = cups
      security = share
    
    # make sure [printers] section looks like this
    [printers]
      browseable = yes
      printable = yes
      public = yes
      create mode = 0700
      guest only = yes
      use client driver = yes
      path = /tmp
    
  • reboot samba:
    sudo /etc/init.d/samba restart
    
  • In windows, go to control panel/printers/add network printer.
  • Browse for server computer. In it's list of printers should be the one you want
  • Install the printer. A dialog may come up about downloading a printer driver. This probably won't work but windows will go on to let wou choose a driver from a list.
  • Print a test page.

Whoopee, can print upstairs from laptop downstairs via wifi. There is no security here so watch out who is using your expensive ink.


Filed under: linux samba ubuntu wifi windows

10 Comments

Aber_Adrian Says:

over 4 years ago

Excellent - thanks! But for General read global.

Adrian

Anonymous Says:

over 4 years ago

Simply awesome! Thanks dude!!!

dolphin Says:

over 2 years ago

yes. teach me more about samba!

Steven Says:

over 2 years ago

Thanks for the post. I can finally print from my windoze box!

Drock Says:

over 2 years ago

Quality post.

It really makes the difference when someone does just a little explanation, not just a smattering of sudo commands. Linux distros will only be widly used if these things get a lot more automated for general users.

Mateus Says:

about 1 year ago

Thanks.

It guided me to setup a printer share from Ubuntu (7.10) to Windows XP running on VirtualBox.

Jeremy Pratt Says:

about 1 year ago

Perfect solution. this enabled me to find the printer through the lan vs. TCP/IP. VERY very please. Thank you very much!

Ubuntu 8 server (Hardy Heron - Printer connected via parallel to this machine) Windows XP PRO clients

aarogh Says:

about 1 year ago

Simply great...straight forward and extremely helpful, thanks. One thing: on my distro (hardy Heron) I have Global instead of General.

julius Says:

about 1 year ago

i have a problem printing my work which is in a PC using windows XP OS to a server that uses Ubuntu Linux OS with a local printer set on it. Please help me get through this.

Warren Fab Says:

8 months ago

Works really well. Thanks.

I am using Ubuntu 8.04 to bypass the connection limitations of Win XP as I have 14 staff. Awesome stuff.

Just a note, HP is really well represented in terms of drivers, you may not be so lucky with Canon. Then again, google is your friend.

Have Your Say

I welcome constructive comments or questions but I reserve the right to delete any comments that displease me.

Who are you?

(Optional) If you enter an email address here I might email you back. Your email address will not be sold to spammers or shown anywhere

What do you have to say?