stty: Adjust the intricate details

I mentioned setterm almost a year ago, and in general that’s the tool you should rely on to adjust some virtual console capabilities. Things like color, cursor blink rate and so forth are handled by setterm. (Note: Not for terminal emulators. Emulators are handled elsewhere. πŸ˜‰ )

stty is a little different, since it’s focused on the intricate line settings — baud rates, dimensions and so forth — for your console.

Ninety percent of what the stty man page describes is total gobbledygook to me. The remaining 10 percent is marginally useful. It does allow for some interesting acrobatics though, such as …

2014-05-10-6m47421-stty-mining_haze

That’s mining-haze, which we’ll discuss another time. I used it here because it absolutely demands an 80×24 terminal screen — and what you see there is 110×38. 😯

I was able to get that punch-out effect by feeding this into the terminal beforehand:

stty cols 80 rows 24

and as you can see, the output arrangement is confined to that area — and more importantly, reported as those dimensions. Otherwise, mining-haze would serve me up a nastygram. 😦

Nothing earth-shattering, but it might save you a little trouble with picky software and unconventional terminal dimensions (think: tiling window managers).

stty can do a lot of other things, but like I said, the preponderance of what I saw in the man and info pages was intended for old-school terminal tweaking.

In that colors and timeouts and blink rates are all handled by setterm, it’s unlikely that I’ll rely on stty for anything but the exceedingly rare console setting. 😐

Oh, I almost forgot: the obligatory coreutils tagline. πŸ˜‰

Advertisements

2 thoughts on “stty: Adjust the intricate details

  1. Pingback: mining-haze: Once glimpsed, now in full view | Inconsolation

  2. Theodore

    Good morning,
    It’s been a hard day’s night and I found, through the man page of rlwrap and this marvellous program, what was making sentaku so ugly (the characters echoed) and how one can perform curses getch (get a character without pressing Enter) inside a shell without curses’ getch and even without using bash.
    With stty echoctl the first problem gets targeted, and with stty raw, then a simple c program that getc and putc, and the magic is done: another piece of curses done without using curses.
    .
    .
    .
    I’m going mental

Comments are closed.