5

I've been using the screen window manager for many years. Just updated to OS X El Capitan (10.11) yesterday, it comes with "Screen version 4.00.03 (FAU) 23-Oct-06" and "GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin15)".

Now when I close a window, and later make a new one with ^ac, it says "Restored session:" and a timestamp at the top. Is this something new, or something OS X-specific? How do I turn it off?

2 Answers 2

9

It turns out this has nothing to do with screen. It's a bash session save/restore mechanism Apple now ships with OS X (as of El Capitan).

The answer is provided in the comments at the top of /etc/bashrc_Apple_Terminal, or this StackOverflow question: simply create a ~/.bash_sessions_disable file (and you can remove the ~/.bash_sessions directory).

4

The behaviour is caused by OS X’s “Resume” feature. You can disable it on a per-application basis by entering this command:

defaults write com.apple.Terminal NSQuitAlwaysKeepsWindows -bool false

Note though that you’ll need to quit and relaunch Terminal TWICE afterwards to make the change permanent, as you’re making the change from within the target application. (i.e. issue the command, quit, relaunch, quit again, and then relaunch to see the results.)

You must log in to answer this question.

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