info home Info Homegeneral Generalwindows Windowsunix linux Linux/Unixdebian Debianmac os Mac OSapache Apachenginx Nginxiphone iPhone/iPod Touch

Tags

How to handle X11 Forwarding using SSH

If you need to use X applications/GUI over a remote SSH connection via PuTTY, this tutorial is for you.

What you need

Configure Xming

  1. Click on the Start button in Windows XP, select Xming → XLaunch
    At the Display settings dialog box, select Multiple windows and set the Display number as 0. Click on Next.
  2. Keep clicking on Next button till you reach the Finish configuration page, then click on the Finish button.

Configure PuTTY

  1. Start PuTTY.
  2. In the PuTTY Configuration section, on the left panel, select Connection → SSH → X11
  3. On the right panel, click on the Enable X11 forwarding checkbox
  4. Set the X display location as :0.0
  5. Click on Session option on the left panel.
  6. Enter the hostname or IP address in the Host Name textbox
  7. Save the session.

Running the X applications from PuTTY

Running X apps as root

This requires a little tweak. Suppose your regular user home directory is /var/home/arul and the root user home directory is /root

Troubleshooting

If you're not able to open any X apps from the session, you may need to enable X11 SSH Forwarding in the /etc/ssh/ssh_config file

Last Updated on 2008

If you liked this article, subscribe to our Feed, follow us on Twitter (@aruljohn) and/or join our Facebook Page.