# Midnight Commander under vt



## balanga (Jul 23, 2018)

When running under vt when using i915kms Midnight Commander no longer outputs in its colour of normal blue but instead some sort of highlight blue which is difficult to read. MC's builtin editor uses very strange colours such as green on highlight blue making it almost invisible. Is there any way to turn on the traditional colours?


----------



## Chris_H (Jul 29, 2018)

The vt(4) man page indicates some "tweaks" available. While a cursory read didn't indicate anything "MC specific". It occurs to me that adding the following to /etc/sysctl.conf(5) might give you the colors you have come to expect. Try the following:

```
hw.vga.textmode=1
```
and see if it works for you (requires reboot).
If you'd like to see if it works _immediately_, simply issue: `sysctl hw.vga.textmode=1`

HTH!

--Chris


----------



## rufwoof (Jul 29, 2018)

Under OBSD console at the end of .profile I have ...


```
# Better colour support with pccon0 than vt220
[ -z $TMUX ] && [ -z $DISPLAY ] && TERM=pccon0
export TERM
```
i.e. set TERM to pccon0

Suspect it might have to be "cons25" or "teken" under FreeBSD

In mc I've set the gotar theme (F9 O A)

I run that under tmux, along with calcurse and the colours/looks are nice, very similar to as when viewed in X, but with console fonts of course. Attached is the X based snapshot (I can't snapshot the console).


----------



## balanga (Jul 29, 2018)

Chris_H said:


> The vt(4) man page indicates some "tweaks" available. While a cursory read didn't indicate anything "MC specific". It occurs to me that adding the following to /etc/sysctl.conf(5) might give you the colors you have come to expect. Try the following:
> 
> ```
> hw.vga.textmode=1
> ...


I get





> unknown oid
> hw.vga.textmode


----------



## Chris_H (Jul 29, 2018)

Hmm. That's odd. That syctl(8) setting came right out of the vt(4) man page.
While it's already in GENERIC. Does `kldstat` show it's even loaded? All my systems use the Nvidia blob. So I use SysCons (sc), as I've never been able to get vt to work as well as sc with those cards. But on an (Intel) based Laptop I have. I actually had to add `kern.vty=vt` to /boot/loader.conf.
Does adding the following 2 lines to your loader.conf(5) work for you?

```
kern.vty=vt
hw.vga.textmode=1
```

HTH!

--Chris


----------



## torindel (Aug 1, 2018)

To get sane (good old standard IBM PC) colors on anything that uses vt console (including efifb) apply following patch to src package and recompile kernel.
vt console have some wierd non-standard colors hardcoded.
Note: Downside is that you need to recompile kernel yourself after each freebsd-update.

* Install src package if needed.

* Patch src package

```
patch -p0 < efifb_colors_fix.txt
```

* Compile kernel (swap amd64 to your arch if its different)

```
cd /usr/src/sys/amd64/conf && config GENERIC
cd /usr/src/sys/amd64/compile/GENERIC && make cleandepend && make depend && make
```


* Install new kernel
Note: It makes backup automaticly in /boot/kernel.old . In case of misshap you can mount your hdd from install cd and move /boot/kernel.old to /boot/kernel

```
cd /usr/src/sys/amd64/compile/GENERIC && make install
```


* Reboot to use new kernel


----------



## Chris_H (Aug 2, 2018)

I've always had some nits with vt(4), and have long been meaning to take a closer look. Thanks for sharing, torindel !
So how did you arrive at your chosen color table?

--Chris


----------



## balanga (Aug 3, 2018)

Chris_H said:


> Hmm. That's odd. That syctl(8) setting came right out of the vt(4) man page.
> While it's already in GENERIC. Does `kldstat` show it's even loaded? All my systems use the Nvidia blob. So I use SysCons (sc), as I've never been able to get vt to work as well as sc with those cards. But on an (Intel) based Laptop I have. I actually had to add `kern.vty=vt` to /boot/loader.conf.
> Does adding the following 2 lines to your loader.conf(5) work for you?
> 
> ...



After adding these lines, I see a definite change....

The blue *booting* msg which flashes up when booting now changes from blue to red! 

Unfortunately mc is still as it was.


----------

