Find the answer to your Linux question:
Results 1 to 3 of 3
So I'm trying to run two instances of a shell script (f@h). They're in seperate directories, so really, the effect I want is opening a shell, running the startup script, ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2006
    Posts
    6

    Spawning multiple shell windows?


    So I'm trying to run two instances of a shell script (f@h). They're in seperate directories, so really, the effect I want is opening a shell, running the startup script, opening another shell, and then starting that script. Of course, if I try to make a shell script that just lists on command and then the other, it will run the first instance until I kill it with ctrl+c, and then start the next. Is there a way I can use a script to spawn two shell windows and then execute the startup scripts in those child windows? Seems like it should be pretty straightfoward but I can't get anyhting usefull after googling for about 20 minutes

  2. #2
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    Location
    the hills
    Posts
    1,134
    A console window isn't just an instance of bash. I have
    KDE, and the command to open a command window
    is konsole. In Gnome I believe it is gnome-terminal

  3. #3
    Just Joined!
    Join Date
    Jun 2006
    Posts
    6
    Quote Originally Posted by rcgreen
    A console window isn't just an instance of bash. I have
    KDE, and the command to open a command window
    is konsole. In Gnome I believe it is gnome-terminal
    whee!

    Code:
    #!/bin/sh
    
    gnome-terminal --command="/home/cg/fold1/FAH504-Linux.sh" --working-directory="/home/cg/fold1/"
    
    gnome-terminal --command="/home/cg/fold2/FAH504-Linux.sh" --working-directory="/home/cg/fold2/"
    works perfectly. thanks!

Posting Permissions

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