[Paraview] Suppress X display while saving images from Python script

Kevin H. Hobbs hobbsk at ohiou.edu
Mon Sep 7 11:02:16 EDT 2009


On Fri, 2009-07-24 at 10:14 +0200, M. Nawijn wrote:
> Hello,
> 
> I have Python script that generates PNG images from a Paraview
> session. This in essence works very well. The one problem that I have
> is that an OpenGL window is created whenever I save the image. When
> you do this in a loop, it becomes a little annoying, since the window
> (at least on my Fedora box) automatically gets focus.
> 
> Is there a way to generate the PNG images without popping up a window?

Yes, there are several.

> Is it hardware/driver/platform dependent?

Yes.

>  I am using Paraview 3.7
> (CVS) and Fedora FC11, NVIDIA proprietary drivers.
> 

You should be able to :

1) use pvbatch yourscript.py --use-offscreen-rendering
	Though I just tried this and I still get a window popping up 
	even though I use the mesa driver with osmesa. This may be a 
	bug.

2) Connect to a pvserver --use-offscreen-rendering
	Though I just tried this and I still get a window popping up 
	even though I use the mesa driver with osmesa. This may be a 
	bug.

3) Use another X server such as Xvfb or vncserver which isn't shown on 
	your display. 

	vncserver :99 -geometry 1280x1024 -depth 24  > vncserver.txt 2>&1 &
	pvbatch pvtestscript.py
	vncserver -kill :99

	This works for me.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://www.paraview.org/pipermail/paraview/attachments/20090907/db6780a8/attachment.pgp>


More information about the ParaView mailing list