Cygwin Windows Is Searching For Mintty Missing

0515

Configuring mintty

Mintty supports a number of common places to look for and save itsconfiguration and resources.

Windows 7 Pro 64-bit: After full installation of setup-x86_64 - done repeatedly to correct any errors and misses - there still is a fatal error when starting Cygwin64 Terminal, 'Windows is searching for minty' with a Any suggestions on how to repair the Cygwin setup-x86_64 installation to have mintty? Windows only: If you need your Unix command line on a Windows PC, chances are you use a terminal emulator like Cygwin—and if you do, you want to check out MinTTY.

For its configuration file, it reads /etc/minttyrc, $APPDATA/mintty/config,~/.config/mintty/config, ~/.minttyrc, in this order.

For resource files to configure a colour scheme,wave file for the bell character, or localization files, it looks forsubfolders themes, sounds, or lang, respectively,in one of the directories ~/.mintty, ~/.config/mintty,$APPDATA/mintty, /usr/share/mintty, whichever is found first.

The ~/.config/mintty folder is the XDG default base directory.The $APPDATA/mintty folder is especially useful to share common configurationfor various installations of mintty (e.g. Cygwin 32/64 Bit, MSYS, Git Bash, WSL).

Using desktop shortcuts to start mintty

The Cygwin setup.exe package for minttyinstalls a shortcut in the Windows start menu under All Programs/Cygwin.It starts mintty with a ‘-’ (i.e. a single dash) as its only argument,which tells it to invoke the user’s default shell as a login shell.

Shortcuts are also a convenient way to start mintty with additional options and different commands.For example, shortcuts for access to remote machines can be created byinvoking ssh. The command simply needsto be appended to the target field of the shortcut’s properties:

Target: C:Cygwinbinmintty.exe /bin/ssh server

The cygutils packageprovides the mkshortcut utility for creating shortcuts from the command line.See its manual page for details.

A Windows shortcut can be associated with a Shortcut key so an instanceof mintty can be started using a hotkey. By default, an already runninginstance would be focussed again with the associated hotkey. To have anew instance started with every usage of the hotkey, use the command-lineoption -D for mintty in the shortcut target.

Taskbar icons

In a Windows desktop shortcut, (since mintty 2.2.3) it is suggestedto not specify an icon in the command line, as mintty detects and usesthe icon from the invoking shortcut.If for any reason, an icon is to be specified, it should be the samein the mintty command line (shortcut properties Target:) as in theshortcut itself (Change Icon..).

Taskbar icon grouping

Windows 7 and above use the application ID for grouping taskbar items.By default this setting is empty, in which case Windows groups taskbaritems automatically based on their icon and command line. This can beoverridden by setting the AppID to a custom string, in which case windowswith the same AppID are grouped together.

The AppID supports placeholder parameters for a flexible groupingconfiguration (see manual).The special value AppID=@ causes mintty to derive an implicit AppIDfrom the WSL system name, in order to achieve WSL distribution-specifictaskbar grouping. This resolves taskbar grouping problems in some cases(wsltty issue #96) but causes similar problems in other cases (issue #784).

Warning: Using this option in a Windows desktop shortcut maycause trouble with taskbar grouping behaviour. If you need to do that,the shortcut itself should also get attached with the same AppId.

Serial key proshow gold 5.0.3310. =============C.O.R.E============= Edition: Producer Name: Administrator Phone Number: Reg.

Note: Since 2.9.6, if mintty is started via a Windows shortcutwhich has its own AppID, it is reused for the new mintty window in orderto achieve proper taskbar icon grouping. This takes precedence over anexplicit setting of the AppID option.

Explanation: Note that Windows shortcut files have their own AppID.Hence, if an AppID is specified in the mintty settings, but not on ataskbar-pinned shortcut for invoking mintty, clicking the pinnedshortcut will result in a separate taskbar item for the new mintty window,rather than being grouped with the shortcut.

Hint: To avoid AppID inconsistence and thus ungrouped taskbar icons,the shortcut's AppID should to be set to the same string as the mintty AppID,which can be done using the winappid utility available inthe mintty utils repository.As noted above, since mintty 2.9.6, the mintty AppID does not need to be setanymore in this case.

Window session grouping

For grouping of window icons in the taskbar, Windows uses the intricateAppID concept as explained above. For grouping of desktop windows, asused by the mintty session switcher or external window manipulation tools,Windows uses the distinct but likewise intricate Class concept.Mintty provides flexible configuration to set up either of them, see manual.

Window icons

The icons (taskbar icon and title bar icon) can be changed dynamicallywith an OSC I escape sequence. Example:

Start errors

Error: could not fork child process

If you are frequently facing this problem, it is not really a mintty issue,but it may reportedly help if you turn off the Windows ASLR featurefor cygwin-based programs; turn off Mandatory ASLR for mintty,cygwin-console-helper, your shell and other programs as described inissue #493or using Powershell commands as described inwsltty issue #6.

Supporting Linux/Posix subsystems

If you have any Linux distribution for the Windows Subsystem for Linux (WSL)installed, mintty can be called from cygwin to run a WSL terminal session:

  • mintty --WSL=Ubuntu
  • mintty --WSL (for the Default distribution as set with wslconfig /s)

Note, the wslbridge tool needs to be installed in /bin for this purpose(see below for details).

A WSL terminal session can be configured for the mintty session launcherin the config file, like:

  • SessionCommands=Ubuntu:--WSL=Ubuntu

WSLtty, the standalone WSL mintty terminal

For a standalone mintty deployment as a WSL terminal, also providingdesktop and start menu shortcuts, command line launch scripts, andoptional Windows Explorer integration, installwsltty,using either the wsltty installer, a Chocolatey package, or a Windows Appx package.

Manual setup of WSL terminal

To help reproduce the installation manually, for users of cygwin or msys2:

  • From https://github.com/rprichard/wslbridge/releases, download the wslbridge archive corresponding to your system (cygwin/msys2 32/64 bit)
  • Install wslbridge.exe and wslbridge-backend into your cygwin or msys2 /bin directory
  • Make a desktop shortcut (Desktop right-click – New ▸ Shortcut) with
    • Target: X:cygwin64binmintty.exe --WSL=Linux_Distribution -
    • Icon location (Change Icon…) for Legacy “Ubuntu on Windows”: %LOCALAPPDATA%lxssbash.ico

Replace X:cygwin64 with your cygwin or msys2 root directory pathand Linux_Distribution with your preferred distribution. The suitableicon location for each respective distribution is not easily found; thestandalone package would set that up for you in the shortcuts. For otherinvocation (cygwin or Windows command line), mintty finds the suitableWSL icon itself.

At the end of the mintty --WSL invocation line, you may add an explicitWSL shell invocation like /bin/bash -l to select your favourite shell orask for a login shell (-l), or set a start directory (-C, before anyshell command) if desired.

If no start directory is otherwise selected, the “Start in:” directoryof the shortcut may be set to %USERPROFILE%.

Interix

On Windows 7, mintty may also be used as a terminal for theSubsystem for UNIX-based applications (SUA), also known as Interix.For the mintty session launcher, this can be configured for theavailable shells as follows (concatened with ‘;’ separator for multiple targets):

  • SessionCommands=Interix Korn Shell:/bin/winpty C:Windowsposix.exe /u /c /bin/ksh -l
  • SessionCommands=Interix SVR-5 Korn Shell:/bin/winpty posix /u /p /svr-5/bin/ksh /c -ksh
  • SessionCommands=Interix C Shell:/bin/winpty posix /u /c /bin/csh -l

For a desktop or start menu shortcut, the respective target command wouldlook like X:cygwinbinmintty.exe winpty …(and may use the icon location%SystemRoot%Installer{DB88A98A-792B-4441-8E60-05A6D3E2B2C0}sh.exe).

Starting mintty from a batch file

In order to start mintty from a batch file it needs to be invoked through the start command. This avoids the batch file’s console window staying open while mintty is running. For example:

The console window for the batch file will still show up briefly, however. This can be avoided by invoking mintty from a shortcut instead, as described above.

Starting in a particular directory

The working directory for a mintty session can be set in theStart In field of a shortcut,or by changing directory in an invoking script, or with option --dir.Note, however, that Cygwin’s /etc/profile script for login shells automatically changes to the user’s home directory.The profile script can be told not to do this by setting a variable called CHERE_INVOKING, like this:

Note: If mintty is run from a shortcut with empty Start In field and theeffective start directory is within the Windows system folder, mintty changesit in order to avoid failure when creating a log file.

Creating a folder context menu entry for mintty

Cygwin’s chere package can be used to create folder context menu entries in Explorer, which allow a shell to be opened with the working directory set to the selected folder.

The following command will create an entry called Bash Prompt Here for the current user that will invoke bash running in mintty. See the chere manual (man chere) for all the options.

Note, however, that context menu entries created by chere fail on non-ASCII directory names.Mintty option --dir comes to help, like in either of these registry entriesfor registry keys like /HKCU/Software/Classes/Directory/Shell/mintty-here/command/:

Setting environment variables

Unfortunately Windows shortcuts do not allow the setting of environment variables. Variables can be set globally though via a button on the Advanced tab of the system properties. Those can be reached by right-clicking on the (My) Computer entry in the start menu or on the desktop, selecting Properties, then Advanced System Settings.

Alternatively, global variables can be set using the setx command line utility. This comes pre-installed with some versions of Windows but is also available as part of the freely downloadable Windows 2003 Resource Kit Tools.

The env utility can be used to set variables specifically for the program to be run in mintty, e.g.:

Input/Output interaction with alien programs

When interacting with programs that use a native Windows API forcommand-line user interaction (“console mode”), a number of undesirableeffects are observed; this is thepty incompatibility problemand thecharacter encoding incompatibility problem.This basically affects all programs not compiled in a cygwin or msysenvironment (and note that MinGW is not msys in this context).

As a workaround, you can use winptyas a wrapper to invoke the Windows program.

Note: There is no point in reporting this for the 15th time as a minttyissue, because it is not a mintty issue (or well, an issue maybe, but notcaused by, or fixable by, mintty); it is a generic problem of cygwin/msysand occurs likewise in all other pty-based terminals (e.g. xterm).

Terminal line settings

Terminal line settings can be viewed or changed with the stty utility, which is installed as part of Cygwin’s core utilities package. Among other things, it can set the control characters used for generating signals or editing an input line.

See the stty manual for all the details, but here are a few examples. The commands can be included in shell startup files to make them permanent.

To change the key for deleting a whole word from Ctrl+W to Ctrl+Backspace:

To use Ctrl+Enter instead of Ctrl+D for end of file:

To use Pause and Break instead of Ctrl+Z and Ctrl+C for suspending or interrupting a process:

With these settings, the Esc key can also be used to interrupt processes by setting its keycode to ^:

(The standard escape character ^[ cannot be used for that purpose because it appears as the first character in many keycodes.)

Unix terminal line drivers have a flow control feature that allow terminal output to be stopped with Ctrl+S and restarted with Ctrl+Q. However, due to the scrollback feature in modern terminal emulators, there is little need for this. Hence, to make those key combinations available for other uses, disable flow control with this command:

Readline configuration

Keyboard input for the bash shell and other programs that use the readline library can be configured with the so-called inputrc file. Unless overridden by setting the INPUTRC variable, this is located at ~/.inputrc. It consists of bindings of keycodes to readline commands, whereby comments start with a hash character. See its manual for details.

Anyone used to Windows key combinations for editing text might find the following bindings useful:

(The Ctrl+Shift+Backspace keycode depends on the selected character set, so the appropriate binding needs to be chosen.)

Finally, a couple of bindings for convenient searching of the command history. Just enter the first few characters of a previous command and press Ctrl+Up to look it up.

Unexpected behaviour with certain applications (e.g. vim)

If for example the PgUp and PgDn keys do not work in your editor, the reasonmay be that in the mintty Options, the Terminal Type was set to 'vt100'and based on the resulting setting of the environment variable TERM,the application expects other key sequences than mintty sends.(While mintty could be changed to send VT100 application keypad codes inthat case, the current behaviour is compatible with xterm.)

Shift+up/down for text selection in emacs

The escape sequences for Shift+up/down are mapped to scroll-backward/forwardvirtual keys by the xterm terminfo entry.Follow the advice inHow to fix emacs shift-up key..to create a fixed terminfo entry that removes this mapping,or use a suitable alternative setting for the environment variable TERM,for example TERM=xterm-color.

Mode-dependent cursor in vim

Mintty supports control sequences for changing cursor style. These can be used to configure vim such that the cursor changes depending on mode. For example, with the following lines in ~/.vimrc, vim will show a block cursor in normal mode and a line cursor in insert mode:

Enabling full mouse functionality in vim

Before vim 8.1.0566, full mouse mode is not automatically enabled in mintty.Add this to ~/.vimrc for a workaround:

Blinking cursor reset

Some applications may reset cursor style, especially cursor blinking,after terminating, caused by theterminfo databaseincluding the corresponding reset sequence in the “normal cursor” setting.This is avoided with mintty option SuppressDEC=12.

Avoiding escape timeout issues in vim

It’s a historical flaw of Unix terminals that the keycode of the escape key, i.e. the escape character, also appears at the start of many other keycodes. This means that on seeing an escape character, an application cannot be sure whether to treat it as an escape key press or whether to expect more characters to complete a longer keycode.

Therefore they tend to employ a timeout to decide. The delay on the escape key can be annoying though, particularly with the mode-dependent cursor above enabled. The timeout approach can also fail on slow connections or a heavily loaded machine.

Mintty’s “application escape key mode” can be used to avoid this by switching the escape key to an unambiguous keycode. Add the following to ~/.vimrc to employ it in vim:

Note that the last line causes vi-compatible behaviour to be used when pressing Esc on the command line: the command is executed rather than cancelled as is the default for vim. If the latter is preferred, replace the last line with a mapping to ^C:

Keyboard issues in specific environments

Detecting AltGr in TeamViewer

Windows provides AltGr using two virtual key codes (Ctrl and Menu)sharing the same timestamp. TeamViewer is buggy with respect to thetimestamp. As a workaround, mintty can detect AltGr also from thetwo key codes arriving with some delay. SettingCtrlAltDelayAltGr=16 or CtrlAltDelayAltGr=20 is suggested.

Using Ctrl+Tab to switch window pane in terminal multiplexers

The Ctrl+Tab and Ctrl+Shift+Tab key combinations can be used toswitch windows/panes/tabs in a terminal multiplexer session.In order to do so, their use as shortcuts for switching mintty windowsneeds to be disabled on the Keys page of the options,and their keycodes need to be mapped as shown below.

Switch window in GNU Screen

For GNU Screen, in ~/.screenrc:

Switch pane in tmux

For tmux, in ~/.tmux.conf:

Keyboard customization

A number of options are available to customize the keyboard behaviour,including user-defined function and keypad keys and Ctrl+Shift+key shortcuts.See the manual page for options and details.

Compose key

Mintty uses the Windows keyboard layout system with its “dead key” mechanismfor entering accented characters, enhanced by self-composed charactersfor dead-key combinations that Windows does not support (e.g. ẃ).

Mintty also provides a Compose key, configurable to Control, Shift or Alt,using X11 compose data. For example, if the compose key is configuredto be Control, pressing and release the Control key, followed by lettersa and e, will enter æ; Control---, will enter ¬,Control-C-o will enter ©, Control-<-< will enter «,Control-c-, will enter ç, Control-s-s will enter ß,Control-!-! will enter ¡, Control-!-? will enter , etc.

For a separate compose key solution, the most seamless and stableCompose Key for Windows isWinCompose.

Appearance

Changing colours

The default foreground, background and cursor colours can be changed in the options dialog, or by specifying the ForegroundColour, BackgroundColour and CursorColour settings in the configuration file or on the command line.

However, they can also be changed from within the terminal using the xterm control sequences for this purpose, for example:

In mintty, the RGB colour values can also be specified using a comma-separated decimal notation,for example 255,0,0 instead of #FF0000 for red.X11 colour namesare supported, too. See the examples below for all options.

The 16 ANSI colourscan be set in the configuration file or on the command line using settingssuch as Blue or BoldMagenta. These are documented in theconfiguration sectionof the manual. They can also be changed using xterm control sequences.Here they are with their default values:

Different notations are accepted for colour specifications:

  • #RRGGBB (256 hex values, see examples above)
  • rrr,ggg,bbb (256 decimal values)
  • rgb:RR/GG/BB (256 hex values)
  • rgb:RRRR/GGGG/BBBB (65536 hex values)
  • cmy:C.C/M.M/Y.Y (float values between 0 and 1)
  • cmyk:C.C/M.M/Y.Y/K.K (float values between 0 and 1)
  • color-name (using X11 color names, e.g. echo -ne 'e]10;bisque2a')

Using colour schemes (“Themes”)

Colour schemes (that redefine ANSI colours and possibly foreground/backgroundcolours) can be loaded with the option -C (capital C) or --loadconfigwhich loads a configuration file read-only, i.e. configuration changesare not saved to this file, or with the new setting ThemeFile.

In the Options menu, section Looks, the Theme popup offers theme filesas stored in a resource directory for selection.This dialog field (or the “Color Scheme Designer” button for drag-and-drop)can be used in different ways:

  • Popup the selection to choose a theme configured in your resource directory
  • Insert a file name (e.g. by pasting or drag-and-drop from Windows Explorer)
  • Drag-and-drop a theme file from the Internet (may be embedded in HTML page)
  • Drag-and-drop a colour scheme directly from the Color Scheme Designer (see below)

After drag-and-drop of a colour scheme, you may Apply it for testing;to keep the scheme in your popup selection, assign a name to it by typing itinto the Theme field, then click the “Store” button. After downloading atheme file, the name will be filled with its basename as a suggestion.As long as a colour scheme is loaded but not yet stored, and a name isavailable in the Theme field, the “Store” button will be enabled.

There is an excellent colour scheme designer available:4bit Terminal Color Scheme Designerwhich lets you download a tuned colour scheme (top-right button “Get Scheme”).Click on the button “Color Scheme Designer” below the Theme fieldto open the designer page and start your design. You can either downloadthe scheme file (“Get Scheme” – “mintty”) or drag-and-drop the download linkdirectly to the mintty Options menu, to either the Theme field or theColor Scheme Designer button. You can then click Apply to test the designand if you like it, you can enter a theme name in the Theme field and thenclick the “Store” button to store the colour scheme.

A number of colour schemes have been published for mintty, e.g.

Mintty also provides the command-line script mintheme which candisplay the themes available in the mintty configuration directories oractivate one of them in the current mintty window.

Background image

As an alternative to a background colour, mintty also supports graphicbackground. This can be configured with the option Background orset dynamically using special syntax of the colour background OSC sequence.The respective parameter addresses an image file, preceded by a modeprefix and optionally followed by a transparancy value.Prefixes are:

  • * use image file as tiled background
  • _ (optional with option Background) use image as picture background, scaled to window
  • % use image as picture background and scale window to its aspect ratio
  • = use desktop background (if tiled and unscaled), for a virtual floating window

If the background filename is followed by a comma and a number between 1 and 254,the background image will be dimmed towards the background colour;with a value of 255, the alpha transparency values of the image will be used.

Examples:

Note that relative pathnames depend on proper detection of the current directoryof the foreground process.Note that absolute pathnames within the cygwin file system are likelynot to work among different cygwin installations.To configure a background in $APPDATA/mintty/config (or%APPDATA%/wsltty/config), Windows pathname syntax should be used.

Providing and selecting fonts

To provide additional fonts for use with mintty, monospace fonts can beinstalled in Windows. Note that font installation in X11 does not makea font available for mintty as mintty is not an X windows application.Some monospace fonts are not explicitly marked as such in the font file.In that case the font will not be listed in the minttyOptions – Text – Font selection menu.It can still be used by explicit selection, e.g.:

Also, Unicode font names are now supported, e.g.

The font selection menu lists monospace fonts unless marked to Hidein the Fonts folder of the system Control Panel.To include them in the fonts offered in the menu (e.g. to select any ofDotumChe, GulimChe, GungsuhChe, MingLiU, MS Gothic, MS Mincho, NSimSun,Simplified Arabic Fixed), do either of:

  • Uncheck “Hide fonts based on language settings” in Fonts ▸ Font settings
  • Hide/Show fonts individually from their context menu
  • Set the mintty hidden setting ShowHiddenFonts=true

The latter setting also includes fonts with an OEM or SYMBOL character set.

Some fonts with a name problem (e.g. Meslo LG S for Powerline) can beselected using the new Apply button in the font selection menu.

Fonts not listed in the menu can be configured with the Font setting.

The old font selection and menu format can be chosen with setting FontMenu=1.

If you are missing certain characters, e.g. as used for the popular “Powerline” plugin,the reason may be that specifically designed characters are being addressedthat are provided in the Unicode Private Use range of dedicated fonts;a collection of such fonts can be found at Nerd Fonts.

Alternative fonts

Mintty supports up to 10 alternative fonts that can be selected ascharacter attributes (see Text attributes below). They are configuredin the config file (see manual page), except for font 10 which has adefault preference; mintty will try to find a Fraktur or Blackletter fontfor it on your system.

Character width

By default, mintty adjusts character width to the width assumption of thelocale mechanism (function wcwidth).If it is desired to use more up-to-date Unicode width properties, this canbe chosen with option Charwidth=unicode. Note that actual widthproperties as rendered on the screen and width assumptions of thewcwidth function will be inconsistent then for the impacted characters,which may confuse screen applications (such as editors) that rely onwcwidth information.

Ambiguous width setting

A number of Unicode characters have an “ambiguous width” property due tolegacy issues with dedicated CJK fonts, meaning they can be narrow(single-cell width) or wide (double-cell width) in a terminal.

To select ambiguous-width characters to appear wide (as some applicationsmay expect), mintty should be run in a CJK locale (character encoding doesnot need to be CJK), e.g.:

If the locale is selected via the Locale setting, however, it is necessaryto choose an ambiguous-wide font in addition (CJK font), or mintty willenforce the ambiguous-narrow mode of rendering by appending the“@cjknarrow” locale modifier:

If it is not desired to set a specific base locale in order to enableambiguous-wide mode, option Charwidth=ambig-wide can be used.It implies Charwidth=unicode behaviour, with the same caveats as above.Mintty indicates this mode by appending the @cjkwide modifier to theLC_CTYPE locale variable (not yet supported by cygwin).

Selective double character width

While mintty fully supports double-width characters (esp. CJK) as wellas ambiguous-width characters, there are also characters of fuzzywidth property, because their rendered glyph is wider than oneterminal character cell in most fonts, but yet they are defined assingle-width by Unicode. Such characters often appear to be clippedon the screen. Mintty has an experimental feature to display semi-wideIndic and some other characters at double-cell width(see Control Sequences – Wide characters),but not all such characters are handled, and there is no perfect solutionthat would also comply with the locale mechanism unless the terminal wouldsupport proportional fonts.

Font rendering and geometry

Mintty can make use of advanced Windows font fallback as provided via the Uniscribe API,achieving improved character/glyph substitution for characters not provided in the selected font.Option -o FontRender=uniscribe is now the default, -o FontRender=textout disables it.Note that Uniscribe is not applied to right-to-left text as it wouldinterfere with mintty’s own bidi transformation.

Window geometry, rows and columns

The actual window size is influenced by several parameters:

  • Font size / character height is the main parameter to determine the row height.
  • Row height is additionally affected by the “leading” information from the font.
  • Row height and column width can furthermore be tuned with setting RowSpacing and ColSpacing.
  • A gap between text and window border can be specified with setting Padding (default 1).

Note: The term “leading” (pronounced like “ledding”) comes from thetimes of metal typesetting when strips of lead (the metal) were usedto adjust line spacing.

Install

Text attributes and rendering

Mintty supports a maximum of usual and unusual text attributes.For underline styles and colour values, colon-separatedISO/IEC 8613-6 sub-parameters are supported.

start ^[[..mend ^[[..mattribute
122bold
222dim
323italic
4 or 4:124 or 4:0solid underline
4:2 or 2124 or 4:0double underline
4:324 or 4:0wavy underline
4:424 or 4:0dotted underline
4:524 or 4:0dashed underline
525blinking
625rapidly blinking
727inverse
828invisible
929strikeout
11 (*)10alternative font 1 (*)
1210alternative font 2
..10alternative fonts 3..8
1910alternative font 9
2023 or 10Fraktur/Blackletter font
21 or 4:224 or 4:0double underline
5355overline
30..3739foreground ANSI colour
90..9739foreground bright ANSI colour
40..4749background ANSI colour
100..10749background bright ANSI colour
38;5;P or 38:5:P39foreground palette colour
48;5;P or 48:5:P49background palette colour
38;2;R;G;B39foreground true colour
48;2;R;G;B49background true colour
38:2::R:G:B39foreground RGB true colour
48:2::R:G:B49background RGB true colour
38:3:F:C:M:Y39foreground CMY colour (*)
48:3:F:C:M:Y49background CMY colour (*)
38:4:F:C:M:Y:K39foreground CMYK colour (*)
48:4:F:C:M:Y:K49background CMYK colour (*)
51 or 5254emoji style (*)
58:5:P59underline palette colour
58:2::R:G:B59underline RGB colour
58:3:F:C:M:Y59underline CMY colour (*)
58:4:F:C:M:Y:K59underline CMYK colour (*)
any0 or empty

Note: Alternative fonts are configured with options Font1 .. Font10.They can also be dynamically changed with OSC sequence 50 which refersto the respectively selected font attribute.

Note: The control sequence for alternative font 1 overrides the identicalcontrol sequence to select the VGA character set. Configuring alternativefont 1 is therefore discouraged.

Note: The control sequences for Fraktur (“Gothic”) font are describedin ECMA-48, see also wiki:ANSI code.To use this feature, it is suggested to install F25 Blackletter Typewriter,e.g. from:

Note: RGB colour values are scaled to a maximum of 255 (=100%).CMY(K) colour values are scaled to a maximum of the given parameter F (=100%).

Note: The emoji style attribute sets the display preference for a numberof characters that have emojis but would be displayed with text styleby default (e.g. decimal digits).

Note: Text attributes can be disabled with option SuppressSGR (see manual).

As a fancy add-on feature for text attributes, mintty supports distinctcolour attributes for combining characters, so a combined charactercan be displayed in multiple colours. Attributes considered for thispurpose are default and ANSI foreground colours, palette and true-colourforeground colours, dim mode and manual bold mode (BoldAsFont=false);background colours and inverse mode are ignored.

Emojis

Mintty supports display of emojis as defined by Unicode usingemoji presentation, emoji style variation and emoji sequences.(Note that the tty must be in a UTF-8 locale to support emoji codes.)

The option Emojis can choose among sets of emoji graphics ifdeployed in a mintty configuration directory.With this option, mintty emoji support is enabled and the emoji graphics style is chosen.Mintty will match output for valid emoji sequences,emoji style selectors and emoji presentation forms.

For characters with default text style but optional emoji graphics,emoji style can be selected with the “framed” or “encircled” text attribute.

Note that up to cygwin 2.10.0, it may be useful to set Charwidth=unicode in addition.

Emojis are displayed in the rectangular character cell group determinedby the cumulated width of the emoji sequence characters. The optionEmojiPlacement can adjust the location of emoji graphics within that area.

Installing emoji resources

Mintty does not bundle actual emoji graphics with its package.You will have to download and deploy them yourself.

Emoji data can be found at the following sources:

  • EmojiOne
    • Free Download for your own use, PNG Files, download e.g. 128x128px zip
    • Deploy the preferred subdirectory (e.g. 128) as emojione
  • Noto Emoji font, subdirectory png/128
    • “Clone or download” the repository or download a release archive
    • Deploy subdirectory noto-emoji/png/128 as noto
  • Unicode.org Full Emoji List (~50MB)
    • Download the Full Emoji List (with all emoji data embedded)
    • Use the extraction script getemojis to extract emoji data (call it without parameters for instructions)
    • Deploy the desired subdirectories (e.g. apple)
    • Includes apple, emojione, facebook, google, twitter, samsung, windows emojis (and some limited low-resolution sets that we shall ignore)
  • Emoji data and images
    • “Clone or download” the repository or download a release archive
    • Deploy subdirectories img-* as appropriate (e.g. img-apple-64 as apple)
    • Includes apple, emojione-2D, facebook, facebook messenger (discontinued), google, twitter emojis

To “Clone” with limited download volume, use the command git clone --depth 1.To download only the desired subdirectory from github.com, use subversion,for example:

  • svn export https://github.com/googlei18n/noto-emoji/trunk/png/128 noto
  • svn export https://github.com/iamcal/emoji-data/trunk/img-apple-160 apple

“Deploy” above means move, link, copy or hard-link the respective subdirectoryinto mintty configuration resource subdirectory emojis, e.g.

  • mv noto-emoji/png/128 ~/.config/mintty/emojis/noto
  • ln -s '$PWD'/noto-emoji/png/128 ~/.config/mintty/emojis/noto
  • cp -rl noto-emoji/png/128 ~/.config/mintty/emojis/noto

Use your preferred configuration directory, e.g.

  • cp -rl noto-emoji/png/128 '$APPDATA'/mintty/emojis/noto
  • cp -rl noto-emoji/png/128 /usr/share/mintty/emojis/noto

Searching in the text and scrollback buffer

With the Search menu command or Alt+F3, a search bar is opened.Matching is case-insensitive and ignores combining characters.Matches are highlighted in the scrollback buffer.The appearance of the search bar and the matching highlight colours can becustomized.

Another search feature (Shift+cursor-left/right) skips to theprevious/next prompt line if these are marked with scroll marker escapesequences, see the CtrlSeqs wiki page.

Passing arguments from an environment with different character set

To pass non-ASCII parameters to a command run from mintty using a specificcharacter encoding, proper conversion must be crafted.See issue #463for a discussion.For example, for a desktop shortcut to start a GBK-encoded minttystarting in a specific directory with a non-ASCII name,use this command line as a shortcut target:

So the initial shell, interpreting its cd parameters already in GBKencoding, will see it properly converted.

Spawning a new terminal window in the same directory

With Alt+F2, normally another mintty window would be opened in thehome directory (or where the current window was started), while it maybe desirable to open it in the same directory as the current workingdirectory. This can be achieved with some interaction between the shelland the terminal, as applied e.g. by the Mac Terminal.The shell can inform the terminal about a changed directory with theOSC 7 control sequence (see the CtrlSeqs wiki page), to be outputwith the prompt (example for bash):

The sequence could also be output by shell aliases or functions changing the directory.It cannot be embedded in the prompt itself with w as that is using some shortcuts,but $PWD could be used if shopt promptvars is not unset.

Note that after remote login, the directory path may be meaninglessunless the remote and local paths match.Note also that from a login terminal (e.g. using parameter - to starta login shell), Alt+F2 starts again a login terminal, whose login shellis likely to reset the working directory to the home directory.

Virtual Tabs

The Virtual Tabs feature provides a list of all running mintty sessionsas well as configurable launch parameters for new sessions.By default, the list is shown in the extended context menu (Ctrl+right-click),the mouse button 5 menu, and the menus opened with the Ctrl+Menu keyand the Ctrl+Shift+I shortcut (if enabled).(Menu contents for the various context menu invocations is configurable.)For configuration, see settings SessionCommands, Menu*,and SessionGeomSync.Distinct sets of sessions can be set up with the setting -o Class=...For flexible window grouping, this setting supports the same placeholdersas the AppID option.

Multi-monitor support

Mintty supports multiple monitors with two features:

A mintty window can be placed on a specific monitor with thecommand-line option -p @N where N is the number of the monitor.

A new mintty window cloned with Alt+F2 can be placed on a selected monitorwhile F2 is being held; press cursor and other keys on the numeric keypadto navigate the monitor grid to the desired target monitor, then release F2.

Note also the generic Windows hotkeys to move the current window tothe left or right neighbour monitor: Win+Shift+cursor-left/right.

Embedding graphics in terminal output

The new support of the SIXEL feature facilitates a range of applicationsthat integrate graphic images in the terminal, animated graphics, and evenvideo and interactive gaming applications.

An example of the benefit of this feature is the output of gnuplotwith the command

Note that gnuplot uses black text on default background for captionsand coordinates so better not run it in a terminal with dark background.

Localization

Mintty facilitates localization of its user interface, the Options dialog,menus, message boxes, and terminal in-line error messages.The localization language can be selected with the option Language,see manual page for details.

Example:Language=*, environment variables LANGUAGE=de_CH:français:de:fr_FR andLC_MESSAGES=en_GB.UTF-8, LC_ALL not set:mintty tries to find localization files (in this order) forde_CH, français, de, fr_FR, en_GB,then (as generic fallback) fr and en,each in all resource configuration folders (subfolder lang).

Note that Windows may already have localized the default entries of thesystem menu, which makes the system menu language inconsistent becausemintty adds a few items here. Choose Language=en to“reverse-localize” this, as well as the font and colour chooser dialogs.

Choose Language=en_US to change Colour to Color in the menus.

Adding translations to localization

Localization files for various language or language/region codesare looked up in the resource configuration folders, subfolder lang.Mintty uses a simplified gettext file format but not the gettext library;all messages must be encoded in UTF-8, the Content-Type charset is ignored.

To add a new language, copy messages.pot to the desired .po file(including a region suffix if appropriate, like fr_CH) and add themsgstr entries which are empty in the template. The tool poedit maybe used but remember to use UTF-8 encoding.

Note: There is one special pseudo-string in the localization template whichfacilitates scaling of the Options dialog width. It is labelled“__ Options: dialog width scale factor (80..200)” and its template valueis “100”. If you provide a pseudo-translated value between 80 and 200for it, the Options dialog width will be scaled by that percentage.(The navigation panel remains unscaled.)

Note that & marks in menu item labels define keyboard shortcuts to behandled by Windows. The script keycheck with your .po file as parameterchecks for ambiguous shortcut entries; these are not errors but you mayconsider to reduce ambiguities. Note that a future (or currently patched)version of the uniq tool is needed to cover non-ASCII keyboard shortcuts.

Character information display

Diagnostic display of current character information can be toggledfrom the extended context menu (Ctrl+right-click).

  • Unicode character codes at the current cursor position will then be displayed in the window title bar. (Note that mintty may precompose a combining character sequence into a combined character which is then displayed.)
  • Unicode character names will be included in the display if the unicode-ucd package is installed in /usr/share (or the file charnames.txt generated by the mintty script src/mknames is installed in the mintty resource subfolder info).
  • Emoji sequence “short names” will be indicated if Emojis display is enabled.Note that the “normal” window title setting sequenceand the character information output simply overwrite each other.

User-defined behaviour

Mintty supports a few extension features:

  • Application-specific drag-and-drop transformations (option DropCommands)
  • User-defined commands and filters for context menu (option UserCommands)
  • User-defined functions for key combinations (option KeyFunctions)
  • User-defined function entries for system menu (option SysMenuFunctions)

See the manual page for details.

Terminating the foreground program

As an example for a user-defined command, that is not used for filteringtext in this case, assume the user wants a menu option to terminate theterminal foreground process (in case it is stalled). This can be done byincluding a user command:

How To Open Cygwin

Running mintty stand-alone

Cygwin Windows Is Searching For Mintty Missing

To install mintty outside a cygwin environment, follow a few rules:

  • Compile mintty statically.
  • Install mintty.exe together with cygwin1.dll and cygwin-console-helper.exe.
  • Call the directory in which to install mintty and libraries ‘bin’.

Bundling mintty with dedicated software

Cygwin Windows Is Searching For Mintty

To bundle an application which is not natively compiled on cygwin with mintty,some way of bridging the terminal interworking incompatiblity problems(pty incompatibility problem andcharacter encoding incompatibility problem)needs to be integrated. A generic solution is winptyor its WSL-specific variant ʻwslbridge’.For software that is aware of Posix terminal conventions, it may be a feasiblesolution if the software detects a terminal and its character encoding bychecking environment variable TERM and the locale variables and invokesstty raw -echo to enable direct character-based I/O and disablenon-compatible signal handling. For this purpose, stty and its librarydependencies need to be bundled with the installation as well.

I just installed cygwin in my windows7 pc. After installation when i click on 'Cygwin Terminal' from start menu it shows a message like this - message title: Missing Shortcut 'Windows is searching for mintty. To locate the file yourself, click Browse' with two buttons below 'Browse' and 'Cancel'.Then if I select mintty.exe manually from 'C:cygwinbin' by clicking Browse button it doesn't load anything. How can I be get rid of this?

Alamin HossainAlamin Hossain

4 Answers

Open the Cygwin Terminal properties (by right click on the icon and go to properties) check the path of 'mintty'. If everything looks right and it is still giving error, change the 'mintty' to 'mintty.exe'. This solved my problem.

RChatRChat

For Installing Cygwin follow the steps given here-

-Link is now dead-http://www.news.amigowork.com/how-to-install-unix-in-windows/

if problem is still there

then

go to installation directory and open Cygwin.bat

or

go to bin folder of installation directory and open mintty.exe.

it will solve your problem.

adarshadarsh

I had installed cygwin in e drive. But the path (in property, by right click on icon )showed c drive. When i changed it to e, the problem went away. It was on Windows 7 and cygwin installation was latest on 4th Jan 2018.

qqqqqqqqqq

Open the Cygwin Terminal properties (by right click on the icon and go to properties) check the path of 'mintty'. If it is not as per your minty(you will get it inside bin folder) location change it.

Anurag MishraAnurag Mishra

Not the answer you're looking for? Browse other questions tagged cygwin or ask your own question.

This entry was posted on 5/15/2019.