Hi,

I have found that okular fails to print in FreeBSD.  The problem is that 
okular requires the cups version of lpr but it finds the FreeBSD version (at 
/usr/bin/lpr).  One work around is the CUPS_OVERWRITE_BASE knob however that 
is not a default option.  

The attached patch gets okular to try and find an alternative lpr.  The patch 
has been tested successfully.  

Could someone please add this patch to graphics/kdegraphics4.  

Regards,

David
--- okular/core/fileprinter.cpp~	2010-06-06 22:36:43.000000000 +0200
+++ okular/core/fileprinter.cpp	2011-01-25 14:01:16.000000000 +0200
@@ -126,7 +126,21 @@
         } else if ( !KStandardDirs::findExe("lpr.cups").isEmpty() ) {
             exe = "lpr.cups";
         } else if ( !KStandardDirs::findExe("lpr").isEmpty() ) {
-            exe = "lpr";
+            /*
+             * Under FreeBSD the default lpr (under /usr/bin) is not the cups 
+             * lpr.  Find the next version of lpr and use that one (which 
+             * should be the cups lpr)
+             */
+            QStringList lprs;
+            if ( KStandardDirs::findAllExe(lprs, "lpr") > 1 )
+                for (int i = 0; i < lprs.size(); ++i) {
+                    if ( lprs.at(i).compare("/usr/bin/lpr") != 0) {
+                        exe = lprs.at(i);
+                        break;
+                    }
+                }
+            else
+                exe = "lpr";
         } else if ( !KStandardDirs::findExe("lp").isEmpty() ) {
             exe = "lp";
         } else {

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
kde-freebsd mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kde-freebsd
See also http://freebsd.kde.org/ for latest information

Reply via email to