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 run some VM's and some of them are dedicated to several jobs. For example lets say that one machine is running samba and ftp services and another is running Apache and some database.

Now what I would like to do is to run several programs at boot to show me the status so that when I peak at the VM's output I can easily see what is going on.

So let's say that I want to split the screen into three so I can run run 'ftptop' and 'watch smbstatus' so I can always see what is going on + the login prompt on one machcine. On the other I might want to run 'apachetop' and 'htop' + the login prompt.

I need to split the terminal into several sections to run all the programs at once and as far as I know screen or tmux would be the way to go here but I have no idea how to set it up properly.

Edit: If this is a bit unclear I want this to happen automatically on each boot. Also what I did NOT mention was that it would be nice to lock the user in one of the separate "windows" on the terminal so one can't break out of the login prompt "window" and get access to the shell by breaking any of the running programs displaying status info.

share|improve this question
What have you tried? Have a look at screen's documentation and post back with specific issues. What you describe should be a very basic use of screen/tmux. Alternatively, see the answer to my question here. – terdon May 19 '13 at 17:43
The thing is that I would like to this to happen automatically (without me doing anything) for each time the system has booted. I need the terminal window to be split into three for example like I described. So far I've only read the manual pages for both screen and tmux (very briefly) and have not (yet) found what I am looking for. – Waxhead May 20 '13 at 0:02
Ah, doing it automatically is a different matter, fair enough. Please edit your question to describe exactly what you need. Would you like this to happen on boot? Using a shortcut? Upon connecting to the server? – terdon May 20 '13 at 2:33
I believe I was clear enough about wanting this to happen after boot. It is after all in the title + the question. However added a little section to the question to hopefully get rid of some confusion. – Waxhead May 22 '13 at 15:47

This is very simple to do on most distributions, you need to change inittab to spawn a script instead of getty on the first tty. Edit /etc/inittab and alter the line that reads:

1:2345:respawn:/sbin/getty 38400 tty1

to something like

share|improve this answer

You must log in to answer this question.

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