home Mail List
Info
Info
Meetings
Goals
Upcoming
Projects
FAQ
Security
Links

[Date Prev][Date Next] [Chronological] [Thread] [Top]

[NMLUG] programming challenge



On Wed, 2004-11-24 at 15:17, Don Wilde wrote:
> Hey, all -
> 
> I need to find a way to kick off an xterm running BASH and then execute 
> a program within that xterm, but NOT close the new xterm after the 
> program finishes. Another desireable thing would be to also be able to 
> 'source in' a file of shell environment that would affect the new window 
>   and shell.

I have done this.
The bad news is that I wrote something like
the inverse of tee to do it.

Doing it inside another xterm is even more tricky.

If you are root, you can write directly to the tty to
send commands.  This would be the easiest route... if possible.

Otherwise, start up bash, forking from a program that
retains ownership of the child's stdin.
This program can do a select/poll for input on
its stdin, which it will pass to bash, all while
occationally printing a command of its own choosing
to bash.... or taking that command from a socket,
or named pipe.

-- 
Aaron Birenboim         \    I have an inferiority complex,
Albuquerque, NM, USA     \       but its not a very good one.
aaron at birenboim.com    \
http://aaron.birenboim.com \




Please send sugestions and comments to webmaster@nmlug.org.
Valid XHTML 1.1! Valid CSS! Powered by Debian Powered by Apache