Question

i have a server wich and i want to execute multiples programs. I think the best was use xterm in order to monitor every program output, if there are something better i would like to know it. The proble is the line 10, i need to pass a cero as an argument and i do not know how. I think there is very easy way but search without succeded.

  2 DIR=$HOME"/IRMA-III"
  3 sudo chown irma /dev/ttyACM0
  4 sudo chown irma /dev/ttyUSB0
  5 xterm $DIR"/src/init/init-cda" &
  6 xterm $DIR"/src/processors/monitor/monitor" &
  7 xterm $DIR"/src/processors/closeRangeNavigator/closeRangeNavigator" &
  8 xterm $DIR"/src/processors/laser/laser"  &
  9 xterm $DIR"/src/processors/longRangeNavigator/longRangeNavigator" &
 10 xterm $DIR"/src/processors/executive/executive" 0 &
Was it helpful?

Solution

The right syntax for xterm is

xterm -e programname argument1 argument2 argument3 ... 

no problem to pass "0" to the "programname"

your line 10 should look like:

xterm -e "$DIR/src/processors/executive/executive" "0" &

Try to find a way to run your "server" tasks independent from a terminalsession. Monitoring via logfiles is easy ( like less +F logfilename ) and it makes everything rock solid.

OTHER TIPS

In order not to need to layout the xterms manually, you may want to add -geometry X options. For a description see http://www2.its.strath.ac.uk/courses/x/subsection3_7_3.html.

xterm -geometry 80x25+10+10 -e /bin/bash -c "echo hello; sleep 2" &

If your programs are not interactive but only output logs then have a look at multitail.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top