I was unsatisfied with the resolution of my TTY, so I followed the instructions here: on the OpenBSD FAQ Chapter 7 Section 5 titled "How do I use a console resolution of 80x50? (some amd64, i386, Alpha)" (sorry, can't post links in the first 5 posts, let me know if you need help finding it) to get a better resolution, but now all of the ttys have this funky brown/red background color, even the ones that should not have been affected by the change.

Is it possible to change the background color of one or all ttys without installing any additional packages? Like using a config file, or environment variable? Also, I should not that I did a TTY-only installation (no x-server or other gui-ness), so the solution should be cli only.

Thanks in advance,

Misha

EDIT: Did a little digging, and it looks like wsdisplay has some color map configuration available? Still trying to figure it out though.

Last edited by mishaparem; 28th March 2014 at 08:28 PM.
Reason: more information

EXAMPLES
Configure screen 1 (i.e., the second) for type ``80x50'' and VT100
terminal emulation. (Note: ``80x50'' is a screen type offered by the
vga(4) display driver. In this particular case, an 8x8-font must be
loaded beforehand to make the screen useful. See wsfontload(8).)
# wsconscfg -t 80x50 -e vt100 1

Terminal types like vt100 are defined in /etc/termcap The codes used to define the capability of a terminal type, including setting foreground and background color are explained in terminfo(5)

So you would have to edit /etc/termcap of the terminal type used by the OpenBSD console terminal. IIRC that is vt220.

But this all seems to be very difficult. Before attempting to change the background and/or foreground color with this method, you could try to create a file with the ANSI escape sequence to set the foreground to say green and simply use /bin/cat to display the file and see whether that is sufficient to change the foreground or text color. See https://en.wikipedia.org/wiki/ANSI_escape_code for info about these codes.

Of course that would require a change to one of the ANSI terminal types mentioned in /etc/termcap
I have to file my income tax return before April 1st, so I don't have time to investigate this any further. It is a pity, checking this color thing out is more fun, than filling a tax return

__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump

I was just looking at /etc/termcap, and I found some pretty interesting options.

But only

Code:

wsconscfg -t 80x50 -e vt100 1

works. None of the types described in /etc/termcap work, giving the following error:

Code:

wsconscfg: WSDISPLAYIO_ADDSCREEN: Device not configured

I suspect that wsconscfg uses a different list, because wsconscfg(8) also says

Code:

-e emul
Specify the terminal emulation to use for the virtual terminal.
The set of available terminal emulations is determined at kernel
compile time. See wscons(4) for details.

wscons(4) lists three available types dumb, sun, vt100 where sun and vt100 are available by default unless their flags are set to turned off, and dumb should always be available.

What I found most interesting now, is that type dumb gives the same error as all the types from /etc/termcap. Unfortunately Mr. Google only has only 6 pages of results for the error, and as I'm looking through them, I can't find a solution.