Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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 http://pastebin.ca/1663824 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 Terminal.app? I tried to put it in Setting > Shell > Startup > Run command but had no luck... –  vrinek Nov 9 '09 at 15:55
Something like tlug.dnho.net/?q=node/239 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). –  vrinek 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.