"tmux open terminal failed: not a terminal" in terminal emulators other than mintty

Kacper Michajlow kasper93@gmail.com
Sat May 16 19:35:25 GMT 2020

On Fri, 27 Mar 2020 at 21:15, Michael Wild via Cygwin <cygwin@cygwin.com>

> Hi
> As the maintainer of the tmux Cygwin package I have to admit that I have no
> idea how to fix this. Sorry.


I did take a look how tmux works and what is going on in Cygwin. Here is
short summary of my findings.

* Tmux sends each client stdio fd to the server through socket. Cygwin does
not support passing file descriptors over to other processes so this fails.
* Tmux has a hack for Cygwin where it opens tty by name provided by

And now there are two cases:

1. When there is no pseudo terminal. cmd.exe, (WT and most other terminal
emulators out there)
* Tmux server will try to open /dev/cons<N> by name provided by client, but
this fails with ENOENT, because server process doesn't see this device.

2. When there is allocated pseudo terminal
* Tmux server will try to open /dev/pty<N> by name provided by client and
actually work.

Is there a way to make tmux work with /dev/cons<N>? I have seen in docs

/dev/cons1	Console device names are pseudo device names, only accessible
...		from processes within this very console session.  This is due
		to a restriction in Windows.

So it likely means that whatever we do it will not be accessible from
another process.

Is this docs still holds true in latest Windows? I have seen a path to
always allocate pty for native applications, maybe this would actually
resolve this problem too.

Best Regards,

More information about the Cygwin mailing list