Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to ssh into my Windows box running Cygwin sshd and run the Windows GUI application in that Windows box. I don't want X forwarding.

e.g. From ubuntu-server terminal, I ssh into Windows running sshd and then I launch a notepad.exe. The notepad.exe will display in Windows, not in ubuntu-server without X windows.

share|improve this question
up vote 9 down vote accepted

The proper method seems to have some issue:

Reinstall 'sshd' specifying the '-i' flag to 'cygrunsrv' or edit the current service under "Administrative Tools"->"Services" and check "Allow service to interact with desktop" in the "Log On" tab of the service's "Properties".

So I try some hack. I create a cygwin_screen.cmd and put it in the Windows Startup folder.

@echo off 
chdir C:\cygwin\bin
bash --login -i "/home/username/bin/" is simple and it will make sure that we have the screen to attach to.

screen -dmS "my_screen"

Now I can remote login to Windows from ssh client and attach to that screen when I want to run the Windows GUI application.

$screen -d -r my_screen

$cygstart my_doc.doc
share|improve this answer
This solution works for me, but when I detach again, the client screen process hangs. I must ctrl-z out, and kill the process. Creating the daemon in one context (on the windows box), and attaching from another (ssh login) seems to create this problem. Creating and then attaching from my ssh connection doesn't cause the conflict. – Tim Rupe Feb 27 '15 at 22:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .