How-to: Network Printer Sharing

Write tutorials here
There are more tutorials here
Forum rules
Please don't add support questions to tutorials,start your own thread in the appropriate sub-forum instead. Before you post please read this
Level 19
Level 19
Posts: 9151
Joined: Tue Feb 03, 2009 10:27 am

Re: How-to: Network Printer Sharing

Post by altair4 » Sun Sep 09, 2012 9:13 am

Note: This is a workaround for Ubuntu based Mint since it involves a modification to an Upstart script which Debian does not use.

Note2: This only involves sharing printers though Samba. It is not required for those who connect to CUPS directly.

There seems to be a reoccurring bug that shows up in every other release of Ubuntu / Mint. In one release it's not an issue in the next release it is an issue. What should happen is the CUPS service will start and provide Samba with a list of available printers. When the Samba service starts it reads that list and makes these printers available to the network. What does happen is that both services are started but in the wrong order. Samba starts first, does not see a list of printers, and then CUPS starts - but by then it's too late.

This fix will make the starting of Samba conditional on CUPS starting first:

[1] Make a backup copy of the smbd Upstart script:

Code: Select all

sudo cp /etc/init/smbd.conf /etc/init/smbd.conf.bak
[2] Edit the smbd Upstart script as root:

Code: Select all

gksu gedit /etc/init/smbd.conf
[3] Change the following line:
start on (local-filesystems and net-device-up)
To this:
start on (local-filesystems and net-device-up and started cups)
EDIT: On new systems the order of cups and net-device-up may have to be reversed:
start on (local-filesystems and started cups and net-device-up)
Last edited by altair4 on Sun Jan 12, 2014 3:44 pm, edited 4 times in total.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

Level 1
Level 1
Posts: 1
Joined: Mon Oct 29, 2012 9:06 pm

Re: How-to: Network Printer Sharing

Post by miklvw » Mon Oct 29, 2012 11:08 pm

Great tutorial Altair4.
I wasn't able to share my pdf printer and thanks to you I could do it, easy, thanks again for the time you use sharing this infos.
Still have a doubt that his melting my head,
I have 2 VM installed with linux mint13 maya, and I wish to access the web in the VM2 by the VM1, creating a internalweb with this 2 machines.
I read that creating 2 adapters in the VM1, one with NAT and the other with internalnetwork.
And in the VM2 if I create one adapter with the internalnetwork I could acess the web by using 2 Ip in which one of this adapters of internalnet.
Do you now how to Altair4?

Level 1
Level 1
Posts: 2
Joined: Wed May 15, 2013 3:25 pm

Re: How-to: Network Printer Sharing

Post by Sharpie1 » Wed May 15, 2013 3:54 pm

Could I share my experience of connecting my Linux laptop to my family machine that has XP on it, called bigdell on the network and a printer attached ? I did it all before coming across this walkthrough. The inverted commas are not to be entered
The printer is shared on the network from the XP end and called "Deskjet"
I connect to the CUPS interface by typing "localhost:631/admin" into a browser
and clicked the option " Show printers shared by other systems"
then clicked the button "Add new printer"
Then clicked the button "Windows Printer via SAMBA"
then entered the URL:

Code: Select all

substitute your windows machine name for bigdell (on the XP computer right -click My Computer and select Computer Name, the share name is under "full computer name") and your printers share name for deskjet
Give it whatever name you choose - doesnt matter
Click continue, then choose your printer driver from the list CUPS supplies
then click add printer



this was after a fair bit of trial and error and having used the Ubuntu printer control panel which was a lot simpler !

Level 1
Level 1
Posts: 2
Joined: Fri May 05, 2017 8:22 pm

Re: How-to: Network Printer Sharing

Post by Sydney23 » Thu May 11, 2017 12:04 pm

This is great tutorial, thanks for sharing, wish you all best! :)

Level 1
Level 1
Posts: 2
Joined: Sun Jan 14, 2018 8:30 am

Re: Network Printing [Solved}

Post by Woodburner » Sat Jan 20, 2018 9:48 am

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

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.

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.
This also applies to Windows 7 shared printers.

Post Reply

Return to “Tutorials”