Description of problem: I have a local printer and a networked CUPS printer set up on this machine. I can print to the remote printer just fine with anything other than OpenOffice.org. When I try to print to the remote printer from OpenOffice the "print" button is greyed out and the only available button is "Options". I can print a test page to that printer from spadmin. I can print a test page from CUPS. I can print from Gnumeric. Version-Release number of selected component (if applicable): How reproducible: Every time Steps to Reproduce: 1.Load Openoffice, start new text document 2.Print 3.Select remote cups printer. Actual results: Print button is not available Expected results: Print button is available Additional info:
So the printer *is* listed in the OpenOffice.org print dialog but when you click one on the line that describes the printer the print button does not become active ? If you use tools->options->openoffice.org->options and toggle on the checkbox "use openoffice.org dialog" and then use file->print you will see the "traditional" print dialog, does that dialog work instead ?
Changing that setting does indeed allow me to print to the remote cups printer as expected.
The dialog is the gtk2 dialog, OOo doesn't do much with it except throw it up, let the dialog itself fill itself and manage itself until print is clicked and take the results, so if print remains insensitive for a given printer I suspect there's some glitch there.
The "Print" button becomes sensitive when gtk receives printer details from cups. If the "Print" button does not becomes sensitive, it looks as if cups fails to return printer details for the network printer.
Matthias: do you mean fetching the PPD? Is there some way to narrow down the problem to whether this is CUPS or GTK+?
By the way, we have Python bindings for CUPS, so it should be possible to test fetching the PPD for a specific printer like this: $ python Python 2.4.4 (#1, Oct 23 2006, 13:58:18) [GCC 4.1.1 20061011 (Red Hat 4.1.1-30)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import cups >>> c=cups.Connection() >>> c.getPPD('deskjet') '/tmp/4562cab2a3b2b' >>> $ cat /tmp/4562cab2a3b2b ..to fetch the PPD for 'deskjet' (a networked printer in this case).
Yes, "receiving the details" here means getting the ppd back in response to a cups_request_ppd() call. It is possible that the cups code in gtkcupsutils.c needs to ignore some errors.
So, Frank, if you run this from a terminal window what does it say?: python -c "import cups;c=cups.Connection();print c.getPPD('deskjet')" Replace deskjet with the name of the queue you tried to click on in the dialog.
python -c "import cups;c=cups.Connection();print c.getPPD('Samsung')" /tmp/45631b9a8d3a2
Then CUPS is working fine, and the problem (whatever it is) is somewhere in the GTK+ print dialog. Matthias: is there some way to get debugging information from that dialog?
Apparently this fix is not available if you run kde. However, I have not got my printers (remote) working with OOo. I added the fully qualified servername to /etc/cups/client.conf. I understand that it causes problems if you have both local and remote printers, but if you only have remote printers it may work for you.
Some discussion which started on the fedora-list mailing list uncovered an error 'server-error-internal-error' which cupsGetPPD2() might return. However, this only comes from trying to fetch a PPD for a queue not known to that server. That seems unlikely to be the cause of this bug, since CUPS_GET_PRINTERS obviously returned that queue name in its response if it's there in the GUI to click on. In any case, I have filed a bug upstream about this (STR #2122), since the error ought to be client-error-not-found instead. So the next step should be to get some debugging information from the GTK+ dialog I think.
Frank, What does this command say, as root?: grep -i browseshortnames /etc/cups/cupsd.conf
su -c "grep -i browseshortnames /etc/cups/cupsd.conf" Password: # BrowseShortNames: whether or not to use "short" names for remote printers #BrowseShortNames Yes
That's from the FC6 machine, the same one as you're trying to print from OpenOffice.org on? What about 'lpstat -s'?
> That's from the FC6 machine, the same one as you're trying to print from > OpenOffice.org on? Yes. > What about 'lpstat -s'? lpstat -s system default destination: Samsung device for hp_color_LaserJet_2550_series: hal:///org/freedesktop/Hal/devices/usb_device_3f0_1c17_00CNGKG37479_if0_printer_noserial device for HP_color_LaserJet_2550_series_USB_00CNGKG37479_HPLIP: hp:/usb/hp_color_LaserJet_2550_series?serial=00CNGKG37479 device for printer: ipp://mutt.melvilletheatre.net:631/printers/printer device for Samsung: ipp://mutt/printers/printer
Okay, then bug #217017 is a separate issue.
*** Bug 214415 has been marked as a duplicate of this bug. ***
A 'strace -s1000 -econnect,sendto,recvfrom -f oowriter' log would probably help to narrow down the problem.
..or, for x86 arch: strace -s1000 -econnect,send,recv,close -f oowriter 2>strace.log Can anyone help with this?
Created attachment 143519 [details] strace -s1000 -econnect,send,recv,close -f oowriter 2>strace.log
Chris: did you try and print something here?
Yes. I started OpenOffice, brought up the print dialog (with the greyed-out Print button), then ran the command. Admittedly, the "document" was empty. Do you want me to retry with an actual document with content?
No, an empty document should be fine. But run the command first, or we don't get to see why the button is greyed out. Did you attach strace to the running process or something?
Created attachment 144761 [details] strace.log for ooo writer
Here is my strace.log from the command above. 1. Ran command, writer opened 2. typed some junk text 3. File -> Print to USB connected printer 4. Button greyed out when printer selected 5. Clicked Cancel 6. Closed writer
[pid 7307] connect(39, {sa_family=AF_INET, sin_port=htons(631), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 ECONNREFUSED (Connection refused) This looks like CUPS isn't running. What does '/sbin/service cups status' say?
Nope, it is running: cupsd (pid 1909) is running...
What does this say, as root?: grep -E '^(Listen|Port)' /etc/cups/cupsd.conf
Listen localhost:631 Listen /var/run/cups/cups.sock
What does 'netstat -ntlp | grep -w 631' say, again as root?
Nothing.
Can you attach /var/log/cups/error_log? Use bzip2 on it if it is very large.
Created attachment 144840 [details] /var/log/cups/error_log Interesting error in there about not being able to bind a socket...
E [07/Dec/2006:19:27:29 -0500] Unable to bind socket for address 127.0.0.1:631 - Cannot assign requested address. That's *really* unexpected. What does '/sbin/ifconfig lo' say?
lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:21096 errors:0 dropped:0 overruns:0 frame:0 TX packets:21096 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:6183390 (5.8 MiB) TX bytes:6183390 (5.8 MiB) I have turned off the ipv6 services and have vmware server installed and running as a service. Might that have anything to do with it?
Some fc6 boxes I've seen get some bogus stuff into /etc/hosts regarding ipv6 and localhost. Could you post it's contents?
# Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost.localdomain localhost
Looks fine. For giggles, you could try to turn off/disable vmware, and then try to restart cups.
Amazingly, that did it. Changing the service startup order so vmware server starts after cups solves the problem for me. What configuration in vmware would be causing this?
Dunno, but it makes it pretty clear that this is (highly) likely a vmware issue, and not a bug in fedora (gtk2/openoffice.org/cups).
Agreed. Thank you for your help Rex and Tim.
FWIW I have the problem and I'm not running VMware.
Chris, $ netstat -ntlp | grep -w 631 $ grep localhost /etc/hosts
I appeared to be adding my output at the same time at Rex was asking for it :) # grep -E '^(Listen|Port)' /etc/cups/cupsd.conf Listen localhost:631 Listen /var/run/cups/cups.sock # netstat -ntlp | grep -w 631 tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 2565/cupsd # cat /etc/hosts # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 t60p.crunge.redhat t60p localhost.localdomain localhost ::1 localhost6.localdomain6 localhost6
Created attachment 144923 [details] CUPS error log
Your problem appears to be different than Austin's. cups is at least accepting (some) jobs: I [05/Jan/2007:12:39:28 -0500] Job 35 queued on "caterpillar" by "crunge". I [05/Jan/2007:12:39:28 -0500] Started backend /usr/lib/cups/backend/ipp (PID 18571) for job 35. N [05/Jan/2007:12:39:32 -0500] [Job 35] Print file accepted - job ID 19230.
True. My problem(s) are: (1) I can't print with evince or with OO2.org (when using the default print dialog). The "Print" button is not selectable. (2) Despite setting a default printer, every time the system is rebooted I need to go into system-config-printer and do it again. (Perhaps unrelated to (1)).
Chris: please read comment #25. Your strace output wasn't any help because I couldn't see the point where you printed something.
I am back. The Vmware fix resolved issues I had printing to a locally connected USB printer via CUPS, but I just noticed I still cannot print to a networked cups printer with the same symptoms (print button grayed out for those printers).
So please start again from comment #20. :-) I'd like to see the strace output.
Created attachment 145203 [details] strace output Sorry for the delay. Steps: (1) strace -s1000 -econnect,send,recv,close -f oowriter 2>strace.log (which launced oowriter) (2) tried to printer to a networked cups printer (3) closed oowriter and attached the logt I hope this helps.
/sigh/ sorry about the spelling mistakes in the last post... let me know if anything isn't clear
[pid 13087] recv(39, "HTTP/1.1 404 Not Found\r\nDate: Tue, 09 Jan 2007 22:23:35 GMT\r\nServer: CUPS/1.1\r\nContent-Language: en_US\r\nUpgrade: TLS/1.0,HTTP/1.1\r\nConnection: close\r\nContent-Type: text/html\r\nContent-Length: 138\r\n\r\n<HTML><HEAD><TITLE>404 Not Found</TITLE></HEAD><BODY><H1>Not Found</H1>The requested resource was not found on this server.</BODY></HTML>\n", 2048, 0) = 336 ** (VCLSalFrame:13087): WARNING **: Error result: HTTP Error in GET Success Is caterpillar a raw queue? There doesn't seem to be a PPD for it on the server.
Yes. According to system-config-printer it is a "Local Raw Printer on ns1.iad.redhat.com" It does work with other printing applications like Firefox and when using Openoffice.org dialogs for save/print (which isn't the default).
In that case, this boils down to bug #219806. *** This bug has been marked as a duplicate of 219806 ***