How-to: Network Printer Sharing

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
altair4
Level 20
Level 20
Posts: 11419
Joined: Tue Feb 03, 2009 10:27 am

How-to: Network Printer Sharing

Post by altair4 »

How-to: Network Printer Sharing
*** I'm in the process or rearranging things in this HowTo so don't be surprised if things change between views ***

Note1: This HowTo is focused on sharing Printers attached to PC's not stand alone networked printers although the same principals and procedures would be applicable.

Note2: There are 2 graphical utilities that you can use to configure and access printers in Mint:

[1] By running the following command:
system-config-printer
[2] Or by entering the following location in any Internet browser and accessing the CUPS Web interface directly:
localhost:631

I'm going to use system-config-printer in this HowTo but localhost:631 is always available and you can also configure printers on another Linux machine on your network from your own replacing localhost with it's ip address like this: 192.168.0.100:631

Note3: Linux Mint Debian needs some additions and adjustments to be done first:
http://forums.linuxmint.com/viewtopic.p ... 18#p315218

[A] SHARING A PRINTER ATTACHED TO A MINT MACHINE

Run the following command to open the printer configuration utility:

Code: Select all

system-config-printer
** Publish Shared Printers

Server > Settings > Select the following:

Publish Shared Printers connected to this system
Allow printing from the Internet

** Enable Sharing of the Attached Printer

Right Click the attached printer > Properties > Policies
Check Enabled, Accepting Jobs, and Shared

** To allow guest access through Samba:

Edit smb.conf as root:

Code: Select all

gksu gedit /etc/samba/smb.conf
Look for the [printers] share and change the "guest ok" line from no to yes:

Code: Select all

[printers]
comment = All Printers
browseable = No
path = /var/spool/samba
printable = yes
guest ok = yes
read only = yes
create mask = 0700
Save smb.conf and restart samba:
In Mint:

Code: Select all

sudo service smbd restart 
In Mint Debian:

Code: Select all

sudo service samba restart
[ B] CONNECTING TO A MINT PRINTER FROM ANOTHER LINUX MACHINE

Run

Code: Select all

system-config-printer
Then select: + Add > Network Printer

You are presented with many different options to connect to the network printer

** via Samba

Select "Windows Printer via Samba" > Browse

You should get a list of printers. If not you can specify it's location manually by selecting "Enter URI" and enter the location of the printer in any of the following formats:

Code: Select all

smb://WORKGROUP_NAME/MACHINE_NAME/PRINTER_NAME
smb://MACHINE_NAME/PRINTER_NAME
smb://MACHINE_NAME.local/PRINTER_NAME
smb://192.168.0.100/PRINTER_NAME
WORKGROUP_NAME is the workgroup associated with the server that has the printer, MACHINE_NAME is the host name of the server, MACHINE_NAME.local is the mdns qualified ( the .local part ) host name of the server, and 192.168.0.100 is the ip address of the server.

** via Internet Printing Protocol

Select Enter URI and specify the location in any of these possible formats:

Code: Select all

ipp://WORKGROUP_NAME/MACHINE_NAME:631/printers/PRINTER_NAME
ipp://MACHINE_NAME:631/printers/PRINTER_NAME
ipp://MACHINE_NAME.local:631/printers/PRINTER_NAME
ipp://192.168.0.100:631/printers/PRINTER_NAME
WORKGROUP_NAME is the workgroup associated with the server that has the printer, MACHINE_NAME is the host name of the server, MACHINE_NAME.local is the mdns qualified ( the .local part ) host name of the server, and 192.168.0.100 is the ip address of the server.

There is another ipp option that allows you to use a version of cups earlier than the current one in case there are compatibility issues with your specific printer: ipp14 ( for ipp cups version 1.4 ). It's the same as the ipp locations above just substitute ipp14 for ipp like this:

Code: Select all

ipp14://192.168.0.100:631/printers/PRINTER_NAME
** via DNS-SD

If you're both running current versions of mint you should see at the very top of the list under "Network Printer" the host name of the server that has the printer attached. Selecting that should bring up: Remote CUPS printer via DNS-SD.

You will then have to right click the printer in the main utility > Properties > Settings > and change Make and Model to install the driver

** When all else fails:
system-config-printer > Server > Settings > Show Printers Shared by other Systems


[ C] CONNECTING TO A MINT PRINTER FROM WINDOWS XP ( Win7 really isn't all that different ).

Use the "Add Printer Wizard".

Start > Control Panel > Printers and Faxes > Add Printer > The Add Printer Wizard opens

Check "A network printer, or a printer attached to another computer"
Check "Connect to a printer on the internet or on a home or office network"

You can either browse for it or enter it directly. Examples:

Code: Select all

URL: \\WORKGROUP_NAME\MACHINE_NAME\PRINTER_NAME
URL: \\MACHINE_NAME\PRINTER_NAME
URL: \\192.168.0.100\PRINTER_NAME
OR,

Code: Select all

URL: http://WORKGROUP_NAME/MACHINE_NAME:631/printers/PRINTER_NAME
URL: http://MACHINE_NAME:631/printers/PRINTER_NAME
URL: http://192.168.0.100:631/printers/PRINTER_NAME
You can even try it without the ":631"

WORKGROUP_NAME is the workgroup associated with the server that has the printer, MACHINE_NAME is the host name of the server, and 192.168.0.100 is the ip address of the server.

[D] CONNECTING TO A WINDOWS PRINTER FROM LINUX

On WinXP: Make sure the printer is "shared"

Start > Control Panel > Printers and Faxes > right click on your printer > Sharing

[If you have already shared a folder or a drive, printer sharing is already activated. If not
then a new window appears and you must first enable remote access. To do so click the
security warning message ( not the Network Setup Wizard - please not the Network
Setup Wizard) , then the "Just enable printer sharing" button on the following screen]

check "Share this Printer"
Share Name: WinPrinter or whatever you choose

On Linux:

system-config-printer > + Add > Network Printer > Windows Printer via Samba > Browse.
It should find it automatically after it does a network scan.

If it can't find anything you may have to fill in the dialog box, examples:

Code: Select all

smb://WORKGROUP_NAME/MACHINE_NAME/WinPrinter
smb://MACHINE_NAME/WinPrinter
smb://192.168.0.100/WinPrinter
[E] CONNECTING TO A LINUX PRINTER FROM MAC OSX

On Mac OSX :

1. Apple menu > Print & Fax
2. Click the + button under the printers list to add a printer.
3. Press the Control key while clicking the "Default" icon then choose Customize Toolbar from the menu.
4. Drag the Advanced (gear) icon to the toolbar and then click Done.
5. Click the Advanced icon that was added to the toolbar.
6. Choose "Internet Printing Protocol" from the Type pop-up menu.
7. In the URL field, type the printer's address in one of the following formats:

Code: Select all

ipp://WORKGROUP_NAME/MACHINE_NAME:631/printers/Linux-Printer-Name
ipp://MACHINE_NAME:631/printers/Linux-Printer-Name
ipp://192.168.0.100:631/printers/Linux-Printer-Name
OSX NOTES:
If the printer name contains spaces, replace each space with "%20" (without quotation marks).
In the Name field, type the name you would like to use for this printer in Mac OS X.
Choose the appropriate PPD or printer driver from the "Print Using" menu.

############
Error Workarounds
############

[1] WinXP printer start to print and then stalls:
http://forums.linuxmint.com/viewtopic.p ... 97#p180860

[2] WinXP printer that is set to allow guest access gives you an "Access Denied":
http://forums.linuxmint.com/viewtopic.p ... 43#p180862

[3] Windows can see the Mint printer but gives you a "Windows cannot connect to the printer" error when you try to configure it:
http://forums.linuxmint.com/viewtopic.p ... 40#p618065

[4] Followed all the steps in part [A] above and is set to allow guest access but you are forever being asked for a password to access:
http://forums.linuxmint.com/viewtopic.p ... 40#p618065

[5] CUPS starting after Samba starts prevents sharing a printers through Samba - Mint Main Edition:
http://forums.linuxmint.com/viewtopic.p ... 60#p626582

[6] AirPrint and iOS6
http://forums.linuxmint.com/viewtopic.php?f=51&t=114904
Last edited by altair4 on Wed Oct 17, 2012 2:59 pm, edited 21 times in total.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
emorrp1

Re: Network Printing

Post by emorrp1 »

Thanks again altair for another straight forward and comprehensive tutorial.
altair4
Level 20
Level 20
Posts: 11419
Joined: Tue Feb 03, 2009 10:27 am

Re: Network Printing

Post by altair4 »

This is a solution for one problem that has come up in the forums.

Problem:
I have a WinXP system with my printer attached to it shared. Other XP
machines can use it fine but with Mint I can connect to it and send a
test page. Then the printer starts making noise and acting like its
gonna do it, then nothing. It just sits there and I have to restart the
XP system to remove the print job.
Solution:

On the XP box:

1. Go to Control panel -> Printers & faxes
2. Right-click on Printer -> Properties -> Ports tab
3. Uncheck "enable bidirectional support"

I would make sure that printing on the WinXP that has the printer, and
that printing from other networked WinXP machines works after the
change. This also shows up in Vista.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 20
Level 20
Posts: 11419
Joined: Tue Feb 03, 2009 10:27 am

Re: Network Printing

Post by altair4 »

This is a solution for a problem that has not come up yet in the forum ( at least I don't think it has )

Problem:

You try to set up a networked printer attached to WinXP / Vista. Everything goes well but when you
try to do a test page or actually use the printer you get the following error message:
NT_STATUS_ACCESS_DENIED
Solution:

On the Mint box:

Press Alt+F2
Type gksu gedit /etc/cups/printers.conf

Look for a line that looks something like this ( depending on how you specified the location ):

DeviceURI smb://WORKGROUP_NAME/MACHINE_NAME/WinPrinter
DeviceURI smb://MACHINE_NAME/WinPrinter
DeviceURI smb://192.168.0.100/WinPrinter

And change it to this:

DeviceURI smb://guest@WORKGROUP_NAME/MACHINE_NAME/WinPrinter
DeviceURI smb://guest@MACHINE_NAME/WinPrinter
DeviceURI smb://guest@192.168.0.100/WinPrinter

Then:
Open Terminal
Type sudo service cups restart
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Wilsonsway

Re: Network Printing

Post by Wilsonsway »

Following these great tutorials, I was still running into a problem getting my wife's Vista laptop to 'see' the networked printer until I remembered something about workgroups. They all need to be part of the same workgroup or it won't work.

I reset hers to the main workgroup for the network and bingo! It then found the printer and I was able to print a test page.

My setup is as follows:
  • laptop #1: Linux Mint 8
    laptop #2: Windows Vista Home Premium
    desktop #1: Linux Mint 8 (printer located here)
    desktop #2: Windows 7 Professional
She's a teacher and they have to use Windows thus explaining the Vista laptop. I have software that I refuse to give up (cost me plenty) that I use frequently for web design and graphics creation which in tune explains the Win7 machine. In any case, I use the LM8 desktop for file sharing/storage and the LM8 laptop for general use and light web page editing tasks.

We needed a way to be able to print documents from anywhere on the network and this was the best way I found so far.

Again, thanks for the great tutorial! :)
altair4
Level 20
Level 20
Posts: 11419
Joined: Tue Feb 03, 2009 10:27 am

Re: Network Printing

Post by altair4 »

Wilsonsway wrote:Following these great tutorials, I was still running into a problem getting my wife's Vista laptop to 'see' the networked printer until I remembered something about workgroups. They all need to be part of the same workgroup or it won't work.
I have Multiple machines on my network running Windows, Linux, and Mac. All of them are in different workgroups and I can see and share directories and printers throughout. Some of these machines are corporate laptops so I couldn't change the workgroup if I wanted to. I'm glad it worked for you and thanks for the compliment but having the same workgroup name is not a requirement unless you have a very complicated network with multiple subnets or are part of a domain.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Wilsonsway

Re: Network Printing

Post by Wilsonsway »

Then I'm not sure why it worked then but all I can say is that it did after changing the workgroup name to match the rest. In any case, your tutorial helped clear some things up. ;)
getusmonster

Re: Network Printing

Post by getusmonster »

I have been trying to print from an xp box to a mint computer for a month now and still cant make it work. It worked when i had my canon printer but now that i have my lexmark printer it just twill no work and i dont know why. I have tried editing my smb.conf file, i have tried everything i know of and yet it still will not work. I don't get any errors in printing and the xp box will add the printer no problem. When you select print from xp it acts like its printing but nothing happens. Not a sound. I have tried sending test pages and nothing from the xp box.It can see it and connect to it but no poo da ga. :( Any help y'all could give would be the best thing in the world.

Thanks in advance.
ddalley
Level 4
Level 4
Posts: 303
Joined: Sun Mar 15, 2009 4:25 am
Location: Toronto, Canada

Re: Network Printing

Post by ddalley »

Another way a printer can be networked is by having it attached to another networked device, such as a NAS box, and I think some routers have USB printer ports, too. Our device is the D-Link DNS-323 and I have no trouble setting it up with various Linux distros, laptops and two XP desktops. One computer caused problems because XP was not set up for file and printer sharing (therefore I guess I had changed this setting on the one that worked, at some point in the past), but that was easily solved once I knew about it.

I was pleasantly surprised how well Linux and the DNS-323 handled this.
altair4
Level 20
Level 20
Posts: 11419
Joined: Tue Feb 03, 2009 10:27 am

Re: How-to: Network Printer Sharing

Post by altair4 »

When my wife bought her MacBook she was able to connect to and configure my Mint7 attached printer by using pixie dust ... er ... avahi. It was flawless and noting short of magic. Something happened to avahi since then and it's no longer magic. I don't know if it's because Ubuntu lacks adult supervision or if it's because it's something that I now have to modify myself but on Mint9 ( Ubuntu 10.04 ) she cannot connect to my printer.

As a result, I have included in this howto a manual way to set up a connection from an OSX client to a printer attached to a Mint computer.

One final rant: It's seems to me to be somewhat ironic that the manual way to connect to the linux printer using CUPS is so convoluted on a Mac given that Apple invented CUPS

I also have no idea how to do this in reverse. Connecting from Mint to an OSX attached printer. My wife only allows me limited amounts of time on that machine for fear that I'll break it. :wink:
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
jessewilliams

Re: How-to: Network Printer Sharing

Post by jessewilliams »

Thank you so much for your detailed guide.

Ive been trying to find a way to get my printers working across the network for the last couple of hours and nothing seemed to work.

Finally Ive managed to get them working on all the different platforms in this place. Really really helpful thank you.
nathanjh13
Level 3
Level 3
Posts: 181
Joined: Mon Mar 22, 2010 2:48 pm

Re: How-to: Network Printer Sharing

Post by nathanjh13 »

I've been through the tutorial, it's pretty comprehensive (though I'm connecting from Linux to Mac) and through Samba there are "No print shares". My Firewall is disabled at present.

Using CUPS it's the same deal, printer sharing is enabled etc etc. The printer itself is switched on next to me.

I might put the document on a memory stick and print from a mac in here, or install Bonjour like the guy in the cafe suggested. Either method is embarrassing as I'm trying to champion the Linux cause. I even donated!

This is BS, shouldn't be this hard. Can anyone help?
I know the IP address but I find this kind of talk hard going, I don't even know what my workgroup name is.

smb://WORKGROUP_NAME/MACHINE_NAME/WinPrinter
smb://MACHINE_NAME/WinPrinter
smb://192.168.0.100/WinPrinter

thanks
nathanjh13
Level 3
Level 3
Posts: 181
Joined: Mon Mar 22, 2010 2:48 pm

Re: How-to: Network Printer Sharing

Post by nathanjh13 »

Bouncing around from one help page to the next and getting nowhere. Never known frustration like it. Utter nonsense.

All these are enabled.

Show printers shared by other systems
Share printers connected to this system
Allow printing from the Internet
Allow remote administration
Allow users to cancel any job (not just their own)
Save debugging information for troubleshooting

I ran through other tutorials on other sites too. Otherwise it's all manual after manual or page after page of coding type talk. I hate this whole endeavor.

I know you don't care but i need to vent frustration somewhere. Been in same internet cafe half my friggin life looking at this.

Wonder if it's the cafe.
altair4
Level 20
Level 20
Posts: 11419
Joined: Tue Feb 03, 2009 10:27 am

Re: How-to: Network Printer Sharing

Post by altair4 »

I'm confused by your post. Are you trying to access a printer attached to a Mac?
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
nathanjh13
Level 3
Level 3
Posts: 181
Joined: Mon Mar 22, 2010 2:48 pm

Re: How-to: Network Printer Sharing

Post by nathanjh13 »

Hiya, thanks. No it's a standalone printer (the cafe is full of Macs i'd chose to print from that was all, i appreciate what i said may have been misleading)
nathanjh13
Level 3
Level 3
Posts: 181
Joined: Mon Mar 22, 2010 2:48 pm

Re: How-to: Network Printer Sharing

Post by nathanjh13 »

It's a HP Deskjet F380 if that helps

Edit; Let's call the whole thing off. I yanked the USB out the back and plugged it in to mine to print straight away wired. Think I'm some way off the "Bonjour method"

thanks for reading anyway.
Nathan
adelfjohanason

Re: How-to: Network Printer Sharing

Post by adelfjohanason »

First Attach Printer to the Computer.and Put Printer on the common Server and In computer give Ip address of the printer and open any document page and then click on the print button so easily comout the print of the document. So each type sharing printer on the network
Dalton_Fan

Re: How-to: Network Printer Sharing

Post by Dalton_Fan »

This is the first time that I've posted anything although I've been using Mint for two or three years, I've usually been able to find out what I needed by searching existing posts (yes there are some who do Fred!)

Thanks for the How-to I've just updated my version of Mint from 5 to 9 so some things had changed, the one thing that I noted is that you have 192.168.0.100:631 as where CUPS is and as the URI for networked printers, on my system it seems to be at 192.168.1.100:631, don't know if that is just the way things have set up on my machine or whether that will be useful in helping others get networked printers set up.

Cheers

Dalton_Fan
altair4
Level 20
Level 20
Posts: 11419
Joined: Tue Feb 03, 2009 10:27 am

Re: How-to: Network Printer Sharing

Post by altair4 »

I'll have to go over this HowTo again but I think that in all cases I used the following phrases to describe an actual ip address:
7. In the URL field, type the printer's address in one of the following formats:
You can either browse for it or enter it directly. Examples:

Code: Select all

URL: \\WORKGROUP_NAME\MACHINE_NAME\Mint_Printer_Name
    URL: \\MACHINE_NAME\Mint_Printer_Name
    URL: \\192.168.0.100\Mint_Printer_Name
In all cases it's meant to be an example. Perhaps I didn't make that clear enough. As far as where CUPS is I avoided the issue entirely and used "localhost":
Open your favorite browser
Type localhost:631
I'd be willing to bet that on any given machine the actual ip address is neither 192.168.0.100 or 192.168.1.100 . :wink:
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
JaceMan

Re: How-to: Network Printer Sharing

Post by JaceMan »

I have a home network with four windows computers and my Linux Mint machine. The four Windows machines are a part of the "JACEMAN" workgroup.

My printer (Canon MP 620... working fine after using the Canon MP 610 driver and making necessary edits to it) is connected to my Mint box. As of right now, if the wife or kids want to print they have to bring their laptops into the room with my mint desktop, disconnect the USB cable from my computer and hardwire it to theirs to print. I'd like to enable them the ability to wirelessly print and then just claim the print jobs, but I cannot get any of the windows computers (3 on XP Professional and 1 on Windows 7) to see my shared Mint printer.

I followed the instructions regarding:

Code: Select all

[] ALLOW YOUR LINUX ATTACHED PRINTER TO BE "SHARED" AND "PUBLISHED"

The Mint Way
Step 1: Enable Sharing for that Printer.
Menu > Administration > Printing > Right Click the attached printer > Properties > Policies
Check Enabled, Accepting Jobs, and Shared

Step 2: Enable Publishing of the Shared Printer
Menu > Administration > Printing > Server > Settings > Check "Publish Shared Printers connected to this system" 
And...

Code: Select all

[] CONNECTING TO A MINT PRINTER FROM WINDOWS

On Linux:

You will need to share and publish the printer as described in the "ALLOW YOUR LINUX ATTACHED PRINTER TO BE "SHARED" AND "PUBLISHED"" section above.:


OnWindows:
Use the "Add Printer Wizard".

Start > Control Panel > Printers and Faxes > Add Printer > The Add Printer Wizard opens

Check "A network printer, or a printer attached to another computer"

Check "Connect to a printer on the internet or on a home or office network"

You can either browse for it or enter it directly. Examples:
Network browsing doesn't ever show the printer... nor does me calling it out manually with my mint machine IP Address and Printer name... (\\192.168.2.2\LinuxCanon)

Any ideas?
Post Reply

Return to “Tutorials”