cannot print from shared printer in Ubuntu?
November 4th, 2007
Sharing and using a printer in Ubuntu has turned to a very simplified procedure. However there may be a tiny bit of extra homework you have to do.
By default the CUPS is configured to accept incoming connections only from localhost (yes, I find it kind of odd, too... what's the point of printer sharing if restricted only to local host?).
To fix this you have to edit your /etc/cups/cupsd.conf configuration file:
Go to the section for the listeners configuration (it is not far from the beginning of the file):
As you can see it is configured to accept connections only from localhost. Replace localhost with an asterisk to allow incoming connection from outside:
Restart the CUPS system:
Now you should be able to set up network printers from the other computers and use the printer.
By default the CUPS is configured to accept incoming connections only from localhost (yes, I find it kind of odd, too... what's the point of printer sharing if restricted only to local host?).
To fix this you have to edit your /etc/cups/cupsd.conf configuration file:
sudo gedit /etc/cups/cupsd.confGo to the section for the listeners configuration (it is not far from the beginning of the file):
# Only listen for connections from the local machine.
Listen localhost:631
Listen /var/run/cups/cups.sockAs you can see it is configured to accept connections only from localhost. Replace localhost with an asterisk to allow incoming connection from outside:
# Only listen for connections from the local machine.
Listen *:631
Listen /var/run/cups/cups.sockRestart the CUPS system:
sudo /etc/init.d/cupsys restartNow you should be able to set up network printers from the other computers and use the printer.
January 5th, 2008 at 1:47 pm Hello Giannis,
I am having real trouble sharing a locally attached printer to other client machines on my Gutsy Ubuntu network. All the machine run 7.10 Gutsy. All of them have had the latest Avahi patches installed. CUPS is configured correctly to share the published printer on the server and the client machines are set up to browse for shared printers.
The problem is that when I turn on the server machine in the morning, the client machines cannot see the shared printer at all. If I go to a terminal and restart cups on the sever machine as above (without making any change to the config files), hey presto, the client machines see the printer and I can print with no problem.
Do you have any ideas?
Thank you in advance
Hilary
PS here is the server config file, it is the std config file, with no changes.
LogLevel warning
SystemGroup lpadmin
# Allow remote access
Port 631
Listen /var/run/cups/cups.sock
# Share local printers on the local network.
Browsing On
BrowseOrder allow,deny
BrowseAddress @LOCAL
DefaultAuthType Basic
# Allow shared printing...
Order allow,deny
Allow @LOCAL
# Restrict access to the admin pages...
Order allow,deny
Allow localhost
AuthType Default
Require user @SYSTEM
# Restrict access to the configuration files...
Order allow,deny
Allow localhost
Require user @OWNER @SYSTEM
Order deny,allow
AuthType Default
Require user @SYSTEM
Order deny,allow
AuthType Default
Require user @SYSTEM
Order deny,allow
Require user @OWNER @SYSTEM
Order deny,allow
Order deny,allow
January 8th, 2008 at 12:38 am Hilary,
your problem seems kind of odd, I cannot think of something specific. Maybe it has nothing to do with CUPS at all, perhaps it is a side effect caused by another piece of software. I've heard that AppArmor was responsible for failure on CUPS on some systems, but that's not necessarily your case.
I would suggest you (if possible) to use a minimal configuration at first, to make sure everything works, and then add packages and services while tracking the behaviour of the system. Maybe this can help you find the misfit...
Sorry that I cannot help you any better.
Cheers
June 19th, 2008 at 3:26 pm ..or you can just from Printer Configuration check the "Allow remote administration" box.
December 10th, 2008 at 1:04 pm Restart the CUPS system:
-----------------------
On Ubuntu 8.10 (Intrepid Ibex) i think the command is
sudo /etc/init.d/cups restart instead of
sudo /etc/init.d/cupsys restart
December 16th, 2008 at 4:26 am Using Ubuntu 8.04 host, from Win2000 in VirtualBox, I got an "access denied" message in Add Printer dialog, until adding this "Allow from" line to cupsd.conf:
# Restrict access to the server...
Order allow,deny
Allow from 10.0.1.*
August 8th, 2009 at 10:46 pm Thanks Ashish! That's the command on 9.04 / Jaunty Jackalope also.