Re: Run Form
Stelios Bounanos (sb@dial.pipex.com)
Wed, 08 May 2002 19:22:47 +0100
>>>>> 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