#! /bin/sh
#
# xrun - cross run code compiled on MacOS X on a Sharp Zaurus and display on the Apple X11 server
#
# Apple X11 must be running
# this script starts the window manager on the Zaurus
# and opens an xterm on the Zaurus
# there you can type 'run Edit' etc.
#

ZAURUS=10.0.1.50
MAC=10.0.1.60

killall twm; sleep 3
export DISPLAY=localhost:0.0
/usr/X11R6/bin/xhost +

# run all what is needed on Zaurus

ssh -l root $ZAURUS sh -c "cd; \
cd /home/myPDA; \
export DISPLAY=$MAC:0.0; \
export PATH=\$PATH:/home/myPDA/bin; \
export LD_LIBRARY_PATH=/home/QtPalmtop/lib:/home/myPDA/lib; \
gdomap; \
set; \
killall myPDAwm; sleep 3; \
myPDAwm -f /home/myPDA/etc/system.myPDAwmrc& \
xterm -T Terminal -geometry 132x48 -ls& \
"
