mikshaw
Group: Members
Posts: 4856
Joined: July 2004 |
|
Posted: Jan. 13 2005,02:32 |
|
It's a bug in the menu item. The 'mc as super user' menu item launches mc with dsl's environment, so it uses /home/dsl/.mc for its configurations. If you start mc as root from the menu before starting it as dsl, that .mc directory will be created with root ownership, meaning dsl cannot write to it.
There are a couple of ways to avoid this... 1) start mc as dsl before starting it as root...this creates the config files with dsl ownership. After this first time you can go back and forth between root and dsl without trouble. 2) start 'mc as super user' with the command 'sudo su -c mc.bin'. This starts mc with root's environment, and the config files will not be written to /home/dsl/.mc
If you already have this problem, as root you can delete or change ownership of the /home/dsl/.mc directory and its contents (not while mc is running) and then start it as dsl.
Personally I don't see the point in having a wrapper for mc. If you just want to change the background color of mc depending on whether you are dsl or root you can do that in the menu item: [exec] (midnight commander) {rxvt -bg blue -T "midnight commander" -e /usr/local/bin/mc.bin} [exec] (mc as super-user) {rxvt -bg red -T "root mc" -e sudo su -c /usr/local/bin/mc.bin} EDIT: I forget I use the '-b' option in mc, so background is the same as the terminal's background, so maybe it won't work as simply as that.
-------------- http://www.tldp.org/LDP/intro-linux/html/index.html
|