Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running more than one instance of Evince

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)

like image 642
Joril Avatar asked Nov 28 '25 21:11

Joril


1 Answers

Wouter Bolsterlee suggests:

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

like image 63
Joril Avatar answered Dec 01 '25 12:12

Joril



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!