X Windows: Remote X to Windows with Xming: Difference between revisions
(ADDED: Category) |
(ADDED: Enable X11Forwarding to sshd_conf) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
===Plain Ol' Vanilla Remote X Session=== | |||
1) Install Xming '''and''' Xming-fonts | 1) Install Xming '''and''' Xming-fonts | ||
* Download from sourceforge.net/projects/xming[http://sourceforge.net/projects/xming/] | * Download from sourceforge.net/projects/xming[http://sourceforge.net/projects/xming/] | ||
Line 11: | Line 13: | ||
4) Start the connection: | 4) Start the connection: | ||
Connect to the Linux machine via ssh/telnet/rlogin/whatever and run: | Connect to the Linux machine via ssh/telnet/rlogin/whatever and run: | ||
DISPLAY=WINDOWS_IP:0;export DISPLAY;APPLICATION_YOU_WANT_TO_RUN | DISPLAY=WINDOWS_IP:0;export DISPLAY;APPLICATION_YOU_WANT_TO_RUN & | ||
EXAMPLE: DISPLAY=192.168.1.10:0;export DISPLAY;xterm | EXAMPLE: DISPLAY=192.168.1.10:0;export DISPLAY;xterm & | ||
5) Minimize the telnet session, do not close it. If you close it, your X connections will close.<br> | 5) Minimize the SSH/telnet session, do not close it. If you close it, your X connections will close.<br> | ||
<br> | <br> | ||
<br> | <br> | ||
---- | ---- | ||
''' | ===Remote X11 Over SSH=== | ||
'''On the remote machine (Linux):'''<br> | |||
1) Ensure that X11Forwarding is enabled in /etc/ssh/sshd_conf on the remote machine. | |||
'''On the local machine (Windows):'''<br> | |||
2) Install Xming '''and''' Xming-fonts | |||
* Download from sourceforge.net/projects/xming[http://sourceforge.net/projects/xming/] | |||
3) Add the Linux machine's DNS name(s) and IP address to the C:\Program Files\xming\X0.hosts file. File should contain: | |||
LinuxBox.mydomain.com | |||
LinuxBox | |||
192.168.1.25 | |||
4) Start Xming on your Windows machine '''(NOT XLaunch)''' | |||
5) Install Putty (if it's not already installed) onto your Windows machine. | |||
* Download from www.chiark.greenend.org.uk/~sgtatham/putty/[http://www.chiark.greenend.org.uk/~sgtatham/putty/] | |||
6) Open putty and fill in the “Host Name” box. | |||
7) Ensure that SSH is checked and that the port is correct (probably 22). | |||
8) Under Category > Connection > SSH > X11 check the “Enable X11 forwarding” box. | |||
9) Click the “Open” button to start the connection. | |||
10) Log into the remote machine as you would do in a normal SSH session. | |||
11) Start the X application from the command line, a window should open on your local machine with the application. | |||
12) Minimize the SSH session, do not close it. If you close it, your X connections will close. | |||
(It's a regular SSH session with putty but with X11 forwarding enabled.) | |||
---- | |||
===PROBLEMS=== | |||
'''PROBLEM:''' "Xlib: connection to YOUR_IP refused by server"<br> | '''PROBLEM:''' "Xlib: connection to YOUR_IP refused by server"<br> | ||
Line 39: | Line 80: | ||
'''PROBLEM:''' Cannot connect to Xming and I have checked all of the above.<br> | '''PROBLEM:''' Cannot connect to Xming and I have checked all of the above.<br> | ||
'''FIX:''' When starting Xming as display 0, Windows Firewall does not complain. Check to see if Windows Firewall is blocking the connection.<br> | '''FIX:''' When starting Xming as display 0, Windows Firewall does not complain. Check to see if Windows Firewall is blocking the connection.<br> | ||
[[Category:Tutorials]] | [[Category:Tutorials]] |
Latest revision as of 13:40, 30 August 2012
Plain Ol' Vanilla Remote X Session
1) Install Xming and Xming-fonts
* Download from sourceforge.net/projects/xming[1]
2) Add the Linux machine's DNS name(s) and IP address to the C:\Program Files\xming\X0.hosts file. File should contain:
LinuxBox.mydomain.com LinuxBox 192.168.1.25
3) Start Xming on your Windows machine (NOT XLaunch)
4) Start the connection: Connect to the Linux machine via ssh/telnet/rlogin/whatever and run:
DISPLAY=WINDOWS_IP:0;export DISPLAY;APPLICATION_YOU_WANT_TO_RUN & EXAMPLE: DISPLAY=192.168.1.10:0;export DISPLAY;xterm &
5) Minimize the SSH/telnet session, do not close it. If you close it, your X connections will close.
Remote X11 Over SSH
On the remote machine (Linux):
1) Ensure that X11Forwarding is enabled in /etc/ssh/sshd_conf on the remote machine.
On the local machine (Windows):
2) Install Xming and Xming-fonts
* Download from sourceforge.net/projects/xming[2]
3) Add the Linux machine's DNS name(s) and IP address to the C:\Program Files\xming\X0.hosts file. File should contain:
LinuxBox.mydomain.com LinuxBox 192.168.1.25
4) Start Xming on your Windows machine (NOT XLaunch)
5) Install Putty (if it's not already installed) onto your Windows machine.
* Download from www.chiark.greenend.org.uk/~sgtatham/putty/[3]
6) Open putty and fill in the “Host Name” box.
7) Ensure that SSH is checked and that the port is correct (probably 22).
8) Under Category > Connection > SSH > X11 check the “Enable X11 forwarding” box.
9) Click the “Open” button to start the connection.
10) Log into the remote machine as you would do in a normal SSH session.
11) Start the X application from the command line, a window should open on your local machine with the application.
12) Minimize the SSH session, do not close it. If you close it, your X connections will close.
(It's a regular SSH session with putty but with X11 forwarding enabled.)
PROBLEMS
PROBLEM: "Xlib: connection to YOUR_IP refused by server"
FIX: Check the Xming log, it probably contains "Xming.exe: client 4 rejected from IP YOUR_IP". If so,
- close Xming
- Make sure that the DNS names and/or IPs are in the C:\Program Files\xming\X0.hosts file
- restart Xming
FIX2: If problem is not fixed, restart Xming with the -ac option.
PROBLEM: The application starts but then I get a font error(s).
FIX: Install the Xming-fonts onto your Windows box.
PROBLEM: When starting Xming, a Windows Security Alert pops up saying Windows Firewall has blocked this program.
FIX: Change Windows Firewall setting to allow Xming.
FIX2: Disable Windows Firewall by going to Services, setting Windows Firewall to MANUAL START and then stop the service.
PROBLEM: Cannot connect to Xming and I have checked all of the above.
FIX: When starting Xming as display 0, Windows Firewall does not complain. Check to see if Windows Firewall is blocking the connection.