Allow to provide custom preamble for a terminal

refs #37