Visit Our UNIX and Linux User Community


running Multiple terminals/shells


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting running Multiple terminals/shells
# 1  
Old 07-27-2009
running Multiple terminals/shells

Hi, I'm looking for a way to send commands through multiple shells/terminals (not sure which is proper syntax). Basically, I have to open 3 different shells/terminals and run separate parts of a program suite in each of them. I find this annoying. The commands I have to do are simple, and could be scripted if they all ran in the same shell/terminal. What I'm looking to do is to write a script that will create 3 new shells/terminals using either gnome-terminal or xterm, and then send commands to them from the one that I ran the script in. Is there a way to assign a tty to them as I open them or to get their tty from my script? Or will this require something more than scripting can handle?

Also, I'd like to change the window title on these to make it easier to track which is which.

Thanks

EDIT: I need to do this in bash

Last edited by Caradoc; 07-27-2009 at 02:54 AM..
# 2  
Old 07-27-2009
Use remote shell (rsh) or secure shell (ssh) from a central script to run the sub commands on remote servers, even if the "remote" server is localhost. Bear in mind that the remote shells will have no interactive environment, so your passed command will have to set everything that's needed, and you'll also need to determine a method for getting output and status from the remote shells back to the master.

Hope that helps.

Jerry

Previous Thread | Next Thread
Test Your Knowledge in Computers #280
Difficulty: Easy
CPU modes (also called processor modes, CPU states, CPU privilege levels and other names) are operating modes for the central processing unit of some computer architectures that place restrictions on the type and scope of operations that can be performed by certain processes being run by the CPU.
True or False?

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to call exeute multiple bash shells from one master shell?

I have few bash shells, which i want to run sequentially, how to create a shell file, and execute/call one after other shell file. I am very new to shell programming. Bult some and running individually and also with crontab scheduler. never had a shell calling other shells, kindly would like... (2 Replies)
Discussion started by: cplusplus1
2 Replies

2. Shell Programming and Scripting

Automate an application using scripting, managing multiple terminals

Hi I am new to Ubuntu and Bash scripting. I am working on a project to give a demo on an SDN application to my class. I need some help in scripting to create the demo. Please help in case if you have any idea on what am asking. The demo uses a tool called mininet. I need just one script so... (2 Replies)
Discussion started by: anzal
2 Replies

3. AIX

How to open multiple virtual terminals to a single LPAR

I just wondering if there are ways to open multiple virtual terminal to a single LPAR. After I have use putty to login to the VIOS. I will use mkvt -id <LPAR id> to open console but if my friend want to open 2 second one, it will say, VT already connected. IS there a way to work this around ? ... (1 Reply)
Discussion started by: wingcross
1 Replies

4. Programming

Handling Multiple terminals

Hi, Basically I've written a game in ncurses that supports multiple players. Each player has a process associated with him which shares a segment of memory in which the player's structures are stored, and these structured are accessed by the 'server' program and handled there. The scope of the... (13 Replies)
Discussion started by: dgre0018
13 Replies

5. UNIX for Advanced & Expert Users

how to make a parent wait on a child shells running in background?

Hi I have a shell script A which calls another 10 shell scripts which run in background. How do i make the parent script wait for the child scripts complete, or in other words, i must be able to do a grep of parent script to find out if the child scripts are still running. My Code: ... (1 Reply)
Discussion started by: albertashish
1 Replies

6. Shell Programming and Scripting

calling multiple terminals

I'd like to write a script that will call n number of terminals that will all ssh to X-server and automatically enter the same password. Unfortunately I'm not exactly sure what kind of commands would work for me here because when I call for gnome-terminal, a new terminal pops up and the old... (1 Reply)
Discussion started by: gelitini
1 Replies

7. Programming

fork multiple shells

Hi, i was trying to play with fork,exec and signal for spawning multiple new shells, but it seems that i'm doing blunder somewhere. <sample code> 1 /* 2 * The idea is to fork multpile(equal to $ULIMIT) childs 3 * and replace their images with process:csh 4 * during this the parent... (3 Replies)
Discussion started by: amit4g
3 Replies

8. UNIX for Dummies Questions & Answers

How to open multiple shells while the scripts keeps running.

Hello, I've tried for a while now to run a bash script that continues to the end, while opening new shells as needed. I've tried xterm -e "somecommand"; & xterm -e " somecommand"; I've also tried screen -S "somecommand"; & screen -S "somecommand"; All without any luck, they... (5 Replies)
Discussion started by: Closed_Socket
5 Replies

9. UNIX for Advanced & Expert Users

Multiple Terminals

Dear Members, I have aquired a load of old Wyse dumb terminals. I have a Linux system set up that I want to be the host for all of these. Now, I know these don't use cat5 or standard networking. They are all done through serial (com) ports. However, I researched this more and found a converter... (25 Replies)
Discussion started by: Phobos
25 Replies

Featured Tech Videos