Setup Windows’ Printer in Ubuntu 12.04 (Precise Pangolin)

For users with both Windows and Ubuntu machines and a single printer, this blog post is going to show you how to share a printer in Windows and allow Ubuntu machines to printer to it.

Almost all printers support Windows by default. Printer manufactures are building printers for Windows and not many are doing it for Linux systems, including Ubuntu. So, if you have a printer with full Windows support, you can share it from the Windows machine and allow other systems to print to it.

I ran into this problem few years go when most printers didn’t support Linux systems. I had an older printer which was designed specifically for Windows and Mac OS X with no support for Linux.

I installed the printer driver on my Windows machine and it worked great. My Windows machine was printing just fine, but couldn’t get the Ubuntu machine to because the printer didn’t support LAN.

Enhance your coding experience with this split keyboard that offers up to 9" of separation.

So, I shared the printer from Windows and my Ubuntu machine was printing properly with the correct fonts and style. If you find yourself in similar situation, follow the guide below to do the same.

First, logon to Windows and right-click the printer you wish to share and click ‘Printer properties’

 

printer-sharing-ubuntu

 

Next, select the ‘Sharing’ tab and check the ‘Share this printer’ box to share the printer. Remember the shared name because you’ll connect using that shared name.

 

printer-sharing-ubuntu-1

 

Finally, open the commands prompt as administrator and run the commands below to enable file and printer sharing through the firewall.

netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes

 

Next, logon to Ubuntu and select the gear on the panel at the top right and select System Settings…

When System Settings opens, select Printers. The add a printer. When prompted to select a device, choose ‘ Windows Printer via SAMBA’.

 

printer-sharing-ubuntu-2 

 

Enter the Windows computer IP address or hostname followed by the printer shared name. You may also have to enter your windows account credentials (username and password). Click Browse to verify that you can see the printer and when you’re done, click Forward to continue.

Next, select the printer brand and model. If you don’t see the particular model, choose the next closest to it and continue.

 

printer-sharing-ubuntu-3

 

If everything is done correctly, you should have a printer installed and ready to use.

 

printer-sharing-ubuntu-4

 

Enjoy!

Invest in some screen real estate with a new big screen, backlit monitor availabe in five different sizes and price points.

10 thoughts on “Setup Windows’ Printer in Ubuntu 12.04 (Precise Pangolin)”

  1. I AM USING CANON LBP 2900 PRINTER WHICH IS CONNECTED TO WINDOWS COMPUTER. BUT I AM NOT ABLE TO SEA THE PRINTER VIA SAMBA PL. HELP

  2. I performed the steps above. When I try to print to the printer attached to my Window 7 computer (host) from my Ubuntu 12.04 computer, I receive the following error message:

    “Connection failed: NT_STATUS_Unsuccessful”

    How do I resolve this issue?

  3. Solved!

    After exhaustive googling and research, I finally resolved the issue. The reason I received the following error message:

    “Connection failed: NT_STATUS_Unsuccessful”

    Is because I did something incorrect on my end. I will now post a series of tips.

  4. Tip:
    In order to print from an Ubuntu 12.04 computer to a printer attached to a Windows 7 printer, one must have Samba installed on their Ubuntu 12.04 computer. To install Samba, use the following procedures:

    Navigation:
    1) Go to the Ubuntu Software Center.
    2) Type “Samba” in the search box.
    3) Click “SMB/CIFS file, print, and login server for Unix”
    Note: If a green check mark is present, then that means that Samba has been installed.
    Note: Samba can be installed through the Terminal. To obtain the command, one can Google, “Install Samba”

  5. Tip:
    In order to print from an Ubuntu 12.04 computer to a printer attached to a Windows 7 printer, both computer must be in the same workgroup. Use the following process to obtain the Workgroup name for each computer:

    Navigation of Windows 7 Computer:
    1) Start
    2) Right click “Computer”
    3) Click “Properties”
    4) Read the Workgroup name

    Navigation of Ubuntu 12.04 Computer:
    1) Go to the Terminal [Ctrl] [Alt] [T]
    2) Type “sudo gedit /etc/samba.conf” without the quotes
    3) Read the Workgroup name

    Additional Note:
    Window 7 Default Workgroup name = Workgroup
    Ubuntu 12.04 Default Workgroup name = Workgroup

  6. Tip:
    In order to print from an Ubuntu 12.04 computer to a printer attached to a Windows 7 computer, both computers must be in the same Subnet Mask. Use the following process to obtain the Subnet Mask Id for each computer:

    Navigation of Windows 7 Computer:
    1) Click Globe (bottom left corner of monitor).
    2) In the “Search program and files” box, type “cmd” without the quotes.
    3) Type “ipconfig” without the quotes.
    4) Read the Subnet Mask Id.

    Navigation of Ubuntu 12.04 Computer (Wired)
    1) Go to the terminal.
    2) Type “ifconfig” without the quotes’
    Note: if wireless, then type “iwconfig” without the quotes.
    3) Read the Subnet Mask Id

  7. Tip:
    If your Windows 7 computer does not have a password (if your Windows 7 computer boots to the desktop screen, then your Windows 7 computer does not have a password) and you receive the follow error message:

    “Not authorized”
    “The password may be incorrect”

    Then what you need to do is turn off “password protected sharing” on your Windows 7 computer. The navigation is as follows:

    Windows 7 Computer Navigation:
    – Control Panel
    – Network and Internet
    – Network and Sharing Center
    – Change advance sharing settings (look at top left of screen)
    – Turn off password protected sharing (note: scroll down a bit)

  8. Hi,
    I have canon LBP2900 printer but in this method my printer model no is not showing in this list.

    Thanks…………

Leave a Reply

Your email address will not be published. Required fields are marked *