RE: Re: Run Form

turnerjw2@netscape.net
Thu, 09 May 2002 22:18:43 -0400


Try this:

xtermp.sh emacs junk

where "xtermp.sh" is:
========================= xtermp.sh ================================
#!/bin/bash

. ~/.bashrc
if [ X$1 == 'X' ]; then
    xterm -name xterm -n Xterm -T 'Xterm'
else
    xterm -name xterm -n Xterm -T "$1 $2 $3 $4 $5 $6 $7" -e pauseme $1 $2 $3 $4 $5 $6 $7
fi

====================================================================

and "pauseme" is:

========================= pauseme ==================================
#!/bin/sh

PROG=$1
shift
$PROG "$@"

echo "Press return ..."
read dummy
====================================================================


Hope this helps.


Jim Turner


Stelios Bounanos <sb@dial.pipex.com> wrote:

> >>>>> On 7 May 2002 23:02:58 -0700, Pachara Tinamas
> >>>>> <mrpachara@icqmail.com> was runoured to have said:
>
> > On Tue, 07 May 2002, Christof wrote:
> >> 
> >> On Sun, Apr 28, 2002 at 11:24:33PM -0700, Pachara Tinamas wrote:
> >> > I use afterstep 1.8.11.
> >> > When I use Run Form with :
> >> > emacs junk
> >> > 
> >> > it show me some thing like :
> >> > /sbin/sh emacs junk: no command or filename.
> >> > 
> >> > it think "emacs junk" is a filename.
> >> > 
> >> > how can i do?
> >> 
> >> Are you trying to run emacs from the Form?
> >> 
> >> Krzysiek
> >> 
> > Thank you. I can run emacs from the Form. but  How can I use run form to run comand like shell prompt such as :
>
> > mozilla http://www.afterstep.org
>
> > or
>
> > cat junk
>
>Hi there,
>
>On my system, the forms config is in ~/GNUstep/Library/Afterstep/forms;
>in that file the Run Form section has the following line:
>
>*RUNFormCommand Exec "-" xterm -fg white -bg black -T Run -e $(CustomTarget)
>
>This means that typing "emacs foo" in the form will cause xterm to try
>and execute "emacs foo" as a program, this won't work obviously.
>Noting that you're in fact treating the form as a shell, you can use this
>(replace bash with sh if necessary):
>
>*RUNFormCommand Exec "-" xterm -fg white -bg black -T Run -e bash -c $(CustomTarget)
>
>Now things like "cat junk" and "emacs foo" will work as expected, but:
>1) The xterm will wait for its child to exit. Not very useful if you're
>   starting up a graphical program...
>2) For "cat junk" etc, you will need something like "cat junk | less" or
>   "less junk" to keep the shell (and xterm) from exiting immediately.
>
>Given this, you may want to simply have
>
>*RUNFormCommand Exec "-" bash -c $(CustomTarget)
>
>and enter xterm -e "some_cmd_to_run_in_terminal" in the form as needed.
>
>Anyway, all this depends on your habits & usage, so play with it... :)
>
> > i don't want to make form for every command (some command I use a little)
>
> > Thank you
>
>
>Rgds,
>/-sb.
>_______________________________________________
>The AfterStep Window Manager for X User's Mailing List
>http://mail.afterstep.org/mailman/listinfo/as-users
>


__________________________________________________________________
Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/

_______________________________________________
The AfterStep Window Manager for X User's Mailing List
http://mail.afterstep.org/mailman/listinfo/as-users