Re: FVWM: exec'ing an expect script

From: Keith Kaple <kak_at_cisco.com>
Date: Wed, 31 May 2000 16:41:29 -0400

Hmm.. I use expect and fvwm2. Maybe this will help:

AddToMenu "GrabCommPort" "Grab Comm Port..." Title
+ "astronet" Exec exec grab astronet
+ "bradford" Exec exec grab bradford
+ "catania" Exec exec grab catania
+ "chandra" Exec exec grab chandra
+ "eric" Exec exec grab eric
+ "haystack" Exec exec grab haystack
+ "hopkins" Exec exec grab hopkins
+ "hubble" Exec exec grab hubble
+ "ikarus" Exec exec grab ikarus
+ "mopra" Exec exec grab mopra
+ "onsala" Exec exec grab onsala
+ "parkes" Exec exec grab parkes
+ "sputnik" Exec exec grab sputnik
+ "taeduk" Exec exec grab taeduk
+ "galileo" Exec exec grab galileo
+ "leonid" Exec exec grab leonid
+ "All of the above" GrabAll1

AddToMenu "LoadImage" "Load Image On..." Title
+ "astronet" Exec exec ccom astronet
+ "bradford" Exec exec ccom bradford
+ "catania" Exec exec ccom catania
+ "chandra" Exec exec ccom chandra
+ "eric" Exec exec ccom eric
+ "haystack" Exec exec ccom haystack
+ "hopkins" Exec exec ccom hopkins
+ "hubble" Exec exec ccom hubble
+ "ikarus" Exec exec ccom ikarus
+ "mopra" Exec exec ccom mopra
+ "onsala" Exec exec ccom onsala
+ "parkes" Exec exec ccom parkes
+ "sputnik" Exec exec ccom sputnik
+ "taeduk" Exec exec ccom taeduk


where grab and ccom are:

bounty:kak-13-> more ccom
#!/usr/bin/expect
#
#

source ~/auto/lib/rtrlib
set routerlist [source ~/auto/lib/readdot.exp]
foreach arg $argv {
        puts $arg
        clearCommPort $arg
}
bounty:kak-14-> more grab
#!/usr/bin/expect
#
#
source $env(RAPATH)/lib/rtrlib
set routerlist [source $env(RAPATH)/lib/readdot.exp]
foreach arg $argv {
        puts $arg
        clearCommPort $arg
        exec ~/bin/$arg &
}

***But notice the last statement in "grab", I pop the xterm for an interface to the router's console with something like:

bounty:kak-16-> more astronet
#!/bin/sh
#
xterm -fn a14 -fg white -bg black -cr red -geometry 80x50+240+240 -rw -sb -sl 8000 -T "astronet_172.18.194.1
75_c3640_gatekeeper_(master)" -e telnet 172.18.192.70 2018 &





HOPE THIS HELPS CISCO BROTHER !!!








On Wed, May 31, 2000 at 01:26:28PM -0700, Yngvi J'garseogn wrote:
> --- Dinesh Pullat <dpullat_at_cisco.com> wrote:
> >
> > I wish fvwm to exec an expect script. I have in my .fvwmrc:
> >
> > Exec "router1" exec $HOME/map.exp router1
> >
> > Where map.exp is the expect script and router1 is the argument
> > to the script.
> > But this does not work. Changing the argument to exec above to
> > just xterm works fine.
> > [...]
>
> Hei
>
> If you are using expect and not expectk then the problem
> is that there is no window for your script to "interact" in.
>
> You need to exec an xterm and tell the xterm to run your
> expect script. I am not sure of the exact syntax but it is
> something along the lines of:
>
> Exec "router1" exec xterm -e $HOME/map.exp router1
>
> --
> ------------------ ------------------------------------------------
> | Yngvi J'garseogn | UNIX _is_ user friendly. |
> | Yngvi_at_yahoo.com | It's just selective about who its friends are. |
> ------------------ ------------------------------------------------
>
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Send instant messages & get email alerts with Yahoo! Messenger.
> http://im.yahoo.com/
> --
> Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
> To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
> message to majordomo_at_fvwm.org.
> To report problems, send mail to fvwm-owner_at_fvwm.org.
>

-- 
Keith Kaple                 |      |           |       	
919-392-5759 or 392-3550    |     |||         |||       
RTP, NC                     |    |||||       |||||    
H323 Packet Telephony       | .:|||||||:...:|||||||:.
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Wed May 31 2000 - 15:42:08 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:50 BST