My mc-4.6.0 not work. (Rereply, sorry)

Doncho N. Gunchev mr700 at globalnet.bg
Thu Apr 15 07:20:41 UTC 2004


    I apologize I replyed directly to Konstantin, I just used reply
which in other mail lists does reply to the list, not to the sender.

On Wednesday 14 April 2004 09:57, kirovsky wrote:
> Hello mc-devel,
> 
>    I'm compile your's mc-4.6.0 under RH 7.3 - standart set.
>    Compilation ran OK. But I type "mc", and mc not work. It print me
>    short help and it print: -P: argument not exist.
>    Mc's seem I type "mc -P". Why?
>    Under Slackware all OK.
> 
    Redhat ship mc with 2 scripts that make mc an alias. The purpose
of these two is to cd to the directory you exited from mc. I think
in mc's sources there was an replacement for these two (the -P option
changed).

I've also received reply from him:

| Thank for your aswer! I'm change script mc.sh in /etc/profile.d from:
| mc ()
| {
|         mkdir -p $HOME/.mc/tmp 2> /dev/null
|         chmod 700 $HOME/.mc/tmp
|         MC=$HOME/.mc/tmp/mc-$$
|         /usr/bin/mc -P "$@" > "$MC"
|         cd "`cat $MC`"
|         /bin/rm -f "$MC"
|         unset MC;
| }
| 
| to:
| mc ()
| {
|         mkdir -p $HOME/.mc/tmp 2> /dev/null
|         chmod 700 $HOME/.mc/tmp
|         MC=$HOME/.mc/tmp/mc-$$
|         /usr/bin/mc
|         /bin/rm -f "$MC"
|         unset MC;
| }
| 
| May be this is not optimal, but it work!

    btw: new redhats (RH9/FC1) are using:
--- /etc/profile.d ---
alias mc='. /usr/share/mc/bin/mc-wrapper.sh'
--- eof ---
    and
--- /usr/share/mc/bin/mc-wrapper.sh ---
MC_PWD_FILE="${TMPDIR-/tmp}/mc-$USER/mc.pwd.$$"
/usr/bin/mc -P "$MC_PWD_FILE" "$@"

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

/bin/rm -f "$MC_PWD_FILE"
unset MC_PWD_FILE
--- eof ---
    I'll look how I do reply in future, sorry.

-- 
Regards,
  Doncho N. Gunchev    Registered Linux User #291323 at counter.li.org
  GPG-Key-ID: 1024D/DA454F79
  Key fingerprint = 684F 688B C508 C609 0371  5E0F A089 CB15 DA45 4F79



More information about the mc-devel mailing list