Closed PiotrC1 closed 7 years ago
You need to install ncurses
(you probably already have it installed) and add these env variables:
export TERM=xterm
export TERMINFO=/opt/share/terminfo
In case of TomatoUSB adding these to /opt/etc/profile
is sufficient system-wide. However, that's so only because tomato's /etc/profile
has line [ -f /opt/etc/profile ] && . /opt/etc/profile
, which isn't common and isn't something we can rely on. Full-fledged (or nearly so, like Synology NASes) Linux boxes have these set already, with their own terminfo
thus eliminating the need in installing ncurses
optware package. More so, since Optware-ng isn't an OS, or a FW, but more likely a supplementary feed service, and is most likely to be used in combination with system's own environment and tools, we usually have little control over setting environment variables. However, the case with mc
is indeed a bug, and I see two options:
mc
to hardcode these values, and adding ncurses dependencyThink I found a valid solution:
terminfo
package from ncurses/opt/share/terminfo
mc
and slang
to force xterm
terminal instead of reading TERM
env variable@PiotrC1 I assume this fixed (see 8fe416c26f755572aa5c1bb9d1c16274c7f67ed7 49ad7aff1c2d5cbcc36e499fd06ca8aa9952565e 6eb63e54cff1b5ca2672f9d75c0eba81c7e027a1): please confirm
Much better, but still not good - borders are incorrect (ASCII characters)
issue still active. The solution is to add:
export LANG='en_US.UTF-8'
export LC_ALL='en_US.UTF-8'
@PiotrC1
Not setting locale is a system bug -- not Optware bug. That being said, I do see how to patch mc
to default locale to 'en_US.UTF-8' if no locale set. However, you are advised to fix your system
OK, thanks. I will do it.
I did push defaulting to en_US.UTF-8 if no locale is set -- soon it'll be online
@PiotrC1 After some struggling, I resorted to setting LANG
env variable if no locale is set in mc subshell by mc itself. I also made it to set EDITOR
to /opt/bin/nano
if EDITOR
isn't set, and /opt/bin/nano
executable exists. Now mc
works without locales properly set, and also defaults to nano as external editor if it's installed
Wow! Kudos.
After installation of mc there are following problems:
Usually such a problems are caused by missing /opt/etc/profile with correct contents.