Indiana University


ComputerScience






 Home

 Contacts

 Courses

 Academics

 Careers

 Research

 People

 Calendar

 Resources

 Facilities
   FAQ
   System Notices
   Help
   Hardware
   Software
   Network
   Policies
   CSG Staff
   Lindley Hall

CSG FAQ

Q: How do I run X client software remotely from my PC?

The standard used for displaying graphical applications under unix is called the X Window System (or just 'X'). The program running on the local machine that displays the applications is called the X server and the applications (which may be running on the local machine or on some remote server) are called X clients. Therefore, if you are using a machine that doesn't support X natively (such as MS Windows), you will have to run 3rd party software in order to display such applications from remote unix systems. If you fire up an application and get an error like this:
  emacs: Cannot connect to X server 129.79.107.54:0.
  Check the DISPLAY environment variable or use `-d'.
  Also use the `xhost' program to verify that it is set to permit
  connections from your machine.
then the X client is unable to display on your remote system. If you are only having this problem with emacs, please see the associated emacs FAQ entry. If you are having this problem with any other X application, you have a few options.

Here are three ways to display such applications on your Windows system:

  1. Use XLiveCD - You can run the X server from a CD using XLiveCD. This is a very simple and free way to get an X server and it work very well. Just go to the XLiveCD Homepage for all the details.

  2. Install X server software - You can install X server software on your PC to solve this problem. Here are a few options. Cigwin/X is the only free option in the list.

  3. Use VNC - VNC (Virtual Network Computing) is a free product that we recommend very highly. Using VNC, you can create a virtual desktop on the remote unix system and then use the VNC client program running on your PC to display this desktop. Since you can run X clients within the VNC desktop, you can then display them from your PC. Here are the steps to do this:

    1. Install VNC on your PC - Go to the VNC homepage and download the software for your OS and install it per the instructions. You only really need to install the VNC client, but you can install the server as well if you like.

    2. Run the VNC server on the remote unix system - You first need to run the VNC server on the remove unix system. To do this, you simply need to run vncserver (assuming it is already installed on the system, which it should be on any of the CS systems). When you run this, it will ask for a password to use for the session (you will need this password in the next step) and it will tell you the display it is using. For example, if you are using the host tank, it may use a display like tank.cs.indiana.edu:5.

    3. Run the VNC client on the local PC - Run the VNC client program that you installed on your PC. When you do this, you will have to enter the display of the remote system and the password (both from the previous step).

    4. Run the X client on the remote unix system - You are now ready to run the X client program on the remote unix system. When you do this, you will have to tell it which display to use. For example, if you wanted to run an xterm window, you may do something like:

      xterm -display tank.cs.indiana.edu:5

    5. Shutdown the VNC server when you are done - When you are finished, you will need to kill the VNC server running on the remote unix machine. To do this, just run

      vncserver -kill :5

      where you will replace '5' with the number of your display.

  4. Run Linux - Of course, the best option for running remote X clients is to run an OS that supports X natively like Linux. While you are probably not willing to get rid of Windows altogether and install Linux there are a couple less drastic options. First, you could set your machine up to dual boot Windows and Linux. But, this is still a pretty drastic measure for the average Windows user and is not recommended for anyone with no Linux experience. However, there IS an option you may want to consider. There is a CD-based Linux distribution called Knoppix. With Knoppix you simply boot Linux from a CD and it runs entirely from CD. This gives you a very simple way to run Linux without having to modify your Windows installation in any way. All you need to do is go to the Knoppix Homepage, download the current ISO images, and burn them to CD. Then just boot from the CD and you are running Linux and have a real live X server!




See an error in this FAQ entry? Please report it.

[Return to the FAQ index]









Valid HTML 4.01!