Ubuntu did something weird with the CUPS-PDF thing in Intrepid. It’s broken when you try to print a file to the PDF output. It’s related to this bug which has something to do with AppArmor. You’ll get a message “/usr/lib/cups/backend/cups-pdf failed” if you try to print a test page from the CUPS admin server, and you’ll see these messages in /var/log/messages:
type=1503 audit(1227758604.902:61): operation="capable" name="dac_override" pid=16910 profile="/usr/lib/cups/backend/cups-pdf"
type=1503 audit(1227758604.902:62): operation="capable" name="dac_read_search" pid=16910 profile="/usr/lib/cups/backend/cups-pdf"
type=1503 audit(1227758632.546:63): operation="capable" name="dac_override" pid=16953 profile="/usr/lib/cups/backend/cups-pdf"
type=1503 audit(1227758632.546:64): operation="capable" name="dac_read_search" pid=16953 profile="/usr/lib/cups/backend/cups-pdf"
type=1505 audit(1227758866.162:65): operation="profile_load" name="/bin/ping" name2="default" pid=17158
type=1505 audit(1227758866.226:66): operation="profile_replace" name="/usr/share/gdm/guest-session/Xsession" name2="default" pid=17164
type=1505 audit(1227758866.250:67): operation="profile_load" name="/sbin/klogd" name2="default" pid=17168
type=1505 audit(1227758866.294:68): operation="profile_load" name="/sbin/syslog-ng" name2="default" pid=17171
I was fooling around a bit and was able to get it working again by doing the following. Warning, this solution might be considered “hackish”, I don’t fully understand apparmor and apparmor profiles, I just want to be able to print to PDF… Is that asking too much!?! I don’t know what security risks this might pose if you are on a multi-user network or run servers. I don’t worry since I’m the only one on my network and I’m behind a stealthed router and don’t run any servers to the outside.
In a root terminal:
apt-get install apparmor-profiles
ln -s /etc/apparmor.d/usr.sbin.cupsd /etc/apparmor.d/disable/
apparmor_parser -R /etc/apparmor.d/usr.sbin.cupsd
/etc/init.d/cups restart
Thank you,
It worked !!!
Thanks, it works for me too.
but GRR..! this is basic desktop usage, how/why did it slip through testing ?
SOLVED
Worked for me in Intrepid
THANK YOU!
print to network pdf printer from win
print from win to ubuntu
print to pdf
I was able to just set cupsd to “complain” (Terminal session cut-n-paste):
######
root@jeff-laptop:~# aa-complain
Please enter the program to switch to complain mode: cupsd
Setting /etc/apparmor.d/usr.sbin.cupsd to complain mode.
######
That seemed to work for me.
Worked for me in Linux Mint 7. Thank you.
Pingback: How To: Fix CUPS PDF Printing in Linux | r3dux.org