<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <HTML> <HEAD> <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9"> <TITLE>Remote X Apps mini-HOWTO: A Little Theory</TITLE> <LINK HREF="Remote-X-Apps-5.html" REL=next> <LINK HREF="Remote-X-Apps-3.html" REL=previous> <LINK HREF="Remote-X-Apps.html#toc4" REL=contents> </HEAD> <BODY> <A HREF="Remote-X-Apps-5.html">Next</A> <A HREF="Remote-X-Apps-3.html">Previous</A> <A HREF="Remote-X-Apps.html#toc4">Contents</A> <HR> <H2><A NAME="s4">4. A Little Theory</A></H2> <P>The magic word is <CODE>DISPLAY</CODE>. In the X window system, a display consists (simplified) of a keyboard, a mouse and a screen. A display is managed by a server program, known as an X server. The server serves displaying capabilities to other programs that connect to it. <P>A display is indicated with a name, for instance: <P> <UL> <LI> <CODE>DISPLAY=light.uni.verse:0</CODE> </LI> <LI> <CODE>DISPLAY=localhost:4</CODE> </LI> <LI> <CODE>DISPLAY=:0</CODE> </LI> </UL> <P>The display consists of a hostname (such as <CODE>light.uni.verse</CODE> and <CODE>localhost</CODE>), a colon (<CODE>:</CODE>), and a sequence number (such as <CODE>0</CODE> and <CODE>4</CODE>). The hostname of the display is the name of the computer where the X server runs. An omitted hostname means the local host. The sequence number is usually 0 -- it can be varied if there are multiple displays connected to one computer. <P>If you ever come across a display indication with an extra <CODE>.n</CODE> attached to it, that's the screen number. A display can actually have multiple screens. Usually there's only one screen though, with number <CODE>n=0</CODE>, so that's the default. <P>Other forms of <CODE>DISPLAY</CODE> exist, but the above will do for our purposes. <P>For the technically curious: <UL> <LI> <CODE>hostname:D.S</CODE> means screen <CODE>S</CODE> on display <CODE>D</CODE> of host <CODE>hostname</CODE>; the X server for this display is listening at TCP port <CODE>6000+D</CODE>. </LI> <LI> <CODE>host/unix:D.S</CODE> means screen <CODE>S</CODE> on display <CODE>D</CODE> of host <CODE>host</CODE>; the X server for this display is listening at UNIX domain socket <CODE>/tmp/.X11-unix/XD</CODE> (so it's only reachable from <CODE>host</CODE>). </LI> <LI> <CODE>:D.S</CODE> is equivalent to <CODE>host/unix:D.S</CODE>, where <CODE>host</CODE> is the local hostname. </LI> </UL> <P> <HR> <A HREF="Remote-X-Apps-5.html">Next</A> <A HREF="Remote-X-Apps-3.html">Previous</A> <A HREF="Remote-X-Apps.html#toc4">Contents</A> </BODY> </HTML>