<?xml version="1.0" encoding="ISO-8859-1"?><html xmlns="http://www.w3.org/1999/xhtml" xmlns:xh="http://www.w3.org/1999/xhtml" xmlns:axle="http://www.cs.odu.edu/~zeil/axle" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ns0="http://www.cs.odu.edu/~zeil/axle" mode="ignore" ns0:xlinkuri="open/unix.dbk" ns0:xpath="/html" ns0:page="unix" foo="0 " ns0:last="/cocoon/~cs252/open/unix/section-8.2.html"><head><title>An Introduction to Unix</title><link type="text/css" href="_axle/docbookstyle.css" rel="stylesheet"/><link type="text/css" href="_axle/cppformat.css" rel="stylesheet"/><link type="text/css" href="_axle/overrides.css" rel="stylesheet"/><script src="_axle/docbook.js"/><link href="http://cocoon.cs.odu.edu:80/cocoon/~cs252/open/unix/section-4.2.html" title="Next" rel="next"/><link href="http://cocoon.cs.odu.edu:80/cocoon/~cs252/open/unix/section-3.6.html" title="Prev" rel="prev"/><link href="http://cocoon.cs.odu.edu:80/cocoon/~cs252/open/unix/unix.html" title="Up" rel="up"/><link href="http://cocoon.cs.odu.edu:80/cocoon/~cs252/open/unix/unix.html" title="First" rel="first"/><link href="http://cocoon.cs.odu.edu:80/cocoon/~cs252/open/unix/section-8.2.html" title="Last" rel="last"/><script>function gotoNext() {top.location.href="/cocoon/~cs252/open/unix/section-4.2.html";}
function gotoPrev() {top.location.href="/cocoon/~cs252/open/unix/section-3.6.html";}
function gotoUp() {top.location.href="/cocoon/~cs252/open/unix/unix.html";}
</script><xhtml:link xmlns:xhtml="http://www.w3.org/1999/xhtml" rel="stylesheet" href="_axle/navigation.css" type="text/css"/><xhtml:script xmlns:xhtml="http://www.w3.org/1999/xhtml" src="_axle/navigation.js"/></head><body><table width="100%" class="navigationBar"><tr class="navigationBar"><td width="5%" class="navigationBar"><a class="navigationBarArrow" title="First" href="http://cocoon.cs.odu.edu:80/cocoon/~cs252/open/unix/unix.html"><img class="navigationBar" src="_axle/first.gif" alt="First"/></a></td><td width="5%" class="navigationBar"><a class="navigationBarArrow" title="Prev" href="http://cocoon.cs.odu.edu:80/cocoon/~cs252/open/unix/section-3.6.html"><img class="navigationBar" src="_axle/prev.gif" alt="Prev"/></a></td><td width="5%" class="navigationBar"><a class="navigationBarArrow" title="Up" href="http://cocoon.cs.odu.edu:80/cocoon/~cs252/open/unix/unix.html"><img class="navigationBar" src="_axle/up.gif" alt="Up"/></a></td><td width="5%" class="navigationBar"><a class="navigationBarArrow" title="Next" href="http://cocoon.cs.odu.edu:80/cocoon/~cs252/open/unix/section-4.2.html"><img class="navigationBar" src="_axle/next.gif" alt="Next"/></a></td><td width="5%" class="navigationBar"><a class="navigationBarArrow" title="Last" href="http://cocoon.cs.odu.edu:80/cocoon/~cs252/open/unix/section-8.2.html"><img class="navigationBar" src="_axle/last.gif" alt="Last"/></a></td><td class="navigationBar"/><td width="5%" class="navigationBar"><a class="navigationBar" title="CS252 Home" href="http://cocoon.cs.odu.edu:80/cocoon/~cs252/directory/announcements.html"><img class="navigationBar" src="_axle/home.gif" alt="CS252 Home"/></a></td><td width="5%" class="navigationBar"><a class="navigationBar" title="discuss this page" href="http://cocoon.cs.odu.edu:80/cocoon/~cs252/forum/getXPath/open/unix/section-4.html"><img class="navigationBar" src="_axle/forum.gif" alt="discuss this page"/></a></td></tr></table><br/><script type="text/javascript">
checkForAnchorOnOtherPage('section-1','unix');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('mainmini','mainmini');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-1.1.1','mainmini');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('displays','mainmini');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('networks','mainmini');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('taleof2','taleof2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-1.2.1','taleof2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('pcrev','taleof2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref1','taleof2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref1_live','taleof2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref2','taleof2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref2_live','taleof2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote1','taleof2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote2','taleof2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('mswin','taleof2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('reflections','reflections');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref3','reflections');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref3_live','reflections');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote3','reflections');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('ssh','ssh');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref4','ssh');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref4_live','ssh');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('puttyConnect','ssh');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('sshConnect','ssh');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote4','ssh');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('login','login');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('termtypes','termtypes');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref5','termtypes');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref5_live','termtypes');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote5','termtypes');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-1.7','section-1.7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-1.8','section-1.8');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-2','section-2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-2.1','section-2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref6','section-2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref6_live','section-2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref7','section-2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref7_live','section-2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('basicFileCmds','section-2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref8','section-2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref8_live','section-2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote8','section-2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('cmdlist','section-2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('session','section-2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('rlogin','section-2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('filemanip','section-2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('cdcmd','section-2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('findcmd','section-2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('lsa','section-2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('lsF','section-2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('pwdcmd','section-2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('textmanip','section-2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('catcmd','section-2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('morecmd','section-2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('printing','section-2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote6','section-2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote7','section-2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-2.2','section-2.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref9','section-2.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref9_live','section-2.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('paths','section-2.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref10','section-2.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref10_live','section-2.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote10','section-2.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('specialChar','section-2.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('cmdpatterns','section-2.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref11','section-2.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref11_live','section-2.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('wildcards','section-2.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref12','section-2.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref12_live','section-2.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote12','section-2.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('regexp','section-2.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('grepregexps','section-2.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref13','section-2.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref13_live','section-2.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref14','section-2.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref14_live','section-2.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote13','section-2.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote14','section-2.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('sedregexps','section-2.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref15','section-2.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref15_live','section-2.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref16','section-2.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref16_live','section-2.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote15','section-2.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote16','section-2.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote11','section-2.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('quoting','section-2.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref17','section-2.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref17_live','section-2.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote17','section-2.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote9','section-2.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-2.3','section-2.3');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref18','section-2.3');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref18_live','section-2.3');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('redirect','section-2.3');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('piping','section-2.3');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('xargs','section-2.3');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('find','section-2.3');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote18','section-2.3');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-2.4','section-2.4');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-2.4.1','section-2.4');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref19','section-2.4');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref19_live','section-2.4');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote19','section-2.4');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-2.4.2','section-2.4');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref20','section-2.4');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref20_live','section-2.4');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote20','section-2.4');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('umask','section-2.4');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-2.4.4','section-2.4');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-3','section-3');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('vim','section-3');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref21','section-3');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref21_live','section-3');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-3.1','section-3.1');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-3.2','section-3.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-3.3','section-3.3');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('markregion','markregion');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref22','markregion');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref22_live','markregion');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote22','markregion');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-3.5','section-3.5');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-3.6','section-3.6');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote21','section-3.6');
</script><div class="sect1" id="section-4" ns0:xpath="//*[@id='section-4']" ns0:page="section-4" ns0:next="/cocoon/~cs252/open/unix/section-4.2.html" ns0:prev="/cocoon/~cs252/open/unix/section-3.6.html" ns0:up="/cocoon/~cs252/open/unix/unix.html" foo="0 " ns0:last="/cocoon/~cs252/open/unix/section-8.2.html" ns0:first="/cocoon/~cs252/open/unix/unix.html"><div class="info_sect1"><div class="title_sect2">4. The X Window System</div></div><div class="TOC">Contents:<div class="TOC-section1"><a href="#section-4.1">4.1 X Servers - Viewing Unix Windows from your PC</a></div><div class="TOC-section2"><a href="#section-4.1.1">4.1.1 X Window Managers</a></div><div class="TOC-section2"><a href="#runningx">4.1.2 Running X</a></div><div class="TOC-section2"><a href="#section-4.1.3">4.1.3 Working in X</a></div><div class="TOC-section2"><a href="#xappl">4.1.4 Some X Applications</a></div><div class="TOC-section2"><a href="#xtrouble">4.1.5 Troubleshooting</a></div><div class="TOC-section2"><a href="#alternatives">4.1.6 Alternative &amp; Related Technologies</a></div><div class="TOC-section1"><a href="section-4.2.html#section-4.2">4.2 Editing Files via X</a></div></div><div class="sect2" axle:nopage="1" id="section-4.1"><div class="info_sect2"><div class="title_sect3">4.1. X Servers - Viewing Unix Windows from your PC</div></div><div class="TOC">Contents:<div class="TOC-section2"><a href="#section-4.1.1">4.1.1 X Window Managers</a></div><div class="TOC-section3"><a href="#connections">4.1.1.1 X Performance and Your Internet Connection</a></div><div class="TOC-section2"><a href="#runningx">4.1.2 Running X</a></div><div class="TOC-section3"><a href="#launchTheServer">4.1.2.1 Launching an X Server</a></div><div class="TOC-section3"><a href="#launchClient">4.1.2.2 Launching a Client Program</a></div><div class="TOC-section2"><a href="#section-4.1.3">4.1.3 Working in X</a></div><div class="TOC-section2"><a href="#xappl">4.1.4 Some X Applications</a></div><div class="TOC-section2"><a href="#xtrouble">4.1.5 Troubleshooting</a></div><div class="TOC-section3"><a href="#cannotOpen">4.1.5.1 
        <span class="quote">
      &#8220;Cannot Open Display<span class="hellip"/>&#8221;
    </span>
      </a></div><div class="TOC-section3"><a href="#firewall">4.1.5.2 Firewalls, NAT, &amp; Internet Connection Sharing</a></div><div class="TOC-section3"><a href="#xforwarding">4.1.5.3 Running X via ssh</a></div><div class="TOC-section3"><a href="#xfast">4.1.5.4 X Applications Seem to be Unreasonably Slow</a></div><div class="TOC-section3"><a href="#xtermFont">4.1.5.5 
        <span class="quote">
      &#8220;xterm:  unable to locate a suitable font&#8221;
    </span>
      </a></div><div class="TOC-section3"><a href="#connect-localhost">4.1.5.6 <span class="quote">
      &#8220;connect localhost port 6000: Connection refused&#8221;
    </span></a></div><div class="TOC-section3"><a href="#refusedByServer">4.1.5.7 <span class="quote">
      &#8220;connection <span class="hellip"/> refused by server&#8221;
    </span> or <span class="quote">
      &#8220;Client is not authorized to connect to Server&#8221;
    </span></a></div><div class="TOC-section2"><a href="#alternatives">4.1.6 Alternative &amp; Related Technologies</a></div><div class="TOC-section3"><a href="#RDP">4.1.6.1 Remote Desktop Protocol (RDP)</a></div><div class="TOC-section3"><a href="#vnc">4.1.6.2 Virtual Network Computing (VNC)</a></div></div><p class="para"><span class="firstterm">X</span> is the windowing system for Unix.
By running <span class="command">X</span>, you can have several
windows on the screen open at once, each devoted to a different task.
For example, you can be reading electronic mail in one window while a
lengthy compilation is running in another. <span class="command">X</span> also allows the
display of graphics and of a variety of fonts.</p><div class="sect3" id="section-4.1.1"><div class="info_sect3"><div class="title_sect4">4.1.1. X Window Managers</div></div><div class="TOC">Contents:<div class="TOC-section3"><a href="#connections">4.1.1.1 X Performance and Your Internet Connection</a></div></div>
    
    <p class="para"><span class="command">X</span> is a windowing system that can present a number of different
appearances to the user.  The appearance and behaviors that you
actually see is controlled by a <span class="emphasis">window manager</span>, a program that
is generally run as part of the <span class="command">X</span> start-up procedure. A window
manager controls both cosmetic details like the colors used for
window borders and other control elements, but also what elements
actualy appear on each window (e.g., does every window get a <span class="quote">
      &#8220;close&#8221;
    </span>
button, what does that button look like, and where does it appear in
the window?) and what menus appear in response to mouse clicks in
various parts of the display.<a href="#twin">Figure 1: <span class="title_xref">X with the TWM window manager</span></a>, for example, shows <span class="command">X</span> running the <span class="command">twin</span>
(Tom's Window manager). Compare to <a href="#icewin">Figure 2: <span class="title_xref">X with the ICE window manager</span></a>, which shows
the same programs running under the <span class="command">ICE</span> window manager and <a href="#starwin">Figure 3: <span class="title_xref">X with the XWin32 window manager</span></a>, which shows those programs running under a
version of <span class="command">X</span> that uses MS Windows as its window manager.
You can see a number of different window managers in action
<a url="http://www.plig.org/xwinman/" href="http://www.plig.org/xwinman/">here</a>.</p>

<div class="figure" id="twin">
  
  <span class="inlinemediaobject">
    <img src="twin.jpg" fileref="twin.jpg"/>
  </span>
<div class="info_figure"><div class="title_figure">Figure 1: X with the TWM window manager</div></div></div>

<div class="figure" id="icewin">
  
  <span class="inlinemediaobject">
    <img src="icewm.jpg" fileref="icewm.jpg"/>
  </span>
<div class="info_figure"><div class="title_figure">Figure 2: X with the ICE window manager</div></div></div>

<div class="figure" id="starwin">
  
  <span class="inlinemediaobject">
    <img src="xwin32.jpg" fileref="xwin32.jpg"/>
  </span>
<div class="info_figure"><div class="title_figure">Figure 3: X with the XWin32 window manager</div></div></div>


  <div class="sect4" id="connections"><div class="info_sect4"><div class="title_sect5">4.1.1.1. X Performance and Your Internet Connection</div></div>
    

    <p class="para">
      One thing that should have been obvious from the examples above is that, in X, you are sending a lot more than just plain text from the remote machine to your local PC. Graphics will require a lot more bytes than text, and it takes time to transmit those bytes. Even <span class="quote">
      &#8220;plain text&#8221;
    </span> may require a lot more time than it would in an ordinary telnet session. To send a line of text under X, the remote machine may need to send information on what font to render the text in, and may in some cases even need to send the font itself to your PC.
    </p>

    <p class="para">
      If even ordinary telnet connections seem slow to you, you have
      real difficulties running X. Nonetheless, you can't expect to
      get by transfoerring only plain text in all circumstnaces, so
      trying to work out a connection scheme that you can live with is
      important.
    </p>

    <p class="para">
      When we talk about connection speed to the internet, most
      internet service providers (ISPs) only talk about how many bytes
      per second they can ship to you. For web browsing and email,
      that may be the most important factor. But programming
      activities tend to be highly interactive. Even in a telnet
      session, you type a command, you pause to see it echoed on your
      screen so you can make sure it's what you wanted, you hit the
      Enter or Return key, you wait for a result to appear on your
      screen, then you start typing the next command.
    </p>

    <p class="para">For our purposes, then, what's important is not only the
    <span class="firstterm">bandwidth</span>, the number of characters per
    second that can flow along a connection once the data stream has
    gotten started, but also the <span class="firstterm">latency</span>, the
    amount of time it takes for the last byte of a request to go from
    your machine the remote machine and, assuming the remote machine
    responds immediately, for the first byte of its response to reach
    you.
    </p>

    <p class="para">When X is displaying something complicated on your screen,
    there's a lot of back-and-forth communication. That means that
    latency is at least as important as bandwidth in determining how
    well X will work for you.
    </p>

    <p class="para">Ideally, you would have an ISP that gives you both high
    bandwidth and low latency. Most cable services and DSL will give
    you that. Dial-up services are fairly low bandwidth, but the
    better ones offer very low latency and so may be OK with X.
    </p>

    <p class="para"> Beware
    of "satellite broadband" ISPs. These bounce their data streams off
    a satellite in orbit. Even at the speed of light, this adds a lot
    of time to the delivery of each byte. Satellite broadband can
    offer high bandwidth, which is good, but they also frequently have
    very high latency. Even telnet can be painful on a satellite
    broadband service. You hit Enter and wait.... Satellite broadband
    may be fine for web browsing and email - once the data stream gets
    going it just flies. But some programming students find they are
    better off doing dial-up because of the latency issues.
    </p>

    <p class="para">
      In the troubleshooting section, I give some tips for what to do
      if you are stuck with low bandwidth or high latency. But if none
      of these work very well for you, you may need to put a high
      degree of effort into getting the appropriate compilers and
      related software <a href="../yourOwnCompiler/">onto your local PC</a>, doing as much work as
      possible offline, then <a href="../ftp/">uploading</a> your nearly finished work to remote
      Unix machines only for the final checks.
    </p>


  </div>

  </div><div class="sect3" id="runningx"><div class="info_sect3"><div class="title_sect4">4.1.2. Running X</div></div><div class="TOC">Contents:<div class="TOC-section3"><a href="#launchTheServer">4.1.2.1 Launching an X Server</a></div><div class="TOC-section4"><a href="#creatingsession">4.1.2.1.1 Starting StarNet X-Win32</a></div><div class="TOC-section4"><a href="#section-4.1.2.1.2">4.1.2.1.2 Starting Cygwin/X</a></div><div class="TOC-section4"><a href="#section-4.1.2.1.3">4.1.2.1.3 Starting Xming</a></div><div class="TOC-section4"><a href="#section-4.1.2.1.4">4.1.2.1.4 Linux and Mac OS/X Servers</a></div><div class="TOC-section3"><a href="#launchClient">4.1.2.2 Launching a Client Program</a></div><div class="TOC-section4"><a href="#launchViaSsh">4.1.2.2.1 Launching via an ssh command</a></div><div class="TOC-section4"><a href="#launchViaPutty">4.1.2.2.2 Launching via PuTTY</a></div><div class="TOC-section4"><a href="#xlaunch-sessions">4.1.2.2.3 Launching via XLaunch</a></div><div class="TOC-section4"><a href="#xwin32-sessions">4.1.2.2.4 Launching an X-Win32 Session</a></div></div>
    
    <p class="para">To use X, you need to run two different programs. One is an
X <span class="firstterm">server</span>, the program that is responsible for controlling the display
of the machine on which you are working. The other is an X <span class="firstterm">client</span>,
which is simply an application program that was compiled to work with
<span class="command">X</span>.
The server must run on the machine at which you are seated - it's job is to actually draw things on your display and handle mouse and keyboard inputs. The client program, on the other hand, might run on that same machine, but might also be something running on a remote machine somewhere on the internet. such as one of our Dept. Unix machines.
</p>

<p class="para">
To run X, then you need to
<div class="orderedlist"><ol><li>Run an X server on your local PC.</li><li>Launch an X client application on the remote machine.</li></ol></div>
This assumes, of course, that you have X server software installed on
your local PC (or are carrying a portable X server on a flash
drive). You may also need software to launch the remote
application. Sometimes this comes with the server software. If not,
almost any <span class="code">ssh</span> software will do. If you've been using
<span class="code">PuTTY</span>, for example, for your telnet client, you can use
it for <span class="code">ssh</span> as well.
</p>

<p class="para">The course <a href="../../directory/library.html">Library</a> page has tips on
what X servers and ssh programs are recommended and how to get them
(for free or at a student discount).</p>

<p class="para">
  You may need to get familiar with a few different X servers. That's because you will want something you can run at home, but will have to accept whatever is installed if you go into a computer lab to work.<a onmouseover="DBshowBriefly('fn_fref23_live')" name="fn_fref23" id="fn_fref23" class="footnotemark" href="#fn_fnote23">23</a><div class="footnote_live" id="fn_fref23_live"><p class="para">Actually, you can put Xming and portable PuTTY on a flash drive and carry a single X server with you wherever you go.</p></div></p>

<p class="para">On the ODU campus, if you go into one of the CS Dept computer labs, you will find the PCs are equipped with either StarNet X-Win32 or Xming. OCCS labs (the general University computing labs) have StarNet X-Win32.
</p>

<div class="sect4" id="launchTheServer"><div class="info_sect4"><div class="title_sect5">4.1.2.1. Launching an X Server</div></div><div class="TOC">Contents:<div class="TOC-section4"><a href="#creatingsession">4.1.2.1.1 Starting StarNet X-Win32</a></div><div class="TOC-section4"><a href="#section-4.1.2.1.2">4.1.2.1.2 Starting Cygwin/X</a></div><div class="TOC-section4"><a href="#section-4.1.2.1.3">4.1.2.1.3 Starting Xming</a></div><div class="TOC-section4"><a href="#section-4.1.2.1.4">4.1.2.1.4 Linux and Mac OS/X Servers</a></div></div>
  

    <p class="para">The first thing you need to do is to 
run an X server on the machine
where you are actually seated. How you do this depends on what X
server has been installed on that machine., but it's usually as simple as finding the X server in the Start button's "All Programs" menu and launching it.
I'll assume for the
purposes of this dicussion that you are working from a Windows PC.</p>

  

    <div class="sect5" id="creatingsession"><div class="info_sect5"><div class="title_sect6">Starting StarNet X-Win32</div></div>
      
      <p class="para">From the <span class="quote">
      &#8220;Start&#8221;
    </span> button menu, find and run <span class="command">X-Win32</span>. You should  see a new icon in the task bar's icon tray, labelled
with a blue <span class="quote">
      &#8220;X&#8221;
    </span>. 
      </p>
    </div>




    <div class="sect5" id="section-4.1.2.1.2"><div class="info_sect5"><div class="title_sect6">Starting Cygwin/X</div></div>
      
      <p class="para">If you have <a url="../yourOwnCompiler/xfree.html" href="../yourOwnCompiler/xfree.html">installed Cygwin/X</a>, you will have a shortcut on your desktop or in your start menu to run it. Do so. You should see a small black "X" in the tray at the right end of your Windows task bar.
      </p>
      <p class="para">You will also probably see an xterm window open up in a few moments. This is an X application that is running on your local machine, not on a remote Unix box.</p>
    </div>


    <div class="sect5" id="section-4.1.2.1.3"><div class="info_sect5"><div class="title_sect6">Starting Xming</div></div>
      
      <p class="para">You have two options here. Find the start menu for Xming and run "xming".<a onmouseover="DBshowBriefly('fn_fref24_live')" name="fn_fref24" id="fn_fref24" class="footnotemark" href="#fn_fnote24">24</a><div class="footnote_live" id="fn_fref24_live"><p class="para">If you are using a machine with a two-button mouse, right-click on the menu shortcut for running xming and add the parameter <span class="quote">
      &#8220;-emulate3buttons 50&#8221;
    </span>. This will allow you to simulate clicking a middle mouse button by pressing both mouse buttons at once.</p></div>


  You should see a small black "X" in the tray at the right end of your Windows task bar. Alternatively, you can launch the server and a remote application in one step with Xming's <span class="code">XLaunch</span> program, described below.
      </p>
    <div name="fn_fnote24" id="fn_fnote24" class="footnote">24. <p class="para">If you are using a machine with a two-button mouse, right-click on the menu shortcut for running xming and add the parameter <span class="quote">
      &#8220;-emulate3buttons 50&#8221;
    </span>. This will allow you to simulate clicking a middle mouse button by pressing both mouse buttons at once.</p> (<a href="#fn_fref24">back</a>)
    </div></div>

    <div class="sect5" id="section-4.1.2.1.4"><div class="info_sect5"><div class="title_sect6">Linux and Mac OS/X Servers</div></div>
      
      <p class="para">If you are running a Linux or a Mac OS/X machine and see windows, menus, etc., when you log in to your local machine, then you are already running an X server and don't need to do anything special in this step.<a onmouseover="DBshowBriefly('fn_fref25_live')" name="fn_fref25" id="fn_fref25" class="footnotemark" href="#fn_fnote25">25</a><div class="footnote_live" id="fn_fref25_live"><p class="para">Linux is an option for MS Windows users as well.  You can get Linux distributions that can be booted and run from a CD or a flash drive. 
</p>

<p class="para">See the
<a url="http://www.cs.odu.edu/~cs252" href="http://www.cs.odu.edu/~cs252">CS 252</a> <span class="quote">
      &#8220;Library&#8221;
    </span> page for
further information.</p></div>


      </p>
    <div name="fn_fnote25" id="fn_fnote25" class="footnote">25. <p class="para">Linux is an option for MS Windows users as well.  You can get Linux distributions that can be booted and run from a CD or a flash drive. 
</p>

<p class="para">See the
<a url="http://www.cs.odu.edu/~cs252" href="http://www.cs.odu.edu/~cs252">CS 252</a> <span class="quote">
      &#8220;Library&#8221;
    </span> page for
further information.</p> (<a href="#fn_fref25">back</a>)
    </div></div>
  </div>



<div class="sect4" id="launchClient"><div class="info_sect4"><div class="title_sect5">4.1.2.2. Launching a Client Program</div></div><div class="TOC">Contents:<div class="TOC-section4"><a href="#launchViaSsh">4.1.2.2.1 Launching via an ssh command</a></div><div class="TOC-section4"><a href="#launchViaPutty">4.1.2.2.2 Launching via PuTTY</a></div><div class="TOC-section4"><a href="#xlaunch-sessions">4.1.2.2.3 Launching via XLaunch</a></div><div class="TOC-section4"><a href="#xwin32-sessions">4.1.2.2.4 Launching an X-Win32 Session</a></div></div>
  

    <p class="para">Once you have an X server running, you can begin running the
    actual client applications. If you want to run a program that is
    installed on your local PC, you can launch it in the normal way
    via the Start menu or via a command line.</p>

    <p class="para">But, most likely, you are doing this because you want to run
    an X application on some other machine, displaying its output on
    your local machine. It's probably easiest if you start by running
    an <span class="command">xterm</span> on the remote
    machine. <span class="command">xterm</span> is simply a command window that
    lets you type commands to the operating system of a machine. From
    there, you can easily launch any other X applications you might
    want to run. We'll look at X applications other than
    <span class="command">xterm</span> a little
    later<a onmouseover="DBshowBriefly('fn_fref26_live')" name="fn_fref26" id="fn_fref26" class="footnotemark" href="#fn_fnote26">26</a><div class="footnote_live" id="fn_fref26_live"><p class="para">Specifically, we'll look at the X version of
    <span class="command">emacs</span> and at the <span class="command">insight</span>
    debugger.</p></div></p>

    <p class="para">It's possible that, wehen you started your X server, you may
    have already opened an <span class="command">xterm</span> - this is
    particularly likely if you are using CygWin/X. If so, it's a
    pretty good bet that this <span class="command">xterm</span> is running on,
    and therefore issuing commands to, your local machine. You will
    still need to follow the steps given below to run clients on a
    remote machine.</p>

    <p class="para">It's worth pointing out that, because it's easy to get
    <span class="command">xterm</span> windows open to many different machines
    at once, it can be a bit confusing remembering which is
    which. Many people therefore <a url="../custom/loginCustom.html" href="../custom/loginCustom.html">customize their command
    prompt</a> to display the name of the machine to which those
    commands are being sent.</p>



<div class="sect5" id="launchViaSsh"><div class="info_sect5"><div class="title_sect6">Launching via an ssh command</div></div>
  

<p class="para"><span class="emphasis-bold" role="bold">Works with servers: all</span><a onmouseover="DBshowBriefly('fn_fref27_live')" name="fn_fref27" id="fn_fref27" class="footnotemark" href="#fn_fnote27">27</a><div class="footnote_live" id="fn_fref27_live">This procedure works with X-Win32 only if it is not running under the limited ODU license.</div></p>

<p class="para">If you have a command-line version of <span class="code">ssh</span> (the <span class="quote">
      &#8220;Secure SHell&#8221;
    </span> program), most likely if you are running CygWin, Linux, or Mac OS/X,
you can launch an xterm on a remote machine quite easily. To do
this, you need a windows open on your local machine where you can type
command. If you are running the CygWin/X server, you probably got an
<span class="command">xterm</span> window (running on your local machine). You
cna issue the necessary commands there. If you are running Linux or
Mac OS/X, open a command/console window.</p>


<p class="para">Give the command
<div class="screen">
    ssh -Y -f -l <span class="emphasis-italic" role="italic">username</span> <span class="emphasis-italic" role="italic">machinename</span> xterm
</div>
replacing "<span class="emphasis-italic" role="italic">username</span>" by your CS Unix login name and replacing
"<span class="emphasis-italic" role="italic">machinename</span>" by the name of one of the <a url="http://system.cs.odu.edu/?page=faq&amp;id=fastmachines" href="http://system.cs.odu.edu/?page=faq&amp;id=fastmachines">CS Unix
servers</a> (<span class="emphasis-italic" role="italic">not</span> <span class="code">fast</span>).</p>
      <p class="para">An xterm window should open up within a few seconds.</p>

      <p class="para">If you find these commands a bit tedious to type out, consider
      adding some lines to your <span class="filename">~/.bashrc</span> file on your local machine to add a simple <span class="firstterm">alias</span> for these ssh commands, similar to the aliases shown <a url="../custom/loginCustom.html" href="../custom/loginCustom.html">here</a>. For example, I have
<div class="programlisting">
alias ra="ssh -Y -f -l zeil ra.cs.odu.edu xterm -title ra -sl 500 -sb "
alias cash="ssh -Y -f -l zeil cash.cs.odu.edu xterm -title cash -sl 500 -sb "
</div>
for these two machines and similar aliases for all the remote machiens I use commonly.</p>
    <div name="fn_fnote27" id="fn_fnote27" class="footnote">27. This procedure works with X-Win32 only if it is not running under the limited ODU license. (<a href="#fn_fref27">back</a>)
    </div></div>

<div class="sect5" id="launchViaPutty"><div class="info_sect5"><div class="title_sect6">Launching via PuTTY</div></div>
  

<p class="para"><span class="emphasis-bold" role="bold">Works with servers: all</span><a onmouseover="DBshowBriefly('fn_fref28_live')" name="fn_fref28" id="fn_fref28" class="footnotemark" href="#fn_fnote28">28</a><div class="footnote_live" id="fn_fref28_live">This procedure works with X-Win32 only if it is not running under the limited ODU license.</div></p>

<p class="para">On a Windows machine without CygWin, you can use a separate ssh client program such as 
	<a url="http://www.chiark.greenend.org.uk/~sgtatham/putty/" href="http://www.chiark.greenend.org.uk/~sgtatham/putty/">PuTTY</a> to launch an ssh session <span class="emphasis">with X forwarding enabled</span>.

      <div class="orderedlist"><ol><li>
	  <p class="para">

	    Start a PuTTY connection, specifying the ssh protocol and making
   sure that <span class="quote">
      &#8220;Enable X forwarding&#8221;
    </span> is checked 
   under the options for <span class="quote">
      &#8220;Connection:SSH:X11&#8221;
    </span>. (Older versions of PuTTY have the same options listed under Connection:SSH:Tunnels.)
	  </p>
  <span class="inlinemediaobject">
    <img src="puttyTunnel2.gif" fileref="puttyTunnel2.gif"/>
  </span>
  <p class="para">
    Since I use X tunnelling all the time, I actually set this option in PuTTY, then went back to the Session options and saved as "Default Settings".
  </p>

   <p class="para">For the host, choose any of the <a href="http://system.cs.odu.edu?page=faq&amp;id=fastmachines">ODU CS telnet/ssh servers</a>, but do
   not use <span class="code">fast.cs.odu.edu</span>. When the window opens, go ahead and
   log in as usual. 
   </p>
   </li><li>
	  <p class="para">
	    In the PuTTY window, type
	    <span class="userinput">xterm&amp;</span> An X window should
	    appear on your screen momentarily. You can continue to
	    launch other X programs either from the PuTTY window or
	    from this new xterm window.
	  </p>
	</li></ol></div>
</p>
<div name="fn_fnote28" id="fn_fnote28" class="footnote">28. This procedure works with X-Win32 only if it is not running under the limited ODU license. (<a href="#fn_fref28">back</a>)
    </div></div>

<div class="sect5" id="xlaunch-sessions"><div class="info_sect5"><div class="title_sect6">Launching via XLaunch</div></div>
  
<p class="para"><span class="emphasis-bold" role="bold">Works with servers: <span class="code">Xming</span></span></p>

<p class="para">If you have the Xming server and have not actually started it yet, you can use the <span class="code">XLaunch</span> program to start a wizard that will start Xming and a remote application at the same time. This is only good for starting your first remote application (usually <span class="code">xterm</span>). If you want more applications on the same remote machine, launch them from that xterm. If you want applications on other remote machines, use the <span class="code">ssh</span> or <span class="code">PuTTY</span> techniques described above.
</p>

<p class="para">
Once you have started XLaunch, i recommend that you select "Multiple Windows", "Start a Program", "Using PuTTY (plink.exe)". For the name of the computer to connect to, use  any of the <a href="http://system.cs.odu.edu?page=faq&amp;id=fastmachines">ODU CS telnet/ssh servers</a>, but do
   not use <span class="code">fast.cs.odu.edu</span>. For parameter settings, consider adding the Xming parameter <span class="quote">
      &#8220;-emulate3buttons 50&#8221;
    </span> if you have a two-button mouse. This will allow you to simulate clicking a middle mouse button by pressing both mouse buttons at once.
</p>
</div>

<div class="sect5" id="xwin32-sessions"><div class="info_sect5"><div class="title_sect6">Launching an X-Win32 Session</div></div>
  

<p class="para"><span class="emphasis-bold" role="bold">Works with servers: StarNet X-Win32</span></p>

<p class="para">If you are running the StarNet X-Win32, you will usually need to use its built-in ssh to launch an <span class="command">xterm</span> on a remote machine.
</p>

<p class="para">Look in the task bar's icon tray for the blue <span class="quote">
      &#8220;X&#8221;
    </span> that indicates that X-Win32 is running. Right-click on this to bring up the menu. (If you are running this on a CS or OCCS machine, look
under the <span class="quote">
      &#8220;Sessions&#8221;
    </span> heading to see if someone has previously
created a session definition for connecting to ODU CS machines: likely
fast.cs.odu.edu.)</p>

      <p class="para">If no such session has been defined, you will have to make your
own. Right-click on the blue X and select <span class="quote">
      &#8220;X-Config&#8221;
    </span>. To
define a new session, click the <span class="quote">
      &#8220;Wizard&#8221;
    </span> button and
answer the succeeding questions as follows:
<div class="itemizedlist"><ul><li>
    <p class="para">Connect via <span class="emphasis">StarNetSSH</span>.</p>
  </li><li>
    <p class="para">
      For the host system, use  one of
      the <a url="http://system.cs.odu.edu/?page=faq&amp;id=fastmachines" href="http://system.cs.odu.edu/?page=faq&amp;id=fastmachines">CS
    ssh servers</a>. Do <span class="emphasis">not</span> use <span class="code">fast.cs.odu.edu</span>.
    </p>
  </li><li>
    <p class="para">
      Leave the login name and password blank. You will be prompted for
      these each time you run the session (and if this is a public machine,
      you don't want it to save that kind of information where others might
      get to it!)
    </p>
  </li><li>
    <p class="para">
      Select the <span class="quote">
      &#8220;SunOS (Solaris)&#8221;
    </span> operating system.
    </p>
  </li><li>
    <p class="para">
      Choose any appropriate name for the session (e.g., the name of the ssh server you selected).
    </p>
  </li></ul></div>
</p>
  
<p class="para">Run this session (e.g., click on the
X-Win32 icon to bring up the menu, and select your new session) to connect
to the CS network. 
With luck, an <span class="command">xterm</span><a onmouseover="DBshowBriefly('fn_fref29_live')" name="fn_fref29" id="fn_fref29" class="footnotemark" href="#fn_fnote29">29</a><div class="footnote_live" id="fn_fref29_live"><span class="command">xterm</span> is a
command window that allows you to enter commands to the remote Unix
system, rather like telnet.</div> window should appear. If
nothing happens, return to the <span class="command">X-Win32</span> menu, make sure that
<span class="quote">
      &#8220;Show Messages&#8221;
    </span> is checked, and try again. 
This may give you some clue as what has gone wrong.</p>


<div name="fn_fnote29" id="fn_fnote29" class="footnote">29. <span class="command">xterm</span> is a
command window that allows you to enter commands to the remote Unix
system, rather like telnet. (<a href="#fn_fref29">back</a>)
    </div></div>



  <div name="fn_fnote26" id="fn_fnote26" class="footnote">26. <p class="para">Specifically, we'll look at the X version of
    <span class="command">emacs</span> and at the <span class="command">insight</span>
    debugger.</p> (<a href="#fn_fref26">back</a>)
    </div></div>
<div name="fn_fnote23" id="fn_fnote23" class="footnote">23. <p class="para">Actually, you can put Xming and portable PuTTY on a flash drive and carry a single X server with you wherever you go.</p> (<a href="#fn_fref23">back</a>)
    </div></div><div class="sect3" id="section-4.1.3"><div class="info_sect3"><div class="title_sect4">4.1.3. Working in X</div></div>
    
    <p class="para">Once you have X working, try opening up some additional windows with
commands like:
<div class="screen"><span class="userinput">
xterm &amp;
xterm -bg Yellow -fg Green -sl 1000 -sb -geometry 40x16 &amp;
xclock &amp;
emacs &amp;
xv /home/zeil/public_html/zeil.jpeg &amp;
</span></div>
Exactly what you will see depends in part on the window
manager. <span class="command">X-Win32</span> uses MS Windows itself as its X window
manager. Cygwin/X does the same by default, but can use other managers as well.
</p>
    <p class="para">A few things to keep in mind:
<div class="itemizedlist"><ul><li>Some window managers will not immediately open new windows, but
      will present you with an outline of the window first that you
      must move, with the mouse to the place on the screen you want,
      then click to lay the actual window down at that position.</li><li>Any time you  enter commands in Unix, you can place an ampersand
(<span class="quote">
      &#8220;&amp;&#8221;
    </span>) at the end of the command to run that command in the
background.  This <span class="quote">
      &#8220;disconnects&#8221;
    </span> the command from your keyboard (in
that window).  You get a prompt immediately and can enter your next
command even if the one you just launched has not yet completed.

<p class="para">Now this capability is not all that useful if you're not running
X. After all, if the program you are running needs input from you, it
has been disconnected and can't see your subsequent keystrokes. Also,
if that program produces output, it will still appear, but will be
intermingled with the outputs of any new commands you have entered in
the meantime.  So, if you're not in X, the &amp; is useful only for
commands and programs that need no additional inputs and produce no
additional outputs.</p>

<p class="para">Under X, however, many useful programs open their own windows and
direct their inputs and outputs through those new windows.  For
example, you would enter <span class="quote">
      &#8220;<span class="command">emacs &amp;</span>&#8221;
    </span> rather than
<span class="quote">
      &#8220;<span class="command">emacs</span>&#8221;
    </span>, and <span class="quote">
      &#8220;<span class="command">netscape &amp;</span>&#8221;
    </span> rather than
<span class="quote">
      &#8220;<span class="command">netscape</span>&#8221;
    </span>. Without
the &amp;, the window where you entered the command to launch
a program would be useless to you until that program has
finished. With the &amp;, that program runs in its own window and the old
window gets a new prompt and can still be used to issue more commands.</p></li><li>Most programs that run under <span class="command">X</span> support a very simple
<span class="quote">
      &#8220;cut-and-paste&#8221;
    </span> facility. Simply drag  the mouse across a block of
text in any window while holding down the left mouse button. Then
position the mouse into a window where you would like that text to be
<span class="quote">
      &#8220;typed&#8221;
    </span>. Click the middle mouse button, and the selected text will
be sent to that window just as if you had typed it yourself.</li><li>When <span class="command">emacs</span> is run under <span class="command">X</span>, this cut-and-paste feature is
supported, but in a different fashion. Text that has been selected in
another window by dragging the mouse can be retrieved in <span class="command">emacs</span>
by the command C-Y (^Y). Text that has been <span class="quote">
      &#8220;killed&#8221;
    </span> in
<span class="command">emacs</span> by C-K, C-W, or M-W can be inserted into other windows by
clicking the middle mouse button.

</li></ul></div></p>
  </div><div class="sect3" id="xappl"><div class="info_sect3"><div class="title_sect4">4.1.4. Some X Applications</div></div>
    
<p class="para">Here's some X-based programs you might want to try. Remember that help
  files on most programs can be accessed via the
    <span class="quote">
      &#8220;<span class="command">man</span>&#8221;
    </span>
    command.  If you can't  invoke them directly (e.g.,
    <span class="code">programName</span>), try
    <span class="code">/usr/X/bin/programName</span>.
    <div class="variablelist"><dl><dt class="varlistentry"><span class="term">filemgr</span></dt><dd class="varlistitem">Graphic directory/file manager</dd><dt class="varlistentry"><span class="term">gimp</span></dt><dd class="varlistitem">A graphics viewer and editor that rivals the best
commecial products in the area.</dd><dt class="varlistentry"><span class="term">gnuplot</span></dt><dd class="varlistitem">Function/data graphing tool.</dd><dt class="varlistentry"><span class="term">xbiff</span></dt><dd class="varlistitem">Notifies you when email has arrived at your Unix
email account</dd><dt class="varlistentry"><span class="term">xclock</span></dt><dd class="varlistitem">A clock program</dd><dt class="varlistentry"><span class="term">xfig</span></dt><dd class="varlistitem">A drawing program for shape-based diagrams</dd><dt class="varlistentry"><span class="term">xterm</span></dt><dd class="varlistitem">Probably the most commonly used X application: opens a command window.</dd><dt class="varlistentry"><span class="term">xv</span></dt><dd class="varlistitem">A graphics viewer and editor for pixel-based graphics</dd></dl></div>
</p>
  </div><div class="sect3" id="xtrouble"><div class="info_sect3"><div class="title_sect4">4.1.5. Troubleshooting</div></div><div class="TOC">Contents:<div class="TOC-section3"><a href="#cannotOpen">4.1.5.1 
        <span class="quote">
      &#8220;Cannot Open Display<span class="hellip"/>&#8221;
    </span>
      </a></div><div class="TOC-section3"><a href="#firewall">4.1.5.2 Firewalls, NAT, &amp; Internet Connection Sharing</a></div><div class="TOC-section3"><a href="#xforwarding">4.1.5.3 Running X via ssh</a></div><div class="TOC-section3"><a href="#xfast">4.1.5.4 X Applications Seem to be Unreasonably Slow</a></div><div class="TOC-section4"><a href="#section-4.1.5.4.1">4.1.5.4.1 Low Bandwidth Connections</a></div><div class="TOC-section4"><a href="#section-4.1.5.4.2">4.1.5.4.2 Low Bandwidth Connections</a></div><div class="TOC-section3"><a href="#xtermFont">4.1.5.5 
        <span class="quote">
      &#8220;xterm:  unable to locate a suitable font&#8221;
    </span>
      </a></div><div class="TOC-section3"><a href="#connect-localhost">4.1.5.6 <span class="quote">
      &#8220;connect localhost port 6000: Connection refused&#8221;
    </span></a></div><div class="TOC-section3"><a href="#refusedByServer">4.1.5.7 <span class="quote">
      &#8220;connection <span class="hellip"/> refused by server&#8221;
    </span> or <span class="quote">
      &#8220;Client is not authorized to connect to Server&#8221;
    </span></a></div></div>
  

  <p class="para">For some of you, an X server may be the most complicated
  piece of Windows software you have ever installed and run.
  If you encounter problems&#8230;</p>
  <div class="sect4" axle:nopage="1" id="cannotOpen"><div class="info_sect4"><div class="title_sect5">4.1.5.1. 
        <span class="quote">
      &#8220;Cannot Open Display<span class="hellip"/>&#8221;
    </span>
      </div></div>
    

    <p class="para">
      This message is the most common problem that arises when trying to run
      X applications. Possible causes:
      <div class="itemizedlist"><ul><li>
	  <p class="para">
	    If you are also getting a message <span class="quote">
      &#8220;connection 
	    &#8230; refused by server&#8221;
    </span> and/or <span class="quote">
      &#8220;Client
	    is not authorized to connect to Server&#8221;
    </span>, see
	    <a href="#refusedByServer">Section 4.1.5.7: <span class="title_xref"><span class="quote">
      &#8220;connection <span class="hellip"/> refused by server&#8221;
    </span> or <span class="quote">
      &#8220;Client is not authorized to connect to Server&#8221;
    </span></span></a>.
	  </p>
	</li><li>
	  <p class="para">
	    You forgot to start the X server before trying to
	    launch an application - See <a href="#runningx">Section 4.1.2: <span class="title_xref">Running X</span></a>
	  </p>
	  </li><li>
	    <p class="para">
	      You are running behind a firewall that is set to
	      an particularly paranoid level of protection.
	    </p>
	    <p class="para">
	      This can be a problem with ZoneAlarm and other firewalls
	      that prompt you for permission every time a new program
	      tries to access the network. It's all too easy to answer
	      "Block" just once and have that program be locked out
	      forever afterwards.
	    </p>
	    <p class="para">
	      It can also be a problem with some LINUX distributions
	      (e.g., some RedHat versions) that, by default, are 
	      configured with a firewall that blocks any X
	      connections from other clients. See <a href="#firewall">Section 4.1.5.2: <span class="title_xref">Firewalls, NAT, &amp; Internet Connection Sharing</span></a>,
	      below.
	    </p>
	  </li><li>
	    <p class="para">You are not connecting via <span class="command">ssh</span>
	    and one or more of the following is true:
	    <div class="itemizedlist"><ul><li>
		<p class="para">
		  You forgot to set the 
		  DISPLAY variable or to specify it as a
		  parameter when starting your X session --- See
		  <a href="#runningx">Section 4.1.2: <span class="title_xref">Running X</span></a>
		</p>
	      </li><li>
		<p class="para">
		  You misspelled your machine name or IP
		  address when typing your
		  DISPLAY value --- try again.
		</p>
	      </li><li>
		<p class="para">
		  You used a DISPLAY of the form <span class="uri">machineName:0</span>
		  but used an abbreviated machine name, e.g., 
		  <span class="quote">
      &#8220;daffodil&#8221;
    </span> instead of
		  <span class="quote">
      &#8220;daffodil.cs.odu.edu&#8221;
    </span>. Try using the full name
		  instead.
		</p>
	      </li><li>
		<p class="para">
		  You used a DISPLAY of the form
		  <span class="uri">machineName:0</span> but for some reason
		  your name isn't known to the client machine
		  (your internet service provider might not be
		  publishing your machine name to the general
		  internet DNS (domain name
		  service) --- Try using your IP address
		  instead.
		</p>
	      </li><li>
		<p class="para">
		  Your IP address begins with 10, 192, or
		  127 -- You're working from behind a firewall or NAT server.
		  See <a href="#firewall">Section 4.1.5.2: <span class="title_xref">Firewalls, NAT, &amp; Internet Connection Sharing</span></a>, below.
		</p>
	      </li><li>
		<p class="para">
		  You are running from behind a firewall that 
		  idoes not provide NAT (including Microsoft XP's
		  built-in firewall, ZoneAlarm, etc. 
		  See <a href="#firewall">Section 4.1.5.2: <span class="title_xref">Firewalls, NAT, &amp; Internet Connection Sharing</span></a>,
		  below.
		</p>
	      </li></ul></div>
	    </p>
	  </li></ul></div>
    </p>
  </div>
  <div class="sect4" id="firewall"><div class="info_sect4"><div class="title_sect5">4.1.5.2. Firewalls, NAT, &amp; Internet Connection Sharing</div></div>
    
    <p class="para">One serious barrier to using X on some machines is the action of other
programs that deliberately block signals from the X client from
reachng the local server software.</p>
    <p class="para"><span class="firstterm">Firewalls</span> are software security programs
that many people use to protect their networks from outside
hacking. One of the features of most firewalls is to block incoming
communications to sockets other than the reserved socket numbers for
email, http, or other services the corporation wants to support.
</p>
    <p class="para">Similar problems arise with
<span class="firstterm">Network Address Translation</span> (NAT),
a scheme for allowing multiple computers on a local network to share a
single internet connection. Microsoft Windows 98 and later offers a
form of NAT they call <span class="quote">
      &#8220;Internet Connection Sharing&#8221;
    </span>. Under this
arrangement, for example, I have three computers in my home that can
all access the internet through a single cable modem connection. To
the outside world, I appear to have only a single computer there,
because all three are sharing the same IP address.</p>
    <p class="para">If you are connected to cable modem service via a router, you are probably using NAT, a firewall, or both.</p>
    <p class="para">Why is this a problem? To answer that, we need to talk a little bit
about how machines provide different services to one another over the
internet.  Machine-to-machine communication over the internet is
generally carried out by sending signals to one of several
<span class="firstterm">sockets</span>, a software analogue of the hardware
device that allows you to <span class="quote">
      &#8220;plug in&#8221;
    </span> other devices.</p>
    <p class="para">Sockets are identified by numbers. Some numbers are reserved for
common internet services (telnet, ftp, email, and http all have their
own specific socket number).</p>
    <p class="para"><div style="clear:right;"/><table class="sidebar" border="1" width="40%"><tr><td><div class="figure"><div class="mediaobject"><img src="telneta.gif" alt="telnet connection" fileref="telneta.gif"/></div><div class="info_figure"><div class="title_figure">Figure 4: Making a telnet connection</div></div></div></td></tr></table>
For example, to make a telnet connection, your local PC sends a signal to a remote server asking for a connection on socket 23 (the socket number reserved for normal telnet connections). The server sends a signal back that acknowledges the request, and the resulting two-way communications channel is then used for your telnet session.
</p>

    <p class="para" style="clear:right;">
<div style="clear:right;"/><table class="sidebar" border="1" width="40%"><tr><td><div class="figure"><div class="mediaobject">
          <img src="telnet_firewalla.gif" alt="telnet connection through firewall" fileref="telnet_firewalla.gif"/>
        </div>
      <div class="info_figure"><div class="title_figure">Figure 5: Telnet Connections Through a Firewall</div></div></div>
    </td></tr></table>

If you are behind a firewall, telnet probably still works. That's
because most firewalls are designed to block connections initiated
from outside, but will allow requests initiated by local machines to
  "tunnel through".<a onmouseover="DBshowBriefly('fn_fref30_live')" name="fn_fref30" id="fn_fref30" class="footnotemark" href="#fn_fnote30">30</a><div class="footnote_live" id="fn_fref30_live">An exception: companies who want to prevent their employees from web surfing, using chat, etc., during work hours may set their firewalls to block even outgoing requests on the socket numbers associated with those services.</div>
</p>
    <p class="para" style="clear:right;">
X also communicates via sockets, using
socket number <span class="inlineequation"><span class="mathphrase">6000 + display-value</span></span>. For example, if
your DISPLAY is set this way:
<div class="screen"><span class="userinput">
setenv DISPLAY localMachineAddress:0
</span></div>
then X uses socket <span class="inlineequation"><span class="mathphrase">6000</span></span>, but if your display is set this way:
<div class="screen"><span class="userinput">
setenv DISPLAY localMachineAddress:2
</span></div>
then X uses socket <span class="inlineequation"><span class="mathphrase">6002</span></span>.
</p>
<p class="para" style="clear: right;">
  <div style="clear:right;"/><table class="sidebar" border="1" width="40%"><tr><td>
    <div class="figure">
      
      <div class="mediaobject">
        <img src="xa.gif" alt="x connection via telnet" fileref="xa.gif"/>
      </div>
    <div class="info_figure"><div class="title_figure">Figure 6: Making an X Connection via telnet</div></div></div>
  </td></tr></table>

  An X connection begins with an ordinary telnet session. Eventually, you issue a command to run some X program such as <span class="command">xterm</span>. That proram, running on the telnet server, then tries to open a connection via socket 6000<a onmouseover="DBshowBriefly('fn_fref31_live')" name="fn_fref31" id="fn_fref31" class="footnotemark" href="#fn_fnote31">31</a><div class="footnote_live" id="fn_fref31_live">I'll assume you are using display number 0, as is usually the case.</div> to your local PC. If you are running X server software on your local PC, it accepts the socket 6000 connection, and a new communications path is thereby established for X windowing information.
</p>

<p class="para" style="clear: right;">
  <div style="clear:right;"/><table class="sidebar" border="1" width="40%"><tr><td>
    <div class="figure">
      
      <div class="mediaobject">
        <img src="x_firewalla.gif" alt="telnet connection" fileref="x_firewalla.gif"/>
      </div>
    <div class="info_figure"><div class="title_figure">Figure 7: X Connection Blocked by a Firewall</div></div></div>
  </td></tr></table>
</p>
    <p class="para">Now, throw in a firewall, and things get messy. From the viewpoint of the firewall, the socket 6000 connection is being initiated by an outside machine. Most firewalls will block any such attempt. The connection attempt fails, and you see the dreaded <span class="quote">
      &#8220;could not open connection&#8230;&#8221;
    </span> message.</p>

    <p class="para">If you are trying to use X from behind a firewall, 
your best bet is to connect via a Secure Shell
(ssh), as described in <a href="#xforwarding">Section 4.1.5.3: <span class="title_xref">Running X via ssh</span></a>. Alternatively,
you might ask
the system's administrator to permit external connections to socket
6000. If you are running a Linux system, consult your documentation on
    <span class="quote">
      &#8220;ipchain&#8221;
    </span> and/or your firewall package 
to see how to do this.</p>

    <p class="para">A similar problem arises with <span class="firstterm">Network Address Translation</span> (NAT). 
NAT can confound X because when an X client tries to send information
to your X server software on socket 600x, the NAT software has no clue
as to which of its local machines it should route that information
to. Luckily, some NAT packages allow you to configure the software to
route specific socket requests to specific machines. Using
<a url="http://support.microsoft.com/support/kb/articles/Q231/1/62.ASP" href="http://support.microsoft.com/support/kb/articles/Q231/1/62.ASP">these instructions</a>, for example, I set up Windows Internet
Connection Sharing to route socket 6000 to one machine and 6001 to
another. Then I can run X server software on either machine and, by
setting my DISPLAY appropriately, have the X windows appear on the
machine I'm seated at.<a onmouseover="DBshowBriefly('fn_fref32_live')" name="fn_fref32" id="fn_fref32" class="footnotemark" href="#fn_fnote32">32</a><div class="footnote_live" id="fn_fref32_live">And I know I've gotten it wrong when
someone screams from the other room, <span class="quote">
      &#8220;Dad! What's this emacs thing
popping up on my screen?&#8221;
    </span></div></p>
    <p class="para">But the simplest way around this problem is to launch your remote programs via ssh, as described in <a href="#launchViaSsh">Section 4.1.2.2.1: <span class="title_xref">Launching via an ssh command</span></a> and <a href="#launchViaPutty">Section 4.1.2.2.2: <span class="title_xref">Launching via PuTTY</span></a>.</p>
  <div name="fn_fnote30" id="fn_fnote30" class="footnote">30. An exception: companies who want to prevent their employees from web surfing, using chat, etc., during work hours may set their firewalls to block even outgoing requests on the socket numbers associated with those services. (<a href="#fn_fref30">back</a>)
    </div><div name="fn_fnote31" id="fn_fnote31" class="footnote">31. I'll assume you are using display number 0, as is usually the case. (<a href="#fn_fref31">back</a>)
    </div><div name="fn_fnote32" id="fn_fnote32" class="footnote">32. And I know I've gotten it wrong when
someone screams from the other room, <span class="quote">
      &#8220;Dad! What's this emacs thing
popping up on my screen?&#8221;
    </span> (<a href="#fn_fref32">back</a>)
    </div></div>
  <div class="sect4" id="xforwarding"><div class="info_sect4"><div class="title_sect5">4.1.5.3. Running X via ssh</div></div>
    
    <p class="para">When you use ordinary telnet, ftp, or X over the internet, information
to and from your PC are being sent as clear text. In theory, anyone
else connected to the same local network as you (or as the machine
with which you are communicating) could be reading the packets of
information flowing by, writing down your passwords, etc.</p>
    <p class="para">Secure Shell (ssh) is an alternative set of internet tools that
provide telnet-like and ftp-like capabilities but transmit all
information in encrypted form, thus foiling potential eavesdroppers.</p>
    <p class="para">I mention this here because ssh has another benefit -- it can be used
to <span class="quote">
      &#8220;tunnel&#8221;
    </span> the X protocol through many firewalls and NAT
systems. </p>
    
<p class="para">
  <div style="clear:right;"/><table class="sidebar" border="1" width="40%"><tr><td>
    <div class="figure">
      
      <div class="mediaobject">
        <img src="sshxa.gif" alt="telnet connection" fileref="sshxa.gif"/>
      </div>
    <div class="info_figure"><div class="title_figure">Figure 8: making an X Connection via ssh</div></div></div>
  </td></tr></table>

ssh conections start off much like telnet connections, though the
socket number is 22 instead of 23. But if X tunnelling has been
specified, and we send a command to the ssh server to start running an
X program, things get very different.  </p>
    <p class="para">Our ssh connection on the server will run with a $DISPLAY
value that maps right back to the ssh server, though usually on an
unusually large display number.  Therefore when the X program tries to
open a connection to the X server that will display its windows, it
connects to itself, on a socket number that is watched by the ssh
server software. That ssh server software then sends a signal along
the already-established ssh communications path indicating that an X
connection was attempted. Back at your local PC, your ssh client
software then opens a connection to socket 6000 on your local PC,
where it gets picked up by your X server software.</p>
    <p class="para">
All of this is invisible to the firewall, because the "new" X
connections don't cross the firewall, and the actual X information is
channelled along an already existing ssh communications path.
</p>
    <p class="para">
To do this, you need two things:
<div class="orderedlist"><ol><li>The machine that will be running the X applications (the X
client) must also be running an ssh server.  Our lab.cs.odu.edu and
fast.cs.oddu.edu machines all run ssh servers.</li><li>The machine where the X windows graphics are to be displayed
(the X server) must have an ssh client program available.</li></ol></div>

</p>
    <p class="para">Where do you get an ssh client?</p>
    <p class="para"> Newer versions of X-Win32 and Exceed already include ssh
support. Beware, however, of the X-Win32 distribution provided by ODU
to all ODU students under its contract with StarNet. Once you enter
the registration code for that distribution, it is limited to
connections made with machines at ODU's IP addresses
(128.82.??.???). But, as the diagram above shows, when we tunnel X
through an ssh connection, the connection to our local PC's server
comes from that same PC itself (using a special IP addresss 127.0.0.1,
which is reserved to mean <span class="quote">
      &#8220;local machine&#8221;
    </span> - not via the
network). Since that address doesn't begin with 128.82, the ODU
distribution of X-Win32 refuses those connections.
<div class="itemizedlist"><ul><li>You can use X-Win32 from ODU's web site if you
  don't give it the ODU registration code. 
  </li><li>You <span class="emphasis">can</span> use X-Win32 downloaded from StarNet's own web
  site.</li></ul></div>
Either way, without a registration code,
it runs in <span class="quote">
      &#8220;demo&#8221;
    </span> mode where it must be shut down and
restarted every two hours.
  </p>
    <p class="para">ssh is also available as part of the CygWin package. And the <a url="http://www.chiark.greenend.org.uk/~sgtatham/putty/" href="http://www.chiark.greenend.org.uk/~sgtatham/putty/"><span class="command">PuTTY</span></a>
program, recommended earlier for use as a Windows telnet client, also
makes a good ssh client.  Finally, check out <a url="http://www.openssh.org/windows.html" href="http://www.openssh.org/windows.html">this list</a> from the
OpenSSH project at <a url="http://www.openssh.org" href="http://www.openssh.org">http://www.openssh.org</a>.</p>
  </div>


  <div class="sect4" id="xfast"><div class="info_sect4"><div class="title_sect5">4.1.5.4. X Applications Seem to be Unreasonably Slow</div></div><div class="TOC">Contents:<div class="TOC-section4"><a href="#section-4.1.5.4.1">4.1.5.4.1 Low Bandwidth Connections</a></div><div class="TOC-section4"><a href="#section-4.1.5.4.2">4.1.5.4.2 Low Bandwidth Connections</a></div></div>
    

    <p class="para">
      The first thing to consider is whether your problem is likely a 
      matter of low <span class="emphasis">bandwidth</span> or high 
      <span class="emphasis">latency</span>, as explained
      in <a href="#connections">Section 4.1.1.1: <span class="title_xref">X Performance and Your Internet Connection</span></a>.
    </p>

    <div class="sect5" axle:noPath="1" id="section-4.1.5.4.1"><div class="info_sect5"><div class="title_sect6">Low Bandwidth Connections</div></div>
      

      <p class="para">
	If your connection is slow at doing all manner of things that
	require tranferring large amounts of data (e.g., downloads,
	viewing web pages with large images or videos), your problem
	is likely to be a low bandwidth internet connection.  This is
	particularly likely to be a problem if you are connecting over
	a conventional dial-up modem, though it can be an issue for
	some supposedly high-bandwidth ISPs as well. Bandwidth
	problems can also arise if you have a good internet connection
	coming into a wireless router, but then connect to that router
	via a slow wireless connetion.
      </p>

      <p class="para">
	Some things to try:
	<div class="orderedlist"><ol><li>
	    <p class="para">
	      On dial-up modems, watch your connection speed. Even if
	      you are using a 56k modem, you might wind up with a much
	      slower connection. Furthermore, your connection speed
	      may actually go down as time passes if your phone
	      connection encounters a lot of line noise.
	    </p>
	    <p class="para">
	      Sometimes you can do better just by hanging up and reconnecting.
	    </p>
	  </li><li>
	    <p class="para">
	      Choose your applications carefully. Even at modem
	      speeds, xterm and emacs are generally going to run at
	      perfectly usable speeds. Applications with fancy
	      toolbars and graphics may run slowly, or may take a long
	      time to appear on your screen but then run at acceptable
	      speeds. For example, over a 53.3k connection, I find
	      that <span class="command">emacs</span> is ready to run in under
	      20 seconds, but <a href="../progdevx/#dddfig"><span class="command">ddd</span></a>
	      takes almost 4 minutes to appear (though its speed is OK
	      once it finally appears).  So, if I need to run a
	      debugger, I am more likely to run <a href="../debugging/"><span class="code">gdb-mode</span> within
	      <span class="command">emacs</span></a> than to use <a href="../progdevx/#dddfig"><span class="command">ddd</span></a>.
	    </p>
	  </li><li>
	    <p class="para">
	      You can reduce the amount of network traffic required by
	      X by telling your X server sofware to always use a
	      <span class="quote">
      &#8220;backing store&#8221;
    </span>. In X-Win32, this option is
	      found by right-clicking on the small blue
	      <span class="quote">
      &#8220;X&#8221;
    </span>, selecting X-config, and going to the
	      <span class="quote">
      &#8220;Display&#8221;
    </span> tab. A backing store is simply a
	      copy of the window's grpahics kept in your local
	      memory. This can be used to refresh the screen when part
	      of your X application gets momentarily covered up by
	      some other window, or if you iconify the X applicaiton
	      and then restore it from the task bar. Without a backing
	      store, all the graphics may need to be retrieved from
	      the remote client over your modem connection.
	    </p>

	    <p class="para">
	      This won't speed up all applications (the default
	      setting of many X servers is to use a backing store only
	      if the application program requests one, so some X
	      applications may already be getting a backing
	      store). But, for some, this might make a big difference.
	    </p>
	  </li><li>
	    <p class="para">
	      There is a very good chance that your X server software
	      supports a special extension to X that compresses
	      packets before sending them over the network. This is
	      called <span class="firstterm">LBX</span> (Low Bandwidth X).
	    </p>
	    <p class="para">
	      To use LBX, make your connection to the Unix machine on
	      which you want to run your X client applications. Make
	      sure your X server is running on your local machine. Set
	      the DISPLAY on the remote machine and test it by running
	      something simple (e.g., <span class="quote">
      &#8220;<span class="command">xterm
	      &amp;</span>&#8221;
    </span>). If all seems well, shut down
	      that that simple program and then do the following on
	      the remote Unix machine: 
<div class="screen">
<span class="userinput">lbxproxy -display $DISPLAY -terminate :1 &amp;
setenv DISPLAY unix:1
xterm &amp;
</span>
</div> 
              You should get
	      a new xterm window.  Now any X clients that you run from
	      that new xterm are actually being routed through the
	      <span class="code">lbxproxy</span> program, which compresses the X
	      packets before sending them on to your local
	      server. When you exit from all the compressed X client
	      applications, including that new xterm window, the
	      lbxproxy will shut down.
	    </p>
	  </li><li>
	    <p class="para">
	      Instead of using <span class="code">lbxproxy</span>, you can achieve a lesser
	      degree of compression by using <span class="command">ssh</span> (see <a href="#xforwarding">Section 4.1.5.3: <span class="title_xref">Running X via ssh</span></a>). Adding a <span class="command">-C</span> option
	      to your <span class="command">ssh</span> commands will request additional
	      compression.
	    </p>
	  </li></ol></div>
      </p>
    </div>

    <div class="sect5" axle:noPath="1" id="section-4.1.5.4.2"><div class="info_sect5"><div class="title_sect6">Low Bandwidth Connections</div></div>
      

      <p class="para">
	If your connection is fast at doing all manner of things that
	require tranferring large amounts of data (e.g., downloads,
	viewing web pages with large images or videos) <span class="emphasis-italic" role="italic">once the data starts flowing</span>, but you
	have to wait a long time for things to start, or if, when you
	work in telnet, you seem to get long pauses after issuing each
	command , your problem is likely to be a high latency internet
	connection.  This is particularly likely to be a problem with
	broadband services that route you through satellites.
      </p>

      <p class="para">
	You can certainly try the fixes listed above for low bandwidth
	connections. If your problem is really latency, they are
	unlikely to help. But they probably won't hurt either, and if
	your problem is really a combination of low bandwidth and high
	latency, you ay see some improvement. Otherwise, try these:
      </p>

      <div class="orderedlist"><ol><li>
	  <p class="para">
	    Get out the old modem and find a cheap dial-up ISP. I have
	    had students in remote, mountainous regions report that,
	    although they would continue to use their satellite
	    broadband (their ownly available broadband option) for web
	    browsing, they got better responses by using dial-up for
	    their programming work.
	  </p>
	</li><li>
	  <p class="para">
	    Try connecting to an X session via <a url="#vnc" href="#vnc">VNC</a>. VNC will likely require higher bandwidth than X, but some students have reported that it works better in high latency situations.
	  </p>
	</li></ol></div>
    </div>

</div>

  <div class="sect4" id="xtermFont"><div class="info_sect4"><div class="title_sect5">4.1.5.5. 
        <span class="quote">
      &#8220;xterm:  unable to locate a suitable font&#8221;
    </span>
      </div></div>
    
    <p class="para">
This message is usually caused by a font configuration problem on the Unix side. There is a simple workaround, however.
</p>
    <p class="para">
 Log into your Unix account. Using emacs or some other editor, create a file named <span class="code">~/.Xdefaults</span> In that file, place the following lines:
<div class="programlisting">
xterm*Font:-*-lucidatypewriter-bold-r-*-*-12-*-*-*-*-*-*-*
xterm*Geometry:80x36
xterm*foreground:midnight blue
xterm*background:white
</div>
(Actually the first line is the critical one for this error - but you might find the effects of the other lines interesting. You may also wnat to paly around with other combinations.)
</p>
  </div>


  <div class="sect4" id="connect-localhost"><div class="info_sect4"><div class="title_sect5">4.1.5.6. <span class="quote">
      &#8220;connect localhost port 6000: Connection refused&#8221;
    </span></div></div>
    

<p class="para">The important thing about this message is that it indicates that the problem was with <span class="quote">
      &#8220;localhost&#8221;
    </span> (or <span class="quote">
      &#8220;127.0.0.1&#8221;
    </span>), which is the local machine that you are sitting at. The problem is not that some remote machine out on the internet has refused you access, but that the machine you are sitting at has in fact refused to allow a connection from itself to itself.
</p>

<p class="para">This is pretty much an obvious sign of a firewall or other security program getting in the way. You might have gotten a pop-up window warning that a program (either <span class="command">XWin.exe</span> or <span class="command">ssh.exe</span>) was trying to make or accept a connection on port 6000. If you told the firewall to block it, that's the problem. If your firewall or security program is set to block unexpected connections without even asking you, that could be the problem.</p>

<p class="para">The easiest way to check this would be to teporarily turn off your firewall and security software, then try launching an X client again. Unfortunately, I've seen some cases where even a switched-off firewall stays partly active and continues blocking things that it believes it has been previously told to block.
</p>

<p class="para">The exact fix for this depends a great deal on what firewall/security software you are running, but somehow you need to convince them to trust <span class="command">XWin.exe</span> and <span class="command">ssh.exe</span>. Here are <a url="http://www.microsoft.com/windowsxp/using/security/internet/sp2_wfexceptions.mspx" href="http://www.microsoft.com/windowsxp/using/security/internet/sp2_wfexceptions.mspx">instructions</a> for telling the Windows firewall to allow exceptions. Try adding 
<span class="command">XWin.exe</span> and <span class="command">ssh.exe</span> as exceptions (browsing to the directory where they are installed, probably <span class="filename">c:\cygwin\cygwin\usr\X11R6\bin\XWin.exe</span> and <span class="filename">c:\cygwin\cygwin\bin\ssh.exe</span>. You might also want to try opeing port 6000.</p>

  </div>


  <div class="sect4" id="refusedByServer"><div class="info_sect4"><div class="title_sect5">4.1.5.7. <span class="quote">
      &#8220;connection <span class="hellip"/> refused by server&#8221;
    </span> or <span class="quote">
      &#8220;Client is not authorized to connect to Server&#8221;
    </span></div></div>
    
    <p class="para">
The "not authorized" and "refused by server" messages means that you
got at least part way through the process of forming an X
connection. The X client (xterm) running on the remote machine was
able to actually talk to your X server software (running on the PC you are seated at) but your X server
software's security settings shut it down.
</p>
    <p class="para">This message generally comes from StartNet's XWin32. I've never seen it reported from users of Cygwin/X.
</p>
    <p class="para">Things to check:
<div class="itemizedlist"><ul><li>If you are using ssh to connect to X-win32, and if you downloaded it from the ODU site, then it is important that you followed <a url="http://www.cs.odu.edu/~cs252/readings/installingXWin.html" href="http://www.cs.odu.edu/~cs252/readings/installingXWin.html">these instructions</a> for installing it, rather than the instructions included in the downloaded package. 
  <p class="para">In particular, did you enter the OCCS registration key during installation instead of just "demo"? (XWin32 should warn you that you are in demo mode every time it starts up.) If you entered that code, you cannot use ssh to launch a session and therefore cannot use X-Win32 from behind a firewall/NAT server. You will need to uninstall X-Win32 and then reinstall using my directions.</p>
</li><li>Run the X-Win32 X-config program and check the "Security" tab. Make sure that "Access Control" and "Use XAuth" are both clear. Click OK in X-config and shut down XWin32 if you have it running. Restart XWin32 and try to connect again.</li><li>If you still get the "not authorized" message, then go back to that security tab again. This time, click "Access Control" and use the "Add..." button to add to the X-host list:
<div class="programlisting">
       localhost
       127.0.0.1
</div>
Again, click OK in X-config and shut down XWin32 if you have it running. Restart XWin32 and try to connect again <span class="emphasis-italic" role="italic">via ssh</span>. 
</li></ul></div>
</p>
  </div>
</div><div class="sect3" id="alternatives"><div class="info_sect3"><div class="title_sect4">4.1.6. Alternative &amp; Related Technologies</div></div><div class="TOC">Contents:<div class="TOC-section3"><a href="#RDP">4.1.6.1 Remote Desktop Protocol (RDP)</a></div><div class="TOC-section3"><a href="#vnc">4.1.6.2 Virtual Network Computing (VNC)</a></div></div>
    

    <p class="para">
      X is one of the earliest protocols to support a GUI connection
      to remote machines, dating back to 1984. Not surprisingly,
      alternatives have arisen, though sometimes for slightly
      different purposes. In particular, conferencing systems allowing
      various degrees of application sharing or desktop sharing are a 
      hot topic. In addition to those, a couple of desktop sharing 
      systems worth mentioning:
    </p>



    <div class="sect4" axle:nopage="1" id="RDP"><div class="info_sect4"><div class="title_sect5">4.1.6.1. Remote Desktop Protocol (RDP)</div></div>
      

      <p class="para">
	Most Windows systems feature a remote desktop capability. You
	have to activate it to show anyone your desktop. Viewers
	(called RDP - Remote Desktop Protocol - viewers) are common
	even for Linux and other non-Windows systems. Some Linux
	distributions now offer RDP servers as well, allowing you to
	access their desktops from remote locations.
      </p>
    </div>


    <div class="sect4" id="vnc"><div class="info_sect4"><div class="title_sect5">4.1.6.2. Virtual Network Computing (VNC)</div></div>
      

      <p class="para">
	VNC is a popular solution for small groups who want to view
	and/or manipulate a shared desktop. Windows, Linux, &amp; Mac
	machines can all participate equally.  You need someone to
	"host" the group by running a VNC server. The host machine's
	screen will be visible to everyone who joins the
	session. Optionally, these remote participants may be able to
	supply mouse and keyboard input as well.
      </p>

      <p class="para">
	I recommend <span class="a" href="http://www.tightvnc.com">TightVNC</span>, a
	free VNC package with a lot of nice features. One convenient
	one is that only the host absolutely needs to install the
	software. The server can generate a web page that runs the
	viewer as an applet. All the non-host participants simply
	direct their browsers to a special URL and the viewer software
	will be loaded and run automatically. (Of course, there is
	also a non-applet viewer that is a bit faster and offers more
	options/features.
      </p>

      <p class="para">
	The trickiest part of hosting a VNC session is that everyone
	else must be able to conenct to a specific port (or pair of
	ports) on the host machine. This may require opening a special
	hole in your firewall. It's a reasonably safe thing to do, but
	the procedure varies according to the firewall/router you are
	using, and some people may stumble over this.
      </p>

      <p class="para">
	Another option would be to run a VNC server on one of the CS
	Dept Unix machines, then connect to it to view the "desktop"
	on that Unix machine. Since this "desktop" is actually an X
	session, VNC can actually be used as an indirect way of
	running X-based applications. Some people have reported that
	this approach works better than a direct connection if their
	internet conenction has high latency.
      </p>

      <p class="para">
	To do this, ssh or telnet in to one of the CS Unix
	machines. For the sake of this example, let's say you chose
	<span class="code">tango.cs.odu.edu</span>. On that machine, give the command

<div class="screen"><span class="userinput">
vncserver :NN -once
</span></div>

        where NN is a two-digit number. I'd suggest starting around
        20. If you get a message saying that there is already a
        vncserver on that port, try a different number. Eventually you
        should be asked to pick a password. Choose one. If you are
        using VNC just as an X alternative, this password prevents
        others from hijacking your X session. If you were using VNC as
        a way of collaboriating with other people on a team project,
        you would let them know the NN you chose and the password via
        email, telephone, IM, etc. (This same password will be used
        for any future VNC sessions you create unless you delete the
        file <span class="code">~/.vnc/passwd</span>).
      </p>

      <p class="para">
	Now that a VNC server is running on your chosen machine, you
	need to run a VNC viewer (e.g., <span class="code">vncviewer.exe</span>
	from the TightVNC package) on your local PC. When asked what
	machine you want to connect to, respond with
	<span class="code">tango.cs.odu.edu::59NN</span>, replacing the NN by the
	two-digit number selected earlier. Of course, if you chose a
	different machine other than tango, change that name too. Also
	note that those are two colons between the machine and number,
	not just one.
      </p>

<div class="figure" id="vncx">
  
  <span class="inlinemediaobject">
    <img src="vncx.gif" fileref="vncx.gif"/>
  </span>
<div class="info_figure"><div class="title_figure">Figure 9: An X Session via VNC</div></div></div>


      <p class="para">
	You should then see a large rectangular window open up with a
	smaller window inside it (<a href="#vncx">Figure 9: <span class="title_xref">An X Session via VNC</span></a>). The outer 
	rectangle is a "virtual
	desktop". The inner window is an xterm running on the Unix
	machine. Try issuing a few commands in that xterm. Try moving
	it (click on the title bar and drag). Click on the open area
	of the desktop to open up a menu of basic desktop options.
      </p>

      
      <p class="para">
	When you  done, shut down the server by giving the command
<div class="screen"><span class="userinput">
vncserver -kill :NN
</span></div>
      </p>

    </div>



  </div></div><script type="text/javascript">
checkForAnchorOnOtherPage('section-4.2','section-4.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('emacsinx','section-4.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('emacsintelnet','section-4.2');
</script></div><script type="text/javascript">
checkForAnchorOnOtherPage('section-5','section-5');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-5.1','section-5');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-5.1.1','section-5');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-5.1.2','section-5');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('mailcommand','section-5');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('mailsend','section-5');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-5.1.3.2','section-5');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref33','section-5');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref33_live','section-5');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote33','section-5');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('popmail','section-5');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-5.2','section-5.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('pinemain','section-5.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('pinecompose','section-5.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('pineindex','section-5.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-6','section-6');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('xfermode','xfermode');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('xfersamba','xfersamba');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref34','xfersamba');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref34_live','xfersamba');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote34','xfersamba');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('internetftp','internetftp');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('anonprivateftp','internetftp');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref35','internetftp');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref35_live','internetftp');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote35','internetftp');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('ftpclient','internetftp');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref36','internetftp');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref36_live','internetftp');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref37','internetftp');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref37_live','internetftp');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote36','internetftp');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote37','internetftp');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('xferproblems','xferproblems');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('dostounix','xferproblems');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('unixtodos','xferproblems');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-7','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-7.1','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-7.1.1','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('compshell','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref38','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref38_live','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('cStructure','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref39','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref39_live','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fig:compilation','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-7.1.1.1.1.1','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-7.1.1.1.1.2','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote39','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('compilingSingle','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('compilingMultiple','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('compilerOptions','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref40','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref40_live','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref41','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref41_live','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote40','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote41','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote38','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('errmsgs','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('capturing','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref42','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref42_live','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote42','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('understanding','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('javacomp','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref43','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref43_live','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('jproject','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote43','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-7.1.1.4','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('emacserr','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('emacs-next-error','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref44','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref44_live','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote44','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('vimcompile','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('vimscreen','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-7.1.2','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref45','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref45_live','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-7.1.2.1','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-7.1.2.2','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('artificial-targets','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('writingMakefiles','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-7.1.2.5','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote45','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-7.1.3','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-7.1.3.1','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref46','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref46_live','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref47','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref47_live','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote46','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote47','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-7.1.3.2','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-7.1.3.3','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('gdbmode','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref48','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref48_live','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref49','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref49_live','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote48','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote49','section-7');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-7.2','section-7.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-7.2.1','section-7.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-7.2.2','section-7.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('gdbxfig','section-7.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('dddfig','section-7.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-8','section-8');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-8.1','section-8');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref50','section-8');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref50_live','section-8');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('loginCustom','section-8');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref51','section-8');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref51_live','section-8');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref52','section-8');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref52_live','section-8');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote51','section-8');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote52','section-8');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('xCustom','section-8');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('programCustom','section-8');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote50','section-8');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-8.2','section-8.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-8.2.1','section-8.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('controlflow','section-8.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref53','section-8.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref53_live','section-8.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote53','section-8.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-8.2.3','section-8.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-8.2.4','section-8.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-8.2.4.1','section-8.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-8.2.4.2','section-8.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('scriptDebugging','section-8.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-8.2.5.1','section-8.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('section-8.2.5.2','section-8.2');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('tracing','section-8.2');
</script><br/><table width="100%" class="navigationBar"><tr class="navigationBar"><td width="5%" class="navigationBar"><a class="navigationBarArrow" title="First" href="http://cocoon.cs.odu.edu:80/cocoon/~cs252/open/unix/unix.html"><img class="navigationBar" src="_axle/first.gif" alt="First"/></a></td><td width="5%" class="navigationBar"><a class="navigationBarArrow" title="Prev" href="http://cocoon.cs.odu.edu:80/cocoon/~cs252/open/unix/section-3.6.html"><img class="navigationBar" src="_axle/prev.gif" alt="Prev"/></a></td><td width="5%" class="navigationBar"><a class="navigationBarArrow" title="Up" href="http://cocoon.cs.odu.edu:80/cocoon/~cs252/open/unix/unix.html"><img class="navigationBar" src="_axle/up.gif" alt="Up"/></a></td><td width="5%" class="navigationBar"><a class="navigationBarArrow" title="Next" href="http://cocoon.cs.odu.edu:80/cocoon/~cs252/open/unix/section-4.2.html"><img class="navigationBar" src="_axle/next.gif" alt="Next"/></a></td><td width="5%" class="navigationBar"><a class="navigationBarArrow" title="Last" href="http://cocoon.cs.odu.edu:80/cocoon/~cs252/open/unix/section-8.2.html"><img class="navigationBar" src="_axle/last.gif" alt="Last"/></a></td><td class="navigationBar"/><td width="5%" class="navigationBar"><a class="navigationBar" title="CS252 Home" href="http://cocoon.cs.odu.edu:80/cocoon/~cs252/directory/announcements.html"><img class="navigationBar" src="_axle/home.gif" alt="CS252 Home"/></a></td><td width="5%" class="navigationBar"><a class="navigationBar" title="discuss this page" href="http://cocoon.cs.odu.edu:80/cocoon/~cs252/forum/getXPath/open/unix/section-4.html"><img class="navigationBar" src="_axle/forum.gif" alt="discuss this page"/></a></td></tr></table></body></html>