Frew Schmidt
Frew Schmidt

Reputation: 9544

How can I run a win32 gui program from cygwin ssh?

I have an (nsis) installer that I am running in silent mode. I'd like to run it via ssh so that I can automatically run our test suite against the installed codebase. Unfortunately when I run the program it just starts and sits there and doesn't actually do anything.

My guess is that this is somehow due to windows services (which ssh is in this case) cannot interact with the desktop. So even though the installer is silent it allocates some object or something and blocks forever.

How can I force the installer to run? Note that it is silent and should not ask for any user input. Is there a way I can say, "run this on a desktop" or something?

Upvotes: 2

Views: 3501

Answers (2)

Nugab
Nugab

Reputation: 1

I had a similar problem trying to launch an interactive program on my 64 bit win 7 machine.

Machines intending to launch programs remotely: Win 8, Ubuntu

Machine running cygwin sshd: win 7

Cygwin sshd is owned by "cyg_server" and not a local user, so I could not check the box "allow service to interact with desktop" (although I heard that checkbox doesn't work anyway).

I solved this problem in a very ugly unelegant way. I used tmux, which is now available on cygwin. On the win7 box I launch a tmux session called "launcher" on bootup.

Later, when I ssh in from another box I send commands to the tmux session. The tmux session is a local user, so it will launch programs interactively.

Upvotes: 0

wes
wes

Reputation: 8215

Try using PsExec from Sysinternals. If you're going to be executing it on the remote machine through ssh, make sure to run it once from the desktop so you can accept the license terms.

Something like PsExec.exe -i -s "full path to program" args should work. -i runs the program in interactive mode on the desktop, and -s runs it under the "system" user so you don't have to punch in user credentials.

Upvotes: 1

Related Questions