I'm having some issues getting a Mono application with a WinForms GUI to work over a SSH connection with X11 forwarding enabled.

The machine I'm sitting at is a Windows 10 laptop. I have both Xming and Vcxsrv installed. The machine I'm connecting to is a VM running Ubuntu 16.10. I'm connecting from the laptop to the VM using KiTTY. I have the 'Enable X11 forwarding' checkbox selected in the KiTTY configuration for the connection. I'm using Mono version on the VM.

When I connect to the VM and run an X application like xeyes or Firefox (while Vcxsrv is running on the laptop), the application window opens (in the background) and, once brought to the foreground, functions as expected.

However, when I run a Mono application (for example, the application on this page) that is supposed to open a graphical interface, the behavior is not as expected. The Windows taskbar shows that the X application is open, and hovering over the taskbar icon even shows the (expected) user interface in the preview. However, clicking on the taskbar icon does not bring the user interface to the foreground; the user interface does not show up at all, even if I minimize all other open applications. The behavior is the same when I use Xming instead of Vcxsrv on the laptop.

Is there a known incompatibility between the Mono X11 driver and Vcxsrv / Xming? What's a good way to debug this issue?

  • Have you tried maximizing the application from the task bar? – Eugen Rieck Oct 3 '17 at 19:45
  • I didn't think to try that - it worked, thank you! I'm still curious why it didn't work without maximizing the application. – millinon Oct 3 '17 at 19:50
  • Details in my answer. – Eugen Rieck Oct 3 '17 at 20:12

Some window managers have trouble with changing screen resolutions - this might lead to windows being drawn off the screen in some cases: Remote X is one of those, unplugging a monitor is another.

By maximising a Window (or moving the window to the visible area) you can fix it, most of the time permanently.

BTW: It has nothing to do with mono.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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