Run Graphic Software on your Linode with X-Forwarding on Ubuntu 12.04

Select distribution:
Traducciones al Español
Estamos traduciendo nuestros guías y tutoriales al Español. Es posible que usted esté viendo una traducción generada automáticamente. Estamos trabajando con traductores profesionales para verificar las traducciones de nuestro sitio web. Este proyecto es un trabajo en curso.
Deprecated

This guide has been deprecated and is no longer being maintained.

Create a Linode account to try this guide with a $ credit.
This credit will be applied to any valid services used during your first  days.

On occasion you may want to run an application that requires a graphic interface from your Linode. By using X forwarding, this is easy to accomplish.

Note
This guide is written for a non-root user. Commands that require elevated privileges are prefixed with sudo. If you’re not familiar with the sudo command, you can check our Users and Groups guide.

Install X11 on your Linode

  1. Before we begin, make sure your Linode’s software is up to date:

    sudo apt-get update
    sudo apt-get upgrade
    
  2. One of the great things about using a Linux distribution with a dependency-aware package manager is that you can just install the application you want to run, and it will make sure you have all the required software. If you’re installing a graphic utility, that will include X. For now, let’s install xauth, which is required for X to authenticate through the SSH session:

    sudo apt-get install xauth
    

Install X11 on the Client

Linux

If you’re using a Linux desktop environment on your local PC, you already have X11 running.

Mac

Apple contributes to the development of XQuartz, an X11 server designed to run on OS X. Download the software here and follow the installer’s instructions.

Windows

There are several pieces of software available that can provide an X server on Windows. We’ve listed the most notable options below:

  • Cygwin/X - Cygwin provides a Unix-like shell to Windows and can support an X server as well.
  • MobaXterm - MobaXterm is an all-in-one tool for accessing remote systems across multiple protocols.
  • Xming - Unlike the previous two, Xming is just the X server itself. It is designed to be a lean standalone system and touts portability.

It’s up to you to choose the software that best suits your needs.

Connect

Connecting from a Linux or OS X client requires adding one extra parameter to your SSH command, the -X flag:

ssh -X root@12.34.56.78

Connecting from a Windows machine will depend on what software you have chosen. Please refer to the software documentation for instructions on initiating an SSH connection with X forwarding.

Test

  1. First, lets install a simple graphic application to test with:

    sudo apt-get install x11-apps
    
  2. Run the following command to launch a program that watches your cursor:

    xeyes
    
  3. Now, let’s try something a bit bigger. The following commands will install and launch Mozilla’s Firefox web browser from your Linode:

    sudo apt-get install firefox
    firefox &
    

Note
More intense graphic software may lag when running in this fashion. Using a Linode in a data center geographically close to you can help reduce latency.

More Information

You may wish to consult the following resources for additional information on this topic. While these are provided in the hope that they will be useful, please note that we cannot vouch for the accuracy or timeliness of externally hosted materials.

This page was originally published on


Your Feedback Is Important

Let us know if this guide was helpful to you.


Join the conversation.
Read other comments or post your own below. Comments must be respectful, constructive, and relevant to the topic of the guide. Do not post external links or advertisements. Before posting, consider if your comment would be better addressed by contacting our Support team or asking on our Community Site.
The Disqus commenting system for Linode Docs requires the acceptance of Functional Cookies, which allow us to analyze site usage so we can measure and improve performance. To view and create comments for this article, please update your Cookie Preferences on this website and refresh this web page. Please note: You must have JavaScript enabled in your browser.