Re: document reload via dbus
- From: Russell Kliese <russell kliese wattle id au>
- To: evince-list gnome org
- Subject: Re: document reload via dbus
- Date: Thu, 14 Aug 2008 18:09:31 +1000
Nickolay V. Shmyrev wrote:
В Втр, 05/08/2008 в 13:12 +1000, Russell Kliese пишет:
I'd like to make evince automatically reload when I make updates to a
There has been some previous discussion on this
(http://bugzilla.gnome.org/show_bug.cgi?id=304249) and I thought the
best way of achieving what I want is to send a D-bus message to evince
to tell it to reload the document after the document has been updated.
I was looking at using a command along the lines of the following:
dbus-send --session --dest=org.gnome.evince.ApplicationService
The problem is, it doesn't appear that there is a D-bus function to
reload the document (the only functions I can find are listed in the
Is there a dbus interface to trigger a document to be reloaded? If not,
are there any other suggestions on how to get evince to reload a
You can just call OpenURI once again, this will reload document. I'm not
sure how to do it with dbus-send. It seems it doesn't support dictionary
nested into array.
You can check main.c:load_files_remote as example of dbus invocation.
Though I think that "system (evince uri);" will be easier.
Thanks for the suggestion. I ended up crafting a small shell script to
do the reloading that might be of interest to others (and is included
below). I guess this will do until version 2.23.4 mentioned by Carlos
that automatically reloads documents is included in my favourite
# If no file was provided, exit
if [ $# -ne 1 ]
echo "Usage: $0 <pdf file>"
while [ true ]
inotifywait -e close_write $1
# exit if inotifywait returned an error
if [ $? -ne 0 ]
echo "Exiting: inotifywait returned an error."
evince $1 &
] [Thread Prev