Printing to CUPS_PDF produces no document

Questions about Wine on Linux
Locked
therapon
Level 1
Level 1
Posts: 5
Joined: Thu Mar 30, 2017 10:32 am

Printing to CUPS_PDF produces no document

Post by therapon »

openSUSE Tumbleweed
WINE 7.11

The problem started with the v2.4 series of CUPS things. Printing to CUPS-PDF works as expected with every linux application. Printing to CUPS-PDF from any Windows/WINE application fails with no errors displayed. I found the following in cups-pdf-CUPS-PDF_log:

With cups-2.4.2 there is the following:
Fri Apr 15 21:04:28 2022 [DEBUG] set new gid: lp
Fri Apr 15 21:04:28 2022 [DEBUG] initialization finished: v3.0.1
Fri Apr 15 21:04:28 2022 [DEBUG] user identified: username
Fri Apr 15 21:04:28 2022 [DEBUG] output directory name generated: //home/username/PDF
Fri Apr 15 21:04:28 2022 [ERROR] failed to create directory: //home/username
Fri Apr 15 21:04:28 2022 [DEBUG] ERRNO: 30 (Read-only file system)
Fri Apr 15 21:04:28 2022 [ERROR] failed to create user output directory: //home/username/PDF
Fri Apr 15 21:04:28 2022 [DEBUG] ERRNO: 30 (Read-only file system)
I reverted cups cups-client cups-config libcups2 libcups2-32bit libcupsimage2 to version 2.3.3 and get the following at the same place in the log:
Fri Apr 15 21:34:50 2022 [DEBUG] set new gid: lp
Fri Apr 15 21:34:50 2022 [DEBUG] initialization finished: v3.0.1
Fri Apr 15 21:34:50 2022 [DEBUG] user identified: username
Fri Apr 15 21:34:50 2022 [DEBUG] output directory name generated: //home/username/PDF
Fri Apr 15 21:34:50 2022 [DEBUG] user information prepared
Fri Apr 15 21:34:50 2022 [DEBUG] spoolfile name created: /var/spool/cups-pdf/SPOOL/cups2pdf-2205
Fri Apr 15 21:34:50 2022 [DEBUG] source stream ready
With the 6 packages at version 2.3.3, printing works as expected from Windows/WINE applications. In both scenarios, the output directory exists and is writeable by users including lp. I also tried printing from a new WINE prefix and results are the same.

Any suggestions for how to fix? Thanks.
therapon
Level 1
Level 1
Posts: 5
Joined: Thu Mar 30, 2017 10:32 am

Re: Printing to CUPS_PDF produces no document

Post by therapon »

The issue is apparently related to OpenSUSE actions to harden things relative to CUPS.
Here is a fix, apparently with the latest version of cups it affects all printing.
$ sudo cp /usr/lib/systemd/system/cups.service /etc/systemd/system/
$ sudo sed -i 's,ProtectHome=true,,' /etc/systemd/system/cups.service
$ sudo systemctl daemon-reload && sudo systemctl restart cups
https://github.com/OpenPrinting/cups/is ... 1168680353
Locked