/[scripts]/trunk/webthumb
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/webthumb

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 63 by dpavlin, Wed Feb 6 23:34:35 2008 UTC revision 64 by dpavlin, Wed Feb 6 23:45:58 2008 UTC
# Line 33  H=768 Line 33  H=768
33  # and then resize it to (comment out to disable)  # and then resize it to (comment out to disable)
34  #RESIZE=200x  #RESIZE=200x
35    
36  # turn locally visible Xnest server to watch progress  # turn locally visible server to watch progress
37  DEBUG=0  DEBUG=0
38  test ! -z "$3" && DEBUG=1  test ! -z "$3" && DEBUG=1
39    
# Line 81  else Line 81  else
81          exit 1          exit 1
82  fi  fi
83    
84  echo "starting X server $XSERVER"  DISPLAY_PORT=6042
85    
86  export DISPLAY=:42  while netstat -ln | grep ":$DISPLAY_PORT " >/dev/null ; do
87            DISPLAY_PORT=`expr $DISPLAY_PORT + 1`
88    done
89    
90    DISPLAY=:`expr $DISPLAY_PORT - 6000`
91    
92    echo "using DISPLAY=$DISPLAY"
93    
94  if [ "$DEBUG" == 1 ] ; then  if [ "$DEBUG" == 1 ] ; then
95          echo "using locally visible debug server on $LOCAL_DISPLAY"          echo "using locally visible debug server on $LOCAL_DISPLAY"
96          Xnest -display $LOCAL_DISPLAY -ac -geometry ${W}x${H} -depth 24 $DISPLAY 2>/dev/null &          DISPLAY=$LOCAL_DISPLAY Xephyr -ac -screen ${W}x${H}x24 $DISPLAY 2>/dev/null &
97  else  else
98          echo "starting $XSERVER"          echo "starting $XSERVER"
99          $XSERVER -ac -screen 0 ${W}x${H}x24 $DISPLAY 2>/dev/null &          $XSERVER -ac -screen 0 ${W}x${H}x24 $DISPLAY 2>/dev/null &
100  fi  fi
101    
102    if [ -z "$!" ] ; then
103            echo "ABORT: can't start X server!"
104            exit
105    fi
106  XSERVER_PID=$!  XSERVER_PID=$!
107    
108  echo "X server pid $XSERVER_PID"  echo "X server pid $XSERVER_PID"
109    
110  function kill_x_server() {  function kill_x_server() {

Legend:
Removed from v.63  
changed lines
  Added in v.64

  ViewVC Help
Powered by ViewVC 1.1.26