Win32-OpenSSH icon indicating copy to clipboard operation
Win32-OpenSSH copied to clipboard

Mouse Events Support for Win32 console applications

Open nkrepo opened this issue 3 years ago • 1 comments
trafficstars

"OpenSSH for Windows" version 8.6.0.0

Server OperatingSystem OS Name Microsoft Windows 11 Pro Version 10.0.22000 Build 22000

Client OperatingSystem OS Name Microsoft Windows 11 Pro Version 10.0.22000 Build 22000

What is failing Mouse events in native Win32 console applications (far manager, micro, e.t.c)

Expected output Mouse events send over ssh to the Win32 console application

Actual output No mouse events pass-through

nkrepo avatar Dec 02 '21 09:12 nkrepo

There is a workaround for this issue. You can use vtm to get full functionality of the Win32 Console Subsystem (including truecolor, native mouse and keyboard support) on remote Windows via OpenSSH.

For example:

  • Remote host (SSH server @win8host)
    • Windows 8 (yep, it works with it) with running OpenSSH Server
    • Place vtm.exe somewhere (e.g. C:\Program Files\vtm)
    • Make sure that the user you will be connecting to has permission to access via SSH (e.g. Administrators membership)
    • Add the location of vtm.exe to PATH environment variable (if you want to avoid vtm's full path typing)
  • Local host (SSH client)
    • any Terminal
    • OpenSSH Client installed
    • Add the location of vtm binary to PATH (to simplify access to)

Type the following command in terminal on local Windows host:

vtm ssh user@win8host vtm

And you will get a remote text console with true colors, native mouse and keyboard support, as if running locally:

https://github.com/directvt/vtm/assets/11535558/c4144bd3-4e5c-4349-a893-06e2935deaf9

If you want to remotely run a standalone Win32 console application, that's also not a problem.

For example, launching a standalone instance of Far Manager via SSH:

vtm ssh user@win8 vtm -r term far

or (if you don't like extra UI)

vtm ssh user@win8 vtm -r headless far

https://github.com/PowerShell/Win32-OpenSSH/assets/11535558/3e636b3d-0588-4fe9-a3c9-2b626d79d068

o-sdn-o avatar Dec 02 '23 21:12 o-sdn-o