Version: (using KDE KDE 3.5.6) Installed from: Fedora RPMs OS: Linux When printing through CUPS with `kprinter`, CUPS printer instances added with `lpoptions -p ...` are not recognized and not available in kprinter's popup-menu. Only centrally installed printers and centrally installed printer instances from /etc/cups/lpoptions are seen. If printer instances are defined in ~/.lpoptions, kprinter sees them, but the `lpoptions` command adds them always to ~/.cups/lpoptions. This problem exists in Fedora FC6 with KDE 3.5.6/CUPS 1.2.7-1.8 and Fedore FC5 with KDE 3.5.5/CUPS 1.2.8-1 frank
"If printer instances are defined in ~/.lpoptions, kprinter sees them, but the `lpoptions` command adds them always to ~/.cups/lpoptions." KDEPrint is guilty of ab-using a few "private" interfaces of the CUPS API. When CUPS moved from 1.1.x to 1.2.0, some of these interfaces changed, and KDEPrint does now no longer understand some little details of CUPS' doing. One of the things that changed is the location of the file to store "lpoptions". You can fix this on your side locally, like so: * copy the contents of ~/.loptions to ~/.cups/lpoptions: mkdir ~/.cups # in case this directory is not yet there cat ~/.loptions >> ~/.cups/lpoptions # in case the file already exists * remove ~/.loptions and create a symlink pointing from ~/.loptions to ~/.cups/lpoptions: rm ~/.loptions ln -s ~/.cups/lpoptions ~/.loptions The symlink will ensure that KDEPrint will use the right file for CUPS even if it only knows to access the "old" filename. ------------ wrote a new $summary; old one was "kprinter does not recognize CUPS printer instances and their options (~/.cups/lpoptions)".
fixed typo in new $summary
Hi Kurt, thanks for the hint. Unfortunately the symlink you propose doesn't work in that direction. The `lpoptions` command will always remove an ~/.lpoptions file and move the data into ~/.cups/lpoptions if ~/.lpoptions is a symlink. But the symlink solution works the other way round (~/.cups/lpoptions is the symlink): cat ~/.cups/lpoptions >> ~/.lpoptions cd ~/.cups rm -f lpoptions ln -s ../.lpoptions ./lpoptions Thanks for pointing out the symlink idea. frank
I had a look at the sources. In kdeprint/kmvirtualmanager.cpp the filename is hardcoded to .lpoptions. I am not an expert but it seems to me kdeprint should use the functions cupsGetDest(s)/cupsSetDest(s) from the API to get the printer list. The question is why the api is not used, as these functions seem to be available from the beginning. There's no hint for a required cups version.
I guess I found out, why the cups api is not used there. Kmvirtualmanager is not cups specific but a generic class. So ignore comment #4.
Created attachment 21552 [details] patch for KDE 3.5.x The patch looks if ~/.cups/loptions exists and reads the printer list from there. Otherwise the file ~/.loptions is used.
Comment on attachment 21552 [details] patch for KDE 3.5.x Sorry, wrong patch. The fallback does not work.
Created attachment 21553 [details] Correct Patch for KDE 3.5.x Reads ~./.cups/lpoptions or if it does not exist ~/.lpoptions.
KDEPrint is obsolete, unmaintained and will never be revived. Closing all open bugs.