Midnight Commander under vt

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?
 
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:
Code:
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
 
Under OBSD console at the end of .profile I have ...

Code:
# 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).
 

Attachments

  • a.png
    a.png
    136.7 KB · Views: 253
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:
Code:
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
I get
unknown oid
hw.vga.textmode
 
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?
Code:
kern.vty=vt
hw.vga.textmode=1

HTH!

--Chris
 
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
Code:
patch -p0 < efifb_colors_fix.txt

* Compile kernel (swap amd64 to your arch if its different)
Code:
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
Code:
cd /usr/src/sys/amd64/compile/GENERIC && make install


* Reboot to use new kernel
 

Attachments

  • efifb_colors_fix.txt
    1.1 KB · Views: 221
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
 
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?
Code:
kern.vty=vt
hw.vga.textmode=1

HTH!

--Chris

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.
 
Back
Top