LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 04-24-2007, 04:53 AM   #1
grautu
Member
 
Registered: Jul 2005
Posts: 142

Rep: Reputation: 15
Midnight Commander: where to open


Hi!
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
slakmagik
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
b0uncer
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
Code:
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 http://www.chm.tu-dresden.de/edv/mc/...ual1.html#56):

Quote:
@prefix@/lib/mc.hlp
The help file for the program.
@prefix@/lib/mc/mc.ext
The default system-wide extensions file.
~/.mc/ext
User's own extension, view configuration and edit configuration file. They override the contents of the system wide files if present.
@prefix@/lib/mc/mc.ini
The default system-wide setup for the Midnight Commander, used only if the user lacks his own ~/.mc/ini file.
@prefix@/lib/mc/mc.lib
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.
~/.mc/ini
User's own setup. If this file is present then the setup is loaded from here instead of the system-wide startup file.
@prefix@/lib/mc/mc.hint
This file contains the hints (cookies) displayed by the program.
@prefix@/lib/mc/mc.menu
This file contains the default system-wide applications menu.
~/.mc/menu
User's own application menu. If this file is present it is used instead of the system-wide applications menu.
~/.mc/tree
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.
./.mc.menu
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 etc..got 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:
Code:
man mc
 
Old 04-19-2013, 12:42 AM   #4
loginz
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:
Code:
[Dirs]
other_dir=/home/grandma/games
current_is_left=false
They will help you as they have to me)
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 03:39 PM.

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