Terminal.app
declares itself a handler of the ssh
, telnet
and x-man-page
URL schemes.
It also registers the file extensions .term
(sessions), .terminal
(settings), .tool
and .command
(scripts), and itself as an editor/viewer for these.
Other than that, there is no default terminal in OS X. It's just an application that can handle URL schemes and file types.
iTerm is capable of handling all of these except the Terminal.app specific .term
/.terminal
.
For the file types, just open the Get Info dialog and associate all files of this kind with iTerm. For the URL schemes, you can download and install the preference pane Default Apps and change the association there. You can also use it as an alternative method of changing the file type associations.
All of these settings are user specific and stored in ~/Library/Preferences/com.apple.LaunchServices.plist
. You can of course edit it in a suitable editor yourself. It's pretty straightforward. Screenshot of Xcode 4 showing the result of changing x-man-page
in Default Apps preference pane:
Terminal.app also provides the following Services for other applications:
- New Terminal at Folder
- New Terminal Tab at Folder
- Open man page in Terminal
- Search man pages in Terminal
The association with Terminal.app is hard-coded. You need to create your own Services e.g. using Automator and/or AppleScript to replace these.
If Terminal is used via its AppleScript API, there is no way to just replace it with iTerm in all cases, as their APIs are quite different. This will often require substantial changes to the programs or scripts doing that.
I've been having the same issue and this is what seems to have solved it:
In your .bash_profile set CLICOLOR before setting TERM:
# Set CLICOLOR if you want Ansi Colors in iTerm2
export CLICOLOR=1
# Set colors to match iTerm2 Terminal Colors
export TERM=xterm-256color
save bash file and source:
source ~/.bash_profile
Then, in your iTerm2 Preferences > Profiles > Terminal > Report Terminal Type, set to either xterm-256color or xterm
Close iTerm2, restart it and type ls. That did the trick for me.
Good luck.
Catalina and ZSH
If using ZSH, which is the default shell in Catalina and later, use ~/.zprofile
, instead of ~/.bash_profile
.
Best Answer
All you need to do is reduce the minimum contrast by moving the slider to the left. Reducing the minimum contrast allows colors other than black and white to be used for the text. Here's why:
A higher minimum contrast will force the text and background to be farther apart in terms of brightness. So if you have a black background, a higher minimum contrast will force the text to be closer to white. Similarly, if you have a white background, a higher minimum contrast will force the text to be closer to black.