Set terminal type earlier in the file.