Installing PDF Printer under Kubuntu with AppArmor and Samba

It actually should be as little as installing cups-pdf (CUPS-PDF (Ubuntuusers German)):

$ sudo apt-get install cups-pdf

Then opening Printers in system preferences did show the new printer.

However printing a test-page didn’t work. I then just followed the tail of the syslog:

# tail -f /var/log/syslog

to find out that app-armor blocked something:

Feb  9 09:47:15 producer25 kernel: [43208.761736] type=1400 audit(1423471635.886:111): apparmor="DENIED" operation="connect" profile="/usr/lib/cups/backend/cups-pdf" name="/run/samba/winbindd/pipe" pid=14195 comm="cups-pdf" requested_mask="rw" denied_mask="rw" fsuid=0 ouid=0

With this error message at hand it was easy to find a bug-report which offered a solution that worked for me directly:

add this to your profile (in the cups-pdf section):

/run/samba/winbindd/pipe rw,

then do this:

$ sudo apparmor_parser -r /etc/apparmor.d/usr.sbin.cupsd

After that I restarted cups.d and apparmor.d and it directly worked.

Printing the PDF

PDF files are stored under ~/PDF by default. If you print large files, it takes some time until the PDF file is written in full. Unless totally done, you (normally) can’t open it successfully. There is no notification given (like with compressing files for example) when the print job as been done and the PDF is fully written. There is also no temporary name. I didn’t look into the configuration of Cups-PDF deeply as I only wanted to get it to the run quickly, so just sharing the experiences, it’s probably worth a feature-request when I find the time.

This entry was posted in Hakre's Tips and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s