[arcpy] shell on linux "X connection" pb

210
1
09-16-2011 04:45 AM
Marie-GilSeptfonds
New Contributor
Hello,

I'm trying to run a shell which executes a simple python script.

My shell :
source /usr/local/arcgis/server10.0/servercore/.Server/init_server.sh
source /usr/local/arcgis/server10.0/python26/setenv_python.sh
python script.py


My python script
import arcpy
sourcesPath = "\\home\\arcgis\\script\\"


As you seen, my script is very simple, but I've this error message.
X connection to localhost:10.0 broken (explicit kill or server shutdown).


To avoid this message I can rue a "windows manager" as xming.

But my goal, is to cron this shell every night without xming.

So if you have any idea ...

Thanx
0 Kudos
1 Reply
Marie-GilSeptfonds
New Contributor
I found a solution in this post

http://forums.arcgis.com/threads/14399-linux-access-ArcPy

In the last three posts we can read that arcpy must be running in an environnement which "have a display configured because ArcPY is a mapping module."

The solution is in the last post (using Xvfb) :
Xvfb :1 &
export DISPLAY=:1
0 Kudos