- Forward


The X Protocol and XWindows
An Introduction


Prof. David Bernstein
James Madison University

Computer Science Department
bernstdh@jmu.edu

Print

A Review
Back SMYC Forward
  • The Simple Case:
    • What do you see (and why) after you first boot a non-windowing OS?
  • A More Complicated Case:
    • What happens if you then ssh/telnet into a remote machine?
Introduction
Back SMYC Forward
  • History:
    • Developed at MIT during the mid 1980s as part of Project Athena
  • Objective:
    • A windowing system and graphical user interface for networked computers
Layering
Back SMYC Forward
  • In The 5-Layer View of the Internet:
    • The X protocol is an application layer protocol
  • The X Protocol Itself:
    • Consists of a device independent layer (for communications) and a device dependent layer (for graphics)
Architecture
Back SMYC Forward
  • X Client:
    • Sends requests (for graphical operations, information) to the server
    • Receives keyboard and mouse events from the server
  • X Server:
    • Accepts requests and acts on them
Architecture (cont.)
Back SMYC Forward
  • The Server Side:
    • Runs on the local machine (and displays graphics requests on it)
      Expand
  • The Client Side:
    • Runs on the remote machine (e.g., xterm) or the local machine (e.g., xclock)
      Expand
    • Client must be told what server to use using the DISPLAY environment variable
      Expand
Message Types
Back SMYC Forward
  • Requests (which are made asynchronously)
  • Replies
  • Events
  • Errors
Messages (cont.)
Back SMYC Forward
  • Requests:
    • Like CreateWindow, DestroyWindow
  • Replies:
    • Not all requests require a reply
Messages (cont.)
Back SMYC Forward
  • Events:
    • Like KeyPressed, MouseMoved
  • Errors:
    • Similar to events but sent to the error handler
Window Managers
Back SMYC Forward
  • Purpose:
    • Controls the appearance of windows
    • Provides a way for users to interact with windows
  • Examples:
    • AfterStep (based on NeXT)
    • Enlightenment (used with Gnome)
    • WindowMaker
    • Metacity
Desktop Environments
Back SMYC Forward
  • Purpose:
    • A window manager plus an interface to the operating system
    • Often include utilities and applications
  • Examples:
    • Common Desktop Environment (CDE)
    • KDE
There's Always More to Learn
Back -