Todd Smith Org

October 10, 2009

Run Windows Application on Desktop from Cygwin SSHD

Filed under: Network Monitoring,Windows Administration — admin @ 3:47 am

Tags: Nagios, Nexus Director, Event handler, Windows, Cygwin, OpenSSH

I needed to run a program via SSHD on Windows

1) Run Cygwin Installer from www.cygwin.com

2) Install OpenSSH, OpenSSL, vi

3) Double click Cygwin on desktop

chmod +r /etc/passwd /etc/group
find /var -type d -exec chmod -v 755 {} \;
ssh-host-config
net start sshd

4) Open your Windows Control Panel –> Administrative Tools –> Services, find the “CYGWIN sshd” item. Right click on it and choose “Properties”. Click on the second tab (Log On), and choose “Allow service to interact with desktop”, then click “OK” to save the change.

5) Restart SSHD

net stop sshd
net start sshd

5 Comments »

  1. a good article. I followed the article, it can’t work. It can display if I call the windows program like notepad.exe in cygwin bash console. But if I call the windows program from ssh client, it popup a rectangle and nothing is in it.

    I’m under winxp sp2 with cygwin1.7.

    any idea?

    Comment by tocer — January 30, 2010 @ 8:37 am

  2. Try searching google for “allow service to interact with desktop” XP SP2

    Somehow that rings a bell.

    Comment by admin — January 30, 2010 @ 8:46 am

  3. Thanks for your reply.

    I don’t find any userful message by google. Do you mind telling me what win os you use?

    Comment by tocer — January 31, 2010 @ 8:03 am

  4. At the time of writing I was using XP SP2 I believe. These days I am using another method (NRPE) for executing programs remotely. This was primarily for the purpose of executing scripts and other programs to check the status or get output of various counters from running software or the operating system.

    Comment by admin — January 31, 2010 @ 8:32 am

  5. Do you mean that http://sourceforge.net/projects/nrpent/ ? It sounds good. I’ll try it sooner. I also just find a tool for the similar purpose, called psexec (http://technet.microsoft.com/en-us/bb897553.aspx). But I don’t try it yet.

    I’d like to get more detail about your experience of the NRPE, or psexec maybe :)

    Thans for your responses.

    Comment by tocer — January 31, 2010 @ 8:50 am

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress