mRemoteNG
mRemoteNG copied to clipboard
External Tool opens behind mRemoteNG window
Hi! External Tool (winbox in my case) opens behind mRemoteNG window when I double click on Connection. But when I right click on Connection and chose External Tool submenu and click on externel tool (winbox) - it opens on top of the mRemoteNG window as it should. The Connection Protocol is set to External Tool / Winbox in Connection properties.
Expected Behavior
External Tool should open on top of mRemoteNG window when I double click on Connection.
Current Behavior
External Tool (winbox in my case) opens behind mRemoteNG window when I double click on Connection. It seems It happens only if at least one RDP connection already opened in a tab.
Possible Solution
Have no idea how can it be fixed.
Steps to Reproduce (for bugs)
- Set up a new Connection with hostname, login and password.
- Configure External tool to start C:\Program Files\winbox.exe with these arguments: %HOSTNAME% %USERNAME% %PASSWORD%
- Set Protocol to External Tool / Winbox in Connection properties
- Open any RDP connection in a new tab.
- Double click on a new winbox Connection and it will be opened behind mRemoteNG.
Context
Every time I have to minimize mRemoteNG manually after connecting to winbox.
Your Environment
- Version used: 1.76.11.40527
- Operating System and version (e.g. Windows 10 1709 x64): Windows 10 1809 x64
Just one more clarification. I have niticed that this bug occurs if some rdp connection is already opened. If you close all connections (all tabs) and open winbox - it opens as it should, on top of mremote window.
@Kvarkas I had a look:
- Small unrelated? buggy code found - The following code is incorrectly using the bitwise
|instead of the logical||.
In ExternalToolsToolStrip.cs line 103: if (selectedTreeNode != null && selectedTreeNode.GetTreeNodeType() == TreeNodeType.Connection | selectedTreeNode.GetTreeNodeType() == TreeNodeType.PuttySession)
I don't think that will solve the problem, but it's worth correcting that if you can. It's just a quick improvement.
- Background:
OnMouse_DoubleClickis probably the handler in question in ConnectionTree.cs line 466.
- This goes through a design time dependency injection pattern thing and eventually gets to
OpenConnectionClickHandler.Execute. - This calls
IConnectionInitiator.OpenConnectionwhich is directly linked toConnectionInitiator.OpenConnectionin ConnectionInitiator.cs - This calls
OpenConnectionin the same class, which creates an instance ofIntegratedProgram(ProtocolBase), thenConnectis called on this. - For an External Program it ends up calling ExternalTool ... eventually getting to StartExternalProcess.
- Background:
nItem.Clickis likely the event emitter in ConnectionWindows.cs.
- This calls ExternalTool.cs
ExternalTool.Start - This then directly calls StartExternalProcess
- For an Integrated Process, it has to build its own ConnectionInfo. It creates a new blank
ConnectionInfothen sets 4 fields directly.
- I don't see any obvious reasons why the variations between [2] and [3] could result in the buggy experience.
@merarischroeder well spotted! Has bin fixed, thanks
Hi Guys, I am having an issue with this where the password I am entering into the Password field, obviously isnt being carried across correctly as when I execuite the session Winbox opens but fails to login as the password is incorrect, if I manually re-type it into the opened Winbox winodow I can login sucessfully.
Hi Guys, I am having an issue with this where the password I am entering into the Password field, obviously isnt being carried across correctly as when I execuite the session Winbox opens but fails to login as the password is incorrect, if I manually re-type it into the opened Winbox winodow I can login sucessfully.
could you please mentioned version you have iisues with?