Ubuntu – generic-CUPS-PDF-printer – Ubuntu 14.04

customizerpdfpermissionsprinting

Printing any document to a PDF works nicely. Unfortunately I want the created PDF file to be saved at a different location.

The current default location is: /home/PDF

The desired one location is: /home/myname/DropBox/PrintWork

I tried to edit the file containing the default directory for this kind of work:
/etc/cups/cups-pdf.conf

Problem is that (I am the superuser) I don't get a permission to save the new default location.
When I look at 'permissions' everything is dimmed.
I am a starting Ubuntu 14.04 user since 3 weeks.

I already spent a lot of hours to solve this, can anybody help me getting this right?

Best Answer

How to change cups-pdf default directory

  • it does not accept symlinks

  • note that this method will change the behaviour for every users

  • this is why you may have to use one of these variables:

    • ${HOME} will be expanded to the user's home directory
    • ${USER} will be expanded to the user name
  • in this example, the output will go to ~/MyDocs/PDF

  • so you have to change the path according to your needs

1. Edit cups-pdf.conf

gksudo gedit /etc/cups/cups-pdf.conf
  • find and comment out this line (by adding # in front):

    Out ${HOME}/PDF
    

    like this:

    # Out ${HOME}/PDF
    
  • then, add this line right below

    Out ${HOME}/MyDocs/PDF
    

2. Edit usr.sbin.cupsd

gksudo gedit /etc/apparmor.d/local/usr.sbin.cupsd
  • add at the end of the file, edit the lines beginning with @{HOME} to match your desired location

    @{HOME}/MyDocs/PDF/ rw,
    @{HOME}/MyDocs/PDF/* rw,
    
  • reboot to activate the changes