newLISP Fan Club

Forum => newLISP and the O.S. => Topic started by: tom on September 07, 2008, 11:41:10 AM

Title: running in an xterm
Post by: tom on September 07, 2008, 11:41:10 AM
hey guys,



most Terminal Emulators can be given an "-e" option to run programs.  If I type "xterm -e /path-to-my-script"  an xterm fires up and runs the script.



is there a way to open an xterm in a script which then executes the script that opens it? (yes, convoluted..)



I want to click a button to run a script in an xterm.  the way I do it now is to write a shell script that starts the xterm that starts the script, and I'd like to reduce it down to one step.



I just confused myself.

:-)
Title:
Post by: Lutz on September 07, 2008, 02:13:09 PM
try: (exec "xterm -e myscript")
Title:
Post by: tom on September 07, 2008, 03:16:16 PM
That will work if I include it in myscript itself?  Wouldn't that loop forever?
Title:
Post by: aron on September 10, 2008, 06:18:29 AM
Quote from: "tom"That will work if I include it in myscript itself?  Wouldn't that loop forever?


If you call it allways then..



Not forever, but a long time I guess. It becomes a Recursive execution of the script and I think it needs more and more memory until there is no memory left, but maybe something else can occure.



I remember i read about an loop that looked like a newer ending loop but it was stopt by an (hardwar-related) exception and the execution was then restarted from the first line on that platform.