mc "Midnight Commander" wrong colors and keys
Hi
I use mc a lot in terminals, in some shared hosting the display and keys are wrong
it looks like this
down keys gives BBB "not working"
I maybe an env and comparing working and this one does not really help.
any advise how to fix deserves a kiss on the hand.
Thanks for any advises.
ehab
GNU Midnight Commander 4.7.0.2
Virtual File System: tarfs, extfs, cpiofs, ftpfs, fish, mcfs, smbfs
With builtin Editor
Using system-installed S-Lang library with terminfo database
With subshell support as default
With support for background operations
With mouse support on xterm and Linux console
With internationalization support
With multiple codepages support
Data types: char 8 int 32 long 64 void * 64 off_t 64 ecs_char 8
env
SHELL=/bin/ovh_ssh
HISTTIMEFORMAT=[%F %T]
PWD=/home/imok
LOGNAME=yoursunny
HOME=/home/somewhere
USERNAME=
LANG=en_US.UTF-8
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
SSH_CONNECTION=1.2.3.4 57474 5.5.5.5 22
TERM=xterm-256color
USER=FRANKZ
SHLVL=1
BASH_ENV=/home/FALZO/.bashrc
LD_LIBRARY_PATH=/mumbly/lupa/libs:
SSH_CLIENT=1.3.4.6 57474 22
OVH_ENVIRONMENT=development
TMOUT=300
OVH_APP_ENGINE_VERSION=3.8
OVH_APP_ENGINE=wsgi
MAIL=/var/mail/xrout
SSH_TTY=/dev/pts/0
_=/usr/bin/env
Thanked by (1)Falzo
Comments
maybe i tag @Not_Oles he is a shell dude. Any suggestions
Hi @ehab! Thanks for tagging me. Wow, I wish I could help! I never use mc except when I get dumped into it by certain install scripts. So I am clueless™ about mc. But surely someone here at LES will be able to help. Always best wishes!
MetalVPS
I also use mc a lot, but I haven't seen this kind of issue in a long time
So you're using xterm -- good
What does
locale
show?"A single swap file or partition may be up to 128 MB in size. [...] [I]f you need 256 MB of swap, you can create two 128-MB swap partitions." (M. Welsh & L. Kaufman, Running Linux, 2e, 1996, p. 49)
should this be changed to :
No, a UTF-8 locale is good (whether fr or en)
Are you using (real) xterm or a console?
"A single swap file or partition may be up to 128 MB in size. [...] [I]f you need 256 MB of swap, you can create two 128-MB swap partitions." (M. Welsh & L. Kaufman, Running Linux, 2e, 1996, p. 49)
i am using Terminal "ssh", how to find out?
So you're not using (real) xterm
Is the system in question running Debian? If so, what does
more /etc/default/console-setup
show?"A single swap file or partition may be up to 128 MB in size. [...] [I]f you need 256 MB of swap, you can create two 128-MB swap partitions." (M. Welsh & L. Kaufman, Running Linux, 2e, 1996, p. 49)
"No such file or folder"
Okay, my best guess is that you're not using an appropriate console font for mc
Does
man console-setup
give anything?"A single swap file or partition may be up to 128 MB in size. [...] [I]f you need 256 MB of swap, you can create two 128-MB swap partitions." (M. Welsh & L. Kaufman, Running Linux, 2e, 1996, p. 49)
As
su -
, trydpkg-reconfigure console-setup
"A single swap file or partition may be up to 128 MB in size. [...] [I]f you need 256 MB of swap, you can create two 128-MB swap partitions." (M. Welsh & L. Kaufman, Running Linux, 2e, 1996, p. 49)
On my system, the output of
more /etc/default/console-setup
is:In the worst case, you could copy this and then log out and in again
"A single swap file or partition may be up to 128 MB in size. [...] [I]f you need 256 MB of swap, you can create two 128-MB swap partitions." (M. Welsh & L. Kaufman, Running Linux, 2e, 1996, p. 49)
@angstrom , i don't have sudo rights since its a shared env.
all i can work with is the .bash* files at ~/
i will continue tomorrow, need to sleep soon
thanks a lot for you help , talk soon
I see
mc doesn't work with all console fonts, so I strongly suspect that this is the problem
Here's a suggestion. First, create the file
~/.console-setup
. Then copy the following text into this file:Then log out and in and see whether this helps
(Good night)
"A single swap file or partition may be up to 128 MB in size. [...] [I]f you need 256 MB of swap, you can create two 128-MB swap partitions." (M. Welsh & L. Kaufman, Running Linux, 2e, 1996, p. 49)
So you may not be using a console after all
Nevertheless, it wouldn't hurt to try what I suggested just above
"A single swap file or partition may be up to 128 MB in size. [...] [I]f you need 256 MB of swap, you can create two 128-MB swap partitions." (M. Welsh & L. Kaufman, Running Linux, 2e, 1996, p. 49)
@ehab I see what you did there. Hugs and kisses ♡♡♡
Same as @angstrom also using mc a lot, but haven't encountered this issue. I think he is already onto it, so I guess you two will get it fixed somehow.
the .console-setup. made sense but unfortunately didn't have any effect.
thanks for your suggestions thou. I will continue.
have a nice week ahead.
Try a different Terminal emulator?
By the way, when you say "Terminal", do you mean the terminal emulator of MacOS?
I assume that you've checked that mc works on another server but using the same terminal emulator (so that we know that the issue is particular to one server)
Any chance of using X-forwarding?
"A single swap file or partition may be up to 128 MB in size. [...] [I]f you need 256 MB of swap, you can create two 128-MB swap partitions." (M. Welsh & L. Kaufman, Running Linux, 2e, 1996, p. 49)
Another try: on the server, what does
more /etc/vconsole.conf
show?"A single swap file or partition may be up to 128 MB in size. [...] [I]f you need 256 MB of swap, you can create two 128-MB swap partitions." (M. Welsh & L. Kaufman, Running Linux, 2e, 1996, p. 49)
If the problem exists on several VPS/servers it is probably in your local settings (on your PC)
"From the diamonds nothing is born, from the manure the flowers are born ..."
F. De Andrè --- Free NAT KVM
i don't use the mac, but i tried it on macbook and same bad outcome, both colors and keys not good.
no go
file does not exists.
only in 2 shared environments. Otherwise all is good.
YES
this fixed my problem
now that deserves a kiss on the hand
@Ganonk style
@angstrom
i started an alpine docker image and at interactive env
so i check my current local env
TERM=xterm-256color
and changed to
export TERM=xterm
vola ... mc is happy
Thanks to all.... maybe i should put this in the tips.
high 5 to dear angstrom
I was just about to ask: what does
dpkg-query -l console-setup
show?But I guess that we can stop now
"A single swap file or partition may be up to 128 MB in size. [...] [I]f you need 256 MB of swap, you can create two 128-MB swap partitions." (M. Welsh & L. Kaufman, Running Linux, 2e, 1996, p. 49)
I'm glad that this works, but needing to use an Alpine docker image for this seems to be (supreme) overkill, if I may say so!
Also, the difference between
xterm-256color
andxterm
shouldn't matter for this -- both should work! I've just tested both, and they both work with mcI would still maintain that the original problem is probably a console font issue (but this would be tricky to solve if you don't have admin rights)
"A single swap file or partition may be up to 128 MB in size. [...] [I]f you need 256 MB of swap, you can create two 128-MB swap partitions." (M. Welsh & L. Kaufman, Running Linux, 2e, 1996, p. 49)
just to add another tip
in the .ssh/config this can be added
last 2 lines are important
Glad that this works, but normally, it shouldn't be necessary to have to stipulate this
"A single swap file or partition may be up to 128 MB in size. [...] [I]f you need 256 MB of swap, you can create two 128-MB swap partitions." (M. Welsh & L. Kaufman, Running Linux, 2e, 1996, p. 49)
Amadex • Hosting Forums • Webshop: Guide to Start Selling Online • Free Debit Card & Online Bank Account 🤑
Maybe you installed the politically correct version?