Page 4 of 4

Re: How-to: Network Printer Sharing

Posted: Sun Sep 09, 2012 9:13 am
by altair4
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)

Re: How-to: Network Printer Sharing

Posted: Mon Oct 29, 2012 11:08 pm
by miklvw
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?

Re: How-to: Network Printer Sharing

Posted: Wed May 15, 2013 3:54 pm
by Sharpie1
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

smb://bigdell/deskjet

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

enjoy

Sharpie1

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

Re: How-to: Network Printer Sharing

Posted: Thu May 11, 2017 12:04 pm
by Sydney23
This is great tutorial, thanks for sharing, wish you all best! :)