Abusing the reconnect prompt to show a session menu

View: New views
3 Messages — Rating Filter:   Alert me  

Abusing the reconnect prompt to show a session menu

by J Quach :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
In our environment we are using Windows Xp workstations with a shell (Res Subscriber) replacing explorer.exe. This shell is nothing more than a few buttons to access the various (Citrix) sessions and a shutdown button (and an autostart for the first session). Now we want to move to Thinstation but make it as easy as possible for the users to switch. So the options are Replimenu and a window manager. With replimenu it will be difficult for users because you cannot use the mouse. A window manager is a good option, but confuses users, because you have a 'session in a session'. So coming back to our winXp pc’s and Res Subscriber, I wanted to mimic the Subscriber menu as close as possible. I’ve done it with te reconnect prompt: in packages/base/etc/thinstation.functions expand the if/else structure with the following code:

#--------------------------------------------------------
    elif [ "$prompt" = "ADV" ] ; then
        i=0
        j=0
        
        ip=$(/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}')
        host=`make_caps $CLIENT_NAME`
        sessioninfo=$WKDIR/session
        while read type title screen position workspace autostart custom icon server options
        do
                # using eval here because of the lack of arrays in ash
                eval string$i="\"'$title'" cmd$i\"
                eval command$i=\"pkg $type console $server\"
                eval sessiontype$i=\"$type\"
                eval sessionserver$i=\"$server\"
                eval screen$i=$screen
                eval position$i=$position
                eval workspace$i=$workspace
                let "i+=1"
        done < $sessioninfo

        while [ $j -lt $i ]
        do
                eval tmp=\$string$j
                str=$str-choice" "$tmp" "
                let "j+=1"
        done
        
        # write to a file because I could not get the quotes right when using descriptions with spaces
        echo "xwChoice -title '$host - $ip'  -question 'Kies een optie en klik <OK> om door te gaan.' $str-choice 'Computer uitschakelen' shutdown" > tmp.txt
        chmod 777 tmp.txt
        choice=`./tmp.txt`
        cmd=`echo $choice|cut -c1-3`

        case $cmd in
        cmd)
            item=`echo $choice|cut -c4-`
                   eval export DISPLAY=:\$screen$item
                   export DISPLAY_NUMBER=0
                   eval export POSITION=\$workspace$item
                   eval server=\$sessionserver$item
                   eval type=\$sessiontype$item
                   pkg console $type $server
                   exit 0;;  # exit here or the default session will also be started
           
        *)
            if [ -e /tmp/poweroff ] ; then
                crontab /tmp/crontab
                rm /tmp/poweroff
            else
                poweroff
            fi
        esac

#--------------------------------------------------------
Session0 autostart is on, menu=ADV. Tested only witch ica and rdp on Thinstation 2.2.2. Any comments or improvements on this?



Plan je feest, nodig mensen uit en deel je foto's met Windows Live Events
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Thinstation-developer mailing list
Thinstation-developer@...
https://lists.sourceforge.net/lists/listinfo/thinstation-developer

Re: Abusing the reconnect prompt to show a session menu

by saman123 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hello, i have a question about creating a toolbar button on firefox on thinstation.
I have to create a shutdown the client button on the toolbar of firefox of thinstation..
can some one tell me how can i create it?
J Quach wrote:
In our environment we are using Windows Xp workstations with a shell (Res Subscriber) replacing explorer.exe. This shell is nothing more than a few buttons to access the various (Citrix) sessions and a shutdown button (and an autostart for the first session). Now we want to move to Thinstation but make it as easy as possible for the users to switch. So the options are Replimenu and a window manager. With replimenu it will be difficult for users because you cannot use the mouse. A window manager is a good option, but confuses users, because you have a 'session in a session'. So coming back to our winXp pc’s and Res Subscriber, I wanted to mimic the Subscriber menu as close as possible. I’ve done it with te reconnect prompt: in packages/base/etc/thinstation.functions expand the if/else structure with the following code:

#--------------------------------------------------------
    elif [ "$prompt" = "ADV" ] ; then
        i=0
        j=0
       
        ip=$(/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}')
        host=`make_caps $CLIENT_NAME`
        sessioninfo=$WKDIR/session
        while read type title screen position workspace autostart custom icon server options
        do
                # using eval here because of the lack of arrays in ash
                eval string$i="\"'$title'" cmd$i\"
                eval command$i=\"pkg $type console $server\"
                eval sessiontype$i=\"$type\"
                eval sessionserver$i=\"$server\"
                eval screen$i=$screen
                eval position$i=$position
                eval workspace$i=$workspace
                let "i+=1"
        done < $sessioninfo

        while [ $j -lt $i ]
        do
                eval tmp=\$string$j
                str=$str-choice" "$tmp" "
                let "j+=1"
        done
       
        # write to a file because I could not get the quotes right when using descriptions with spaces
        echo "xwChoice -title '$host - $ip'  -question 'Kies een optie en klik <OK> om door te gaan.' $str-choice 'Computer uitschakelen' shutdown" > tmp.txt
        chmod 777 tmp.txt
        choice=`./tmp.txt`
        cmd=`echo $choice|cut -c1-3`

        case $cmd in
        cmd)
            item=`echo $choice|cut -c4-`
                   eval export DISPLAY=:\$screen$item
                   export DISPLAY_NUMBER=0
                   eval export POSITION=\$workspace$item
                   eval server=\$sessionserver$item
                   eval type=\$sessiontype$item
                   pkg console $type $server
                   exit 0;;  # exit here or the default session will also be started
           
        *)
            if [ -e /tmp/poweroff ] ; then
                crontab /tmp/crontab
                rm /tmp/poweroff
            else
                poweroff
            fi
        esac

#--------------------------------------------------------
Session0 autostart is on, menu=ADV. Tested only witch ica and rdp on Thinstation 2.2.2. Any comments or improvements on this?


_________________________________________________________________
Blijf altijd op de hoogte van wat jouw vrienden doen
http://home.live.com
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Thinstation-developer mailing list
Thinstation-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/thinstation-developer

Re: Abusing the reconnect prompt to show a session menu

by Mike Eriksen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Oct 29, 2009 at 10:03 AM, saman123 <samankamalzadeh@...> wrote:
>
> hello, i have a question about creating a toolbar button on firefox on
> thinstation.
> I have to create a shutdown the client button on the toolbar of firefox of
> thinstation..
> can some one tell me how can i create it?
>

Maybe this is useful:
https://addons.mozilla.org/en-US/firefox/addon/5452

Mike
--
Thinstation oldtimer
http://thinstation.org
- a light, full featured linux based thin client OS

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Thinstation-developer mailing list
Thinstation-developer@...
https://lists.sourceforge.net/lists/listinfo/thinstation-developer