10

Is there any way to change / set evince settings either in a config file or from the command line when starting ?

I'm using inotifywait to display a PDF when it is copied to a specific file, and I want to be able to set zoom (fit to page), continuous scrolling off and dual (side-by-side mode).

I know that I can manually launch evince, set these values and save as default, but that only works if someone manually launches it first and does this right - I want to guarantee a certain display at launch time.

don_crissti
  • 79,330
  • 30
  • 216
  • 245

1 Answers1

9

I don't think you can control those settings via cli options (I'd love to be proven wrong though...)
You could however set the zoom, dual mode etc via the file attributes1 before launching evince. You do that via gio set so e.g. if you run:

gio set myfile.pdf metadata::evince::continuous 0
gio set myfile.pdf metadata::evince::dual-page 1
gio set myfile.pdf metadata::evince::sizing_mode: fit-page

and then

evince myfile.pdf

it should open myfile.pdf in dual-mode, with continuous scrolling off and fit-to-page.


1: To see all the attributes run gio info myfile.pdf. Note this is rather new stuff - it replaces gvfs-info and respectively gvfs-set-attribute (which had similar syntax)

don_crissti
  • 79,330
  • 30
  • 216
  • 245
  • I'm noticing that gio changes don't seem to take effect immediately. For example, I do gio set myfile.pdf metadata::evince::continuous 0. I then check with gio info myfile.pdf and it's not shown there... wait a while and it is again. What's the best way to sync / flush this ? – Anonymouslemming Oct 15 '17 at 15:50
  • @Anonymouslemming - I cannot replicate that... the change is instantaneous on my system (`gio 2.52.3` on _archlinux_ - the drives are all SSD if it matters...) – don_crissti Oct 15 '17 at 16:02