Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (2) </ [1] 2 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: MC window resize, won't do it< Next Oldest | Next Newest >
Max Offline





Group: Members
Posts: 211
Joined: July 2004
Posted: Jan. 12 2005,17:39 QUOTE

How do you configure Midnight Commander so that when you resize the window, the pane also resize to fill the available space of the term window.  I end up with a little square in the top left of the window.

--------------
Using DSL on: IBM T42, IBM 560x, Dell Dimension CPx
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Jan. 12 2005,19:49 QUOTE

It's not configurable.  Apparently mc was compiled for DSL without that ability.  I tested it by replacing just the binary (and a couple of needed libs), leaving configuration files untouched, and the windows automatically resized in the new version.

You can get around this by changing the properties of the terminal window before launching mc.  For example you could change your mc menu item to something like this:
[exec] (midnight commander) {rxvt -rv -g 140x40 -e mc.bin -b}
(the -rv and -b options have nothing to do with anything...just thought I'd throw them in)


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
ke4nt1 Offline





Group: Members
Posts: 2329
Joined: Oct. 2003
Posted: Jan. 12 2005,21:38 QUOTE

Try this..

1. Open a shell, size it however your wish, even fullscreen
2. Run this command  -  mc.bin

Let us know..

73
ke4nt
Back to top
Profile PM 
Max Offline





Group: Members
Posts: 211
Joined: July 2004
Posted: Jan. 13 2005,02:18 QUOTE

That worked great.

Another little nagging thing.  For some reason I can only use mc as root.  When I start the normal (non-root) mc from the menu I get the notice "Hotload list: was unable to write ~/.mc/hotlist file, your old hotlist entries were not delet"  Same thing when I start from command line.  Starting as root works fine though.  

I noticed that /home/dsl/.mc/hotlist is set for only root r/w permissions.  Was this an oversight?


--------------
Using DSL on: IBM T42, IBM 560x, Dell Dimension CPx
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Jan. 13 2005,02:32 QUOTE

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
Back to top
Profile PM WEB 
5 replies since Jan. 12 2005,17:39 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (2) </ [1] 2 >/
reply to topic new topic new poll
Quick Reply: MC window resize

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code