2

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?

kraxor
  • 5,627
user314648
  • 21
  • 1
  • 3

3 Answers3

2

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

David Foerster
  • 36,890
  • 56
  • 97
  • 151
anton
  • 31
  • 2
0

I think you are mixing permissions somehow... as root you should be able to edit it from a console (sudo vi /etc/cups/cups-pdf.conf) and change the Out setting to what you need.

An alternative: making ~/PDF a symlink, unfortunately doesn't work.

Pablo
  • 31
  • 2
0

I know this question is about one year old, but for a ubuntu-beginner the simplest way to edit the file /etc/cups/cups-pdf.conf is to use the normal default editor gedit with sudo.

Therefore just open a Terminal and type sudo gedit /etc/cups/cups-pdf.conf

Then edit everything you'd like to... save the file and close gedit afterwards!

That's it.

eDeviser
  • 2,149
  • 7
  • 24
  • 37