How-to: Network Printer Sharing

Write tutorials and howtos in here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Do not start a support topic here please. Before you post please read this

Re: How-to: Network Printer Sharing

Postby altair4 on 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.
altair4
Level 16
Level 16
 
Posts: 6054
Joined: Tue Feb 03, 2009 10:27 am

Linux Mint is funded by ads and donations.
 

Re: How-to: Network Printer Sharing

Postby miklvw on 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?
miklvw
Level 1
Level 1
 
Posts: 1
Joined: Mon Oct 29, 2012 9:06 pm

Re: How-to: Network Printer Sharing

Postby Sharpie1 on 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
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 !
Sharpie1
Level 1
Level 1
 
Posts: 2
Joined: Wed May 15, 2013 3:25 pm

Previous

Return to Tutorials / Howtos

Who is online

Users browsing this forum: No registered users and 4 guests