# vidcontrol font and color via /etc/rc.conf problem



## Mariusz (Aug 14, 2021)

Hi there,

I've just compiled brand new FreeBSD 13-STABLE on my home server with vt(4) driver. Since the stock console font is too large for me I want to set a smaller one. I also use lightgreen foreground color for years.
What I want to achieve? Set the vgarom-8x16 font and lightgreen color during system start on all consoles.
Here's my problem.
In the /etc/rc.conf I set `allscreens_flags` as follows:


```
allscreens_flags="-f vgarom-8x16 lightgreen"
```
It doesn't work.


```
allscreens_flags="lightgreen -f vgarom-8x16"
```
It doesn't work as well.

Running vidcontrol(8) command by hand it also doesn't work to set font and foreground color at once.
So, configuring these two options in /etc/rc.conf file is not working. If I set only font or only color, then it works.
When it's combined, it doesn't.
As a workaround I created simple rc start script I put in /usr/local/etc/rc.d directory to change a foreground color, when the font is configured in /etc/rc.conf.
I do not want to configure color in the /boot/loader.conf because it hurts a little color in Midnight Commander.
Any suggestions?

My server: HP ProLiant MicroServer Gen10 Plus. I'm connecting to server via Java Web Console plugin from HP iLO5 Advanced.
Huh! There is another problem I don't know how to fix. Here I can not to change screen resolution to any other resolutions as of square pixels 4x3. Well, I can live with that, but any other resolutions set in /boot/loader.conf, for example:

```
efi_max_resolution="1440x900"
```
just doesn't work. Maybe it's Java related problem?

Best regards,
Mariusz


----------



## ralphbsz (Aug 14, 2021)

We're talking about the hardware console of the server, right? If we're not, then everything I'm writing below may be irrelevant.



Mariusz said:


> Maybe it's Java related problem?


Pretty much guaranteed to have nothing to do with Java. Why? Because the vidcontrol program and all the scripts in /etc that run it are part of base, and Java is not part of base, so it is not used for this functionality at all.



> Running *vidcontrol* command by hand it also doesn't work to set font and foreground color at once.


So you are saying that "vidcontrol lightgreen" works, and "vidcontrol -f vga..." works?
That is  very surprising. Here's why: If you look at "man vidcontrol", you see that setting the foreground color requires the "-r" flag. If you don't use any flag at all, the parameter (in your case lightgreen) is interpreted as a mode, and lightgreen is not a valid mode.

For starters, try "-r lightgreen black" or something similar as argument. Then try combining -r and -f together.

If it is really true that vidcontrol can't take both color and font arguments on a single command line, then you have a problem. Read /etc/rc.d/syscons, and you can see that there is really only one place where you can call vidcontrol with arbitrary arguments. You may have to create a new service (call it syscons_mariusz) that is more flexible, put it in /usr/local/etc, and use it instead. And file a PR, that this would be a useful feature.

But my hunch is that with careful selection of parameters it can be made to work.


----------

