Add Printer to Ubuntu From Windows Network

Add Printer to Ubuntu From Windows Network

Overview

Ubuntu supports printer sharing over networks, so you lot can print from your Ubuntu machine, your Windows automobile, etc, to some other Ubuntu or Windows machine that has a printer fastened (ie a “Ubuntu print server” or “Windows impress server”).

Background

printingScheme.png

Ubuntu uses the Common UNIX Printing System (“CUPS”) to handle printing. CUPS uses the Net Printing Protocol (“IPP”) as the basis for managing print jobs and queues. Other protocols are besides supported (LPD, SMB,
AppSocket
a.k.a.
JetDirect), some with reduced functionality.

CUPS printer configuration and management is handled by the Printer Admin utility launched from the Gnome menu –
System -> Administration -> Printing
(If the menu particular does not exist you need to add the control
system-config-printer
to the menu). Also IPP provides spider web services so after you have configured CUPS accordingly, you can access the printers and jobs via your web browser.

When a locally attached printer is divers, eg using the Printer Admin utility, that printer is automatically published from this “print server” host to the network, depending on the server directives in the CUPS configuration file. A remote Ubuntu “client” host can then be able to meet and use the printer attached to the server. The network printer automatically appears in the client’s Printer Admin utility. Information technology simply pops up if CUPS is up and configured correctly and disappears if you lot stop CUPS at either the Print Server or your local car.

Ubuntu print server

The
Print Server
is the Ubuntu computer that is directly connected to the printers.

  1. On the server machine (the one the printer is attached to), open
    System -> Administration -> Printing
    (If the menu item does not exist you need to add together
    system-config-printer
    to the menu). . This will open the
    Printer Configuration
    window.
    system-config-printer.png

  2. Select
    Server
    in the menu bar, and then
    Settings. This will open up the
    Bones Server Settings
    window.

  3. Check the second box:

    Publish shared printers connected to this server
    If this reckoner acts as
    both
    a Print Server and a client (it does demand access to a printer continued to another calculator), select also the first box, “Show printers shared past other systems”.Server-setting.png

  4. OK

  5. Right click the printer and check the
    Shared
    option, if non checked yet

  6. Cheque that users that you desire to be able to utilize the printer are not excluded. Encounter Backdrop>Access Command. The default settings may be ready to “deny printing for everyone except …”

Read:  No Printer or Utility Can Be Deleted

inkjet_settings1.png.

Only you might desire to “allow printing for everyone”.

access_control_allow_everyone.png

Ubuntu print server compatible with Windows (Samba)

If your Ubuntu impress server shall exist able to work also with Windows clients, you must first brand sure that the SAMBA packet is installed (due east.chiliad. using Synaptic package managing director). Then, practice a little configuration change to SAMBA. In brief, you must uncomment the following lines in
/etc/samba/smb.conf
– open up terminal and run:

        gksudo gedit /etc/samba/smb.conf

In the [printers] department:

        
        browseable = aye
        
        guest ok = yes

When done, restart Samba:

        sudo service smbd restart
        sudo service nmbd restart

There is a
dedicated folio in the official documentation
which gives more than details.

Also, one would want to let the following ports through a firewall (ufw for case) via:




        sudo ufw allow 139/tcp
        sudo ufw allow 445/tcp
        sudo ufw let 137/udp
        sudo ufw allow 138/udp

For more on this, delight encounter
here.

Printing from Ubuntu

Now let’south configure the customer (the Ubuntu computer from where y’all desire to print):

  1. Organization -> Administration -> Press

  2. Add – Network printer

    • Click
      Find network printer

      • Specify the host IP address or proper noun. (It may too work without, try)
        (IP accost worked for me, hostname did not.)
      • Click
        Discover

    • Printers on the target machine should be found, no matter whether they are connected using CUPS or SAMBA.

      • BUT if both protocols are available, e.g. because you accept shared your printer on a Linux box both using CUPS and Samba, adopt CUPS (ipp://) over Samba (smb://), because yous won’t exist prompted to install a driver in general.

      findNetworkPrinterScreenshot.png

  3. You **may** be prompted to select a commuter. Select your model in the list.

    • (to be done) What to do if driver is not in the list

Read:  Wireless Monochrome Laser Printer All in One

Printing from Windows

Once your Ubuntu impress server is set up using SAMBA equally described above, you tin can add the printer in Windows equally follows:

  1. Showtime
  2. Devices and Printers
  3. Add a printer
  4. Add a network, wireless or Bluetooth printer
  5. Click
    The printer that I desire isn’t listed
    (unless a miracle happens)

  6. Enter the address manually (\\servername\MyPrinter). Exist sure to respect uppercase/lowercase.

Step 1

Step 2

Note that searching or browsing for printers in Windows is notoriously unreliable, as it heavily depends on the network setup. Therefore, it is recommended to enter the printer address manually equally shown.

Windows volition so probably complain about a
missing driver, and offer you to choose i manually. This is the easiest option, so select your printer manufacturer and model from the dialog box. (Alternatively, the Samba configuration could be improved and then that the driver would be automatically downloaded.) If your printer model isn’t listed, you may effort the “Generic” printer.

Tips:
Yous tin avoid intermediate SAMBA buffer using direct connection to CUPS/IPP Ubuntu server from Windows workstation. Yous should manually specify “http://hostname:631/printers/MyPrinter” IPP URL and select printer commuter.

Windows print dialog window (Ctrl-P) can accept long time (about 30 seconds) to appear. You can reduce the connection time to CUPS IPP printer by disabling selection
Automatically detect settings
in “Control Panel/Net Explorer -> Internet Options -> Connections -> LAN settings”.

Troubleshooting

ane. Bypassing firewall.

If there is an firewall either on print server or the client side, there might appear a communications problem. Employ this command to update the firewall to get through.

iptables -A INPUT -p tcp –dport 631 -j Accept

  • This dominion is used for IPP only. If you’re using other protocol, such equally SAMBA, you accept to adapt.

    You might need to use this rule on both sides (server & client) if the firewall is being used on both of them.

    To apply this dominion after each start/restart of the system, use /etc/rc.local .

Read:  Cara Reset Printer Canon Ip2770 Tanpa Software

2. Networking problems.

Be careful about using different network masks/subnets on your network where yous would like to share the printer.

If the subnets differs, e.g. on the impress server there would exist a /24 (255.255.255.0) netwok mask configured, and e.g. on the clients there would be a /16 (255.255.0.0) network mask – mayhap provided by the DHCP server, this might cause a trouble that clients won’t be able to observe any shared printer on the server, fifty-fifty if other communications betwixt impress server and clients would be possible (e.g. ICMP, ssh) and successful.

If such situation happens, you take to unify the network masks/subnets on all of your stations, e.g. utilize /24 (255.255.255.

3. IP address

Generally, it is a good idea to assign your print server a
static IP address. Instead, using its host name is also possible, but functionality will then depend on proper configuration of your dwelling router, name service, etc.

four. IPv6
Windows (since XP) can print over IPv6 to Ubuntu Linux (tested between Windows XP SP3 and Ubuntu Linux 8.10). Brand sure both the Windows and Ubuntu have IPv6 connectivity. You lot should tick “Allow Printing from the Internet” on the Ubuntu machine. And so use the URL (which resolves to IPv6) of the Ubuntu machine as described above.

v. Mac OS X 10.five.


Volition not notice your network printer unless you lot get to the terminal and run
cupsctl BrowseRemoteProtocols=cups
(see the CUPS 1.4 documentation at
http://www.cups.org/documentation.php/doc-1.4/sharing.html). After doing so, you may need to set the network printer as your default printer for information technology to testify upwardly in program “print” menus.



CategoryNetworking

Add Printer to Ubuntu From Windows Network

You May Also Like