CompuCell3D / cc3d-player5

CC3D Player 5
GNU Lesser General Public License v3.0
4 stars 4 forks source link

Running remotely on Linux system, xterm problem #27

Open jpsluka opened 1 year ago

jpsluka commented 1 year ago

I have installed CC3D 440 on Tatooine. Everything seems to run OK except, there are no screen shots generated. If you ask for screenshots then CC3D crashes. If you do not ask for screenshots everything runs OK. (And you can get restart and VTK files OK).

The error you get is:

bad X server connection. DISPLAY=
./runScript.sh: line 7: 1130240 Aborted                 (core dumped) python -m cc3d.run_script $* --current-dir=${SCRIPT_DIR}

To fix this (with help for Luddy support) I added this to runScript.sh:

### JPS: Added the lines below to try to fix the Xterm problem that prevented CC3D screenshots from working.
######Xvfb :1 & 
export DISPLAY=:1 
echo $DISPLAY

And now this new runScript works correctly and gives screen shots.

Tatooine: Operating System: Ubuntu 20.04.6 LTS Kernel: Linux 5.15.0-46-generic Architecture: x86-64

jpsluka commented 1 year ago

BTW, I am connecting to Tatooine with Putty and WinSCP.

jpsluka commented 1 year ago

My edited runScript.sh is:

### JPS: Added the lines below to try to fix the Xterm problem that prevented CC3D screenshots from working.
### if no xserver is running eht Xvfb can be uncomment. Xvfb laucnces a persitent process so it is not needed everytime, just once.
### Leaving the Xvfb line in will just give a warning message without causing the rruns to abort.
######Xvfb :1 & 
export DISPLAY=:1 
echo $DISPLAY
###
###

SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"

source ${SCRIPT_DIR}/miniconda3/bin/activate base

export exit_code=0
python -m cc3d.run_script $* --current-dir=${SCRIPT_DIR}
exit_code=$?

cd ${SCRIPT_DIR}
exit ${exit_code}
jpsluka commented 1 year ago

It would be better if the script checked it see if Xvfb was running, and if not, then start it (it persists across login once started).

maciekswat commented 1 year ago

This looks good. I need to test it on a remote machine and include xvfb launcher as well.