X11 forwarding with Bitvise SSH Client
The X11 forwarding feature in Bitvise SSH Client provides one way for an SSH connection to access graphical applications running on the SSH server. X11 forwarding is an alternative to forwarding a Remote Desktop or VNC connection. It differs from Remote Desktop or VNC in that remote application windows appear seamlessly in the client's desktop, without forwarding a complete desktop. X11 forwarding is best used with Unix-style servers running applications intended to run under X11. For connections to Windows servers, Remote Desktop is the native option.
Installing an X11 server
In order to use X11 forwarding, an X11 server needs to be installed on the client. One such server is available as part of Cygwin.
To install the Cygwin X11 server without installing the entire (and large) Cygwin platform, perform the following steps in the Cygwin installer:
- Proceed to the Select Packages page. On this page, you should see a package tree with All - Default as the root.
- To prevent installing packages selected by default, cycle All - Default by clicking on the Default part until it is set to All - Uninstall. (screenshot)
- Find the package All / X11 / xorg-server: X.Org X servers and select it by changing Skip at the beginning of the line to the current stable version - that is, the first version after Skip. (screenshot)
- Proceed to the next page and complete the installation.
Starting the Cygwin X11 server
You can start the Cygwin X11 server by executing:
C:\cygwin\bin\XWin -listen tcp -multiwindow
If the X11 server starts successfully, a new X-resembling icon will appear in the task bar notification area (the system tray). To close the X11 server, right click on the icon and select Exit from the right-click menu.
If the X11 server fails to launch, an error message will be displayed. A common failure reason is that an X11 server is already running. It is possible to run multiple X11 servers on the same computer, but each will need to be associated with a unique display number. For example, to start the X11 server on display 3, you would execute:
C:\cygwin\bin\XWin :3 -listen tcp -multiwindow
Note: We do not recommend opening the firewall for the X11 server (the XWin.exe process).
Setting up Bitvise SSH Client
In the SSH client's Terminal tab, enable X11 forwarding. If your X11 server runs on a non-default display (a display other than 0), the setting X11 Forwarding - Display will need to be changed, as well. For example, if your X11 server runs on display 3, change the setting to: 127.0.0.1:3.0.
Use the Login button to establish an SSH connection. Open a terminal console, and in it, run an X11 program (e.g. xemacs). The program should appear in a new window on your screen.