views:

246

answers:

2

Hi everyone!
I have a wxPython application and I'm using Evince to display the reports it generates. Since I'd like to delete every report after the user has closed the corresponding Evince instance, my application uses a thread that does a subprocess.call() to invoke Evince, and then removes the report when the subprocess terminates.
This works fine as long as the user looks at just one report at a time, because if he opens one report and then another (without closing the previous one) the previous Evince instance gets "recycled" to show the new report, so subprocess.call() returns immediately and the file gets deleted too soon.
Is there a way to force Evince to use a new instance every time?

(Xubuntu 8.10)

A: 

You can't do that with evince. Try suggesting that to the developers as a new feature.

PiedPiper
Someone tried that already, but they told him it was against the design principles of Gnome :/http://mail.gnome.org/archives/evince-list/2009-April/msg00019.html
Joril
That's one of the reasons I prefer KDE - the Gnome people care more about their design principles than their users
PiedPiper
+1  A: 

Wouter Bolsterlee suggests:

dbus-launch --exit-with-session evince file://...

Joril
I just found out that this way the process keeps running even when you close evince.. :/ (Tried with Ubuntu 9.04 and 8.10)I ended up using epdfview instead of evince, works nicely and with fewer problems :)
Joril