Results 1 to 3 of 3

Thread: open a new konsole in bash and execute command

  1. #1
    Just burned his ISO
    Join Date
    Feb 2008
    Posts
    4

    Default open a new konsole in bash and execute command

    hi,
    is it possible to make a bash script (.sh) open a new konsole and run a command. I need the script to open a new shell/konsole and place it on the top left side of my screen, it needs to run a command, for example iwconfig, the window where the original bash script is running needs to continue to exist and needs to continue running...

    mvg,
    TY.

  2. #2
    Member
    Join Date
    Apr 2007
    Posts
    155

    Default

    And the point of this would be?
    This is a hackers forum :P
    root ~# aircrack-ng pwnd-01.cap
    Lenovo Thinkpad R500, OS: Ubuntu 8.10, BackTrack3, Windows XP (VirtualBox), Windows Vista, Windows 7 beta

  3. #3
    Very good friend of the forum Virchanza's Avatar
    Join Date
    Jan 2010
    Posts
    863

    Default

    The following will get you "ifconfig" and "iwconfig" in two different windows.

    Code:
    ifconfig
    xterm -e "iwconfig; bash" &
    Notice that I have "iwconfig; bash". If it were just "iwconfig", then the terminal window would disappear as soon as the iwconfig command finishes execution. To keep the terminal window open, I make it launch "bash" right after it executes "iwconfig".

    By the way, "xterm" is the bread-and-butter terminal emulator for X Windows, it should be available on every system. If you want to make it less portable then replace it with "kconsole" or whatever (and of course you'll have to look up the command line arguments for "kconsole").
    Ask questions on the open forums, that way everybody benefits from the solution, and everybody can be corrected when they make mistakes. Don't send me private messages asking questions that should be asked on the open forums, I won't respond. I decline all "Friend Requests".

Posting Permissions

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