< prev index next >

jdk/test/start-Xvfb.sh

Print this page




  42 export DISPLAY
  43 cd /tmp
  44 #
  45 if [ ! -x "/usr/bin/X11/Xvfb" ]; then
  46   # We have Solaris-flavored X windows, and the /usr/openwin Xvfb is
  47   # a simple wrapper script around the Xsun server.  Massage the
  48   # arguments: server number must be first; others are slightly
  49   # different.
  50   #
  51   # Also the default Visual Class (DirectColor) triggers an awt bug
  52   # (probably 4131533/6505852) and some tests will loop endlessly
  53   # when they hit the display.  The workaround is:
  54   #  1) Ask for PseudoColor instead.
  55   #  2) Omit 32-bit depth.
  56   /usr/bin/nohup /usr/openwin/bin/Xvfb ${DISPLAY} -dev vfb screen 0 1280x1024x24 pixdepths 8 16 24 defclass PseudoColor > ${currentDir}/nohup.$$ 2>&1 &
  57 else
  58   # Linux...
  59   /usr/bin/nohup /usr/bin/X11/Xvfb -fbdir ${currentDir} -pixdepths 8 16 24 32 ${DISPLAY} > ${currentDir}/nohup.$$ 2>&1 &
  60 fi
  61 WM="/usr/bin/X11/fvwm2"
  62 if [ ! -x ${WM} ] ; then
  63   WM="/opt/sfw/bin/fvwm2"
  64 fi
  65 #
  66 # Wait for Xvfb to initialize:
  67 sleep 5
  68 #
  69 if [ -x "${WM}" ]; then
  70 # 2 JCK tests require a window manager
  71 # mwm fails (key name errors) and twm fails (hangs),
  72 # but fvwm2 works well.
  73   /usr/bin/nohup ${WM} -display ${DISPLAY} -replace -f /dev/null > ${currentDir}/nohup.$$ 2>&1 &
  74 else
  75   echo "Error: ${WM} not found"
  76   exit 1
  77 fi
  78 #
  79 # Wait some more to see if the xhost command gets through:
  80 sleep 10
  81 # Allow access to all - this is a brute force approach,
  82 # but I do not see how it could be a security problem...
  83 DISPLAY="${DD}" xhost +
  84 #


  42 export DISPLAY
  43 cd /tmp
  44 #
  45 if [ ! -x "/usr/bin/X11/Xvfb" ]; then
  46   # We have Solaris-flavored X windows, and the /usr/openwin Xvfb is
  47   # a simple wrapper script around the Xsun server.  Massage the
  48   # arguments: server number must be first; others are slightly
  49   # different.
  50   #
  51   # Also the default Visual Class (DirectColor) triggers an awt bug
  52   # (probably 4131533/6505852) and some tests will loop endlessly
  53   # when they hit the display.  The workaround is:
  54   #  1) Ask for PseudoColor instead.
  55   #  2) Omit 32-bit depth.
  56   /usr/bin/nohup /usr/openwin/bin/Xvfb ${DISPLAY} -dev vfb screen 0 1280x1024x24 pixdepths 8 16 24 defclass PseudoColor > ${currentDir}/nohup.$$ 2>&1 &
  57 else
  58   # Linux...
  59   /usr/bin/nohup /usr/bin/X11/Xvfb -fbdir ${currentDir} -pixdepths 8 16 24 32 ${DISPLAY} > ${currentDir}/nohup.$$ 2>&1 &
  60 fi
  61 WM="/usr/bin/X11/fvwm2"



  62 #
  63 # Wait for Xvfb to initialize:
  64 sleep 5
  65 #
  66 if [ -x "${WM}" ]; then
  67 # 2 JCK tests require a window manager
  68 # mwm fails (key name errors) and twm fails (hangs),
  69 # but fvwm2 works well.
  70   /usr/bin/nohup ${WM} -display ${DISPLAY} -replace -f /dev/null > ${currentDir}/nohup.$$ 2>&1 &
  71 else
  72   echo "Error: ${WM} not found"
  73   exit 1
  74 fi
  75 #
  76 # Wait some more to see if the xhost command gets through:
  77 sleep 10
  78 # Allow access to all - this is a brute force approach,
  79 # but I do not see how it could be a security problem...
  80 DISPLAY="${DD}" xhost +
  81 #
< prev index next >