I'm currently using termios to set up a serial console over USB for a Linux machine. I'm running into a problem however that the serial console's terminal is defaulting to vt220. I would like to use vt100 so I can get color. Once I'm in the serial console, setting the TERM environment variable to vt100 does work, however I would like the terminal to default to vt100 instead of vt220. Is there a way to do this with termios? See the code below for how I am setting up the tty device.
struct termios modes;
/* Initialize the remote line.
*/
if (tcgetattr(rmt_fd, &modes) < 0) {
return -1;
}
modes.c_iflag = BRKINT | ISTRIP;
modes.c_oflag = 0;
modes.c_lflag = 0;
modes.c_cc[VMIN] = 1;
modes.c_cc[VTIME] = 0;
return tcsetattr(rmt_fd, TCSANOW, &modes);