Windows – Launching programs remotely via SSH on Windows 7

remote accesssshwindows 7

I've installed freeSSHd server on Windows 7. It works fine but when I try launching any graphical executables via SSH, e.g. "C:\Program Files\GIMP 2\bin\gimp-2.8.exe" or start /d "C:\Program Files\GIMP 2\bin" gimp-2.8.exe, Gimp starts in the background and no windows are displayed. I can see the program running in the Windows Task Manager, though. I am connecting to the host from an OpenSSH client running Debian.

  • Why are graphical applications not visible to the user when launched from an SSH session?
  • How can I launch a graphical application from an SSH connection so that the user logged into the host PC can interact with it?

Best Answer

I'm not familiar with freeSSHd, but it most likely runs as a service. Starting with Windows Vista, services no longer share the same "session" with the logged on user, so any graphical application that is started by a service will be displayed in a separate session and will be invisible to the logged on user.

You should use the runas command when launching GIMP and specify the username and password of the user logged into the host PC. This will make GIMP start in the logged on user's session so that they can see and interact with it.

runas /user:username "C:\Program Files\GIMP 2\bin\gimp-2.8.exe"
Related Question