remote-access – Lightweight Way to Start an Application on Remote Win7 Machine from Linux

linuxprocessremote-accesswindows 7

I am trying to find a lightweight way to start an application on a remote Windows7 machine from linux.

The following are my boundary conditions:

  • The Windows7 system is located in the same subnet on the same LAN as the Linux machine.
  • If needed, a local user account with administrator privileges is available on that machine and the password is known.
  • The application which should be started on the windows machine needs to show a Window. It is not just a process.
  • No further interaction should be necessary on the windows7 system.
  • I don't want to install a full blown cygwin on that system.
  • I tried to use the linux equivalent of psExec (winexe) but I still needed to acknowledge some warning on the windows7 machine.

Using psExec from another windows7 machine works, but I have to start a process on the windows machine from a linux host.

Edit:

I am free to install additional software, but I don't want to install mysys or cygwin.

The application needs to start immediately (that is as soon as the linux machine triggers the "start the application"). IMO polling isn't an option.

As I found out, the warning windows7 shows when it should invoke a command from winexe is a feature called "session 0 isolation" and haven't found a way to turin it off.

Best Answer

RSHD will do exactly what you are looking for. It can run in the context of the currently logged on user, and listens on a port for incoming connections from pre-authorised hosts. You could send a command (e.g. calc.exe) and have the app appear on the user's desktop.

Note that there are many implementations, and I wouldn't like to recommend one over another, some run as a service, but you will probably need to find one that runs in the context of the logged on user to do what you are asking.

Edit in response to the comment:

I've used this one in the past to do exactly as you are asking. It's lightweight, just a standalone binary.

Firstly, on the windows PC create a rhosts file and save it as c:\windowsrhosts (note this isn't a typo, this file exists in the root of the C: drive). The file should contain the FQDN of the remote linux computer you are going to connect from, followed by the username, e.g.

remotepc.example.com bryan

Next, create a batch file that executes on logon, with the following command

rshd.exe -d

This will leave a command prompt window, which you can minimise.

Download a RSH client on your Linux PC (I've only tested using a Windows RSH client)

I've just tested, and have launched calc using the following command

rsh windowspc.example.com -l bryan calc

...and up popped calc.exe on the Windows desktop.