|
Home > Archive > Unix questions > November 2004 > after running a command with 'xterm -e' how do I leave the window active ?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
after running a command with 'xterm -e' how do I leave the window active ?
|
|
|
| I want to open a new shell window and run a command in it from
a script. I used the "xterm -e" command, but I want the new window to
ramain active after the command completes.
Is there a way to do it ? (-hold only leaves the window open but not
active)
maybe with a different terminal (gnome-terminal, ....)
Thanks,
Assaf,
| |
| Stephane CHAZELAS 2004-11-30, 2:47 am |
| 2004-11-30, 01:00(-08), abb:
> I want to open a new shell window and run a command in it from
> a script. I used the "xterm -e" command, but I want the new window to
> ramain active after the command completes.
[...]
By "active", do you mean a shell should be run i it?
xterm -e sh -c 'your cmd; exec "${SHELL:-/bin/sh}"'
--
Stephane
| |
| Greg Beeker 2004-11-30, 7:43 pm |
| assaf.ben-bassat@intel.com (abb) wrote in message news:<4b51b485.0411300100.40a370dc@posting.google.com>...
> I want to open a new shell window and run a command in it from
> a script. I used the "xterm -e" command, but I want the new window to
> ramain active after the command completes.
>
> Is there a way to do it ? (-hold only leaves the window open but not
> active)
try this
xterm -e "your command; exec /bin/ksh" &
the & runs your command in the background which returns a prompt to
the calling shell.
replace /bin/ksh with your shell
| |
| Jeremiah DeWitt Weiner 2004-11-30, 7:43 pm |
| abb <assaf.ben-bassat@intel.com> wrote:
> I want to open a new shell window and run a command in it from
> a script. I used the "xterm -e" command, but I want the new window to
> ramain active after the command completes.
> Is there a way to do it ? (-hold only leaves the window open but not
> active)
Other people have already answered your question, but I thought I'd
mention something for similar situations. You can use a little script
called 'pauseme', which in its simplest form just looks like
$*
read DUMMY
Then you invoke it like 'xterm -e pauseme mutt' or whatever. More
baroque variations might look something like this:
$*
xtermcontrol --fg=DarkGray --bg=LightGray --title="(CLOSED) `xtermcontrol --get-title`"
echo "Ended at `date`."
echo "Press Enter to continue..."
read DUMMY
|
|
|
|
|