LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Trying to share printer between 2 Linux machines (https://www.linuxquestions.org/questions/linux-networking-3/trying-to-share-printer-between-2-linux-machines-854860/)

norm.h 01-07-2011 12:55 PM

Trying to share printer between 2 Linux machines
 
Two machines, each running Ubuntu 10.10.
Desktop is wired to the router, and laptop is wireless.
Printer is an HP Photosmart C4400 All in One series, and is connected to the desktop via USB.Prints OK from desktop.
I have CUPS set up on both machines, and the laptop can see the printer.
Desktop firewall allows CUPS in on port 631.
Printer properties are set to enabled and shared
Desktop is set to publish printers, and laptop is set to show printers from other systems.
Fine until I try to print from laptop, when print job is shown as sent, but printer remains idle.
Another thing is that on the laptop, the "enabled" setting drops off.
I think this must be a configuration issue, but cannot find an answer anywhere.
File sharing set up using Nautilus works fine.

stress_junkie 01-07-2011 05:00 PM

Port 631 is the CUPS management port. It responds to http requests. Try this in your web browser.
Code:

http://localhost:631
Once you have done that then check this in your web browser.
Code:

http://localhost:631/help/network.html
If that doesn't work then try this in your web browser.
Code:

http://www.cups.org/documentation.php/network.html
According to that manual page the printer access port should be 9100.

markush 01-07-2011 05:23 PM

Hello,
Quote:

Originally Posted by norm.h (Post 4216647)
...until I try to print from laptop, when print job is shown as sent, but printer remains idle...

Did you add the user to the persons who are allowed to print (on the laptop)?

Markus

norm.h 01-08-2011 04:33 AM

Many thanks to markrush and stress junkie.
I'll have have a play with your suggestions, but it's not easy to get unrestricted access to both PC's at the same time, so may not be till after the weekend.
Please bear with me.

"Did you add the user to the persons who are allowed to print (on the laptop)?"
I'm running both machines with full permissions. Where would I do that?

markush 01-08-2011 04:55 AM

Quote:

Originally Posted by norm.h (Post 4217211)
..."Did you add the user to the persons who are allowed to print (on the laptop)?"
I'm running both machines with full permissions. Where would I do that?

Within the webinterface: http://localhost:631 in "Administration" or in "Printer" (don't know exactly) you'll find that.

Markus

norm.h 01-08-2011 10:11 AM

Do you mean the bit about Classes?

markush 01-08-2011 10:48 AM

No, this has nothing to do with classes, I'll check it out when I'm at home.

Markus

markush 01-08-2011 03:12 PM

1 Attachment(s)
Here a screenshot, the button for the allowed users is on the righthand side near the bottom.

Markus

norm.h 01-09-2011 04:49 AM

Thanks for that, but when I go to that page, it only shows the printer details and none of the other options are there.
Also, my page isn't coloured, and I notice that my Cups version is 1.4.4.6, whereas yours is 1.3.11.
I can't find the options yours shows, on any page in my Cups

EDIT: Good news, it works.
The only thing I did was set the firewall on the laptop to allow port 631 in and out. I'd already allowed 631 "in" on the desktop (server)
Thanks for the interest and help

SECOND EDIT:
It's not right, so I'll have to do more head scratching.

THIRD EDIT:
Now OK, printed two test pages and two pages from Open Office, but please don't ask what I did. Beyond the above, I just had several go's at adding the printer. .

EricTRA 01-09-2011 05:01 AM

Quote:

Originally Posted by norm.h (Post 4218121)
Thanks for that, but when I go to that page, it only shows the printer details and none of the other options are there.
Also, my page isn't coloured, and I notice that my Cups version is 1.4.4.6, whereas yours is 1.3.11.
I can't find the options yours shows, on any page in my Cups

Hi,

You're using the newer version of CUPS which can be quite confusing at first because of the differences. Go to:
Administration -> Manage Printers -> Click your printer -> Administration DROPBOX -> Set Allowed Users
Provide the user(s) for which you want to allow printing.

All the other options are there as well, in the menu when clicking on the Administration 'button'.

Kind regards,

Eric

norm.h 01-09-2011 07:36 AM

Many thanks for that.
I didn't have to do anything like that to get it to work (see previous post), but the information is very useful, and |I'll reference it for the future
N

norm.h 01-13-2011 05:23 AM

Only one thing doesn't seem quite right.
There's a time lag of up to 4 minutes between switching on, and the laptop "seeing" the printer.
After that, everything works OK.
Is this a CUPS thing, or a Ubuntu issue, and can it be improved?
If so, how?

markush 01-13-2011 05:45 AM

I think you'll have to restart the cupsd-daemon on the laptop, then it will instantly recognized the printer.

Markus

norm.h 01-13-2011 10:16 AM

By the time I'd faffed around trying various commands, the laptop had found the printer.
What is the correct command, and would I have to do that every time?
N

markush 01-13-2011 10:28 AM

Hello,

the cupsd daemon "looks" for new printers in the network in periodic intervals of time.

I don't know if one can change this intervals to very short (which means that cupsd finds the new printer almost instanly). I think you'll have to read the documentation.

In order to restart the daemon, you'll have to locate the program
Code:

whereis cupsd
and use the command
Code:

/path_to_the_daemon/cupsd restart
but this may vary from distribution to distribution. Probably on your system
Code:

/etc/init.d/cupsd restart
Markus


All times are GMT -5. The time now is 10:59 AM.