X Forwarding for Mono Application

0

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 5.4.0.167 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?

millinon

Posted 2017-10-03T19:42:00.767

Reputation: 103

Have you tried maximizing the application from the task bar? – Eugen Rieck – 2017-10-03T19:45:05.453

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 – 2017-10-03T19:50:39.147

Details in my answer. – Eugen Rieck – 2017-10-03T20:12:35.030

Answers

0

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.

Eugen Rieck

Posted 2017-10-03T19:42:00.767

Reputation: 15 128