1. Installing Xming on Windows
Use the notes on the site of Xming to install it. For this section I've used the Windows installer. There is an optional fonts package you can install as well. After installing the Xming package, you'll need to create an xlaunch file. You can use the Xlaunch program to do it for you or create one manually.
On the server you are connecting to, the following should be installed:
- Working graphical Xorg/X11 environment
- XFCE, KDE, Gnome, openbox, blackbox, ...
- SSHD server
Check if the sshd config contains the X forwarding lines:
cat /etc/ssh/sshd_config ... X11Forwarding yes X11DisplayOffset 10 X11UseLocalhost yes
If you needed to add those, don't forget to restart sshd.
2. Create a launch file
To create a connection file, go to C:\Program Files\Xming and start XLaunch.exe. Choose 1 window for this example. Try the other options later to get feel of what the various options do.
The next screen is "Select how to start Xming". Since the machine is running Xfce, we want to start an xfce4-session over ssh. Select "Start a program".
Enter the session, use Putty (plink), and enter your machine and ssh password.
We opt to use the Clipboard and no OpenGL acceleration this time. First we will try and connect, time enough afterwards to increase performance.
Save the configuration.
3. Launch Xming
In Windows you can double click the launch file to actually start the connection. If this is the first time connection to the server, you might get a popup from ssh asking if you trust the remote machine.
Next we get a popup screen to enter the ssh password again.
The end result is a connection to the graphical environment of the machine over SSH.
From Linux you can connect from your own X environment:
ssh -X user@hostname "xfce4-session"
4. Launch file
This is the content of a launch file. In this case OpenGL is enabled. You could copy and change it to suite your needs.
<?xml version="1.0" encoding="utf-8"?> <XLaunch xmlns="https://www.straightrunning.com/XmingNotes/" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://www.straightrunning.com/XmingNotes/XLaunch.xsd" WindowMode="Windowed" ClientMode="StartProgram" Program="xfce4-session" ClientStart="PuTTY" RemoteHost="myhostname" RemoteUser="user" ExtraSSH="-X" Clipboard="true" WGL="true"/>