PuTTY, mintty and others ChildGui inside ConEmu


‘Child Graphical User Interface’ or ‘ChildGui’ or ‘windowed applications’ are GUI applications which may be started in ConEmu Tabs or Splits. They are drawing their contents themselves using WinApi.

Few examples: PuTTY, mintty, notepad, GViM and so on.

One may run simple ChildGui in ConEmu tabs/splits/panes. This is a ‘side-feature’, ConEmu will acts only as tabbed ‘container’ for these type of applications.

ConEmu can’t control or customize the look of those apps. In most cases console versions are preferred because they are running in the ConEmu ‘native’ mode.

PuTTY and Notepad in ConEmu

There are several limitations

Don’t confuse ChildGui with ConsoleApplications which are specially developed and compiled. ChildGui applications, even they have their own console-like interfaces, are not ConsoleApplications. This is one of the most common console-related delusions. ConEmu acts as simple holder for these ChildGui-s.

Single process, single window

ChildGui support was developed for simple applications. It will not be working with those ones which runs several windows from single process (PID), runs bunch of child processes or reuses single process for new windows.

Child window must be resizeable

Note To be able to ‘integrate’ ChildGui into ConEmu, your application window must be resizeable! For example, if your PuTTY settings locks its window size to certain ‘rows x cols’ values, its window is non-resizeable, and ConEmu will not integrate it into ConEmu’s tabs. Because it is not ‘possible’ to resize that ChildGui when ConEmu window has to be resized! For example, you maximize ConEmu window but child application remains its small size. That will look weird, small framed child window with caption inside ConEmu workspace.

Can’t be controlled by ConEmu

These application process all mouse and keyboard events, draw the contents including selection areas internally. ConEmu can’t control or customize them.

From time to time somebody asks why PuTTY colors do not match ConEmu palette. That is because PuTTY colors must be configured in PuTTY itself.

Hotkeys limitations

One more note about hotkeys. When you are running ChildGui, all keypressed must be passed to that application. That’s why most of ConEmu hotkeys will be inaccessible. With exception of hotkeys types ‘Global’, ‘Local’ and hotkeys with ‘Win’ modifier, if option ‘Install keyboard hooks’ is enabled.

Hotkey workaround

One of most asked question is ‘Why Ctrl-Tab is not working with PuTTY or mintty?’

It isn’t because of hotkeys limitations. Keyboard focus is located in that ChildGui application but not in ConEmu.

But there are few workarounds.

  1. Hotkeys with Win key are working even if ChildGui has focus. But you have to check ‘Install keyboard hooks’ on the Settings › Keyboard to enable this advanced hotkeys processing technique. In that case you may use following hotkeys (look at default keymappings below):
    • ‘Switch next console’ - Win+Shift+Q;
    • ‘Switch previous console’ - unassigned;
    • ‘Activate console by number’ - works too if you choose Win+Numbers hotkey in Keys & Macro and check ‘Win+Numbers - activate console’ on the Settings › Keyboard.
  2. Also there are hotkeys to force focus to be set in ConEmu or ChildGui. When you put focus into ConEmu (default is Win+Z) you may switch tabs by Ctrl+Tab as usual.
    • ‘Switch focus between ConEmu and child GUI application’ - Win+Z;
    • ‘Set focus to ConEmu’ - unassigned;
    • ‘Set focus to child GUI application’ - unassigned.
  3. At last you may still use mouse to switch tabs.

How to run ChildGui in ConEmu

Absolutely the same way you do that for simple ConsoleApplication’s. For example, from ‘Create new console dialog’.

Start ChildGui in Tab

Or with -new_console switch from your shell prompt.

C:> putty -new_console

NB. You can’t run ChildGui from Bash on Ubuntu on Windows.

ChildGui title bar, window and system menu

To make ChildGui applications looks prettier in ConEmu tabs there is an option ‘Hide caption of child GUI windows started in ConEmu’ on then Appearance settings page. It is checked by default, so you will see only child application client area.

Child window menu (for notepad.exe that is ‘File’, ‘Edit’, ‘Format’ and so on) is visible regardless of mentioned option - menu relates to client area.

However child system menu will be invisible and you will not see for example PuTTY’s menu items like ‘Change settings’, ‘Reset terminal’ and so on…

But ConEmu may popup child system menu for you. Call the item ‘Child system menu’ from ConEmu TabMenu and voila.

You may also choose desired hotkey for the action ‘Child GUI window system menu (PuTTY, Notepad, etc.)’.

Download    Donate