Changed cygwin home location, now the terminal can't find my .minttyrc config file
The terminal can't find my .minttyrc config file
You can use the -c file
option to specify the location of the mintty configuration file.
The easiest way to do this is to change your mintty shortcut to
C:\cygwin\bin\mintty.exe -c ~/.minttyrc -i /Cygwin-Terminal.ico -
Modify as appropriate for your Cygwin setup.
Further reading
$ mintty --help
Usage: mintty [OPTION]... [ PROGRAM [ARG]... | - ]
Start a new terminal session running the specified program or the user's shell.
If a dash is given instead of a program, invoke the shell as a login shell.
Options:
-c, --config FILE Load specified config file
-e, --exec Treat remaining arguments as the command to execute
-h, --hold never|start|error|always Keep window open after command finishes
-i, --icon FILE[,IX] Load window icon from file, optionally with index
-l, --log FILE|- Log output to file or stdout
-o, --option OPT=VAL Override config file option with given value
-p, --position X,Y Open window at specified coordinates
-s, --size COLS,ROWS Set screen size in characters
-t, --title TITLE Set window title (default: the invoked command)
-u, --utmp Create a utmp entry
-w, --window normal|min|max|full|hide Set initial window state
--class CLASS Set window class name (default: mintty)
-H, --help Display help and exit
-V, --version Print version information and exit
Related videos on Youtube
Comments
-
Shaun over 1 year
I had to change the
HOME
location for Cygwin by setting it to pick up the directory I set in/etc/passwd
(following the solution from here). It seems to not be a problem for the majority of my configuration files..bashrc
and.vimrc
are read as expected.But it isn't picking up the configuration for my
.minttyrc
file. It loads up with the default colors. If I try to add a new setting through Windows, by right clicking on the title bar and selecting Options, it gives me an error:Could not save options to '[old home directory]': No such file or directory.
If I rebuild the old home directory and put the
.minttyrc
file there, it works fine. Is there some place I need to update the location for the.minttyrc
separately?-
Admin almost 9 yearsI don't think the solution in your link will work with recent cygwin versions. The cygwin startup code got completely rewritten. Now for example /etc/password is no longer required. See I am unable to find the etc/passwd file in cygwin and cygwin.com/cygwin-ug-net/ntsec.html for more info about how to correctly change your home directory.
-
Admin almost 9 years@DavidPostill At work, my PC has the HOME environment variable set to a folder in a network drive. When I installed Cygwin, it created a duplicate of this folder on my Desktop and wanted to use that as the HOME folder. I changed it be the
home
subdirectory of my Cygwin install. I set up thedb_home
line in/etc/nsswitch.conf
as you suggested, and the other configuration files are mentioned are working properly. But it still isn't looking in the right place for.minttyrc
. -
Admin almost 9 yearsHow are you starting mintty?
-
Admin almost 9 yearsTry adding
-c ~/.minttyrc
to your mintty startup shortcut ieC:\cygwin\bin\mintty.exe -c ~/.minttyrc -i /Cygwin-Terminal.ico -
-
Admin almost 9 years
-c FILE
is Load specified config file -
Admin almost 9 yearsI'll write it up as an answer then ;)
-
-
Shaun almost 9 yearsDidn't work on my work environment because of the "HOME" situation, but I tested it out at home by putting the minttyrc configuration somewhere else and updating the path specified in the shortcut. It worked as expected.