Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to start a few programs with a single launch script and monitor their outputs to the console.

The easiest way would be to launch in background an xterm for each program, but that's not very neat (I don't like having too many windows around).

The other alternative I've thought of is to redirect their outputs to logfiles and then use multitail to watch their outputs in a single terminal, but if I want to kill them I'd need to take a look at their PID's and then issue a kill command rather than just going to their terminal and press Ctrl+C. Also, this wouldn't work well if some of the program uses curses or similar.

My ideal option would be something like using screen to multiplex a terminal (or even show all of them in a split fashion), but I cannot find any option in the manual pages related with that and googling screen won't throw any useful result as it is a very generic term.

So, any suggestions on how to achieve something similar to what I want?

share|improve this question

No suggestion for your specific problem but have you also considered tmux which is said to be easier to configure. Have a look at this and this blog post for more information and some advantages compared to screen.

share|improve this answer

It is possible to do this with screen by loading a custom screen configuration file. Here is an example for starting and monitoring four programs in a split terminal. Create a file launch_file somewhere with the following in it:

screen program1
focus down
screen program2
focus down
screen program3
focus down
screen program4

where program1, program2... are the four programs you wish to run. Now, in a (large) xterm or similar enter screen -c launch_file. You should see a four-way split view with one of the programs running in in each. You can use Ctrl+a tab to cycle through the four windows, and use Ctrl+c to stop one of the programs.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .