Version: (using KDE KDE 3.4.0) Installed from: Compiled From Sources Compiler: GCC 3.3.5 OS: Solaris In our environment on Solaris 8, an empty /etc/printers.conf is provided by default. The getEtcPrintersConfName() in kdeprint/lpdunix/kmlpdunixmanager.cpp will not bother asking NIS for printers if it finds an /etc/printers.conf file. This behavior didn't happen before KDE 3.1. It would be better if either the routine checked to see if any printers were defined in the file or perhaps combine the contents of this file with the one produced from the NIS map. Alternatively, give the user an option to decide where printer information should come from or provide a priority list for it. In my current situation, I fixed it by removing the check for the existence of the local file. Now, if the ypcat command exists, it will try to retrieve the printers from NIS. Unfortunately, if it doesn't find any, it won't check the local file (I leave these fixes to the very capable maintainer of kdeprint). Just thought I'd let you know. --- kdeprint/lpdunix/kmlpdunixmanager.cpp.orig 2005-05-04 14:44:02.537328000 -0500 +++ kdeprint/lpdunix/kmlpdunixmanager.cpp 2005-05-04 14:49:25.109103000 -0500 @@ -230,11 +230,11 @@ QString getEtcPrintersConfName() { QString printersconf("/etc/printers.conf"); - if (!QFile::exists(printersconf) && !KStandardDirs::findExe( "ypcat" ).isEmpty()) + if (!KStandardDirs::findExe( "ypcat" ).isEmpty()) { - // standard file not found, try NIS + // try NIS if it's available. printersconf = locateLocal("tmp","printers.conf"); - QString cmd = QString::fromLatin1("ypcat printers.conf.byname > %1").arg(printersconf); + QString cmd = QString::fromLatin1("ypcat printers.conf.byname > %1 2>&1").arg(printersconf); kdDebug() << "printers.conf obtained from NIS server: " << cmd << endl; ::system(QFile::encodeName(cmd)); }
I might add that, as a regular user, I am unable to remove /etc/printers.conf. This file is on every one of our 75 workstations (part of standard JumpStart corporate load). Also, I do not have any root access, so the file will probably not be going away anytime soon.
UNCONFIRMED (batch reassigning messed this)
Is anyone ever going to address this? It should be easy to reproduce. Just make sure you have a /etc/printers.conf file with nothing in it and use it on a system with NIS printers defined. You can clearly see in the code that it won't even bother looking at the NIS database if it finds a /etc/printers.conf file.
For now, I'm setting this bug report to "Confirmed/NEW" although I'm not in a position to confirm for real (neither Solaris 8 here, nor NIS nor LPD in use). Maybe I can even find someone to look at the code in question and at the (semi-)patch sent by the reporter. However, I do not believe that the LPD print subsystem in KDEPrint will ever see any additional love in the future. LPD is hardly used any more (all Solaris-on-Workstations using customers I know of have switched to CUPS in recent years). Also, a volunteer who some time ago committed himself to implement better LPD/LPRng subsystem support has now disappeared from the scene.
KDEPrint is obsolete, unmaintained and will never be revived. Closing all open bugs.