Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 had some tabs in the Terminal and was doing some work when it crashed but my processes were still running (could see them in Activity Monitor/htop). When I started the Terminal again it put me to ttys004 so I guess there are 3 more (4 if there should be a ttys000 too) sessions running.

How do I regain control over my lost sessions?

share|improve this question

Using screen would of saved you from this, man screen for more info on screen. It's briliant for long running process.

to start screen (or any command) when you create a new window or tab, add the command to the bottom of your ~/.bash_profile. eg: screen

Here is a copy of my ~/.screenrc , you might find some useful stuff in it screen also allows for tabs, the above version will create two bash login tabs,

share|improve this answer
I checked the manual and seems to be just what I need. Do you know if there is a way to run it every time I make a new tab in I tried to put it in Setting > Shell > Startup > Run command but had no luck... – Kostas Nov 9 '09 at 15:55
Something like should work, with slight modifications if you are not using Bash as your login shell. – David Spillett Nov 9 '09 at 20:09
The first script of the post seems to not be working. The second though is really useful (with some modifications). – Kostas Nov 10 '09 at 8:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.