bashcygwinmintty

how to change default settings in .minttyrc programmatically


I want to increase the default font Lucida Console from 9pt to 12pt and adjust the blue color quality. Currently the only way I can find to do it is by right-clicking the Cygwin window and selecting Options & Text and Apply as described in this answer.

I tried to edit .minttyrc to change the font size and color as suggested here. Settings are shown below. But when I relaunch the Cygwin shortcut the default window reappears.

C:\cygwin64\home>cat .minttyrc
FontHeight=12
Blue=127,127,255
BoldBlue=191,191,255

Is there a way to set .minttyrc programmatically ? Surely there is a way to change the default settings without doing this manually every time.

EDIT.

I have Cygwin configured like this ( a screen shot of the window opened by the DOS batch file).

enter image description here

Here is the code suggested by me_and

C:\cygwin64\home\Greg\Work\CMI>cat ~/.minttyrc
cat: '~/.minttyrc': No such file or directory

I can get .bashrc to find .CMI_functions in a sub-directory but I don't know how to get it to find .minttyrc in the same directory

CONCLUSION.

Best results came from editing the Cygwin batch file to relocate all .executable bash files, together with .minttyrc, into C:\cygwin64\home\%USERNAME%.

cd    %USERPROFILE%\Desktop\Archive\UTIL
xcopy .            C:\cygwin64\home\%USERNAME%\Work\CMI\UTIL /E /I
copy  Misc\*       C:\cygwin64\home\%USERNAME%\Work\CMI
copy  Bash\.*      C:\cygwin64\home\%USERNAME%
copy  Scripts\*.sh C:\cygwin64\home\%USERNAME%\Work\CMI

Solution

  • The Super User question you've linked to talks about putting the .minttyrc file as ~/.minttyrc, which as a Windows path (at least with default settings) would be something like C:\cygwin64\home\Greg\.minttyrc, but you have it as C:\cygwin64\home\.minttyrc. That's the wrong place, so it's never going to work.

    To change the settings for Mintty, you need to have the file in the right location, otherwise it won't be able to load them. Try moving the file to the correct location, and see if that resolves things for you.