Results 1 to 7 of 7

Thread: Keeping xterm up after command is finished

  1. #1
    Junior Member
    Join Date
    Jan 2010
    Posts
    81

    Default Keeping xterm up after command is finished

    When running xterm in a script, I can get it to continue with the script while it runs, but I can not keep it open even when the command is finished.
    Code:
    xterm -e iwconfig &
    Runs the command, but then the terminal closes. How would one keep it up until the user clicks to close it. Or are there any other terminal emulators I could do to do the same function?

    Thanks,
    red

  2. #2
    Very good friend of the forum Gitsnik's Avatar
    Join Date
    Jan 2010
    Location
    The Crystal Wind
    Posts
    851

    Default

    I don't know about clicks, but to get away with a ^C or even executing a fresh terminal, the following works flawlessly for me:

    Code:
    xterm -e 'iwconfig ; tcsh' &
    Note we're just command separating, you could replace tcsh with bash or cat if you preferred.
    Still not underestimating the power...

    There is no such thing as bad information - There is truth in the data, so you sift it all, even the crap stuff.

  3. #3
    Junior Member
    Join Date
    Jan 2010
    Posts
    81

    Default

    I have a problem with it. When I put it in, it runs the command on a separate terminal, like it should, but then closes. If I were to put airodump-ng in, because it runs until told to stop, it closes. So I think there is a problem with formating. What I want to do is push Crtl-z and stop the application, and then be able to input another command.

    Thanks,
    red

  4. #4
    Very good friend of the forum Gitsnik's Avatar
    Join Date
    Jan 2010
    Location
    The Crystal Wind
    Posts
    851

    Default

    Paste the command you used, I just ran the xterm on BT3, FreeBSD and BT4, using airodump and aircrack on all three, with it working as it should (xterm -e 'airodump-ng ath0 ; bash' runs airodump until i control C, then bails out to bash).

    Perhaps I am misunderstanding what you are trying to acheive too. Which is possible.
    Still not underestimating the power...

    There is no such thing as bad information - There is truth in the data, so you sift it all, even the crap stuff.

  5. #5
    Junior Member
    Join Date
    Jan 2010
    Posts
    81

    Default

    Quote Originally Posted by Gitsnik View Post
    Paste the command you used, I just ran the xterm on BT3, FreeBSD and BT4, using airodump and aircrack on all three, with it working as it should (xterm -e 'airodump-ng ath0 ; bash' runs airodump until i control C, then bails out to bash).

    Perhaps I am misunderstanding what you are trying to acheive too. Which is possible.
    Yes, it was me saying it wrong. I need the information on that first terminal and by stopping the application, it is still available to me, but it closes. How do I keep that terminal up, if possible?

    Thanks,
    red

  6. #6
    Very good friend of the forum Gitsnik's Avatar
    Join Date
    Jan 2010
    Location
    The Crystal Wind
    Posts
    851

    Default

    Which is what I thought you meant, so I will ask again for the command you tried most recently. For me, xterm -e 'airodump-ng ath0 ; bash' will pop up an xterm with airodump on it, then when I stop airodump, it drops out to bash - and leaves the airodump screen output just above it.

    The other possibility is that your system is clearing the screen when loading bash, so you could place cat there instead.
    Still not underestimating the power...

    There is no such thing as bad information - There is truth in the data, so you sift it all, even the crap stuff.

  7. #7
    Junior Member
    Join Date
    Jan 2010
    Posts
    81

    Default

    Quote Originally Posted by Gitsnik View Post
    Which is what I thought you meant, so I will ask again for the command you tried most recently. For me, xterm -e 'airodump-ng ath0 ; bash' will pop up an xterm with airodump on it, then when I stop airodump, it drops out to bash - and leaves the airodump screen output just above it.

    The other possibility is that your system is clearing the screen when loading bash, so you could place cat there instead.
    I am running BT4, and when I run it, it closes the airodump and then runs bash. How would I put the cat command into it.

    Edit: I guess when trying different combinations, I did not re-put the ' ' on the commands. Thanks for all your help.

    Thanks,
    red

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •