Macos – How to automatically restore window arrangement from last time in iTerm

iterm2macos

I have two old Macs, both have iTerm2 installed and could automatically restore window arrangement (tabs with different directories and colors) from last time after launch. I forget what configuration I've made for both.

Now I'm setting up a new Mac with iTerm2, but could never get "automatically restore window arrangement from last time" working there.

What I've tried:

  1. Compared with the working ones, check and set the preferences one by one;
  2. Cloned the working "~/Library/Preferences/com.googlecode.iterm2.plist";
  3. Preferences -> Profiles -> General -> Working Directory -> Reuse previous session's directory (but I think this impacts when you open a new tab, not for launch);
  4. Menu -> Window -> Save Window Arrangement -> and save it as default. But in this case, every time if I launch from start, iTerm always restore fixed window arrangement from the save. I don't want to save any pattern, I just want restore whatever I have from last time.

All the things I've tried could not make it work. Could anyone tell me what should I do please? Thanks a lot.

iTerm version: iTerm2-1_0_0_20140112

Best Answer

In iTerm2's preferences (Cmd + ,), change General > Startup from Open Default Window Arrangement to Use System Window Restoration Setting.

In System Preferences, turn off General > Close windows when quitting an app.