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.

3
  • System, version, etc? I have 14.04 on three different computers and it does not show the problem. Yes, it depends on inotify, but that should work out of the box on all Ubuntus.
    – Rmano
    May 26, 2015 at 16:06
  • 1
    This is still 12.04. I have tried upgrading evince to it's latest version (i.e. newer than on the repository) through a .deb file, and this hasn't helped. I have another 12.04 installation on a different machine for which this behavior works perfectly. Also, it used to work on this machine, but has recently stopped. For a time it would stop working on-and-off, but now it never works.
    – evencoil
    May 26, 2015 at 16:25
  • 2
    You could be running out of inotify watches. Checkout this question and the ensuing answers. Jun 1, 2015 at 12:27

2 Answers 2

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.

2
  • 1
    I used the mentioned command but not worked. I use pdflatex examplefile.tex to create pdf file. Is anything needed to view changes?
    – alhelal
    May 1, 2017 at 8:59
  • This is not really an answer?
    – mathtick
    Nov 5, 2021 at 9:07
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)

You must log in to answer this question.

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