executing a command in xterm and keep interactive
Hi, I'm trying to automate some processes, where an initial command should run inside a xterm, and the xterm kept interactive thereafter (xterm -e ...). Since the culprit seem bash, I've tried most ways of invoking bash with -i, -s and -c options, but as soon as I give bash the -c option, it exits after the command itself, no matter if any of -i or -s is also given, which differs from my reading/understanding of related sections in the manual. Has somebody in the kind audience tried to accomplish such a task before and want to share the findings? TIA, Pete --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-programming-de+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-programming-de+help@opensuse.org
* Hans-Peter Jansen
Hi,
I'm trying to automate some processes, where an initial command should run inside a xterm, and the xterm kept interactive thereafter (xterm -e ...).
Since the culprit seem bash, I've tried most ways of invoking bash with -i, -s and -c options, but as soon as I give bash the -c option, it exits after the command itself, no matter if any of -i or -s is also given, which differs from my reading/understanding of related sections in the manual.
xterm -e bash -c mc works here. Can you be a bit more concrete about the command? Bernhard --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-programming-de+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-programming-de+help@opensuse.org
On 19-Jan-08, Hans-Peter Jansen wrote:
Hi,
I'm trying to automate some processes, where an initial command should run inside a xterm, and the xterm kept interactive thereafter (xterm -e ...).
Since the culprit seem bash, I've tried most ways of invoking bash with -i, -s and -c options, but as soon as I give bash the -c option, it
The only possibility I see is to start an interactive shell and let it read your initial command from a special rcfile: xterm -e bash --rcfile my_command -- my_command: -------------------------------------------------- #!/bin/bash # this mini-script is sourced instead of $HOME/.bashrc, so we source # $HOME/.bashrc anyway, before or after "your command" . $HOME/.bashrc your command ----------------------------------------------------------------- (Also, usually, in this case you do not need the -i option to bash.) Otherwise, if you used the -c option to read commands from a string, you can not change (redirect) the command source anymore, as it is not through an open file but just the command line argument that is interpreted by the shell. The shell will inevitably terminate after all commands have been processed. Regards, -- Olaf Dabrunz (Olaf <at> dabrunz.com) --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-programming-de+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-programming-de+help@opensuse.org
participants (3)
-
Bernhard Walle
-
Hans-Peter Jansen
-
Olaf Dabrunz