Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Midnight Commander is gone

Featured Replies

Sorry I didn't reply earlier Weebo, I really appreciate your time helping me, it's just been an hectic week at work

 

I'm baffled, but in any case here is another try.

I have this command called lw (ls -l like where is)

 

save this command in /root/lw

do

chmod a+rx /root/lw

 

I get this:

 

root@Tower:~# chmod a+rx /root/lw

chmod: cannot access `/root/lw': No such file or directory

root@Tower:~#

 

also show us the output for the alias command

type in alias

 

 

root@Tower:~# alias

alias clear='echo -e '\''\0033\0143'\'''

alias d='dir'

alias dir='/bin/ls $LS_OPTIONS --format=vertical'

alias ls='/bin/ls $LS_OPTIONS'

alias mc='. /usr/share/mc/bin/mc-wrapper.sh'

alias v='vdir'

alias vdir='/bin/ls $LS_OPTIONS --format=long'

 

 

Is the alias mc line right?

 

thanks again for your help!

 

no, it is not.   It is a relative path, not an explicit one.  It will ONLY work if you are invoking it in a specific directory where the relative path is correct.

 

I think it expects that you are in the "/" directory since it references a path of "./usr/share/........."

 

You need an explicit path, not a relative one.  (and it needs to point to the correct explicit full path to mc-wrapper.sh)

 

actually there is a space in there.  and the path starts from /usr/share/mc/bin/mc-wrapper.sh

I'm lazy.. I would just unalias mc and see how that works for ya.

 

save the following code in /root/lw first. Then do the chmod, then run it.

 

#!/bin/sh

IFS=": "

for file in $@
do  for dir in $PATH
    do  [ -f $dir/$file ] && ls -l $dir/$file
    done
done

  • Author

ok , here it goes:

 

root@Tower:~# chmod a+rx /root/lw

root@Tower:~# /root/lw mc

-rwxr-xr-x 1 root root 930056 2010-02-09 19:07 /usr/bin/mc

root@Tower:~# alias

alias clear='echo -e '\''\0033\0143'\'''

alias d='dir'

alias dir='/bin/ls $LS_OPTIONS --format=vertical'

alias ls='/bin/ls $LS_OPTIONS'

alias mc='. /usr/share/mc/bin/mc-wrapper.sh'

alias v='vdir'

alias vdir='/bin/ls $LS_OPTIONS --format=long'

 

I think I'm getting the same messages as you do.

 

I could unalias mc, (should I?), but aren't the aliases created at boot time?

ok , here it goes:

 

root@Tower:~# chmod a+rx /root/lw

root@Tower:~# /root/lw mc

-rwxr-xr-x 1 root root 930056 2010-02-09 19:07 /usr/bin/mc

root@Tower:~# alias

alias clear='echo -e '\''\0033\0143'\'''

alias d='dir'

alias dir='/bin/ls $LS_OPTIONS --format=vertical'

alias ls='/bin/ls $LS_OPTIONS'

alias mc='. /usr/share/mc/bin/mc-wrapper.sh'

alias v='vdir'

alias vdir='/bin/ls $LS_OPTIONS --format=long'

 

I think I'm getting the same messages as you do.

 

I could unalias mc, (should I?), but aren't the aliases created at boot time?

 

with the lw command, the only mc command in your path is /usr/bin/mc

so the alias is being run, and for some reason there is a problem with the alias runs.

 

logout

login

unalias mc

 

and run mc to see what happens.

 

after that you could logout, login again.

do

set -x -v

run mc again. (should show some diagnostic trace stuff).

 

  • Author

logout

login

unalias mc

 

and run mc to see what happens.

 

it works

 

after that you could logout, login again.

do

set -x -v

run mc again. (should show some diagnostic trace stuff).

 

here it  goes:

 

Tower login: root

Password:

Linux 2.6.32.9-unRAID.

root@Tower:~# set -x -v

root@Tower:~# mc

mc

+ . /usr/share/mc/bin/mc-wrapper.sh

MC_USER=`id | sed 's/[^(]*(//;s/).*//'`

id | sed 's/[^(]*(//;s/).*//'

+++ id

+++ sed 's/[^(]*(//;s/).*//'

++ MC_USER=root

MC_PWD_FILE="${TMPDIR-/tmp}/mc-$MC_USER/mc.pwd.$$"

++ MC_PWD_FILE=/tmp/mc-root/mc.pwd.16032

/usr/bin/mc -P "$MC_PWD_FILE" "$@"

++ /usr/bin/mc -P /tmp/mc-root/mc.pwd.16032

 

if test -r "$MC_PWD_FILE"; then

        MC_PWD="`cat "$MC_PWD_FILE"`"

        if test -n "$MC_PWD" && test -d "$MC_PWD"; then

                cd "$MC_PWD"

        fi

        unset MC_PWD

fi

++ test -r /tmp/mc-root/mc.pwd.16032

 

rm -f "$MC_PWD_FILE"

++ rm -f /tmp/mc-root/mc.pwd.16032

unset MC_PWD_FILE

++ unset MC_PWD_FILE

root@Tower:~#

 

To be frank, I don't have an answer for you on what the mc wrapper does not work correctly.

I do not use mc and do not know why the wrapper is there.

If you can unalias the mc command and it works correctly, I would do that.

 

  • Author

To be frank, I don't have an answer for you on what the mc wrapper does not work correctly.

I do not use mc and do not know why the wrapper is there.

If you can unalias the mc command and it works correctly, I would do that.

 

 

Hi Weebo, thanks a lot anyway for your time and effort I appreciate it. I'll unalias mc and if needed will also unalias on the go file.

 

Merry Christmas!

 

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.