HMC Homepage      CS Home

How to use X Windows

This document is meant to be a quick introduction to the X Window System (which many people just call "X") which is a graphical user interface used on UNIX systems. This document assumes that you are logging into a CS Server from one of the Macs in the terminal rooms (Beckman 102 and 105), but most of the concepts here apply to all X systems.

The X windows interface is a commonly used windowing system in linix/ unix machines. In macs, it can be run in addition to the standard (aqua) interface.

  1. Open the X11 application on your system. The application will be located at /Applications/Utilities/X11.app You will be presented with an X-windows terminal and a command prompt.

  2. Connect to the the server (knuth, wilkes) via SSH. SSH is described in the Getting Started Tutorial

    Adding the '-X' option to SSH will forward the X display to your local computer.

    ssh -X user@server

  3. You don't see anything yet, but graphical applications you now run on the server will display on your machine.

    You can test this by opening an application, for instance:

    xclock&

    Note: The '&' will cause the command to run in the background, so you can continue to use your terminal while it is running.

  4. To log off:
    • First close any application you are running making sure to save your documents.
    • Second, type exit in your terminal to safely close your connection to the server.
    • Finally, choose the X11 menu and click 'Quit X11'.

Notes: (Advanced)

The .xinitrc and .Xdefaults files contain the commands that determine the characteristics of your X session: which and how windows are displayed, menu options, etc. See the X11(7) and xinit(1) man pages for more information.

If you do not have a .xinitrc in your home directory, you can find the latest copy at /mnt/shared/skel/generic/.xinitrc.

The .Xdefaults file contains the values of X resources, which let you customize the appearance and behavior of your X programs. The .xinitrc file contains a list of commands that are run when you start X, much like .login.

If you decide to edit these files, be careful. If you mess them up, you may have trouble logging in again. If this happens to you, you can try logging in to the server via the command line. After you have logged in you can edit the files back to a stable configuration.


Copyright (c) HMC Computer Science Department. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License.''

HMC Computer Science Department
Contact Information
Last Modified Wednesday, 16-May-2007 14:04:56 PDT