Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Debian This forum is for the discussion of Debian Linux.


  Search this Thread
Old 04-24-2007, 04:53 AM   #1
Registered: Jul 2005
Posts: 139

Rep: Reputation: 15
Midnight Commander: where to open

The Midnight Commander opens by default at /home/<user_name>/ as a working directory. Could anybody please teach me how to set it in order to open the root directory when launching? I was not able to get this setting neither by its control panel nor by searching throughout the file /home/<user_name>/.mc/ini (while a file such as /etc/mc/mc.ini does not exist at all in my system). Also it was of no help to search within /etc/bash.bashrc while a file /home/<user_name>/.bashrc does not exist.
Thanks in advance!
Old 04-24-2007, 05:03 AM   #2
Senior Member
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
you can create a .bashrc which aliases mc to 'mc / /' if you want. May have side-effects, I dunno. mc usually remembers the last working directory in the left pane, though - and there shouldn't be much to do in /.
Old 04-24-2007, 05:04 AM   #3
LQ Guru
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
At least the file .bashrc can be created, if it doesn't exist, with
touch .bashrc
if it's not used, it might not exist. Simply create a new, empty file with the above command and it's there but I don't think it has much to do with midnight commander..

Likewise you can create a mc.ini file with a touch command or by copying an "example" file from somewhere. It seems to me that there are these files on your system (or should be; quoted from

The help file for the program.
The default system-wide extensions file.
User's own extension, view configuration and edit configuration file. They override the contents of the system wide files if present.
The default system-wide setup for the Midnight Commander, used only if the user lacks his own ~/.mc/ini file.
Global settings for the Midnight Commander. Settings in this file are global to any Midnight Commander, it is useful to define site-global terminal settings.
User's own setup. If this file is present then the setup is loaded from here instead of the system-wide startup file.
This file contains the hints (cookies) displayed by the program.
This file contains the default system-wide applications menu.
User's own application menu. If this file is present it is used instead of the system-wide applications menu.
The directory list for the directory tree and tree view features. Each line is one entry. The lines starting with a slash are full directory names. The lines starting with a number have that many characters equal to the previous directory. If you want you may create this file by giving the command

find / -type d -print | sort < ~/.mc/tree

Normally there is no sense in doing it because the Midnight Commander automatically updates this file for you.
Local user-defined menu. If this file is present it is used instead of the home or system-wide applications menu.
The @prefix@ depends on your system. It can be nothing or it can be /usr/ for example; in the first case the paths would be like /lib/mc/mc.hint, in the second case /usr/lib/mc/mc.hint it? So, if you can't find your files under /usr/lib/, try /lib or some others Read the system-wide config files trough, if there are some options that you find useful. I didn't find an exact configration parameter to set the start directory, but if it exists, it's either there or mentioned in the manpage:
man mc
Old 04-19-2013, 12:42 AM   #4
LQ Newbie
Registered: Apr 2013
Posts: 3

Rep: Reputation: Disabled
Hi! If it still interest for anyone i have solve this problem by standart mc resourses.
There is a section of options in my panels.ini file in .config/mc directory that called [Dirs]. There is two options in it:
They will help you as they have to me)


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 Off
HTML code is Off

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

All times are GMT -5. The time now is 09:18 PM.

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