I needed to reformat my computer and now I'm having trouble copying the settings/profiles over.
I copied the files in ~/Library/Application\ Support/iTerm/
I also copied ~/Library/Preferences/com.googlecode.iterm2.plist
but it keeps giving me this error:
Failed to load preferences from custom directory. Falling back to local copy.
Missing or malformed file at "/
com.googlecode.iterm2.plist"
I also tried saving the profile in a directory so I could send it but it doesn't work.
Here's the location:
iTerm ▶ General ▶ Preferences ▶ Save Settings To Folder
and here's the output:
Failed to copy preferences to custom directory. Copy
/Users/alexcory/Library/Preferences/com.googlecode.iterm2.plist
to Alex_Corys_iTerm_Configuration/com.googlecode.iterm2.plist:
No such process
The colors work, (found in the path below) but I'm not simply trying to save colors, but rather all my preferences.
iTerm ▶ Preferences ▶ Profiles ▶ Colors ▶ Load Presets ▶ Export
Does anyone know how to get this to work?
I didn't touch the "save to a folder" option. I just copied the two files/directories you mentioned in your question to the new machine, then ran
defaults read com.googlecode.iterm2
.See https://apple.stackexchange.com/a/111559
There is another way to do this.
From iTerm2 2.9.20140923 you can use Dynamic Profiles as stated in the documentation page:
So it is possible to create a file like this one:
in the folder
~/Library/Application\ Support/iTerm2/DynamicProfiles/
and share it across different machines. This enables you to retain some visual differences among iterm2 installations such as font type or dimension, while synchronising remote hosts, shortcuts, commands, etc.If you have a look at
Preferences -> General
you will notice at the bottom of the panel, there is a settingLoad preferences from a custom folder or URL:
. There is a button next to itSave settings to Folder
.So all you need to do is save your settings first and load it after you reinstalled your OS.
If the
Save settings to Folder
is disabled, select a folder (e.g. empty) in theLoad preferences from a custom folder or URL:
text box.It isn't the most obvious workflow. You first have to click "Load preferences from a custom folder or URL". Select the folder you want them saved in; I keep an appsync folder in Dropbox for these sorts of things. Once you have selected the folder, you can click "Save settings to Folder". On a new machine / fresh install of your OS, you can now load these settings from the folder. At first I was sure that loading preferences would wipe out my previous settings, but it didn't.
Preferences -> General -> Load preferences from a custom folder or URL
First time you choose this, it will automatically save a preferences file into this folder called "com.googlecode.iterm2.plist"
Caveats: this answer only allows exports color settings.
iTerm => Preferences => Profiles => Colors => Load Presets => Export
Import shall be similar.