You could easily read the token ID of the current user in the cam script, determine the appropriate WTS, then run rdesktop.

Script would look something like this... It looks at the "Other Info" field for a card user in the Sun Ray Data Store to determine the terminal server to connect to. You will need to add the users to the Sun Ray DS for this to work. The interesting part for your is under "WTS Selection"

Brad

#!/bin/sh
########

##############
#RDP configuration
##############

# RDP color depth (24 bit is default. Set here to override)
RDP_DEPTH=
# RDP Client geometry
# By default the client will be launched fullscreen. To change this
# behavior, enter thee geometry below in WIDTHxHEIGHT (ex: 1024x768)
RDP_GEOMETRY=
# Disable Downstream Audio ("yes" or blank)
DISABLE_AUDIO=
# RDP client install root
# This script assumes that you are using the rdesktop from sunfreeware which
# installs with an install root of /usr/local/ If you built or installed with
# another rood, enter it here (ex: /opt)
RDP_CLIENT_ROOT=

##############
#Misc. configuration
##############

# Disable "Click to start" dialog ("yes" or blank)
DISABLE_START_DIALOG=
# DT Dialog command
DTDIALOG=/usr/dt/bin/dterror.ds
# Termminal Server ping test timeout
PING_TIMEOUT=1

##############
#Message Dialog Text
##############
START_DIALOG="Please press Enter or click OK to start your desktop session."
NO_TERM_SERV_DIALOG="There are no Windows Terminal Servers available.\n\n Please contact your Administrator." BAD_CONFIG_DIALOG="The CAM script has been misconfigured.\n\n Please contact your Administrator."
DIALOG_HEADER="Sun Ray Message"
DIALOG_BUTTON="OK"


##############
#Main
##############

#Sleep so dt window manager gets started
sleep 3


#####
# Setup RDP client

#Client install root
if [ "$RDP_CLIENT_ROOT" = "" ]; then
RDP_CLIENT_ROOT=/usr/local
fi

#Client Binary
RDP_CLIENT=$RDP_CLIENT_ROOT/bin/rdesktop

#Color Depth
if [ "$RDP_DEPTH" = "" ]; then
RDP_DEPTH=24
fi
RDP_EXTRA="$RDP_EXTRA -a $RDP_DEPTH"

#Geometry
if [ "$RDP_GEOMETRY" != "" ]; then
RDP_GEOMETRY="-g $RDP_GEOMETRY"
else
RDP_GEOMETRY="-f"
fi

#Sound forwarding
if [ "$DISABLE_AUDIO" != "yes" ]; then
RDP_EXTRA="$RDP_EXTRA -r sound:local"
fi

# Other Command Options
if [ "$WTS_USERNAME" != "" ]; then
RDP_USERNAME="-u $WTS_USERNAME"
fi
if [ "$WTS_PASSWORD" != "" ]; then
RDP_PASSWORD="-p $WTS_PASSWORD"
fi
if [ "$WTS_DOMAIN" != "" ]; then
RDP_DOMAIN="-u $WTS_DOMAIN"
fi


#####
# "Click to Start" dialog

if [ "$DISABLE_START_DIALOG" != "yes" ]; then
$DTDIALOG "$START_DIALOG" "$DIALOG_HEADER" "$DIALOG_BUTTON"
fi

#####
# Terminal Server selection
OTHER_INFO=`/opt/SUNWut/sbin/utuser -L \
|grep $SUN_SUNRAY_TOKEN | awk '{print $5}'`

if [ "$OTHER_INFO" != "" ]; then
/usr/sbin/ping $OTHER_INFO $PING_TIMEOUT
if [ "$?" = "0" ]; then
WTS_SERVER=`echo $OTHER_INFO`
else
$DTDIALOG "$NO_TERM_SERV_DIALOG" "$DIALOG_HEADER" "$DIALOG_BUTTON"
exit 2
fi
else
$DTDIALOG "$BAD_CONFIG_DIALOG" "$DIALOG_HEADER" "$DIALOG_BUTTON"
exit 2
fi


#####
# Display Logic

#Run RDP Client
$RDP_CLIENT $RDP_USERNAME $RDP_PASSWORD $RDP_DOMAIN\
$RDP_GEOMETRY $RDP_EXTRA $WTS_SERVER


#Exit
exit 0


Kevin wrote:
hello all, i'm using CAM mode to access to windows server directly, but i want each user to access different windows server by TokenID(Smard card) i know what AMGH can access different sunray server, but in this case, i have 1 sunray server and 3 windows servers and 3 users is it possible ??? plz, give me some ideas.... :)) thanks,




"?? ???, Daum" http://www.daum.net ????? ?? ?????
<http://www.daumdirect.co.kr/websales/service/service_nservice.jsp?_partner_code.key=9100009>
        
        <http://allim.daum.net/servlet/Redirect?sid=footer_smarton0909>

------------------------------------------------------------------------

_______________________________________________
SunRay-Users mailing list
[email protected]
http://www.filibeto.org/mailman/listinfo/sunray-users

--
        *Brad Lackey*
Desktop and Mobility
Client Solutions Organization
(720) 548-3339
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>

_______________________________________________
SunRay-Users mailing list
[email protected]
http://www.filibeto.org/mailman/listinfo/sunray-users

Reply via email to