6

using Debian testing, Xfce v4.12 here. My preferred PDF viewer, evince (or "document viewer" under Ubuntu? Don't know) keeps changing my print settings, even when I tell it not to:

  • Open PDF, set number of pages per sheet to 2, print
  • ~/.config/evince/print-settings is changed to reflect that
  • next time I want to print one page per sheet I forget and document is printed with 2 pages per sheet
  • sigh and print again with my "standard settings"

Attempted remedies:

  • tried to make ~/.config/evince/print-settings read-only (chmod 444), to no avail, permissions are set to 644 after printing
  • chown'ed the file to root:root, but after next print it is reset to USER:GROUP. What's going on?

How do I prevent changes to this file, while still being able to use other settings every now and then?

Enno

3 Answers 3

3

I had the same problem and also setting ~/.config/evince/print-setting didn't work. However I solved the problem for me by setting the directory read only: chmod a-w ~/.config/evince. This may be have some sideeffects but I didn't observe any yet.

1
  • This worked for me. Marking the print-setting file as read-only is not enough because evince can just delete and overwrite the file. The only side effect I've noticed is warning messages if evince is run from the terminal. Perhaps an alternative solution is to only make it so that one file cannot be deleted (e.g. unix.stackexchange.com/questions/20104/…), but I personally don't see anything in that directory that is that important to my workflow.
    – scottkosty
    Commented Oct 26, 2016 at 20:05
1

This is working. for me on Debian jessie (Evince 3.14.1). But on another machine running Ubuntu trusty (Evince 3.10.3), Evince uses the CUPS configuration instead of its own. I don't know whether this is a matter of version, distribution or machine configuration.

If you have a file ~/cups/lpoptions or ~/.lpoptions, that's your CUPS configuration. The default printer is configured with a line like

Default myprintername Duplex=DuplexNoTumble number-up=2

and you can have with default options for other printers like

Dest myprintername/1up Duplex=DuplexNoTumble
Dest myprintername/single Duplex=Single
Dest otherprintername Duplex=DuplexNoTumble
1
  • Thanks, but the only thing in my ~/.cups/lpoptions is a single line saying "Dest P45x", which is my default printer. Also I can see my ~/.config/evince/print-settings getting changed when I change the printing options in evince, so the latter seems to be the relevant file.
    – mcenno
    Commented Feb 29, 2016 at 9:25
0

If you're still having problems with evince or atril messing with settings, there are two remedies.

  1. Delete the file ~/.config/evince/print-settings and then do ln -s /dev/null ~/.config/evince/print-settings. From this point on, any changes to the file go to the void, ~/.config/evince/print-settings is always empty, and so evince will always use the defaults.

  2. Use the chattr command to mark ~/.config/evince/print-settings as immutable. Do it like this: sudo chattr +i /home/myname/.config/evince/print-settings. You must be root to do this. Do this after you set things the way you like and then the system won't (shouldn't ?) be able to change them again.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .