OpenPrinting / cups

OpenPrinting CUPS Sources
https://openprinting.github.io/cups
Apache License 2.0
963 stars 176 forks source link

Run cups(d) without colord - new option or graceful degradation please #193

Closed ned64 closed 3 years ago

ned64 commented 3 years ago

On my system there is no colord due to several reasons. Mainly, as part of a part of standard security hardening I have reduced attack surface by removing daemons I don't need.

I do not need the colour management features provided by colord at all.

Upon one of the past updates of cups printing was disabled completely because cupsd tries to contact colord and fails completely as it isn't running. The error was difficult to find, too.

Please allow the running of cupsd and printing without colord, either by ignoring colour management if colord cannot be found on D-Bus or doesn't reply (graceful degradation) or by adding a cupsd config option not to try colord in the first place (disable colour management by colord option).

Perhaps graceful degradation is perhaps more elegant - a warning could be issued but printing would continue. The situation would be the same if colord ran but the printer device weren't managed by it.

In practise this could also mean not linking libprintbackend-cups.so dynamically to libcolord.so.2 anymore but using dlopen instead:

# ldd /usr/lib64/gtk-3.0/3.0.0/printbackends/libprintbackend-cups.so | grep color
    libcolord.so.2 => /usr/lib64/libcolord.so.2 (0x00007f4e07c71000)

Thereby (hard) dependencies can be reduced as a bonus.

michaelrsweet commented 3 years ago

@ned64 The code should be handling when colord isn't running. What errors are you getting?

ned64 commented 3 years ago

Thanks. I had the problem in Feb 2020 and only now migrated the issue here when you suggested it on the other site. Therefore it may be difficult to reproduce now but I will try. I somehow found a workaround back then.

Basically, printing did not work at all with no error messages in /var/log/cups/*log that I could understand.

Has there been some development in this area, perhaps there now is graceful degradation when there is no colord on the D-Bus? That would be great :-)

michaelrsweet commented 3 years ago

@ned64 The code (as has been unchanged for several years) should handle a missing/disabled colord...

michaelrsweet commented 3 years ago

@ned64 Any luck reproducing this?

ned64 commented 3 years ago

Thanks for taking time to reply @michaelrsweet ! I have tried to reproduce the issue but was unsuccessful. I also looked at the source and there should really be no problem in current releases.

I was probably using an older version when I experienced that problem last year (or a fork by the distro maintainers?).

I suppose we can happily mark this one "invalid".