Green on black text

I was trying to find out how to setup green on black text and most references related to videocontrol, the only thing I could find realting to sc(4)() was this:-

The following lines will set the default colors. The normal text will be
green on black background. The reversed text will be yellow on green
background. Note that you cannot put any white space inside the quoted
string, because of the current implementation of config(8).

options SC_NORM_ATTR=(FG_GREEN|BG_BLACK)
options SC_NORM_REV_ATTR=(FG_YELLOW|BG_GREEN)

The following lines will set the default colors of the kernel message.
The kernel message will be printed bright red on black background. The
reversed message will be black on red background.

options SC_KERNEL_CONS_ATTR=(FG_LIGHTRED|BG_BLACK)
options SC_KERNEL_CONS_REV_ATTR=(FG_BLACK|BG_RED)

Do I need to implement this by changes to /boot/device.hints? The instructions don't make it clear as to what to do.
 
Well, current FreeBSD versions use vt(4) instead of sc(4) by default, so I'd look there. I spot the same kind of example in its manualpage, but still slightly different:

Code:
     This example changes the default color of normal text to green on a black
     background, or black on a green background when reversed.  Note that
     white space cannot be used inside the attribute string because of the
     current implementation of config(8).

           options TERMINAL_NORM_ATTR=(FG_GREEN|BG_BLACK)
To my knowledge this option should be set in /boot/loader.conf after which you should be all set.
 
meh, I obviously need more coffee.

Still, now I am intrigued to discover that this is a compiled option vs. a dynamic changeable option. It seems doable enough to change the text color dynamically. I suppose color codes within a shell prompt could also do the trick, but that's just not the same I guess, time for some experimentation ;)
 
Still, now I am intrigued to discover that this is a compiled option vs. a dynamic changeable option. It seems doable enough to change the text color dynamically. I suppose color codes within a shell prompt could also do the trick, but that's just not the same I guess, time for some experimentation ;)
Very good suggestion, I would fully support that.

Reason:
Aside of the fact that the need to make a custom kernel requires much effort and knowledge on the (possibly new) user's side, that leads to the fact that the resulting system is no longer GENERIC.
And that in turn causes the problem for all people trying to do support, they cannot be really sure whether that user's config is actually GENERIC. Remember, people happen to make mistakes when editing kernel configuration files.

And changing from the default (extremely unergonomic) white on black should be easier than now. Inverse display like that was ok 40 years ago, but not today.

As a heavy console user I need normal display, not inverted, as that fatigues me much. So I several times got the message "sorry you have a custom kernel, we cannot help" just because of the fact I had to make kernel to get a console that is no pain to use.
Even Linux has the option to set console parameters on-the-fly without rebuilding kernel. I think FreeBSD should be able to do the same.

OT: And there is another point regarding the default vt console, why I find it unusable. Its scrollback buffer (access it using ScrollLock key) is way too small. vt does not offer an option to set another size, like sc does with the "options SC_HISTORY_SIZE=...". This single point is why I will not use vt until it offers a similiar option.
 
I iassumed that my question would be easily resolved, and after further searches I'm none the wiser...
 
Code:
# vidcontrol green
Add
Code:
allscreens_flags="green"
to /etc/rc.conf if you want all your virtual consoles to have green text color.

I didn't think that
Code:
allscreens_flags=
worked with sc(4)()... but your solution does work.... although I would like to get the same effect in X terminals?
 
On x11/xfce4-terminal it is under Preferences:
screenshot23.png
 
I didn't think that
Code:
allscreens_flags=
worked with sc(4)()... but your solution does work.... although I would like to get the same effect in X terminals?

vidcontrol(1) said:
The vidcontrol utility is used to set various options for the syscons(4)
or vt(4) console driver, such as video mode, colors, cursor shape, screen
output map, font and screen saver timeout. Only a small subset of
options is supported by vt(4).

In /etc/rc.d/syscons:
Code:
       for ttyv in /dev/ttyv*; do
           vidcontrol ${allscreens_flags} < ${ttyv} > ${ttyv} 2>&1
       done
 
Back
Top