Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
12-22-2014, 03:40 AM
|
#1
|
Member
Registered: Jan 2014
Posts: 39
Rep:
|
Midnight Commander Help
Hi,
I need to know how to check the current colour for mc and how to change it.
I google it and they talk about changeing some initial file /.mc/ini which i have no idea (no one ever gives full filename.)and i cant find it at all. Wasted an hour of my life. I just need the simplest way to change it, not another 10+ steps to change a stupid colour.
|
|
|
12-22-2014, 04:22 AM
|
#2
|
Member
Registered: Dec 2013
Location: Turin, Italy
Distribution: slackware
Posts: 328
Rep:
|
in some distros (mine, e.g.) it is located in ~/.local/mc/ini
|
|
|
12-22-2014, 04:24 AM
|
#3
|
LQ Veteran
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836
|
This is the full filename. Mind you on my distro it's in ~/.config/mc/ini
Find / Create this file and add the following (obviously change the colour values):
The syntax is: variable=foreground_colour,background_colour
Code:
[Colors]
base_color=lightgray,green:normal=green,default:selected=white,gray:marked=yellow,default:markselect=yellow,gray:directory=blue,default:executable=brightgreen,default:link=cyan,default:device=brightmagenta,default:special=lightgray,default:errors=red,default:reverse=green,default:gauge=green,default:input=white,gray:dnormal=green,gray:dfocus=brightgreen,gray:dhotnormal=cyan,gray:dhotfocus=brightcyan,gray:menu=green,default:menuhot=cyan,default:menusel=green,gray:menuhotsel=cyan,default:helpnormal=cyan,default:editnormal=green,default:editbold=blue,default:editmarked=gray,blue:stalelink=red,default
Also, have a look at this:
http://blog.mybox.ro/2010/05/10/skin...ght-commander/
|
|
|
12-22-2014, 10:34 AM
|
#4
|
Moderator
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,961
|
Member response
Hi,
Be sure to use 'man mc' to get loads of information relative to 'mc'.
|
|
1 members found this post helpful.
|
12-22-2014, 03:14 PM
|
#5
|
LQ Guru
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: One main distro, & some smaller ones casually.
Posts: 5,708
Rep:
|
Once you delve into mc, you will be surprised at how much it can do.
|
|
|
12-22-2014, 04:14 PM
|
#6
|
Senior Member
Registered: Apr 2004
Distribution: slack what ever
Posts: 1,076
|
Quote:
Originally Posted by fatmac
Once you delve into mc, you will be surprised at how much it can do.
|
it's my goto program for working on the file system
I always have it running in an xterm
it makes it simple to do the almost impossable
like work with files that have spaces in there names
(downloaded videos I would NEVER!EVER! include a space in a file name )
|
|
|
12-22-2014, 08:48 PM
|
#7
|
Senior Member
Registered: May 2011
Location: Hiding somewhere on planet Earth.
Distribution: No distribution. OpenBSD operating system
Posts: 1,711
|
I echo onebuck's advice. Become accustomed to checking man pages. They usually have the answers to most "frequently asked questions," including the locations of configuration files. mc's man page in particular has extensive information on colours.
|
|
|
12-24-2014, 08:08 AM
|
#8
|
Member
Registered: Jan 2014
Posts: 39
Original Poster
Rep:
|
Hi, after a few days...
tried everything mentioned, but it doesnt work or not how i wanted it. (using Debian stable)
I found that my midnight commander was actually using the env COLORTERM=gnome-terminal.
So i realise that bash and gnome terminal was the same thing, i think?
Under gnome terminal, edit, profile perferences, color
I found that gnome is actually forcing the mc to use a specific color palette scheme, i can change it and it will change the mc color, but every other program using color in the terminal will change too, so does anyone know how to fix it?
|
|
|
12-24-2014, 08:13 PM
|
#9
|
Senior Member
Registered: May 2011
Location: Hiding somewhere on planet Earth.
Distribution: No distribution. OpenBSD operating system
Posts: 1,711
|
Install a different terminal (xfce4-terminal, LXDE terminal, Sakura, etc.) and in the line COLORTERM=gnome-terminal, change gnome-terminal to the new terminal?
(If that does not work, you could always replace Gnome with a different GUI. )
|
|
|
12-24-2014, 09:12 PM
|
#10
|
Member
Registered: Jun 2011
Distribution: Slackware
Posts: 515
|
Quote:
Originally Posted by CrazyCatLover
I need to know how to check the current colour for mc and how to change it.
|
Ok. Midnight Commander comes from upstream with several "skins" as .ini files. These skins are used to change the colors in the program. For instance, the Slackware package installs these files:
Code:
usr/share/mc/skins/modarin256.ini
usr/share/mc/skins/dark.ini
usr/share/mc/skins/modarin256root-defbg.ini
usr/share/mc/skins/mc46.ini
usr/share/mc/skins/darkfar.ini
usr/share/mc/skins/modarcon16root.ini
usr/share/mc/skins/default.ini
usr/share/mc/skins/modarcon16-defbg.ini
usr/share/mc/skins/gotar.ini
usr/share/mc/skins/modarcon16.ini
usr/share/mc/skins/modarin256-defbg.ini
usr/share/mc/skins/nicedark.ini
usr/share/mc/skins/double-lines.ini
usr/share/mc/skins/sand256.ini
usr/share/mc/skins/modarin256root.ini
usr/share/mc/skins/xoria256.ini
usr/share/mc/skins/featured.ini
usr/share/mc/skins/modarcon16root-defbg.ini
To use one of these skins, you start mc with the -S parameter:
That makes mc use the /usr/share/mc/skins/gotar.ini skin, and so on.
Another way to use skins (the way I do it) is to use the MC_SKIN environment variable. I export it in my ~/.bashrc file. Midnight commander looks for the skin defined in MC_SKIN in ~/.local/share/mc/skins first.
Creating one of these skins is rather simple, just look at the provided example skins and write your own, here's the one I'm currently using:
Code:
[skin]
description=Midnight (Transparent)
[Lines]
horiz=─
vert=│
lefttop=┌
righttop=┐
leftbottom=└
rightbottom=┘
topmiddle=─
bottommiddle=─
leftmiddle=├
rightmiddle=┤
cross=┼
dhoriz=─
dvert=│
dlefttop=┌
drighttop=┐
dleftbottom=└
drightbottom=┘
dtopmiddle=─
dbottommiddle=─
dleftmiddle=├
drightmiddle=┤
[core]
_default_=lightgray;default
selected=white;blue
marked=yellow;
markselect=yellow;blue
gauge=;yellow
input=brightgreen;
reverse=brightgreen;blue
[dialog]
_default_=brightcyan;blue
dfocus=yellow;black
dhotnormal=brightred;
dhotfocus=yellow;black
[error]
_default_=white;red
errdhotnormal=yellow;
errdhotfocus=yellow;blue
[filehighlight]
directory=brightcyan;
executable=brightgreen;
symlink=red;
stalelink=brightred;
device=green;
special=brightblue;
core=brightred;yellow
temp=magenta
archive=cyan;
doc=brown;
source=green;
media=white;
graph=brightmagenta;
database=blue;
[menu]
_default_=white;blue
menuhot=brightgreen;
menusel=brightcyan;black
menuhotsel=yellow;black
menuinactive=lightgray;blue
[popupmenu]
_default_=lightgray;default
menusel=white;blue
menutitle=white;red
[help]
_default_=lightgray;blue
helpitalic=brightcyan;
helpbold=brightgreen;
helplink=white;
helpslink=yellow;blue
[editor]
_default_=lightgray;default
editbold=yellow;blue
editmarked=white;blue
editwhitespace=brightblue;default
editlinestate=brightgreen
bookmark=white;red
bookmarkfound=black;green
editrightmargin=brightblue;blue
[viewer]
viewunderline=brightgreen;black
[diffviewer]
_default_=lightgray;black
added=brightgreen;
changedline=cyan;
changednew=yellow;
changed=;brown
removed=;blue
folder=brightblue;
error=white;red
[buttonbar]
hotkey=lightgray;black
button=white;blue
[statusbar]
_default_=white;blue
To get all the details, read the manpage. Everything I mentioned above is right there in the manpage.
|
|
|
12-24-2014, 09:50 PM
|
#11
|
Senior Member
Registered: May 2011
Location: Hiding somewhere on planet Earth.
Distribution: No distribution. OpenBSD operating system
Posts: 1,711
|
Are you sure it is a skin issue? The part of the problem's description that stands out for me is this:
Quote:
Originally Posted by CrazyCatLover
I found that gnome is actually forcing the mc to use a specific color palette scheme, i can change it and it will change the mc color, but every other program using color in the terminal will change too, so does anyone know how to fix it?
|
Although my experience is not exhaustive, I have never seen MC's colour schemes affect other applications, even terminal applications launched with MC. What CrazyCatLover describes sounds like a Gnome issue to me.
Edit:
On second thought, it appears CrazyCatLover is changing MC's colours by using Gnome, instead of MC's configuration file. So you are probably correct.
Last edited by Randicus Draco Albus; 12-24-2014 at 09:52 PM.
|
|
|
12-24-2014, 10:00 PM
|
#12
|
Member
Registered: Jun 2011
Distribution: Slackware
Posts: 515
|
Quote:
Originally Posted by Randicus Draco Albus
On second thought, it appears CrazyCatLover is changing MC's colours by using Gnome, instead of MC's configuration file.
|
That's what I thought actually. Let's wait until he/she tries the skin stuff and we'll see how to proceed.
|
|
|
12-25-2014, 03:01 AM
|
#13
|
Member
Registered: Jan 2014
Posts: 39
Original Poster
Rep:
|
Ok, good news, i did it though i still dunno some stuff.
I still have no idea why the gnome-terminal does what it does, so anyone who knows do let me know.
I realise why changing the colors in ~/.config/mc/ini doesnt not work, i think its because i have the line above
skin=default
so no matter what color you change, it doesnt matter as it still uses the default skin.(let me know if i am wrong)
quote from man
"A skin-file is searched on the following algorithm (to the first one
found):
1) command line option -S <skin> or --skin=<skin>
2) Environment variable MC_SKIN
3) Parameter skin in section [Midnight-Commander] in config
file.
4) File /etc/mc/skins/default.ini
5) File /usr/share/mc/skins/default.ini
"
Easiest way
What i did was just to open the /usr/share/mc/skins/default.ini file, just edit the file (make sure that color is available) save it and your done. You will need to use root to do this, i have no idea how to use normal account, seems locked to read-only.
Thanks everyone for all the tips, very much appreciated.
|
|
|
12-25-2014, 03:19 AM
|
#14
|
Senior Member
Registered: May 2011
Location: Hiding somewhere on planet Earth.
Distribution: No distribution. OpenBSD operating system
Posts: 1,711
|
I change skin=default in ~/config/mc/ini to skin=name_of_skin.
|
|
|
12-25-2014, 04:00 AM
|
#15
|
Member
Registered: Jun 2011
Distribution: Slackware
Posts: 515
|
Quote:
Originally Posted by CrazyCatLover
What i did was just to open the /usr/share/mc/skins/default.ini file, just edit the file (make sure that color is available) save it and your done. You will need to use root to do this, i have no idea how to use normal account, seems locked to read-only.
|
What I do is copy one of the skins in /usr/share/mc/skins/ to ~/.local/share/mc/skins/. I make my modifications there and then export the MC_SKIN variable with the skin name I wish to use.
Just below the text you quoted from the man page, it reads:
Quote:
Command line option, environment variable and parameter in config file may contain the
absolute path to the skin-file (with the extension .ini or without it). Search of
skin-file will occur in (to the first one found):
1) ~/.local/share/mc/skins/
2) @sysconfdir@/mc/skins/
3) /usr/share/mc/skins/
|
Which is pretty much self-explanatory. If you want to use your local directory, put one or more skins there and use one of the three methods to select the skin: command line option, environment variable or parameter in the configuration file.
|
|
|
All times are GMT -5. The time now is 02:33 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|