
Changing a terminal's foreground and background color
Hi,
I have been using Linux for quite a while, and have also
had FreeBSD for a while too, although I haven't used it
as much.
To change a terminals foreground and background colors
in Linux there is a program called setterm. You can also
store the chosen colors permanently as well. (In my red
hat distro I do it in rc.sysinit when the system boots up)
Is there an equivalent program in FreeBSD ?
I tried "rolling my own" version of setterm for FreeBSD
by looking at the C source for the Linux version and
extracting out the parts I want. It works - sometimes.
It changes the colors, (usually, but not always) but
refuses to store them permanently. In the linux version
of setterm storage is done by printf(("\033[8]"). It
appears that this is not the string to store permanently
for cons25 (the default FreeBSD TERM). Also mysetterm wont
change the colors in an xterm. (It will set bold on and
off though)
Is there an equivalent to setterm in FreeBSD, and/or
a guide to the Terminal Control Stings for "cons25"
and/or any other information on this topic anywhere ?
regards,
Bernard Doyle