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
 

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

reply to topic new topic new poll
Topic: Midnight Commander, mc tips< Next Oldest | Next Newest >
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: July 31 2005,14:54 QUOTE

This first post is just a copy of what I have already uploaded to the vectori mirror, but I'll keep adding to it as time goes on.  Please feel free to add any of your own tips for running mc....

DSL mc does not include a menu or extensions file, but I've found that using them makes a HUGE difference in mc's power.  The menu file (/home/dsl/.mc/menu) brings up a menu of actions which can be performed on the selected file(s) with the F2 key.  The extensions file (/home/dsl/.mc/ext or /home/dsl/.mc/bindings?) lets you set the action performed on each filetype, depending on whether you choose to open (double-click or Enter/Return), view (F3), or edit (F4).

Here's a [relatively] short menu file which should help in dealing with a few common tasks:
EDIT: dead link, and the file has been lost =o(
This current file is slightly in need of repair as of July 31,2005, but it mostly works.  The filetool part is broken, though, since it was changed to ".filetool.lst" in the latest DSL version (i'll fix it soon...just been busy with other stuff lately).

A future addition to the menu file will be the option to set a selected image file as background:

= f \.jpg$ | f \.png$
w       Set as wallpaper
       [ -n "$DISPLAY" ] && bsetbg -f %f

The mc man page (google.com/linux) explains in detail the format of the menu file, but basically it's something like this:

= f \.jpg$ | f \.png$
selected item is a file ending in either .jpg or .png

w       Set as wallpaper
this is the displayed label. "w" is a hotkey.

[ -n "$DISPLAY" ] && bsetbg -f %f
this is the command performed on %f (the selected item).


= t d
u       Create UCI package from current subdirectory
       Pwd=`basename %d`
       cd ../ && mkisofs -R -hide-rr-moved -cache-inodes -pad "$Pwd" | \
       create_compressed_fs - 65536 > "$Pwd.uci" && \
       md5sum "$Pwd.uci" >"$Pwd.uci.md5.txt"


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





Group: Members
Posts: 4856
Joined: July 2004
Posted: Aug. 16 2005,01:43 QUOTE

Get access to a subshell in aterm with Ctrl+o by setting your TERM variable to "xterm".
EDIT: sorry, this one doesn't work in DSL's mc.  You can get a look at stdout this way, but you do not get a subshell for input.


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





Group: Members
Posts: 4856
Joined: July 2004
Posted: Oct. 14 2005,18:54 QUOTE

Transparent background....
I couldn't figure out why using "mc.bin -b" would just give me a black and white mc even in a transparent terminal.  It works fine in other distros.  Then after changing aterm's foreground color it suddenly started working.  Don't ask me why, but transparency in mc does not work with certain font colors.

I changed /home/dsl/.Xdefaults to use "gray90" for aterm's foreground color instead of the default "white", and when i use the command "aterm -e mc.bin -b" i now have a transparent mc in DSL.


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
2 replies since July 31 2005,14:54 < Next Oldest | Next Newest >

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

 
reply to topic new topic new poll
Quick Reply: Midnight Commander

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