# run paraview py script with ssh

**URL:** https://discourse.paraview.org/t/run-paraview-py-script-with-ssh/1009
**Category:** ParaView Support
**Created:** [December 6, 2018, 1:04am UTC](https://discourse.paraview.org/t/run-paraview-py-script-with-ssh/1009 "2018-12-06T01:04:33Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ebreard](https://discourse.paraview.org/user_avatar/discourse.paraview.org/ebreard/32/2421_2.png) [@ebreard](https://discourse.paraview.org/u/ebreard)
#### Post date: [December 6, 2018, 1:04am UTC](https://discourse.paraview.org/t/run-paraview-py-script-with-ssh/1009/1 "2018-12-06T01:04:33Z")

</div>

Hello, I am trying to run the .py script made from the trace on the cluster of my university.

I can run it from the command line successfully using pybatch file.py , and I can run it as bash script.

However, while running in the background a window displaying the image that is saved pop up and then closes. If I submit the bash script, my terminal needs to be opened otherwise the script does not work (does not export what is needed). Is there a way to make it 100% in background? By not needing to display anything? ( I am going to run things that will be very large and want to avoid needing a good internet and a long wait time with my terminal opened). Cheers

here is the end of the .py trace if that helps:

# get opacity transfer function/opacity map for ‘EP\_G’

eP\_GPWF = GetOpacityTransferFunction(‘EP\_G’)  
eP\_GPWF.Points = [0.9979066252708435, 0.0, 0.5, 0.0, 1.0, 1.0, 0.5, 0.0]  
eP\_GPWF.AllowDuplicateScalars = 1  
eP\_GPWF.ScalarRangeInitialized = 1

# Rescale transfer function

eP\_GPWF.RescaleTransferFunction(0.9999, 1.0)

# Rescale transfer function

eP\_GLUT.RescaleTransferFunction(0.999, 1.0)

# Rescale transfer function

eP\_GPWF.RescaleTransferFunction(0.999, 1.0)

# current camera placement for renderView1

renderView1.InteractionMode = ‘2D’  
renderView1.CameraPosition = [7.444136548470577, 0.4049599060192654, 24.745090265683924]  
renderView1.CameraFocalPoint = [7.444136548470577, 0.4049599060192654, -0.019999999552965077]  
renderView1.CameraParallelScale = 7.755709187334878

# save animation

SaveAnimation(’/projects/dufeklab/ebreard/BENCMARK/SIMULATION\_2\_BIS/EXP\_TEST/EP\_G.png’, renderView1, ImageResolution=[1082, 833],  
FontScaling=‘Scale fonts proportionally’,  
OverrideColorPalette=’’,  
StereoMode=‘No change’,  
TransparentBackground=0,  
ImageQuality=100,  
FrameRate=1,  
FrameWindow=[79, 79])

#### saving camera placements for all active views

# current camera placement for renderView1

renderView1.InteractionMode = ‘2D’  
renderView1.CameraPosition = [7.444136548470577, 0.4049599060192654, 24.745090265683924]  
renderView1.CameraFocalPoint = [7.444136548470577, 0.4049599060192654, -0.019999999552965077]  
renderView1.CameraParallelScale = 7.755709187334878

#### uncomment the following to render all views

# RenderAllViews()

# alternatively, if you want to write images, you can use SaveScreenshot(…).

---

<div class="post-metadata">

### Author: ![Tobias](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/t/c67d28/32.png) [@Tobias](https://discourse.paraview.org/u/Tobias)
#### Post date: [December 6, 2018, 6:53am UTC](https://discourse.paraview.org/t/run-paraview-py-script-with-ssh/1009/2 "2018-12-06T06:53:51Z")

</div>

Have you tried pvbatch --force-offscreen-rendering yourFile.py ?

---

<div class="post-metadata">

### Author: ![ebreard](https://discourse.paraview.org/user_avatar/discourse.paraview.org/ebreard/32/2421_2.png) [@ebreard](https://discourse.paraview.org/u/ebreard)
#### Post date: [November 15, 2019, 7:19pm UTC](https://discourse.paraview.org/t/run-paraview-py-script-with-ssh/1009/3 "2019-11-15T19:19:40Z")

</div>

> [@Tobias](#):
>
> –force-offscreen-rendering

Thank you so much. It worked (sorry totally forgot to reply last year…)
