hi

I have a tcl script to create a logon ui for my sunray. I want a button to change the screen res.

i have a 1024x768 button which successfuly changes the res than tells you to powercycle the sunray, i know the powercycle can be done automatically with the script but how?

i have posted the script below.

set INSTALL_DIR /opt/SUNWutMenu
set IMAGE_DIR $INSTALL_DIR/images

#set ACTIVE_COLOUR #5482A0
set ACTIVE_COLOUR #000000
set BACKGROUND_COLOUR #FFFF99

set logon_icon [image create photo -format GIF -file $IMAGE_DIR/logon.gif]
set reset_icon [image create photo -format GIF -file $IMAGE_DIR/reset.gif]
set win_icon [image create photo -format GIF -file $IMAGE_DIR/windows.gif]
set default [image create photo -format GIF -file $IMAGE_DIR/1024x768.gif]
set 1280x1024 [image create photo -format GIF -file $IMAGE_DIR/res_high.gif]
set 1024x768 [image create photo -format GIF -file $IMAGE_DIR/res_med.gif]
set 800x600 [image create photo -format GIF -file $IMAGE_DIR/res_low.gif]

set BUTTON_WIDTH 500

font create MacFont -family Helvetica -size 18 -weight bold -slant roman

set BORDER_WIDTH 5

set top_banner [image create photo -format GIF -file $IMAGE_DIR/BANNER.gif]
label .top_banner -image $top_banner

wm overrideredirect . 1
wm resizable . 0 0

button .kiosk -image $logon_icon -text "Login" -command { exec /opt/SUNWutMenu/windows.sh }

button .prefs -image $reset_icon -text "Reset" -command { exec /opt/SUNWut/bin/utxconfig -r 800x600 }

button .res -image $default -text "Reset" -command { exec /opt/SUNWut/bin/utxconfig -r 1024x768 }


pack .top_banner
pack .kiosk .prefs -side left -ipadx 0p -ipady 0p
pack .res -side left -ipadx 0p -ipady 0p

update
set x [expr {([winfo screenwidth .]-[winfo width .])/2}]
set y [expr {([winfo screenheight .]-[winfo height .])/2}]
wm geometry . +$x+$y
wm deiconify .