[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [K12OSN] clients boot up to wrong xscreen with new EL5



Barry, I've attached my customized screen scripts.  Hope they help you.

-Rob

Barry R Cisna wrote:
Hey Rob,

Thanks for the feedback. The link you posted came up formatted broken. I
tried underscores, dots, searched, and can not get to message that you
posted.
Thanks Again,

Barry Cisna

_______________________________________________
K12OSN mailing list
K12OSN redhat com
https://www.redhat.com/mailman/listinfo/k12osn
For more info see <http://www.k12os.org>
********************************************************

The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. If you are not the addressee, any disclosure, reproduction,
copying, distribution, or other dissemination or use of this transmission in
error please notify the sender immediately and then delete this e-mail.
E-mail transmission cannot be guaranteed to be secure or error free as
information could be intercepted, corrupted lost, destroyed, arrive late or
incomplete, or contain viruses.
The sender therefore does not accept liability for any errors or omissions
in the contents of this message which arise as a result of e-mail
transmission. If verification is required please request a hard copy
version.

********************************************************
#!/bin/sh
#
# rdesktop
#
# rdesktop screen script for the linux terminal server project.
# This script lives in the /opt/ltsp/i386/etc/screen.d directory
#
# Call it through lts.conf with the `SCREEN_xx = rdesktop` option.
#
# You can pass options to rdesktop 2 different ways.
#
#   1)  Place all of the options you want after the 'rdesktop' setting
#       on the screen_script.
#
#       For example:
#
#           SCREEN_01   = rdesktop -u jam w2kserver.ltsp.org
#
#
#   2)  Place the rdesktop options in the RDP_OPTIONS option
#       and the name or IP address of the rdp server in
#       the RDP_SERVER option.
#
#       For example:
#
#           RDP_OPTIONS	 = "-f -u jam"
#           RDP_SERVER   = w2kserver.ltsp.org
#           SCREEN_01    = rdesktop
#

PATH=/bin:$PATH; export PATH
. /etc/ltsp_functions

#
# Get the lts.conf entries
#
eval `/bin/getltscfg -a`

RDP_OPTIONS=${RDP_OPTIONS:-"-f"}

reg_info RDP_SERVER
reg_info RDP_OPTIONS

TTY=`/usr/bin/basename \`/usr/bin/tty\` | sed s/tty//`
XFCFG=/tmp/XF86Config.${TTY}
export TTY

RDESKTOP_OPTIONS="${RDP_OPTIONS} $* ${RDP_SERVER}"

#   
# Setup the DISP variable
#   
export DISP=:$(expr ${TTY} - 1).0

################################################################################
#
# Setup the XF86Config file
#

XSERVER=${XSERVER:-"auto"}

if [ "${XSERVER}" = "auto" ]; then
    echo "Scanning for video card"
    XSERVER=`/sbin/pci_scan /etc/vidlist`
    if [ -z "${XSERVER}" ]; then
        echo
        echo "  ERROR: Auto probe of the video card failed !"
        echo "         You need to specify the proper X server in lts.conf"
        echo
        echo -n "Press <enter> to continue "
        read CMD
        exit 1
    fi
fi

if [ "${XSERVER}" = "i810" ]; then
    if [ ! -f /tmp/i810_loaded ]; then
        modprobe agpgart
        >/tmp/i810_loaded
    fi
fi

if [ ! -z "${XF86CONFIG_FILE}" ]; then
    #
    # If XF86CONFIG_FILE is defined in the lts.conf file, then
    # it points to an XF86Config file that is pre-made for a workstation
    #
    if [ -f /etc/${XF86CONFIG_FILE} ]; then
	cp /etc/${XF86CONFIG_FILE} ${XFCFG}
    else
        echo
        echo "Error! - ${XF86CONFIG_FILE} - File not found!"
        echo
    fi
else
    #
    # Build the XF86Config file from entries in the lts.conf file
    # If it starts with 'XF86_', then we use XFree86 3.3.6.  Otherwise,
    # we use Xorg
    #
    case ${XSERVER} in

        XF86_*)  /etc/build_x3_cfg ${XSERVER} >${XFCFG}
                 ;;

        *)       /etc/build_x4_cfg ${XSERVER} >${XFCFG}
                 ;;
    esac
fi

################################################################################
#
# Figure out how to run the X server
#
 
case ${XSERVER} in

    XF86_*)  XBINARY="${XSERVER}"
             XOPTS=""
             ;;

    Xvesa)   XBINARY="Xvesa"
             case "${X_MODE_0}" in
                 1280x1024)   XOPTS="-shadow -mode 0x011A"
                              ;;
                 1024x768)    XOPTS="-shadow -mode 0x0117"
                              ;;
                 800x600)     XOPTS="-shadow -mode 0x0114"
                              ;;
                 640x480)     XOPTS="-shadow -mode 0x0111"
                              ;;
                 *)           XOPTS="-shadow -mode 0x0117"
                              ;;
             esac
             ;;

    *)       XBINARY="Xorg"
             XOPTS=""
             ;;
esac

ACCESS_CONTROL=${DISABLE_ACCESS_CONTROL:-"N"}
if [ "${ACCESS_CONTROL}" = "Y" ]; then
    ACC_CTRL="-ac"
else
    ACC_CTRL=""
fi

clear
echo
echo
echo
echo
echo
echo
echo
echo
echo
echo
echo
echo
echo -n "                      Press <enter> to Login to Windows"
read

if [ -w /proc/progress ]; then
    /usr/X11R6/bin/xinit      /usr/bin/rdesktop.wrapper           \
                              -u ""                       \
    			      ${RDESKTOP_OPTIONS}         \
			      -- /usr/X11R6/bin/${XBINARY}\
                              ${DISP}                     \
                              -xf86config ${XFCFG}        \
                              vt${TTY} >/dev/null 2>&1
else
    /usr/X11R6/bin/xinit      /usr/bin/rdesktop.wrapper           \
                              -u ""                       \
    			      ${RDESKTOP_OPTIONS}         \
			      -- /usr/X11R6/bin/${XBINARY}\
                              ${DISP}                     \
                              -xf86config ${XFCFG}        \
                              vt${TTY}
fi
#!/bin/bash
#
# remote_x
#
# This script will launch the Xserver on the workstation with
# a -qeary pointing back to the server.
#
PATH=/bin:$PATH; export PATH
. /etc/ltsp_functions

#
# Get the lts.conf entries
#
eval `/bin/getltscfg -a`

DEFAULT_SERVER=${SERVER:-"192.168.0.254"}
XDM_SERVER=${XDM_SERVER:-${DEFAULT_SERVER}}
reg_info XDM_SERVER

TTY=`/usr/bin/basename \`/usr/bin/tty\` | sed s/tty//`
XFCFG=/tmp/XF86Config.${TTY}
export TTY

if [ $# -lt 1 ]; then
    XF_ARGS=""
else
    XF_ARGS=$*
fi

################################################################################
#
# Setup the XF86Config file
#

XSERVER=${XSERVER:-"auto"}

if [ "${XSERVER}" = "auto" ]; then
    echo "Scanning for video card"
    XSERVER=`/sbin/pci_scan /etc/vidlist`
    if [ -z "${XSERVER}" ]; then
        echo
        echo "  WARNING: Auto probe of the video card failed !"
        echo "           You should specify the proper X server in lts.conf"
        echo "           Proceeding with the SLOW vesa server"
        echo 
        sleep 5s
        XSERVER=vesa
    fi
fi
reg_info XSERVER

if [ "${XSERVER}" = "i810" ]; then
    if [ ! -f /tmp/i810_loaded ]; then
        modprobe agpgart >/dev/null 2>&1
        >/tmp/i810_loaded
    fi
fi

if [ ! -z "${XF86CONFIG_FILE}" ]; then
    reg_info XF86CONFIG_FILE
    #
    # If XF86CONFIG_FILE is defined in the lts.conf file, then
    # it points to an XF86Config file that is pre-made for a workstation
    #
    if [ -f /etc/${XF86CONFIG_FILE} ]; then
	cp /etc/${XF86CONFIG_FILE} ${XFCFG}
    else
        echo
        echo "Error! - ${XF86CONFIG_FILE} - File not found!"
        echo
    fi
else
    #
    # Build the XF86Config file from entries in the lts.conf file
    # If it starts with 'XF86_', then we use XFree86 3.3.6.  Otherwise,
    # we use XFree86 4.x
    #
    case ${XSERVER} in

        XF86_*)  /etc/build_x3_cfg ${XSERVER} >${XFCFG}
                 ;;

        *)       /etc/build_x4_cfg ${XSERVER} >${XFCFG}
                 ;;
    esac
fi

################################################################################
#
# Figure out how to run the X server
#
 
case ${XSERVER} in

    XF86_*)  XBINARY="${XSERVER}"
             XOPTS=""
             ;;

    Xvesa)   XBINARY="Xvesa"
             case "${X_MODE_0}" in
                 1280x1024)   XOPTS="-shadow -mode 0x011A"
                              ;;
                 1024x768)    XOPTS="-shadow -mode 0x0117"
                              ;;
                 800x600)     XOPTS="-shadow -mode 0x0114"
                              ;;
                 640x480)     XOPTS="-shadow -mode 0x0111"
                              ;;
                 *)           XOPTS="-shadow -mode 0x0117"
                              ;;
             esac
             ;;

    *)       XBINARY="Xorg"
             XOPTS=""
             ;;
esac
#
# Setup the DISP variable
#
export DISP=:$(expr ${TTY} - 1).0

DISABLE_ACCESS_CONTROL=${DISABLE_ACCESS_CONTROL:-"N"}
reg_info DISABLE_ACCESS_CONTROL
if [ "${DISABLE_ACCESS_CONTROL}" = "Y" ]; then
    ACC_CTRL="-ac"
else
    ACC_CTRL=""
fi


#############
#
clear
echo
echo
echo
echo
echo
echo
echo
echo
echo
echo
echo
echo
echo -n "                       Press <enter> to Login to Linux"
read
#
#############


if [ "${XF_ARGS}" = "" ]; then
    XF_ARGS="-query ${XDM_SERVER}"
fi

XRAMPERC=${XRAMPERC:-100}

if [ ${XRAMPERC} -lt 100 ]; then
  XMEM=0
  while read TYPE VALUE UNITS; do
    case ${TYPE} in
      MemFree:|SwapFree:)
          XMEM=$((${XMEM} + ${VALUE}))
          ;;
    esac
  done < /proc/meminfo
  XMEM=$((${XMEM} * ${XRAMPERC} / 100))

  echo "**** X server limited to ${XMEM} kB RAM ****"

  ulimit -v ${XMEM}
fi

if [ -w /proc/progress ]; then
    /usr/X11R6/bin/${XBINARY} ${ACC_CTRL}              \
                              ${XF_ARGS}               \
                              -xf86config ${XFCFG}     \
                              vt${TTY} ${DISP} >/dev/null 2>&1
    if [ $? -ne 0 ]; then
      echo -n -e "\n\rxserver failed, press <enter> to continue "
      read CMD
    fi
else
    /usr/X11R6/bin/${XBINARY} ${ACC_CTRL}              \
                              ${XF_ARGS}               \
                              -xf86config ${XFCFG}     \
-logfile /tmp/mnt/xorg.log \
                              vt${TTY} ${DISP}
    if [ $? -ne 0 ]; then
      echo -n -e "\n\rxserver failed, press <enter> to continue "
      read CMD
    fi
fi

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]