2

Just for aesthetics I would like to have my text on my console be displayed at a lower speed. I've tried using things like screen with custom baud rates of /dev/tty1 but it wouldn't work, input from my keyboard would appear onscreen but no output and everything would be stuck on one line. I don't have any real serial port so I don't know if I could even do this but if it was unclear I would like to set a custom baud rate on my ssh/pts for something like an old school terminal with characters loading on the screen.

1

TTY's in Unix and Linux are kind of "poor OOP" in the sense that everything got pushed into the "base class". There are various kinds of devices which are each "a-kind-of TTY", but all of them carry properties related to serial I/O: baud rate, framing bits, hardware handshaking and so on.

This is actually good because it simplifies the programming model greatly. On any kind of TTY device you can call the POSIX C library function tcgetattr to get a structure of one type (struct termios) of its properties: "one size fits all".

However, what it means is that not all the properties actually work with all TTY devices.

Neither the Linux console, nor a virtual windowed terminal like Xterm or Gnome Terminal actually actually uses the baud rate and other hardware settings for any purpose. The baud rate can be set and retrieved, but it does nothing.

If you want a terminal that actually runs at 9600 baud, you must either go through a serial port, or else write a kernel patch to simulate the effect of the baud rate on consoles.

To go through a serial port without a second computer or actual terminal, you can simply loop a "USB serial dongle" between a USB port and an RS-232 port. Or, if you don't have an RS-232 port, go from USB port, to USB serial adapter, to null modem cable/connector, to another USB serial adapter, and to another USB port.

Either way, you end up with a pair of serial devices which are looped together externally. You turn one into a serial console, and then run a serial communication program on the other, like Minicom.

(The kernel hack to rate-limit the console output to match the configured TTY baud rate would be more interesting, but that's just me.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.