xpdfWatch
Information
Currently xpdf does not have an option "watch file" to reload the document automatically. xpdfWatch monitors running xpdf programs and force them to reload the shown document if the corresponding file has been updated.
xpdfWatch is free software released under the GNU General Public License V3 or later.
xpdfWatch is (C) 2008-2009 Ralf Hoffmann.
Download
The current release is xpdfWatch 0.4.3 (13 kB) (signature)
from 2009-11-17.
You also need to install the xse tool.
You can find a copy here: xse 2.1 (44 kB) (signature)
Changes
- 2009-11-17: Version 0.4.3
accepts any lsof 4.x version - 2008-12-03: Version 0.4.2
checks for correct version of required programs (xse, lsof, and xwininfo) - 2008-11-19: Version 0.4.1
first public release
Requirements
- xpdf
xpdfWatch does not actually requires xpdf to run but it does not anything useful without running xpdf programs. - Python 2.x
python 2.4 is known to work, python 2.3 should be enough and older version may or may not work. - Linux kernel 2.x
xpdfWatch currently use the /proc filesystem available in linux kernels for getting information about running xpdf programs. Other Un*x kernels providing a similar interface may also work. That may be changed later if there is any need. - lsof
version 4.76 is known to work - xwininfo
should be available in any recent X installation - xse 2.1 (see above)
Installation
No special steps are required to install xpdfWatch. You may copy the file xpdfWatch.py into to your preferred bin directory (/usr/local/bin, $HOME/bin, ...).Running
xpdfWatch support two modes:- Force xpdf programs showing a specific document to reload it:
# xpdfWatch.py -f document.pdf
That command may be used for example in a Makefile which creates the document. - Checking all running xpdf programs in daemon mode:
# xpdfWatch.py &
In this mode xpdfWatch checks every second all documents opened by running xpdf programs whether they have been changed. If it detects such a change it will send a reload command with "xse" to the corresponding window.
Problems
If xpdfWatch does not work as expected you can try the debug mode:
# xpdfWatch.py -d
In this mode xpdfWatch will output information which might help
finding problems.
If xpdfWatch complains about missing programs but they actually exist then start it with the argument --skiptest. Please also contact the author so the test can be fixed in the next release.