Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've been messing with CUPS and gnome-cups-manager and I've added a wrong networkprinter but I can"t delete the printer. Very weird.
/etc/cups/printers.conf doesn't have the printer listed but yet, it's shown in gnome-cups-manager and the webadmin page for CUPS (localhost:631).
I've even deleted /etc/cups/ manually, didn't change a thing.
One strange thing I've noticed is that the printer is in /var/run/cups/printcap but that files gets automattically generated by /etc/cups/printers.conf and there is no trace of this printer (I even deleted the conf file).
It's a ghost printer I tell you! Deleting from localhost:631 doesn't work either.
There it turns up at "printername on soapbox" and when I press the delete button cups tries to go to http://soapbox:631 which doesn't exist and therefor cups is unable to delete that printer.
If I delete the printer from gnome-cups-manager it works but the printer automatically returns when I run gnome-cups-manager again.
I've also tried deleting it from oopadmin but the delete button was greyed out. Strangest thing I've encountered yet! I really don't have a clue what else I can do.
When I push the delete button in cups in my browser, I get following error:
Quote:
Gateway Timeout
The following error occurred:
A DNS lookup error occurred because the request timed out during the lookup. (DNS_TIMEOUT)
Please contact the administrator.
Well, as root, just
# grep "nameofprinter" /etc/* /var/* /home/*
Something should show up.
? The printer you want to use, do others print to it or, are you the first to print to it? Just wondering if you have it setup right on the server. If not, get back with me and I'll set you through it.
Originally posted by -X- Well, as root, just
# grep "nameofprinter" /etc/* /var/* /home/*
Something should show up.
? The printer you want to use, do others print to it or, are you the first to print to it? Just wondering if you have it setup right on the server. If not, get back with me and I'll set you through it.
Nothing came up and I only 1 computer prints to it on the network. When I turn browsing off in cupsd.conf, the printer dissappears, so I'm guessing the printer gets "pushed" to the client.
The thing is, I can't print to it from the server. It's an USB printer.
Hmmm... I got the printer on the server working again.
On the client I get this error: "Unable to get printer status (client-error-forbidden)!"
When I try to print to the printer on the server.
DNS lookup error ??
Did you configure /etc/hosts on both client and server so that they can associate the proper IP adress on your local network to the right host name ?
If for example, you have 2 computers on your network:
1 named "server" with ( for example ) an Ip adress of 192.168.0.1 and
1 named "client" with ( for example ) an Ip adress of 192.168.0.2
the /etc/hosts on "server" should looks like:
127.0.0.1 localhost server
192.168.0.2 client
Originally posted by Biased turkey DNS lookup error ??
Did you configure /etc/hosts on both client and server so that they can associate the proper IP adress on your local network to the right host name ?
If for example, you have 2 computers on your network:
1 named "server" with ( for example ) an Ip adress of 192.168.0.1 and
1 named "client" with ( for example ) an Ip adress of 192.168.0.2
the /etc/hosts on "server" should looks like:
127.0.0.1 localhost server
192.168.0.2 client
and on "client" /etc/hosts should looks like:
127.0.0.1 localhost client
192.168.0.1 server
Yes, I can ping from client to server and server to client using the hostnames. So, this is set up correctly.
Unless you have denied outside clients or special deny setup, you shouldn't need to hosts.allow. Make sure your firewall is open for printing.
>>> Server side <<<
The only thing you need to change on the server in cupsd.conf is to allow outside clients access;
<Location />
Encryption IfRequested
Satisfy All
Order deny,allow
Deny From All
#Allow From 127.0.0.1 <---------------- I just commented this out.
Allow From All <---------------- Add this line. Very common problem.
</Location>
Then restart the cupsd service to register all of this.
>>> Client side <<<
>>> KDE printer config app setup the following <<<
My Slackware /etc/printcap for server corvette, printer hp940c. I always put the server name as part of the printer. Mustang is my wireless laptop.
# This file was automatically generated by cupsd(8) from the
# /etc/cups/printers.conf file. All changes to this file
# will be lost.
corvette-hp940c|corvette-hp940c:rm=mustang:rp=corvette-hp940c:
My /etc/cups printers.conf.
# Printer configuration file for CUPS v1.1.19
# Written by cupsd on Sun Jun 6 07:20:32 2004
<DefaultPrinter corvette-hp940c>
Info HP DeskJet 940C, hpijs
Location server
DeviceURI ipp://corvette:631/printers/hp940c
State Idle
Accepting Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
</Printer>
My /etc/cups/client.conf
ServerName corvette.office.org
I was going to use localhost:631 to setup the printer on the client, but saw the KDE printer config app and thought, 'what the heck, lets see how this works.' So after allowing "All" to the server cupsd, I just used the KDE print config app. Just selected the remote cups, it found the printer, I selected, and it worked perfect. It also setup /etc/cups/interfaces/corvette-hp940c.ppd
Not sure about gnome. Keep posting, should be able to get it running. Also, your results would be helpful to others.
Maybe we should start from scratch, because it's not clear to me if you can access the printer from the server.
1) disconnect your network
2) from Gnome on the server ( I use KDE ) delete any available printer.
3) point your browser as root at http://localhost:631
4) follow the procedure to create a new printer
try printing from the server. It's not even worth trying to print from the client if you can't even print from the server.
If it works, reconnect your network, desable any firewall on the client and server and edit the cupsd.conf.
I added the following lines:
in the security options:
<Location />
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
# specify the client IP
Allow From 192.168.0.2
</Location>
just before the end of the file, add the Browsing options:
#
# End of "$Id: cupsd.conf.in,v 1.13 2003/04/10 20:14:04 mike Exp $".
#
Browsing On
BrowseProtocols cups
BrowseAddress 192.168.0.2
BrowseInterval 60
Don't be discouradged, it took me 2 weeks ( and going through the 100 + pages of the cups software administrator manual ) before having things working.
After that, the client should automatically ( I mean it, nothing to do on the client side ).
P.S. If you want I can email you my complete cupsd.conf
The single biggest problem with cups is the "Allow from 127.0.0.1" has to be changed to open up the cups sever printer to clients. For what I do I use "All". You're right BT about printing from the server first. After that and changing cupsd.conf shouldn't be a problem. For completeness, I don't have any of the Browser..... options set.
The single biggest problem with cups is the "Allow from 127.0.0.1" has to be changed to open up the cups sever printer to clients
You do not have to "change" anything. The 1st line
Allow From 127.0.0.1
Is required so the server has to detect itself so to speak when it has a printer connected to itself.
If you have no network, just 1 system with a printer connected to it you need that line.
The same is true for /etc/hosts. If you have just 1 system and no network at all you still require the line
127.0.0.1 localhost localhost.localdomain ( or somethong like that )
Then if you have a local network with 1 server and 1 client you have to add a 2nd line in cupsd.conf with the client Ip adress to allow the client to print .
and you have to add the 3rd line
BrowseAddress 192.168.0.2 ( 192.169.0.2 being the client adress )
to let the client know that a printer is available on the server.
Thanks a lot for the help guys, I've been messing with cupsd.conf and it works! :-)
One other problem though, on the client there's also a parallel printer connected. The printer gets autodetected by gnome-cups-manager and I can set it up with no problems, BUT when I want to print to it, the printer remains idle. No printjobs.
Any ideas what could be wrong? As previous, it used to work before this whole mess with my network printer.
Biased Turkey; not sure what you're getting at, but Allow From All, allows everthing, even local host. I know about localhost, but we are talking about client/server printing. Yes, for only local printing, just leave the cupsd.conf as it is. You can change how you wish, add in each client, or just make it simple for the entire office and Allow From All. My office setup works fine with only the Allow From All change, no browse. I know, I use it every day. Go and re-read my post. The point is the cups server has to be opened up. How you do that is up to the individule.
Biased Turkey; not sure what you're getting at, but Allow From All, allows everthing, even local host
... and Allow from ALL means any hacker with any IP too.
I prefer to do it the other way: restrict to all then allow only a few selected one.
Of course if you are behind a firewall ( I have a dedicated rig running Firestarter ) allowing everyone is less risky
Better to be safe than sorry
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.