Here is a juicy morsel from my pilgrimage into the world of Virtual Desktop Infrastructure (VDI).
This is a variation on Maurice Bonotto's blog post on Resizing Windows Sessions entry. The primary difference is that I added the necessary step of killing the active RDP connection (uttsc session) so that the RDP connection will be re-created at the proper resolution.
Place the following contents into a script named /opt/SRSS-Addons/utresize.
#!/bin/sh
# utaction script to resize VDI desktop
PATH=$PATH:/opt/SUNWut/bin:/opt/SUNWut/sbin:/usr/X11/bin
dtuDev=`basename $DTDEVROOT`
newRes=`grep RESOL /var/opt/SUNWut/dispinfo/$dtuDev|cut -d= -f2|cut -d: -f2`
# Determine the current settings. If the resolution hasn't changed,
# don't do anything. However, if it has, change X11 pallet, xrandr,
# and reset the RDP connection.
oldRes=`xrandr | grep "^*" | sed -e "s/ x /x/g" | awk '{ print $2 }'`
if [ "$newRes" != "$oldRes" ]
then
# utxconfig defines the X11 pallet size
utxconfig -r $newRes
# xrandr (X11 Resize and Rotate) changes the X11 resolution of
# the DTU session.
xrandr -s $newRes
# For VDI, the RDP session needs be re-established at the new
# resolution. There isn't a clean way to do that. So we, just
# kill the existing RDP connection (uttsc)
pkill uttsc-bin
fi
Then add the following line to the top of the vda script found here:
/etc/opt/SUNWkio/sessions/vda/vda
/opt/SUNWut/bin/utaction -i -c /opt/SRSS-Addons/utresize &
When you insert your token (aka Java Card) into a Desktop Unit (DTU) that has a different resolution that your current DTU, it will seem like the SunRay is rebooting. This is because the script has killed the RDP (uttsc) session. Also, when the Windows login screen comes up, the login screen may not yet represent the proper resolutioin. However, after you login it will resize to the proper resolution.
Enjoy!
Brad