Bug 455742 - Print dialog: should try UDS when fetching PPD for localhost
Summary: Print dialog: should try UDS when fetching PPD for localhost
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: gtk2
Version: 9
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Marek Kašík
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-07-17 14:48 UTC by Tim Waugh
Modified: 2008-12-12 09:18 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-12-12 09:18:07 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Tim Waugh 2008-07-17 14:48:04 UTC
Description of problem:
The GTK+ print dialog does not allow the 'Print' button to be clicked when a
printer on the local machine has been selected but CUPS is configured only to
listen on the UNIX domain socket.

Version-Release number of selected component (if applicable):
gtk2-2.12.11-1.fc9.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Fresh install.
2.Edit /etc/cups/cupsd.conf and comment out the line 'Port 631'.
3.'service cups reload'
4.Start the text editor and try to print
  
Actual results:
'Print' button disabled for local printers.

Expected results:
'Print' button enabled for all printers.

Comment 1 Marek Kašík 2008-09-04 13:48:12 UTC
Hi,
I commited patch to gtk2 CVS. The version is gtk2-2.12.11-2.

  Marek

Comment 2 Matthias Clasen 2008-09-05 02:31:06 UTC
Marek, does the patch work ? If it does, it should be committed upstream too.
It would be good to add a comment explaining whats going on there, though.
Is cupsServer() returning the path to the socket in this case ?

Comment 3 Marek Kašík 2008-09-08 12:36:49 UTC
Hi Matthias. The patch works. I'll add a comment to patch soon.
Meanwhile:
the problem was that the cups_request_ppd() function was connecting directly to printer->hostname, which was parsed from "printer-uri-supported" attribute. But the format of the attribute is "ipp://localhost/printers/*". Therefore it was connecting to localhost not to the socket (/var/run/cups/cups.sock).
Only information I have about the server is its address. So I used similar approach to the one in httpSeparateURI() (for checking whether the uri is file path) and checked presence of '/' in the first character of the string returned by the cupsServer() function.

  Regards

    Marek

Comment 4 Marek Kašík 2008-09-08 12:59:21 UTC
I committed gtk2-2.12.11-3. This is a little change of cups-unix-domain-socket.patch and add a short comment to the source code.

  Marek

Comment 5 Marek Kašík 2008-09-10 07:50:38 UTC
Hi Matthias,
the cupsServer() returns the path to the socket.

  Marek


Note You need to log in before you can comment on or make changes to this bug.