Salome HOME
DCQ : Merge with Ecole_Ete_a6.
[modules/kernel.git] / bin / runSalome
1 #!/bin/bash
2
3 NSPORT=2809
4 echo -n "Searching for free port for the SALOME Naming Service: "
5 while [ ${NSPORT} -lt 3000 ]; do
6     NSPORT=`expr ${NSPORT} + 1`
7     aRes=`netstat -ltn | grep -E :${NSPORT}`
8     if [ -z "$aRes" ]; then
9 cat > ${OMNIORB_CONFIG} <<EOF
10 ORBInitRef NameService=corbaname::`hostname`:${NSPORT}
11 EOF
12         echo ${NSPORT} - Ok
13         break
14     fi
15     echo -n "${NSPORT}; "
16 done
17
18 if [ $# -ne 0 ] ; then
19     python -i ${KERNEL_ROOT_DIR}/bin/salome/runSalome.py $* 
20 else
21     python ${KERNEL_ROOT_DIR}/bin/salome/runSalome.py
22 fi
23
24 # -----------------------------------------------------------------------------
25 # examples:
26 # ---------
27 #  $: ${KERNEL_ROOT_DIR}/bin/salome/runSalome
28 #
29 #     parameters read from $HOME/.salome/salome.launch 
30 #     if the config file does not exist, it is created with default values
31 #
32 #  
33 #  $: ${KERNEL_ROOT_DIR}/bin/salome/runSalome --modules=GEOM,SMESH,VISU,SUPERV,MED --embedded=registry,study,moduleCatalog,cppContainer --standalone=pyContainer,supervContainer --xterm --killall
34 #
35 #     parameters from command line supersede those from $HOME/.salome/salome.launch
36 #
37 # Some CORBA servers could be launched in the SALOME_Session_Server
38 # (embedded = same process) or in a separate process (standalone):
39 # --> registry,study,moduleCatalog,cppContainer
40 # Other CORBA servers could only be launched in separate process (standalone):
41 # --> pyContainer,supervContainer
42 #
43 # $: ${KERNEL_ROOT_DIR}/bin/salome/runSalome -h
44 #    help
45 # -----------------------------------------------------------------------------
46 #
47 # l'option -i permet de garder l'interpreteur python ouvert :
48 # par defaut, les differents serveurs ouvrent des fenĂȘtres xterm
49 # (cf. runSalome.py)
50 # le serveur Logger n'est pas obligatoire (commentĂ© dans runSalome.py)
51
52 # -----------------------------------------------------------------------------