How do I get rid of a ghost printer in Gnome?

9,293

Solution 1

It turns out that this printer isn't installed anywhere on my system. This is Gnome auto-discovering my Brother laser printer (the one that is installed as HL4570CDW). So it ends up that the same printer shows up twice on the list (but only once functionally.)

I discovered this because I noticed that my printer's administration web interface said that the printer was located in the "Basement Utility Room" which exactly matches what the Gnome programs were saying. I figured out how to change that setting. Once I updated the printer to say it was in the "Office (1st Floor)", the dialog immediatly changed to say so as well:

If I unplug my printer from the network and try to print from a Gnome application, the "ghost printer" no longer appears. If I plug the printer back in and try to print it re-appears on the list.

I went into the printer configuration and disabled network services one at a time until I found the one that was causing the printer to magically appear (although non-functional.) The culprit is IPP. If I disable IPP services on the printer (and reboot it), then I no longer get the ghost printer even when the printer is on and connected to the network.

When IPP is disabled, you can still install the printer as LPD or raw socket. However, IPP may be important for printing from other platforms such as Windows and Mac.

In the end it appears to be a bug that a printer discovered via IPP is non-functional.


To stop programs from showing auto-discovered printers in the print dialog, you need to reconfigure the avahi daemon service as detailed in this answer to How do I disable automatic remote printer installation?:

edit /etc/avahi/avahi-daemon.conf and in the [server] section, add enable-dbus=no then restart the avahi-daemon service: sudo service avahi-daemon restart

Once I configure avahi like this, I no longer see this ghost printer even when the printer is available with IPP.

Solution 2

I had a similar problem:

printer list.png

The bottom printer is from an older installation. I edited the file:

$ sudo -H gedit /etc/cups/printers.conf

# Printer configuration file for CUPS v2.1.3
# Written by cupsd
# DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING

<DefaultPrinter DCP-7065DN>
UUID urn:uuid:1a785efb-bce4-35dd-7e44-c4fd53bb429a
Info Brother DCP-7065DN
  (... SNIP ...)
</DefaultPrinter>

<Printer DCP7065DN>
UUID urn:uuid:46e866c1-3ab2-324b-65fd-30d2fee77f85
Info DCP7065DN
  (... SNIP ...)
</Printer>

So I deleted the second entry...

<Printer DCP7065DN>
UUID urn:uuid:46e866c1-3ab2-324b-65fd-30d2fee77f85
Info DCP7065DN
  (... SNIP ...)
</Printer>

... and saved the file.

A reboot is necessary for changes to take effect.


There is also a printer definition file in /etc/cups/ppd:

printer ppd.png

So I removed this file too:

$ ll /etc/cups/ppd

total 28
drwxr-xr-x 2 root lp  4096 Aug 10  2018 ./
drwxr-xr-x 5 root lp  4096 Nov 10 09:59 ../
-rw-r----- 1 root lp  8191 Aug 10  2018 DCP-7065DN.ppd
-rw-r----- 1 root lp 10537 Aug  7  2018 DCP7065DN.ppd

$cat /etc/cups/ppd/DCP7065DN.ppd

*PPD-Adobe: "4.3"
*%================================================
*%  Copyright Brother Industries,Ltd 2006-2008
*%  "Brother DCP7065DN for CUPS"
*%================================================
  (... SNIP ...)
*UIConstraints: *InputSlot MANUAL   *Duplex DuplexTumble
*UIConstraints: *InputSlot MANUAL   *Duplex DuplexNoTumble

$ sudo rm -f /etc/cups/ppd/DCP7065DN.ppd
Share:
9,293

Related videos on Youtube

Stephen Ostermiller
Author by

Stephen Ostermiller

Contact Me Website GitHub Facebook LinkedIn

Updated on September 18, 2022

Comments

  • Stephen Ostermiller
    Stephen Ostermiller almost 2 years

    When I try to print from a Gnome application, the print dialog has non-functional printer listed. It is called "duerqxesz5090 -- Basement Utility Room -- Rejecting Jobs". Here is a screenshot of the Gnome print dialog box:

    ghost printer

    • If I try to select that printer, the application will freeze for minutes or even crash.
    • I only get this with Gnome programs (such as gedit or glabels), but not with firefox or libreoffice
    • It is possible that it is the remnants of an old printer I did have installed at some point. I did have a printer installed in the basement utility room.
    • I'm not using Gnome (I'm using xfce), but I have used Gnome in the past.
    • My Ubuntu version is Ubuntu 15.04 (Vivid)
    • CUPS doesn't know anything about this ghost printer: cups
    • system-config-printer doesn't know anything about this printer: System config printer

    How can I find out where this non-existent printer is listed on my system and remove it?

    I've tried searching for it in various places, but none of these return any results:

    • dconf dump / | grep duerqx
    • sudo grep -r duerqx /etc/
    • gsettings list-recursively | grep duerqx
    • Rmano
      Rmano almost 9 years
      Interesting. Wild guess: try to see if there is some remnant in /etc/cups/printers.conf or (shouldn't) in /etc/printcap. Or if you had gnome before, try to launch /usr/bin/gnome-control-center.real --- it uses a different (and worse) printer settings program.
    • Stephen Ostermiller
      Stephen Ostermiller almost 9 years
      @Rmano -- Thank you for the suggestions. /etc/cups/printers.conf has only an entry for HL4570CDW, same for /etc/printcap. gnome-control-center.real has a printers icon in it that launches system-config-printer -- I don't get the "worse" printer settings program.
    • Charl le Roux
      Charl le Roux over 8 years
      I can confirm this on Ubuntu 15.10 clean install. I only have one printer installed which is a Brother MFC9450CDN. There seem to be a common thread through the posts I've seen on the internet: Everyone seem to have a Brother printer installed.
    • pbhj
      pbhj over 8 years
      If you're using CUPS does anything appear in the browser based settings - localhost:631/printers ? If it's there then click it, then choose "delete printer" from the administration drop-down list.
    • Stephen Ostermiller
      Stephen Ostermiller over 8 years
      @pbhj I included a screenshot of that page in my question already. The only thing that CUPS lists is my real actual printer.
    • Jorge Suárez de Lis
      Jorge Suárez de Lis over 8 years
      I'm having this same problem. To get to this point, I deleted my /etc/cups folder, reinstalled cups (/etc/cups is created again) and then added again all my printers with a slightly different name. Now I have both the old and the new printers. The problem is not exactly the same, because I'm using 14.04 and the behaviour is slightly different. The apps won't crash or freeze (but the ghost printers won't work), and the printers are also being showed in Firefox, but not in KDE apps. I'm currently investigating this.
    • Elijah Lynn
      Elijah Lynn about 4 years
      We need to find an upstream bug report and link it here. If not, we should create one. My auto-discovered printers are not usable and it is really confusing. There should be an option to disable this correctly. The provided answer creates another problem and isn't working for me.
  • NeoShow
    NeoShow almost 7 years
    Excellent answer, the question is, could there be a utility to this feature? Is there a circumstance where the printer discovered can be used (without configuration). Mine also shows "rejecting jobs".
  • Stephen Ostermiller
    Stephen Ostermiller almost 7 years
    In most cases, the people I've found encountering the error in internet forums have Brother printers. I think this feature works better with printers from some other manufacturers.
  • NeoShow
    NeoShow almost 7 years
    You are right, the ghost printer (duerquex) is useless, the dialog hangs trying to connect to the printer.
  • NRaygun
    NRaygun almost 5 years
    I tried changing enable-dbus=no on my Xubuntu 18.04 system but then restarting avahi just hangs. Is there another way to prevent avahi from finding just printers? Seems like I need the zero-config feature for other things like accessing my file share resources (although I could just use the IPs).
  • Josh Stone
    Josh Stone over 4 years
    Thank you! After reading this answer, I found my ghost directly with IPP: $ ippfind ipp://Brother.local:631/duerqxesz5090
  • Steve R.
    Steve R. about 4 years
    Warning!!! This solution, while it solved the ghost printer problem, had the unintended effect of avahi not "activating" correctly. I accidentally discovered this when I looked at the /var/log/syslog file. It gave the following error message: "avahi-daemon.service: Failed with result 'timeout'." _ and _"Failed to start Avahi mDNS/DNS-SD Stack.". Should you use the solution posted, check your /var/log/syslog file afterwards for any errors. I took the option of living with the ghost printer.
  • Stephen Ostermiller
    Stephen Ostermiller about 4 years
    @SteveR. What do you need avahi for? The only thing that I can tell that it does is install printers incorrectly. After disabling it, I never missed it.
  • Steve R.
    Steve R. about 4 years
    As far as I know, I don't know if I actually need avahi. Avahi was preinstalled, so I left it alone except for resolving the printer issue. As you note, a better solution may be to simply disable it. I am somewhat reluctant to disable programs without really understanding them.
  • desgua
    desgua over 3 years
    Diabling IPP and IPPS works for HP LaserJet M15w
  • Uzair Gheewala
    Uzair Gheewala about 3 years
    Worked perfectly for my Brother HL-L2390DW