Cygwin tmux: "failed to connect to server: No error"
Just as the title says, whenever I try to start tmux in Cygwin 64-bit (Win7), with any or no arguments besides --help
, I get the following error:
$ tmux
failed to connect to server: No error
I can't reproduce this on Linux. Any help would be greatly appreciated.
Thanks!
Solution 1:
This works for me too on 32-bit Win7. But I need to delete the directory every time before launching tmux so I just added an alias to .bashrc.
alias tmux='rm -rf /tmp/tmux* && tmux'
Solution 2:
The alias method suggested by bender doesn't really work if you're trying to reattach, because it kills the existing session(s). The following seems to have solved the problem for me:
Save the Perl script at http://pastebin.com/nN6zX37K to "~/bin/tmux" or elsewhere in your path, ahead of /usr/bin.
Give it execute permissions: "chmod +x ~/bin/tmux".
Exit and reopen Cygwin.
Run tmux commands normally.
This works because it detects the state where tmux has closed entirely but did not remove its temporary directory, which it solves by removing the temp directory (as suggested by bender), but then runs the desired command.