LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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


Reply
  Search this Thread
Old 12-22-2014, 03:40 AM   #1
CrazyCatLover
Member
 
Registered: Jan 2014
Posts: 39

Rep: Reputation: Disabled
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.
 
Old 12-22-2014, 04:22 AM   #2
gengisdave
Member
 
Registered: Dec 2013
Location: Turin, Italy
Distribution: slackware
Posts: 328

Rep: Reputation: 74
in some distros (mine, e.g.) it is located in ~/.local/mc/ini
 
Old 12-22-2014, 04:24 AM   #3
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836
Blog Entries: 1

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
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/
 
Old 12-22-2014, 10:34 AM   #4
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,961
Blog Entries: 46

Rep: Reputation: 3188Reputation: 3188Reputation: 3188Reputation: 3188Reputation: 3188Reputation: 3188Reputation: 3188Reputation: 3188Reputation: 3188Reputation: 3188Reputation: 3188
Member response

Hi,

Be sure to use 'man mc' to get loads of information relative to 'mc'.
 
1 members found this post helpful.
Old 12-22-2014, 03:14 PM   #5
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: One main distro, & some smaller ones casually.
Posts: 5,708

Rep: Reputation: Disabled
Once you delve into mc, you will be surprised at how much it can do.
 
Old 12-22-2014, 04:14 PM   #6
rob.rice
Senior Member
 
Registered: Apr 2004
Distribution: slack what ever
Posts: 1,076

Rep: Reputation: 205Reputation: 205Reputation: 205
Quote:
Originally Posted by fatmac View Post
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 )
 
Old 12-22-2014, 08:48 PM   #7
Randicus Draco Albus
Senior Member
 
Registered: May 2011
Location: Hiding somewhere on planet Earth.
Distribution: No distribution. OpenBSD operating system
Posts: 1,711
Blog Entries: 8

Rep: Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635
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.
 
Old 12-24-2014, 08:08 AM   #8
CrazyCatLover
Member
 
Registered: Jan 2014
Posts: 39

Original Poster
Rep: Reputation: Disabled
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?
 
Old 12-24-2014, 08:13 PM   #9
Randicus Draco Albus
Senior Member
 
Registered: May 2011
Location: Hiding somewhere on planet Earth.
Distribution: No distribution. OpenBSD operating system
Posts: 1,711
Blog Entries: 8

Rep: Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635
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.)
 
Old 12-24-2014, 09:12 PM   #10
Diantre
Member
 
Registered: Jun 2011
Distribution: Slackware
Posts: 515

Rep: Reputation: 234Reputation: 234Reputation: 234
Quote:
Originally Posted by CrazyCatLover View Post
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:

Code:
$ mc -S gotar
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.
 
Old 12-24-2014, 09:50 PM   #11
Randicus Draco Albus
Senior Member
 
Registered: May 2011
Location: Hiding somewhere on planet Earth.
Distribution: No distribution. OpenBSD operating system
Posts: 1,711
Blog Entries: 8

Rep: Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635
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 View Post
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.
 
Old 12-24-2014, 10:00 PM   #12
Diantre
Member
 
Registered: Jun 2011
Distribution: Slackware
Posts: 515

Rep: Reputation: 234Reputation: 234Reputation: 234
Quote:
Originally Posted by Randicus Draco Albus View Post
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.
 
Old 12-25-2014, 03:01 AM   #13
CrazyCatLover
Member
 
Registered: Jan 2014
Posts: 39

Original Poster
Rep: Reputation: Disabled
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.
 
Old 12-25-2014, 03:19 AM   #14
Randicus Draco Albus
Senior Member
 
Registered: May 2011
Location: Hiding somewhere on planet Earth.
Distribution: No distribution. OpenBSD operating system
Posts: 1,711
Blog Entries: 8

Rep: Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635
I change skin=default in ~/config/mc/ini to skin=name_of_skin.
 
Old 12-25-2014, 04:00 AM   #15
Diantre
Member
 
Registered: Jun 2011
Distribution: Slackware
Posts: 515

Rep: Reputation: 234Reputation: 234Reputation: 234
Quote:
Originally Posted by CrazyCatLover View Post
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.
 
  


Reply

Tags
filemanager, mc, midnight commander


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Midnight Commander matombo Fedora 3 11-30-2005 01:41 PM
midnight commander prevoo DamnSmallLinux 6 09-19-2004 05:26 PM
midnight commander archlyric Linux - Software 2 02-28-2004 03:04 AM
midnight commander enigma1 Linux - Software 6 12-10-2003 03:47 PM
Midnight Commander XPediTioN Slackware 2 07-13-2003 12:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration