Hi All

Here is a kiosk script I have put together for our citrix desktop environment. 
It comes in two parts and would be easy to modify to launch the windows 
connector.
1. a Shell script Called(citrix)
2. a TCL script to provide a GUI (login)
______________________________________________________________________________________________________________________
#! /bin/sh
#Fix PrintScreen , alt+printscreen
xmodmap -e 'keycode 111 = 0xff61'

#Enable Script to Run on Every Session Reconnect
/opt/SUNWut/bin/utaction -i -c '/etc/opt/SUNWut/reconnect'&

#Retrieve SUNRAY Device Name & Pass to Logon Window
SRMAC=$(ls -l $UTDEVROOT | sed 's/.*\.//')

#Check to ensure we have retrieved a MAC address and not an empty string.
if [ -n "$SRMAC" ]
then
    echo "$SRMAC FOUND"
    #Get rid of the minimize,maximize,close buttons on the window manager.
    /usr/bin/gconftool-2 \
    --type string \
    --set /apps/metacity/general/button_layout menu:close

    #Start a window manager so we have a window title bar.
    /usr/bin/metacity &

    #Launch login window
    /etc/opt/SUNWkio/sessions/citrix/login SR-$SRMAC
fi

#Sleep for 10 seconds to avoid Kiosk Script error about session lasting less 
than 10 Seconds.
sleep 10
______________________________________________________________________________________________________________________________________________
#!/usr/bin/wish
    set pubDesktop "SUN-DESKTOP"
    set domain "DOMAIN"
    set myimage [image create photo -file 
/etc/opt/SUNWkio/sessions/citrix/LOGO.gif]
    set srmac [lindex $argv 0]
    wm  title . "Windows Login - $srmac"
    wm  state . iconic
    wm protocol . WM_DELETE_WINDOW {exit}
    #wm resizable . 0 0
    label  ..dummyBeforeImage1 -text ""
    label  ..dummyBeforeImage2 -text ""
    label  ..dummyBeforeImage3 -text ""
    label  ..i -image $myimage
    label  ..dummyAfterImage -text ""
    label  ..u -text "User Name:"
    entry  ..user -width 40  -textvar _username
    label  ..p -text "Password:"
    entry  ..pass  -width 40 -show * -textvar _password
    label  ..dummy -text ""
    button ..ok -text OK -command {set _res [list $_username $_password]}
    button ..cancel -text Cancel -command {{exit}}
    #place .i -bordermode inside -relwidth .9 -x .0 -relheight .9 -y .0
    #place .l -relwidth .3 -relx .35 -relheight .3 -rely .35
    #grid   .dummyBeforeImage1  x   x
    #grid   .dummyBeforeImage2  x   x
    #grid   .dummyBeforeImage3  x   x
    grid   .i .i -
    grid   .dummyAfterImage
    grid   .u .user -
    grid   .p .pass -
    grid   .dummy -
    grid   .ok .cancel -sticky news

    bind . <Return> [list .ok invoke]
    bind . <Escape> [list .cancel invoke]

        wm withdraw .
        set xx [expr {([winfo screenwidth .]-[winfo width .])/3}]
        set yy [expr {([winfo screenheight .]-[winfo height .])/3}]
        wm geometry . +$xx+$yy
        wm transient .
        wm iconify .
        wm  state . normal
        wm frame .
    raise .
    grab set .
    vwait _res
    destroy .

        if {$_username != ""} {exec /usr/lib/ICAClient/wfica -file 
/usr/lib/ICAClient/config/sunray-appsrv.ini -protocolfile  
/usr/lib/ICAClient/config/sunray-module.ini -clientfile 
/usr/lib/ICAClient/config/sunray-wfclient.ini -desc $pubDesktop -username 
EPWH\\$_username -clearpassword $_password -quiet -clientname $srmac
        }
        exit
________________________________________________________________________________________________________________________________________________

Cheers
Lance


This e-mail message and accompanying data may contain information that
is confidential and subject to privilege.  If you are not the intended
recipient, you are notified that any use, dissemination, distribution or
copying of this message or data is prohibited.  If you have received
this e-mail in error please notify the sender immediately by return
e-mail and delete all material pertaining to this e-mail.  The views
expressed in this message are those of the individual sender, except
where the sender specifically states them to be the views of Epworth
HealthCare.  Epworth does not warrant that the integrity of the
communication has been maintained nor that the communication is free of
errors, virus, interception or interference.  All e-mail sent to Epworth
HealthCare may be inspected and used by Epworth HealthCare for any lawful
purpose. Epworth HealthCare policy prohibiting transmission of
inappropriate material to its e-mail addresses is strictly enforced.

_____________________________________________________________________________________________
This email has been scanned by the MessageLabs Email Security System for 
Epworth HealthCare.
_____________________________________________________________________________________________
_______________________________________________
SunRay-Users mailing list
[email protected]
http://www.filibeto.org/mailman/listinfo/sunray-users

Reply via email to