DroboApp announcement: Midnight Commander

Hello everyone,

The famous curses-based file manager is available as a DroboApp for the DroboFS.

You can download the DroboApp package here: http://www.droboports.com/app-repository/mc-4-7-5-2

Comments, suggestions and feedback are welcome.

i know people who use midnight commander
apparently its like the original winfile filemanager (but with every single “useful” utility bolted onto it :)[hr]
(oh wait maybe im thinking of Total Commander - sorry :slight_smile:

either way, well done Ricardo for your work on this, looks like a nice gui into the world of ‘nix’ systems.

Sorry to ask such a silly question, but how do you get Midnight Commander and Screen to work? I’ve got both of the packages installed correctly, but I can’t access the commands.

# mc
-sh: mc: not found
# screen
-sh: screen: not found

I know that you have the following on your page:

But I’m not really sure why these programs wouldn’t work in the terminal once installed. Could you please explain it?

If you type it like this:


does it work?

If so, then the problem is that you have to adapt your PATH variable. To make a long history short, try to type this:

export PATH=mnt/DroboFS/Shares/DroboApps/mc/bin:$PATH

and then try to call ‘mc’ again. This time it should work.

EDIT: as pointed out by Shibboleth below, the proper line is (note the leading slash that was missing):
export PATH=/mnt/DroboFS/Shares/DroboApps/mc/bin:$PATH

The main problem is that fixing the PATH variable like that is that it is not a persistent change. PATH will revert to its original value every time you log off. To make it a persistent change, you have to change some files that you should only be changing if you understand how bad you can mess it up and how to fix it if you do.

A long explanation about PATH and how to make a persistent change to it can be found here: http://www.troubleshooters.com/linux/prepostpath.htm

That does indeed work. Thanks for the suggestion to fix the PATH. However, screen still isn’t working:

/mnt/DroboFS/Shares/DroboApps/screen/bin/screen: error while loading shared libraries: libncursesw.so.5: cannot open shared object file: No such file or directory

Could you please suggest a fix?

Thanks for your help!

That means your PATH for libraries is not properly set either. The variable in this case is called LD_LIBRARY_PATH, and works pretty much the same way as PATH. Try this for screen:

export LD_LIBRARY_PATH=/mnt/DroboFS/Shares/DroboApps/screen/lib:$LD_LIBRARY_PATH

to get this to work, I just had to add a leading slash to the path:

export PATH=/mnt/DroboFS/Shares/DroboApps/mc/bin:$PATH

in case anyone else is having trouble getting this to work.

Meh, I made a typo. :frowning:

Thanks, that did the trick. Screen is a truly great bit of software. ‘Back in the day’, when I had accounts on about four different servers at university, it was definitely the Best Program Ever. Great to have it back, especially when doing long rsync transfers.

Thanks again!

You’re very welcome. :slight_smile:

I’m not entirely happy with the way I compiled those apps, though. This mess of missing libraries and so on is quite annoying, so as new releases come out I’m posting new versions of the binaries that will have all the dependencies statically compiled. This way we’ll have to worry only about PATH.

Works good for me - many thanks.
Had a droboFS for years but only just found droboports.

Awesome work! Thanks again!!

When I connect via PuTTY using UTF-8 as remote character set the display gets wrong:

Does anyone knows how to fix it? Changing “Options -> Display bits…” appears to do nothing…

This looks like the font you are using on Windows does not have all the UTF-8 glyphs. Give it a try with “Arial Unicode MS” (sp?) and see if it fixes it.

It only allows to change to one of monospace fonts: Consolas, Courier, Courier New, Fixedsys, Lucida Console, Lucida Sans Typewriter, Terminal.
I tried all of them but none worked.

Another thing I’ve noticed: when I change “Options -> Display bits…” to “UTF-8” with “Full 8-bits input” and then “Save setup”; exit mc and start again – “Options -> Display bits…” are back to “7-bit ASCII”.[hr]

Btw, the same font works just fine with Far Manager:

I’m just speculating here, but I think that when you set the character set to UTF-8, then MC uses the proper unicode characters for those (see here: http://en.wikipedia.org/wiki/Box-drawing_character ).

Far Manager, on the other hand, seems to keep using the codepage 437/850 characters. If you ask me, that is a bug, since those characters are supposed to be something else in the unicode character set.

The mono-spaced font Consolas ( http://en.wikipedia.org/wiki/Consolas ) seems to support box-drawing characters in unicode. It might be worth giving it a try.

No it doesn’t work with Consolas neither. I do recall getting mc to work with UTF-8 on FreeBSD several years ago, as far as can see this build doesn’t support switching “Display bits…”. Is it possible that it was build without UTF-8 support or something?..

Ok, last desperate attempt: which version are you actually using? or the latest one, 4.8.1?

Because I was looking at the compilation steps and, indeed, it seems that is missing “–enable-widec” when compiling ncurses, whereas 4.8.1 has it.

You can find the latest version here: http://www.droboports.com/app-repository/mc-4-8-1

I have the latest build:

[regent@Drobo-FS ~]$ mc -V
GNU Midnight Commander 4.8.1
Built with GLib 2.31.4
Using the ncurses library
With builtin Editor
With subshell support as default
With support for background operations
With mouse support on xterm
With internationalization support
With multiple codepages support
Virtual File Systems: cpiofs, tarfs, sfs, extfs, ftpfs, fish, smbfs
Data types: char: 8; int: 32; long: 32; void *: 32; size_t: 32; off_t: 64;
[regent@Drobo-FS ~]$ mc --configure-options
 '--host=arm-none-linux-gnueabi' '--prefix=/mnt/DroboFS/Shares/DroboApps/mc' '--with-screen=ncurses' '--with-ncurses-includes=/home/ricardo/code/ncurses-5.9/include' '--with-ncurses-libs=/home/ricardo/code/ncurses-5.9/lib' '--without-gpm-mouse' '--with-glib-static' '--enable-vfs-smb' '--without-x' '--with-smb-configdir=/mnt/DroboFS/Shares/DroboApps/mc/etc' '--with-smb-codepagedir=/mnt/DroboFS/Shares/DroboApps/mc/etc/codepages' 'host_alias=arm-none-linux-gnueabi' 'CC=/usr/local/arm-2007q1/bin/arm-none-linux-gnueabi-gcc' 'CFLAGS=-march=armv5te -mtune=arm926ej-s -O3 -I/home/ricardo/code/glib-2.31.4 -I/home/ricardo/code/glib-2.31.4/glib -I/home/ricardo/code/glib-2.31.4' 'LDFLAGS=-L/home/ricardo/code/glib-2.31.4/glib/.libs -L/home/ricardo/code/glib-2.31.4/gmodule/.libs' 'LIBS=-lglib-2.0 -lgmodule-2.0' 'GLIB_CFLAGS=-I/home/ricardo/code/glib-2.31.4 -I/home/ricardo/code/glib-2.31.4/glib' 'GLIB_LIBS=-L/home/ricardo/code/glib-2.31.4/glib/.libs' 'GMODULE_CFLAGS=-I/home/ricardo/code/glib-2.31.4' 'GMODULE_LIBS=-L/home/ricardo/code/glib-2.31.4/gmodule/.libs'

Interestingly, I’ve just installed Linux Mint in VM, installed opensshd and mc, then connected via PuTTY using exactly the same settings (except for hostname, of course) and it worked as a charm:

regent-VirtualBox ~ # mc -V
GNU Midnight Commander 4.8.1
Built with GLib 2.31.20
Using the S-Lang library with terminfo database
With builtin Editor
With subshell support as default
With support for background operations
With mouse support on xterm and Linux console
With support for X11 events
With internationalization support
With multiple codepages support
Virtual File Systems: cpiofs, tarfs, sfs, extfs, ext2undelfs, ftpfs, fish
Data types: char: 8; int: 32; long: 32; void *: 32; size_t: 32; off_t: 64;
regent-VirtualBox ~ # mc --configure-options
 '--build=i686-linux-gnu' '--prefix=/usr' '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' '--sysconfdir=/etc' '--localstatedir=/var' '--libdir=${prefix}/lib/i386-linux-gnu' '--libexecdir=${prefix}/lib/i386-linux-gnu' '--disable-maintainer-mode' '--disable-dependency-tracking' 'AWK=awk' '--libexecdir=${prefix}/lib' '--with-x' '--with-screen=slang' '--disable-rpath' '--disable-static' '--enable-vfs-undelfs' '--enable-tests' 'build_alias=i686-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro' 'CPPFLAGS=-D_FORTIFY_SOURCE=2'

What about the content of /mnt/DroboFS/Shares/DroboApps/mc/etc/codepages ?

Maybe the codepages are missing.

Yes, it is missing:

ls: /mnt/DroboFS/Shares/DroboApps/mc/etc/codepages: No such file or directory

Where can I get the codepages from?