After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 648784 - entering ip address of network printer does nothing
entering ip address of network printer does nothing
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Printers
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Marek Kašík
Control-Center Maintainers
: 652208 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-04-27 16:34 UTC by William Jon McCann
Modified: 2013-03-20 14:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
enable services on firewall (9.52 KB, patch)
2011-06-21 08:50 UTC, Marek Kašík
none Details | Review
screenshots (191.18 KB, image/png)
2011-06-29 11:27 UTC, Marek Kašík
  Details
modified patch (14.11 KB, patch)
2011-07-01 12:48 UTC, Marek Kašík
none Details | Review
screenshot of warning about missing firewalld (42.61 KB, image/png)
2011-07-01 12:48 UTC, Marek Kašík
  Details
screenshot of notification about enablement of mDNS service on firewall (163.55 KB, image/jpeg)
2011-07-01 12:50 UTC, Marek Kašík
  Details
firewall warning (38.76 KB, image/png)
2011-07-14 13:43 UTC, Marek Kašík
  Details
picture showing padding (36.34 KB, image/png)
2011-07-14 13:45 UTC, Marek Kašík
  Details
patch enabling services on firewall + showing warning message if needed (17.92 KB, patch)
2011-07-22 13:12 UTC, Marek Kašík
reviewed Details | Review

Description William Jon McCann 2011-04-27 16:34:32 UTC
When I try to add a new network printer by ip address it does nothing when I click Add.
Comment 1 Marek Kašík 2011-04-28 12:50:08 UTC
Is the printer shared by a CUPS server? If yes, does it have accessible PPD file (wget "ip-address/printers/printer.ppd") ?
Comment 2 William Jon McCann 2011-04-28 18:16:01 UTC
Not sure, it is a HP/Jetdirect printer.  Adding it with system-config-printers worked fine.
Comment 3 Jan van Esdonk 2011-04-29 12:29:05 UTC
I had a similar problem. I wasn't able to add my network printer through the gnome-control-center but system-config printers worked fine. The printer is a Epson Stylus Office BX610FW.

When trying to add it this was written to my CUPS access_log file

localhost - - [29/Apr/2011:14:13:16 +0200] "POST / HTTP/1.1" 200 323 Create-Printer-Subscription successful-ok
localhost - - [29/Apr/2011:14:13:26 +0200] "POST / HTTP/1.1" 401 75 CUPS-Get-Devices successful-ok
localhost - root [29/Apr/2011:14:13:26 +0200] "POST / HTTP/1.1" 200 1875 CUPS-Get-Devices -
localhost - - [29/Apr/2011:14:15:30 +0200] "POST / HTTP/1.1" 200 303 CUPS-Get-PPDs -
localhost - - [29/Apr/2011:14:15:30 +0200] "POST / HTTP/1.1" 200 303 CUPS-Get-PPDs -
Comment 4 Jean-François Fortin Tam 2011-05-05 20:42:26 UTC
I have a LaserJet 5 network printer (it was not shared by a cups server) and, like Jan's comment #3, was unable to add it using gnome-control-center but was able to do it with system-config-printer or the cups web interface.
Comment 5 Marek Kašík 2011-05-06 07:16:32 UTC
Hi,

could you send me result of "lpinfo -l -v" (under root)? It is enough to cut the part which contains the requested printer.

Regards

Marek
Comment 6 Jean-François Fortin Tam 2011-05-06 12:33:16 UTC
[root@kusanagi jeff]# lpinfo -l -v
Périphérique : uri = usb://Samsung/SCX-4x26%20Series
        class = direct
        info = Samsung SCX-4x26 Series
        make-and-model = Samsung SCX-4x26 Series
        device-id = MFG:Samsung;CMD:PCL5E,PCL6,GDI,FAX2,FWV;MDL:SCX-4x26 Series;CLS:PRINTER;MODE:FAX2;STATUS:BUSY;
        location = 
Périphérique : uri = http
        class = network
        info = Internet Printing Protocol (http)
        make-and-model = Unknown
        device-id = 
        location = 
Périphérique : uri = scsi
        class = direct
        info = Imprimante SCSI
        make-and-model = Unknown
        device-id = 
        location = 
Périphérique : uri = https
        class = network
        info = Internet Printing Protocol (https)
        make-and-model = Unknown
        device-id = 
        location = 
Périphérique : uri = ipp
        class = network
        info = Internet Printing Protocol (ipp)
        make-and-model = Unknown
        device-id = 
        location = 
Périphérique : uri = socket
        class = network
        info = AppSocket/HP JetDirect
        make-and-model = Unknown
        device-id = 
        location = 
Périphérique : uri = lpd
        class = network
        info = Hôte ou imprimante LPD/LPR
        make-and-model = Unknown
        device-id = 
        location = 
Périphérique : uri = socket://192.168.1.200
        class = network
        info = HP LaserJet 5
        make-and-model = HP LaserJet 5
        device-id = MANUFACTURER:Hewlett-Packard;COMMAND SET:PJL,MLC,PCL,PCLXL;MODEL:HP LaserJet 5;CLASS:PRINTER;DESCRIPTION:Hewlett-Packard Lase
        location = 


(note that the laserjet and samsung printers are both currently set up correctly, don't know if this can affect this command's output)
Comment 7 Marek Kašík 2011-05-13 14:56:49 UTC
Hi Jean,

which version of gnome-control-center do you have? Does the printer show up even if you don't check the "Search by Address" button? It adds the HP LaserJet 5 successfully with control-center-3.0.1.1-6.fc15 for me.

Marek
Comment 8 Jim Nelson 2011-05-13 19:17:58 UTC
I'm having this problem as well with an HP PhotoSmart Premium printer.  When I to go add the printer through the GNOME Control Center, I select "Network" and type the IP address and press Add and it simply returns me to the control panel.  If I do it a few times the Control Center will crash.  This is dumped to the console:

**
GLib:ERROR:gvarianttypeinfo.c:186:g_variant_type_info_check: assertion failed: (0 <= index && index < 24)

(Unsure if I should report this as a separate bug.)

I attempted the wget command mentioned in comment #1:

jim:~$ wget "192.168.1.10/printers/printer.ppd"
--2011-05-13 12:14:43--  http://192.168.1.10/printers/printer.ppd
Connecting to 192.168.1.10:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2011-05-13 12:14:43 ERROR 404: Not Found.

And my result for lpinfo -l -v:

Device: uri = scsi
        class = direct
        info = SCSI Printer
        make-and-model = Unknown
        device-id = 
        location = 
Device: uri = ipp
        class = network
        info = Internet Printing Protocol (ipp)
        make-and-model = Unknown
        device-id = 
        location = 
Device: uri = lpd
        class = network
        info = LPD/LPR Host or Printer
        make-and-model = Unknown
        device-id = 
        location = 
Device: uri = http
        class = network
        info = Internet Printing Protocol (http)
        make-and-model = Unknown
        device-id = 
        location = 
Device: uri = socket
        class = network
        info = AppSocket/HP JetDirect
        make-and-model = Unknown
        device-id = 
        location = 
Device: uri = https
        class = network
        info = Internet Printing Protocol (https)
        make-and-model = Unknown
        device-id = 
        location = 

I should also mention that when I attempt to add a printer, I'm only offered two choices in the list on the right: Local and Network.  When I select Network the window on the right remains empty.  It makes no difference if I select "Search by Address" or not.
Comment 9 Marek Kašík 2011-05-16 14:44:31 UTC
Hi Jim,

I see that your printer should be capable of publishing itself by mDNS protocol. Do you have avahi-daemon running? If not, could you start it and try adding the printer again? (just run "service avahi-daemon status" under root and if it is inactive then run "service avahi-daemon start").

Another problem is that g-c-c is not able to add HP/JetDirect printer if it is not published by the mDNS protocol. I work on it.

Regards

Marek
Comment 10 Jean-François Fortin Tam 2011-05-16 17:44:50 UTC
@Marek in comment #7: 

> Which version of gnome-control-center do you have?
Same as yours, control-center-3.0.1.1-6.fc15

>Does the printer show up even if you don't check the "Search by Address" button?
No, it never shows up under any circumstances.
Comment 11 Jim Nelson 2011-05-23 18:32:35 UTC
Marek,

After posting my comment I tried running system-config-printers and got the printer registered and working.  One important thing happened that might have some bearing on this: When I ran system-config-printers, it reported that it needed to punch a hole in my firewall (of course, it didn't use this terminology).  Once I agreed, it found the printer and I got it configured.  When I returned to the GNOME control center, it showed the printer and I was able to configure it.

I don't know that the firewall thing is the missing puzzle piece here, but it sure seems relevant.

-- Jim
Comment 12 Matthias Clasen 2011-06-08 14:17:18 UTC
I was going to say that I think this (turning on mdns) is better off in a 'privacy and sharing' panel, but the designers seem to think that printer sharing/discovery is not really in scope for that, see

https://live.gnome.org/Design/SystemSettings/PrivacyAndSharing

so maybe it _would_ be ok to just turn it on from the printer panel when necessary. Would still be good to get some design input on how that might look in detail (warning or not, what to say, etc...)
Comment 13 Bastien Nocera 2011-06-09 15:53:30 UTC
*** Bug 652208 has been marked as a duplicate of this bug. ***
Comment 14 Gendre Sébastien 2011-06-10 13:08:32 UTC
I have a similar problem with a HP Laserjet 3390. I can add it, but in the Control Center panel on IP Address field, it's write "Localhost".
Comment 15 Marek Kašík 2011-06-21 08:50:59 UTC
Created attachment 190347 [details] [review]
enable services on firewall

Hi,

this patch implements enabling of required services on firewall. It enables mdns, ipp, ipp-client and samba-client services for 5 minutes just for detection. After that, it enables services needed by added printer permanently. It informs user about these steps.
It is implemented using DBus API of FirewallD, which is not default firewall yet, so you have to install it and enable it.
This is just a proposal, it needs some work still (e.g. improvement of texts, asynchronous DBus calls, ...). Don't review the code yet.

Regards

Marek
Comment 16 Marek Kašík 2011-06-29 11:27:00 UTC
Created attachment 190921 [details]
screenshots

Hi,

I've created few screenshots to show how does it work. The upper right screenshot and lower left screenshot show the situation when the FirewallD is available and no required service is enabled. It tells you that it enables these services temporarily (for 5 minutes) before getting devices and that it enables the requested services permanently after the user selects a printer and press Add.
The lower right screenshot show the situation when FirewallD is not installed (or running). It informs you that you need to enable the listed services.

Suggestions are welcomed.

Marek
Comment 17 Matthias Clasen 2011-06-29 18:15:06 UTC
My immediate reaction is that we probably want to avoid the dialog-on-top-of-dialog-on-top-of-window situation, and maybe just show the information in the status area of the dialog, where you already have a spinner. Plus, the generic warning icon does stick out a bit. Anyway, just quick impressions.
Comment 18 Marek Kašík 2011-06-30 10:09:20 UTC
Maybe we need a Cancel button somewhere so the user can stop enabling those services on firewall (it doesn't ask me for a password here...).
Comment 19 Marek Kašík 2011-07-01 12:48:04 UTC
Created attachment 191090 [details] [review]
modified patch
Comment 20 Marek Kašík 2011-07-01 12:48:47 UTC
Created attachment 191091 [details]
screenshot of warning about missing firewalld
Comment 21 Marek Kašík 2011-07-01 12:50:54 UTC
Created attachment 191092 [details]
screenshot of notification about enablement of mDNS service on firewall
Comment 22 Matthias Clasen 2011-07-01 13:05:33 UTC
Some feedback on the first screenshot:

- there should be some padding around the text, not sure about the exact amount

- there's also some missing padding between the grey/white box and the address entry

- the background of the right hand side should be white not grey

- I also wonder if the address entry and checkbox should be insensitive if search is not possible -  we can find out if the required services are running, right ?
Comment 23 Jean-François Fortin Tam 2011-07-01 13:33:02 UTC
Adding to Matthias' comments:
- there should be a shadow around the scrolled areas for increased contrast/cleanliness. Something like gtk.ScrolledWindow.set_shadow_type(gtk.SHADOW_IN)
(I know this is python, but just for the sake of the example)

- The "Address" label shoud probably be "Address:" and left-aligned, while the text entry expands
Comment 24 Marek Kašík 2011-07-14 13:43:45 UTC
Created attachment 191960 [details]
firewall warning

Hi,

this picture shows a modified version of the patch. The text is shown in a new GtkTextView so it can have padding and is on white background.
I didn't place there the Address thing since we need to tell this to user and showing a mix of warning and discovered printers would be confusing. But this forces user to use firewalld as a firewall solution.
Another thing is that we can not find out whether there is a firewall configured since we don't have permissions to view the configuration. Hence I can not say whether the computer has a firewall or not (except for the firewalld).

Regards

Marek
Comment 25 Marek Kašík 2011-07-14 13:45:29 UTC
Created attachment 191962 [details]
picture showing padding

This picture shows added vertical padding and setting of alignment for the "Address" label.
Comment 26 Matthias Clasen 2011-07-14 16:52:25 UTC
These look much better, thanks.
Comment 27 Marek Kašík 2011-07-15 12:13:43 UTC
When I'm thinking more about this, I see that the warning should be just informational and shouldn't block showing of discovered printers :(. Since we tell user that we need those services enabled on firewall, he can do it manually and then he expects to be able to add new printers.
Maybe we need an "OK" button which will remove the warning (but this makes it similar to the GtkMessageDialog, only embedded) or a GtkCheckBox "Don't show me again" (but we have to solve storing of the information between runs of the Control Center).
What do you think?

Regards

Marek
Comment 28 Matthias Clasen 2011-07-20 12:05:55 UTC
(In reply to comment #27)

> What do you think?
> 

I think closing the dialog and trying again should be good enough for the 'opened firewall manually' case.
Comment 29 Marek Kašík 2011-07-22 13:12:54 UTC
Created attachment 192456 [details] [review]
patch enabling services on firewall + showing warning message if needed

Hi,

this is a patch which I would like to commit to master. It enables services mdns, ipp, ipp-client and samba-client on firewall for 5 minutes for detection. It enables required services permanently for printers selected by user for addition then. It shows a notification for the permanent enable only.
It uses firewalld, so if it is not installed or running it shows a warning message to the user in the place where discovered printers will be shown (both local and network). The warning disappears after the finish of printers discovery (but not from network part if no printer was found).

Regards

Marek
Comment 30 Matthias Clasen 2011-07-22 17:56:23 UTC
Review of attachment 192456 [details] [review]:

Looks good enough to commit with the _() additions below.

::: panels/printers/pp-new-printer-dialog.c
@@ +1632,3 @@
+                  g_str_has_prefix (pp->devices[device_id].device_uri, "mdns:"))
+                {
+                  show_notification ("Enabling service mDNS on firewall",

Needs _() ? Also, the wording could be improved. I don't have a concrete proposal, though.

One thing that occurs to me is that it would be slightly more natural to have the firewall service itself show a notification when a hole gets opened programmatically (of course, you don't want to see those bubbles when you are using s-c-firewall to configure your firewall). For now, keeping the notifications here is certainly ok.

@@ +1641,3 @@
+              if (g_strrstr (pp->devices[device_id].device_uri, "smb:") != NULL)
+                {
+                  show_notification ("Enabling service Samba Client on firewall",

Same here: _(), again the wording could be improved. 'Allowing outgoing Samba connections' ?

@@ +1652,3 @@
+                  show_notification ("Enabling services IPP and IPP Client on firewall",
+                                     NULL,
+                                     "dialog-information-symbolic");

Again: _(). Wording could be improved. 'Opening firewall for IPP connections' ?
Comment 31 Marek Kašík 2011-07-27 11:37:00 UTC
Hi,

thank you for your comment Matthias. I made the changes you've mentioned and committed the patch to master. I used the "Opening firewall for * connections" form of notifications. It appears best to me.

Regards

Marek
Comment 32 Marek Kašík 2011-11-29 14:58:13 UTC
I'm closing this bug, since entering IP address of network printer adds printer now.
If it doesn't work for you then open a new bug please.

Marek
Comment 33 William Jon McCann 2011-11-29 15:10:52 UTC
What version is it fixed in? It didn't work for me in F16.
Comment 34 Marek Kašík 2011-11-29 15:24:45 UTC
Does it show you the message with FirewallD when you are adding the printer?
Comment 35 Marek Kašík 2011-11-29 15:28:05 UTC
Does it show the printer which you want to add in the list of available printers?
Comment 36 William Jon McCann 2012-02-22 16:48:02 UTC
Discussed this with Marek. I think we need to remove all the poking of firewalls and warning about firewalld from the code. We need to ensure that distros don't ship broken firewall rules. Or that when you enable a service you also enable it at the firewall.

We have another bug for improving the design of the add printer dialog.

Probably can close this once we remove that code, right?
Comment 37 Matthias Clasen 2012-03-09 20:32:06 UTC
I think we should probably do this together with the other printer panel design improvements in 3.5. 3.4 is pretty much done at this point.
Comment 38 romu 2012-10-25 12:07:32 UTC
Hi everyone,
Same problem with Ubuntu Gnome Remix 12.10 64 bits + Gnome 3 ppa. Indeed, I've never been able to add my old HP Deskjet 815C connected to my wireless router to Gnome with the printer applet.

And also for me, system-config-printers works just fine.
Comment 39 Marek Kašík 2013-03-20 14:56:52 UTC
(In reply to comment #36)
> Discussed this with Marek. I think we need to remove all the poking of
> firewalls and warning about firewalld from the code. We need to ensure that
> distros don't ship broken firewall rules. Or that when you enable a service you
> also enable it at the firewall.
> 
> We have another bug for improving the design of the add printer dialog.
> 
> Probably can close this once we remove that code, right?

The code for poking firewall was removed and the new design has been implemented in 3.6.0. I'm closing this.

Thank you all for your help