Skip to content

Cannot add printer with GNOME GUI (grayed out) #12058

Closed

Description

@bjornfor

Open gnome-control-center and select "Printers". The "Add new printer" button is grayed out, making it impossible to add a printer.

This is what the program prints to the terminal:

(gnome-control-center:16664): printers-cc-panel-WARNING **: Your system does not have the cups-pk-helper's policy "org.opensuse.cupspkhelper.mechanism.all-edit" installed. Please check your installation

Relevant configuration.nix snippet:

  services = {
    ...
    printing.enable = true;
    xserver.desktopManager.gnome3.enable = true;
  };

(I don't know if this is relevant, but I found gnome.libgnomecups package in nixpkgs, but it is for GNOME 2.)

Activity

  1. added
    0.kind: bug
    6.topic: nixos
    6.topic: GNOME
    on Jan 1, 2016
  2. bjornfor commented on Jan 1, 2016

    @bjornfor
    ContributorAuthor

    I've packaged cups-pk-helper in my local tree. I got a bit further. I could click on the 'Add new printer' button, it found my network printer (with avahi/DNS-SD I think) but then failed when I tried to add it:

    (gnome-control-center:18733): printers-cc-panel-WARNING **: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.fedoraproject.Config.Printing was not provided by any .service files
    (gnome-control-center:18733): printers-cc-panel-WARNING **: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.PackageKit was not provided by any .service files
    (gnome-control-center:18733): printers-cc-panel-WARNING **: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.fedoraproject.Config.Printing was not provided by any .service files
    (gnome-control-center:18733): printers-cc-panel-WARNING **: Installation of the new printer failed.
    

    So there is still some packaging work left.

  3. lucabrunox commented on Jan 1, 2016

    @lucabrunox
    Contributor

    The org.freedesktop.PackageKit is scary. The org.fedoraproject.Config.Printing should be provided by http://cyberelk.net/tim/software/system-config-printer/ .

    What a complex world...

  4. bjornfor commented on Jan 1, 2016

    @bjornfor
    ContributorAuthor

    I added cups-pk-helper to master branch in commit 92a0140.

  5. bjornfor commented on Jan 2, 2016

    @bjornfor
    ContributorAuthor

    @lethalman: Right, adding system_config_printer to the system profile removed this gnome-control-center warning:

    DBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.fedoraproject.Config.Printing was not provided by any .service files
    

    However, it prints the following message repeatedly (~1 sec interval) while scanning my network for printers:

    GDBus.Error:org.freedesktop.DBus.Error.Spawn.ExecFailed: Failed to execute program org.fedoraproject.Config.Printing: Success
    

    And when I select one printer and click "add", it prints

    GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.PackageKit was not provided by any .service files
    
  6. lucabrunox commented on Jan 2, 2016

    @lucabrunox
    Contributor

    Read the org.fedoraproject.Config.Printing dbus service file, it's probably trying to execute the daemon due to auto activation but cannot find it.

  7. bjornfor commented on Jan 2, 2016

    @bjornfor
    ContributorAuthor

    @lethalman: Spot on!

    $ cat /nix/store/8p4w7v88winr0zlgqd08qnc4hh8picia-system-config-printer-1.3.12/share/dbus-1/services/org.fedoraproject.Config.Printing.service
    [D-BUS Service]
    Name=org.fedoraproject.Config.Printing
    Exec=/usr/bin/scp-dbus-service
    
  8. lucabrunox commented on Jan 2, 2016

    @lucabrunox
    Contributor

    Yep... now that scp-dbus-service.... endless... :P Remind me, why aren't we just using debian or fedora :P

  9. bjornfor commented on Jan 2, 2016

    @bjornfor
    ContributorAuthor

    @lethalman: hehe, yeah, I ask myself that from time to time :-D

  10. bjornfor commented on Jan 2, 2016

    @bjornfor
    ContributorAuthor

    Oh, scp-dbus-service is in system_config_printer (s-c-p, doh!):

    /nix/store/8p4w7v88winr0zlgqd08qnc4hh8picia-system-config-printer-1.3.12/bin/scp-dbus-service
    

    If only upstream application developer respected the configure time --prefix flag... grrr..

  11. bjornfor commented on Jan 2, 2016

    @bjornfor
    ContributorAuthor

    Fixed system-config-printer dbus service file in commit 1979034 (and made upstream issue: OpenPrinting/system-config-printer#28).

  12. bjornfor commented on Jan 3, 2016

    @bjornfor
    ContributorAuthor

    Ok, I guess the original issue is solved. I'll open new issues for remaining printer issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bug6.topic: GNOME6.topic: nixos

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions