I do my day-to-day work on Windows 7 (no, that's not going to change) and often need to work with Linux running on Parallels. Switching between Windows and Linux desktops is a pain, so I've installed Cygwin+Xming (less complicated than CygwinX). I open a Cygwin command line using mintty, then do ssh -Y to get a Linux command line. Doing "vim" on the Linux command line causes the vim window to appear on my Windows desktop.

This is great, except that the new vim window doesn't automatically grab the focus, which stays with the mintty window. Years of habit cause me to start typing immediately without clicking on the new window. Having to switch manually is very jarring. Any way to make it automatic?

  • Sounds like a Xming problem, doubt if there is any solution to it, try a bug report for them to fix. Jun 7, 2012 at 21:10
  • Even if xming is stupid about focus, there ought to be some X command for directing the focus to a specific window. Jun 15, 2012 at 18:37
  • Is it just VIM that doesn't get focus, or other things? There is a cygwin mailing list. [email protected] you may need subject "subscribe" And if you scroll down to the bottom of this page cygwin.com/lists.html there's an option to choose a cygwin related mailing list and subscribe to it.
    – barlop
    Sep 13, 2012 at 10:56
  • @barlop - it's not realted to cygwin at all, it's purely Xming issue.
    – cji
    Nov 6, 2012 at 1:08
  • 2
    Five years, and no answer. FWIW, this is still a problem.
    – Jon Watte
    Sep 8, 2017 at 17:48

1 Answer 1


If you are using Xming X server, you may also connect via Putty and focus will be directed to the vim window.

I use that on Windows to open Emacs.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .