8

Evince (the pdf viewer) used to reload my .pdf files after I compiled them in LaTeX. However, this behavior has recently stopped to the point where I have to manually reload Evince (control + R) to show changes. I have tried resetting the desktop environment (i.e. reboot) but this doesn't help.

Any ideas on how I can go about troubleshooting this? My Googling has given me the vague awareness that Evince depends on other services (inotify?) for this feature, but I am not sure how I can go about diagnosing what the problem is precisely.

evencoil
  • 787

2 Answers2

3

Luis' suggestion worked. I used the following command:

echo fs.inotify.max_user_watches=100000 | sudo tee -a /etc/sysctl.conf; sudo sysctl -p

as suggested by the question he linked to, which was addressing Dropbox syncing.

evencoil
  • 787
1

A completely different reason why this problem might happen: Evince (as well as Atril) won't auto-reload a document that has been opened via a symlink.

$ ln -s example.pdf link-to-example.pdf
$ evince link-to-example.pdf

At this point, changing example.pdf will not trigger a reload in Evince, as it would if you had directly opened the file as evince example.pdf. (The idea seems to be that the “file I've opened”, i.e. the symlink, has not in fact changed.)

Short of manually looking up the link location, one way to circumvent this issue is to have Bash do it on the command line:

$ evince $(readlink link-to-example.pdf)

or more generally

$ evince $(realpath link-to-example.pdf)