#!/bin/ksh
# IBM_PROLOG_BEGIN_TAG 
# This is an automatically generated prolog. 
#  
# gos720 src/gos/2d/XTOP/programs/xinit/xserverrc 1.5.4.1 
#  
# Licensed Materials - Property of IBM 
#  
# COPYRIGHT International Business Machines Corp. 1987,2010 
# All Rights Reserved 
#  
# US Government Users Restricted Rights - Use, duplication or 
# disclosure restricted by GSA ADP Schedule Contract with IBM Corp. 
#  
# IBM_PROLOG_END_TAG 
# @(#)79        1.5.4.1  src/gos/2d/XTOP/programs/xinit/xserverrc, xclients, gos720 1/8/10 15:16:36
#
#-------------------------------------------------------------------------
#
# This shell script will used by xinit, xdm or dtlogin to start the X server.
# This script may be tailored by the user.
# All server parameters passed in will be passed on to the X server.
#
#-------------------------------------------------------------------------


##################################################################
# Uncomment the line below if you want to use the new Xorg Xserver
#
# Currently, this will only work with GXT135P and GXT145
# graphics adapters.
##################################################################
# USE_XORG="True"

if [ -n "$USE_XORG" ]
then

  ############################
  # Start the new Xorg Xserver
  ############################

  ###################################################################
  # The Matrox driver defaults to 16-bit color.  24-bit is preferred.
  ###################################################################
  EXTENSIONS="-depth 24"

  exec /usr/lpp/X11/bin/Xorg $EXTENSIONS "$@"
fi



#############################
# Start the old X11R6 Xserver
#############################
EXTENSIONS=""

#-------------------------------------------------------------------------
# Start the X server in True Color mode
# This is needed for Gnome and some versions of Firefox, that will not
# work with the old 8-bit Pseudo Color visual
#-------------------------------------------------------------------------
EXTENSIONS="$EXTENSIONS -cc 4"

#-------------------------------------------------------------------------
# Uncomment the line below to turn on the XKeyboard extension
# (needed for accessx accessibility)
#-------------------------------------------------------------------------
# EXTENSIONS=$EXTENSIONS" +kb "


#-------------------------------------------------------------------------
# Load GLX extension to the X server for OpenGL
#-------------------------------------------------------------------------
if [ -f /usr/lpp/OpenGL/bin/loadGL -a   \
     -f /usr/lpp/X11/bin/loadAbx -a	\
     -f /usr/lpp/X11/bin/loadDBE ] ; then
  EXTENSIONS="$EXTENSIONS -x abx -x dbe -x GLX"
fi
 
#-------------------------------------------------------------------------

RGB=/usr/lib/X11/rgb
if [ -f $RGB.pag ]; then
  EXTENSIONS=$EXTENSIONS" -D $RGB "
fi

#>>>>>>>>>>>>>>>>>>>>>>>>> Start X-Window System <<<<<<<<<<<<<<<<<<<

# If not X-Station then start the server and capture the display id.
# Use the color definition selected by $LANG variable if it exists.

if [ -z "$XSTATION" ]
then
  exec /usr/lpp/X11/bin/X $EXTENSIONS "$@" 
fi
