Libreoffice with CUPS option off

Hi all,

Is it possible to print from Libreoffice having compiled it without CUPS support?

I went through quite a bit of trouble getting my printer to work with LPD (works flawlessly), and was encouraged to do so because it's is the base system, and can do everything I need it to, etc.

I've also moved to using ports-mgmt/synth to manage my packages, and I would like to disable unneeded options to keep build time to a minimum.

Now it seems after all that I need to keep CUPS on my system (and keep rebuilding it and its build/runtime dependencies), even if I don't use it directly.

I thought THIS and THIS meant the problem had been solved, but I guess not.

I've tried copying /usr/local/lib/libreoffice/share/psprint/psprint.conf to ~/.config/libreoffice/user/psprint/psprint.conf, editing it as described HERE, but it didn't help.
 
This problem exists for a long time afaik. I try to use lpd and avoid cups too, but it always gets pulled in by some dependency. Qt5 applications require cups too for printing unfortunately. The solution lies upstream at LibreOffice, they removed the ability to print with lpd.
 
Bummer. It seems strange that editors/libreoffice won't work with print/cups disabled, seeing as how there is a compile-time option to disable it. Unless someone out there knows otherwise...

Worse still, it was still downloaded, built and installed by something even when I had added OPTIONS_UNSET = CUPS to my /etc/make.conf. So I tried to find out what.

pkg info -r cups-2.2.2_1
Code:
cups-2.2.2_1:
   qt5-printsupport-5.7.1
   gtk2-2.24.29_3
   ghostscript9-agpl-base-9.16_5
   qt4-gui-4.8.7_2
   scribus-1.4.6_6
   libreoffice-5.2.6_1
   foomatic-filters-4.0.17_9

Of these, x11-toolkits/qt4-gui, print/scribus have a hard-coded dependency on print/cups, as there is no option to disable it. And according to make all-depends-list print/foomatic-filters will need print/cups (though indirectly) even with the option "CUPS_IMAGE" turned off.

I once wrote about trying to get my printer working with LPD (without CUPS); turns out I was only half-successful :/
 
Yeah, I also have a lot of Gnome stuff in my /etc/make.conf. But it's really hard to keep things like CUPS off your system. There's always some dependency of a dependency which requires Gnome ports. The requirement of GTK3 is becoming a problem now too imo (Firefox, LibreOffice in the near future).
 
But it's really hard to keep things like CUPS off your system. There's always some dependency of a dependency . . . .

I've noticed this CUPS problem too. Since it's not actually a dependency I would have hoped that developers would have control over it. This situation reminds me of the MS-Windows horror stories that I hear.
 
I think CUPS is pulled in by GTK3, and when more and more applications make the switch to GTK3, CUPS is becoming inevitable. I've noticed that most Qt5 applications require CUPS for printing and LPD is discarded, same for LO. In these cases I just print to PDF and use Xpdf for printing.
 
So in case anyone stumbles onto this thread wondering whether it is possible to print from Libreoffice CUPS=OFF - I haven't managed it.

I actually even went as far as to configure CUPS for use, seeing as it is installed anyway.

Now I am able to use a few more of my printer's options (such as long-side duplex) thanks to CUPS.
 
I print directly from LibreOffice without CUPS. No special setup is required as far as I know and I didn't configure anything here.
 
I print directly from LibreOffice without CUPS. No special setup is required as far as I know and I didn't configure anything here.
Do you mean that you don't have CUPS installed as a dependency, or that you have configured LibreOffice to not use CUPS?

My main problem was that LibreOffice doesn't print AT ALL when compiled without CUPS support (not even using LPD). I can, however live with having CIUPS as a dependency of my LPD-based setup.

You can use pkg info -r cups to find out what is requiring it.
See post #3. I know what is installing CUPS. It is print/ghostscript9-agpl-x11, among others. Each magic filter I tried (print/magicfilter, print/foomatic-rip, print/ghostscript9-agpl-x11) pulled in CUPS as a dependency of ghostscript.

I'm sure I tried disabling the CUPS option for ghostscript (via my make.conf, and by port-specific options), resulting in circular dependency build failure; I will check it again later - I'm using a computer that uses packages right now.

But for now, I'm happy to leave as it is: LibreOffice won't print with CUPS=OFF, even via LPD. But that is OK because I can leave CUPS=ON, continue to use LPD, and just ignore CUPS (or use it).
 
Unfortunately there is a tendency to remove lpd/lpr support in several applications. A Linux thing I guess. LO is one of them, also Qt5 applications. Solution for me is printing to file/pdf and use Xpdf3 for sending it to my printer for real (that is because the new Xpdf4 is a Qt5 application and cannot print using lpd/lpr anymore).
 
/etc/make.conf
Code:
QT4_OPTIONS= -CUPS
OPTIONS_UNSET=CUPS
disables building CUPS for devel/qt4, a dependency of editors/libreoffice, when it is unsettable from make config, and where OPTIONS_UNSET=CUPS by itself is not enough in make.conf.

This setting can be found in /usr/ports/Mk/bsd.qt.mk.


Edit:
for Apache editors/openoffice-4 with CUPS setting turned off, dependency java/openjdk8 brings in print/cups. openjdk8 forces use of cups from c. According to https://www.infoworld.com/article/2...-openoffice-4-vs--libreoffice-4-1.html?page=2, they intend to remove Java from Apache Openoffice, but it won't happen soon.
 
Last edited:
Do you mean that you don't have CUPS installed as a dependency, or that you have configured LibreOffice to not use CUPS?

My apologies. :) I was a mistake when I said that. I don't knowingly use CUPS and always print with lpd. When I said it worked without CUPS I had just printed a page directly from LibreOffice to check - and it worked. When I investigated later, it turns out that CUPS actually was installed, though I had nothing to do with that, or had ever looked at any configuration of it.
 
Back
Top