Remote Shell Extension

Remote Shell Extension integrates Linux servers in the Windows shell using COM, the X Window System, Samba, ssh and duct tape. Programs on Linux or Linux-like OSes can be run by doubleclicking in Windows Explorer.

RSE also has an "Remote terminal here" option for directories on a Samba share, similar to the Windows power toy "Command Prompt Here", but on the remote host. Shortcuts can be created by right-dragging a file or directory.

The program can be configured with a property sheet for network drives or a control panel applet.

Required software

RSE needs Samba on the Unix host, and Cygwin ssh and the Cygwin X server on the Windows PC. RSE does not (currently) work on 64 bit Windows.

Cygwin configuration

RSE is much more usable if ssh is set up to log in on the server without asking for at password.

If you get an error about "no xauth data" execute this from a cygwin command line: "xauth generate :0 ." (the final "." is part of the command).


RSE is a context menu shell extension that takes over the default action (doubleclick), and it loads every time anything is clicked in Explorer. I have tried to make sure it does not crash Explorer or such, but if it does break Explorer it might be difficult to get rid of it.

Run the installation program as an Administrator. This creates registry entries and icons, and copies the program files to the RSE folder in the Program Files directory.

RSE can be uninstalled using the Add/Remove Programs control panel applet. This also removes runx.exe, which is used by any shortcuts created by RSE. It does not remove user configuration in the registry (HKCU\Software\RSE).

Windows may ask for the machine to be rebooted if RSE is reinstalled or updated. This is because rse.dll can't be replaced since it is loaded all the time (the other files may also be loaded). This may be avoided by uninstalling RSE before reinstalling and logging off and on.

How it works

When a file is double- or right-clicked, rse.dll checks whether it is a local file or on a network drive. Then it queries the server for the pathname of the share on the remote host and checks that it is a Samba server.

The file is analyzed to see if it is an executable and if so, whether it is an X application or needs a terminal window.

RSE starts the program runx.exe (or creates a shortcut to it) with the server name, the name of the user logged on to the Samba server, and the filename as arguments.

Runx starts ssh and executes the appropriate command on the remote machine. Output from the program (up to 4 K) is captured and shown it in a message box when the ssh session terminates.

The runx process can be stopped from the task manager. This will also stop the program that was started on the server.

Command line syntax for runx

runx [-q] [-t] [-k] [user@]servername pathname [arguments]

options are
-q suppress error messages from the program
-t run program in terminal window
-k keep terminal window open after exit

If the last character of the pathname is a slash it is ssupposed to be a directory, and runx will start an xterm in this directory.