mc 4.7.5.2 always exits to its starting directory

Guus gbonnema at xs4all.nl
Thu Jul 14 12:35:04 UTC 2011


On 07/14/2011 02:24 PM, Boyandin Konstantin wrote:
>>>   Is this a 4.7.5.2 bug/feature, or a quirk of the mentioned build?
>> This is done on purpose.
>>
>> Fedora packages source a wrapper script to start mc that remembers the
>> current directory before actually launching the program, so that after
>> you quit mc your pwd is restored.
> I see.
>
> OK, I'll run the binary mc directly. I suppose it's of no purpose discussing why such changes are made, the rules of the list prevent me from expressing my thoughts about this.
>
> Thanks.
> Sincerely,
> Konstantin
> _______________________________________________
> mc mailing list
> http://mail.gnome.org/mailman/listinfo/mc
>
You only have to disable the alias or alter it. the command "mc" is 
aliased to a script that remembers the pwd.
For me it works properly i.e. it happily forgets the pwd, but for the 
life of me, I don't remember how I did it.

[gbonnema at athene etc]$ alias mc
alias mc='. /usr/libexec/mc/mc-wrapper.sh'
[gbonnema at athene etc]$ cat /usr/libexec/mc/mc-wrapper.sh
MC_USER=`id | sed 's/[^(]*(//;s/).*//'`
MC_PWD_FILE="${TMPDIR-/tmp}/mc-$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

P.S. why would the list rules forbid you to express your thoughts on 
this? As long as you use neutral language and refrain from attacking 
anyone personally, I don't see what you could do wrong by saying what 
you think abou the subject.

Guus Bonnema.




More information about the mc mailing list