home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 13 / CDA13.ISO / DOC / HOWTO / OTHER_FO / SGML / TERM_HOW.GZ / Term-HOWTO.sgml
Encoding:
SGML Document  |  1996-02-11  |  92.4 KB  |  2,051 lines

  1. <!doctype linuxdoc system>
  2. <article>
  3. <title> <tt>TERM</tt> HOWTO
  4. <author>Patrick Reijnen <tt>patrickr@bart.nl</tt> </author>
  5. <date>v1.2, 15 July 1995
  6. <toc>
  7.  
  8. <sect>Legal Information
  9. <p>
  10.  
  11. <sect1>Copyright statement
  12. <p>
  13. This document may be distributed freely as a whole in any form and free of charge. Parts of this document may be distributed, provided that this copyright message is included and the reader is informed that this is not the full HOWTO document. Furthermore, there is to be a pointer as to where the full document can be obtained. Specifically, it may be included in commercial distributions, without prior consent. However, I would like to be informed of such usage.
  14.  
  15. This HOWTO may be translated into any language, whatsoever, provided that you leave this copyright statement and the disclaimer intact, and that a notice is appended stating who translated the document.
  16.  
  17. <sect1>DISCLAIMER
  18. <p>
  19.  
  20. While I have tried to include the most correct and up-to-date information available, I cannot guarantee that usage of the information in this document does not result in loss of data. I provide NO WARRANTY about the information in this HOWTO and I cannot be made liable for any consequences for any damage resulting from using information in this HOWTO.
  21.  
  22. <sect>Introduction 
  23. <p>
  24.  
  25. <sect1>This Document 
  26. <p> 
  27.  
  28. This HOWTO attempts to clear up some of the confusion of using
  29. <tt>TERM</tt>, Michael O'Reilly's remarkable program that allows you
  30. to multiplex your serial line and set up a network connection.
  31. By and large, the documents that come with <tt>TERM</tt> are quite
  32. good, and this HOWTO is not intended to replace them. The intention of
  33. this document is to give some background on how <tt>TERM</tt> works
  34. and detail the steps in getting some of the more common networking
  35. services working under <tt>TERM</tt>. It should be emphasized that this
  36. document does not cover everything there is to know about
  37. <tt>TERM</tt>. After reading it, the <tt>TERM</tt>
  38. manual pages should be read, since they include information not contained here.
  39.  
  40. <sect1> What is <tt>TERM?</tt>
  41. <p>
  42. <tt>TERM</tt> is a program, written by Michael O'Reilly
  43. (michael@iinet.com.au) and maintained by Bill Riemers (bcr@physics.purdue.edu), that is run over a serial line to allow
  44. multiple connections to operate concurrently - <it>i.e.</it> you may
  45. be down-load a file via your modem while working on a (different)
  46. remote system via the same modem connection. <tt>TERM</tt> can also
  47. be used to open up X client windows over a serial connection.  Through
  48. the <tt>tredir</tt> utility and the <tt>tudpredir</tt> utility <tt>TERM</tt> can provide almost all of the 
  49. ``traditional'' TCP/IP and UDP network services: mail, news, ftp, telnet, xarchie, etc.  In a
  50. sense, <tt>TERM</tt> is very much like other serial protocols such
  51. as SLIP or PPP. <tt>TERM</tt>'s advantage is that it can be run
  52. entirely from user space, requiring no support
  53. from system or network administrators.
  54.  
  55. Unlike SLIP or PPP, your machine does not have its own IP address. All incoming traffic must be addressed to your remote host, and it will be redirected to your local computer by <tt>TERM</tt>.
  56.  
  57. <sect>How <tt>TERM</tt> works
  58. <p>
  59.  
  60. Before experimenting with <tt>TERM</tt> it is strongly advised to first read this complete chapter and the INSTALLATION file provided with the package. Also take a look at the manual pages <tt>linecheck</tt>, <tt>(term)test</tt> and <tt>TERM</tt>. This will help you to work easier and faster. 
  61.  
  62. <sect1> Nomenclature
  63. <p>
  64.  
  65. I assume you are dialling a system through some sort of terminal
  66. server. I use the terms <it>local</it> and <it>remote</it> to refer to the home
  67. and network connected systems respectively (unless I use them to mean
  68. something else :-).
  69.  
  70. <tt>TERM</tt> provides the local machine, which has no network
  71. connection, but is connected, via a serial line, to a remote machine
  72. which is in turn connected to a network with network services. Let us look at how a machine with a
  73. 'traditional' network connection provides these services. First the
  74. user invokes a program, like <tt>ftp</tt> or <tt>telnet</tt>, that
  75. requests a network service. What these programs do is make a system
  76. call requesting network services. The operating system then obtains
  77. these services via its network interface (<it>e.g.</it> it sends and
  78. receives packets over the ethernet). SLIP and PPP do exactly this, by
  79. converting your modem line into a network interface, which is in
  80. principle no different from an ethernet. The downside of this is that
  81. these protocols make the modem-connected machine part of the network,
  82. just like any other machine. This implies all the administrative
  83. burdens associated with being a network node (more actually, since the
  84. modem link must also be administered).
  85.  
  86. In the absence of a network connection like SLIP or PPP, what does one
  87. typically do? Well, you dial your network connected machine, read
  88. your mail, your news etc; if you need a file, you first transfer it to
  89. the remote machine and then download it to your local machine using
  90. <tt>kermit</tt> or some other communication program. This is a bit of a pain, especially since
  91. you can only really do one thing at a time that uses your modem link.
  92. The idea behind <tt>TERM</tt> is basically to automate and multiplex
  93. this process. <tt>TERM</tt> is invoked on both the local and remote
  94. machines, and the two processes communicate with one another over the
  95. modem line. When you need a network service, you make a request to the
  96. local <tt>TERM</tt> daemon, which forwards the request to the
  97. <tt>TERM</tt> daemon on the remote, network-connected, machine. The
  98. result is then returned over the modem line.
  99.  
  100. To be more concrete, say you want to retrieve a file by <tt>ftp.</tt>
  101. First you need a version of <tt>ftp</tt> that can speak to
  102. <tt>TERM</tt>. You invoke this <tt>termftp</tt> as you do a regular
  103. <tt>ftp</tt>, say <tt>termftp nethost.gov</tt>, but this special
  104. version makes its network request to the local <tt>TERM</tt> daemon
  105. instead of the kernel. The local <tt>TERM</tt> forwards this request,
  106. over the modem line, to the remote <tt>TERM</tt>, which opens an ftp
  107. connection to <tt>nethost.gov</tt>, and transmits the data back over
  108. the modem link. <tt>TERM</tt> is smart enough to have many different
  109. things going on at once; so you can have several different network
  110. sessions using the same modem link, <it>e.g.</it> you can be logged
  111. into another distant host via <tt>termtelnet</tt> while the <tt>
  112. termftp</tt> transfer is going on.
  113.  
  114. If this is too abstract (or unclear) do not worry; the important piece
  115. of information to get out of this section is that there are <it>two
  116. </it> copies of <tt>TERM</tt> running, one on each end of the modem
  117. link.
  118.  
  119. <sect>Setting Things Up
  120. <p>
  121.  
  122. <sect1>What has to be available
  123. <p>
  124.  
  125. Before you start building and using <tt>TERM</tt> you have to make sure that you have built TCP/IP support into the kernel. Furthermore, make sure that the TCP/IP loopback interface is activated. When this is the case you can go on with the rest of this section. 
  126.  
  127. <sect1>Explanation of concepts
  128. <p>
  129.  
  130. In newer <tt>TERM</tt> version two new concepts have entered <tt>TERM</tt>. These two concepts will be explained in the next two subsections.
  131.  
  132. <sect2>Sharing
  133. <p>
  134.  
  135. Starting with version 1.16 the concept of <tt>sharing</tt> the <tt>TERM</tt> connection with other users has entered <tt>TERM</tt>. This means that when you enable shared features, other people can use the same <tt>TERM</tt> connection you are using, i.e. when you are working on your remote machine via your <tt>TERM</tt> connection (say, from your local machine you used trsh to get in) another person on your local machine can use the same <tt>TERM</tt> connection at the same time to ftp a file to his login on your local machine from an ftp site somewhere in the world.
  136.  
  137. When you disable shared features (i.e. you execute <tt>TERM</tt> in private mode) you and only you (we do not count root :-) can use the <tt>TERM</tt> connection.
  138.  
  139. Of course, you only need to install shared <tt>TERM</tt> at the end at which you want to allow people to use the same <tt>TERM</tt> connection you are using. So, if other people have a login on your local machine and they want to use it from somewhere on your remote network you enable shared features on the remote end of your <tt>TERM</tt> connection. In this way all these people can login on your machine at the same time sharing the same <tt>TERM</tt> connection with each other and with you. (NOTE: the first example needed shared features to be enabled at the local end of the <tt>TERM</tt> connection).
  140.  
  141. <bf>NOTE for installation as root:</bf>
  142. When you install <tt>TERM</tt> as root you have to create a 'term' group first (before compilation) with no member by adding the following line in '/etc/group':
  143.  
  144. <verb>
  145.   term::16:root
  146. </verb>
  147.  
  148. or any other unused GID than 16 when 16 is already in use.
  149.  
  150. After compilation and installation make <tt>TERM</tt> and its clients SGID 'term':
  151.  
  152. <verb>
  153.   chgrp term <term_client>
  154.   chmod g+s <term_client>
  155. </verb>
  156.  
  157. Also any other program that you make TERM-aware must be made SGID 'term'.
  158.  
  159. <sect2>Full TERM networking
  160. <p>
  161.  
  162. Starting with <tt>TERM</tt> version 2.0.0 the statement <tt>full TERM networking</tt> is used. When your only connection with the outside world is a <tt>TERM</tt> connection, you have a full <tt>TERM</tt> network and you should build <tt>TERM</tt> with full <tt>TERM</tt> networking. In this case in the shared directory a file called <tt>termnet</tt> is placed. This tells <tt>TERM</tt> that your only connection to the outside world is via <tt>TERM</tt>.
  163.  
  164. When you also have some other type of network connection beside your <tt>TERM</tt> connection TERM-aware programs first try to fulfil their job using this network connection. When this fails <tt>TERM</tt> is invoked and it is tried to fulfil the job via the <tt>TERM</tt> connection. To make this more clear now an example is given in which <tt>TERM-aware telnet</tt> is used. This telnet should work both with and without <tt>TERM</tt>.
  165.  
  166. <verb>
  167.   telnet localhost
  168. </verb>
  169.  
  170. does not use <tt>TERM</tt> to connect, but
  171.  
  172. <verb>
  173.   telnet zeus.cs.kun.nl
  174. </verb>
  175.  
  176. will use <tt>TERM</tt> only if you do not have some other type of network connection.
  177.  
  178. <tt>Full TERM networking</tt> also means to lie about the host name, and say it is the remote host instead.  Furthermore, it causes bind(0) to always act on the
  179. remote host.  In essence it makes many programs unusable when they are not going through <tt>TERM</tt>, while <tt>TERM</tt> is
  180. running.  Unfortunately, most UDP programs
  181. and daemons will not work with <tt>TERM</tt> without these nasty tricks.
  182.  
  183. <sect1>Build <tt>TERM</tt>
  184. <p>
  185.  
  186. When you are lucky, this should just involve a <tt>make</tt>. Most probably however, you need to do more. Due to new features in newer versions of <tt>TERM</tt> it is now a bit more complicated to create your <tt>TERM</tt> binary. A couple of ways can be followed to obtain your binary.
  187.  
  188. To cover all these ways <tt>TERM</tt> can be built this section will be split into three parts:
  189.  
  190. <enum>
  191. <item>Build <tt>TERM</tt>, versions 2.0.0 and higher</item>
  192. <item>Build <tt>TERM</tt>, versions 1.16 up to 1.19 </item>
  193. <item>Build <tt>TERM</tt> up to version 1.15 </item>
  194. </enum>
  195.  
  196. <sect2> Build <tt>TERM</tt>, versions 2.0.0 and higher
  197. <p>
  198.  
  199. First, make sure you have read the section about 'full TERM networking' above.
  200.  
  201. For <tt>TERM</tt> versions 2.0.0 and higher there are many ways to build the <tt>TERM</tt> binary and the clients. All of these can be done both by root and by ordinary user:
  202.  
  203. <enum>
  204. <item>Build <tt>TERM</tt> in private mode without full <tt>TERM</tt> networking</item>
  205. <item>Build <tt>TERM</tt> in private mode with full <tt>TERM</tt> networking</item> 
  206. <item>Build <tt>TERM</tt> in shared mode without full <tt>TERM</tt> networking</item>
  207. <item>Build <tt>TERM</tt> in shared mode with full <tt>TERM</tt> networking</item>
  208. </enum>
  209.  
  210. In these versions of <tt>TERM</tt> a new way for compilation has entered <tt>TERM</tt> using the script <tt>configure</tt>. When configure is run it checks on what operating system you are trying to install <tt>TERM</tt>, whether the source directory is available or not, and if any runtime options are set. According to the things found configure then creates a <tt>Makefile</tt> using Makefile.in which is provided in the <tt>TERM</tt> package.
  211.  
  212. Two of the more important options to configure are <tt>--root</tt> and <tt>--user</tt> which state whether <tt>TERM</tt> will be installed by root or an ordinary user. Other options can be used to install <tt>TERM</tt> the way you want (non-standard paths for example).
  213.  
  214. <enum>
  215. <item> Build <tt>TERM</tt> in private mode without full <tt>TERM</tt> networking.
  216.  
  217. To build <tt>TERM</tt> in this way you need to execute the following commands (both for root and ordinary user):
  218.  
  219. <verb>
  220.   ./configure --root  OR --user
  221.   make install installman
  222. </verb>
  223.  
  224. This builds the binaries and installs these binaries and the manual pages.
  225. </item>
  226.  
  227. <item> Build <tt>TERM</tt> in private mode with full <tt>TERM</tt> networking.
  228.  
  229. To build <tt>TERM</tt> in this way you need to execute the following commands (both for root and ordinary user):
  230.  
  231. <verb>
  232.   ./configure --root  OR --user
  233.   make installnet installman
  234. </verb>
  235.  
  236. This builds the binaries and installs these binaries and the manual pages.
  237. </item>
  238.  
  239. <item> Build <tt>TERM</tt> in shared mode without full <tt>TERM</tt> networking.
  240.  
  241. To build <tt>TERM</tt> in this way you need to execute the following commands (both for root and ordinary user):
  242.  
  243. <verb>
  244.   ./configure --root  OR --user
  245.   make share installman
  246. </verb>
  247.  
  248. This builds the binaries and installs these binaries and the manual pages.
  249. </item>
  250.  
  251. <item> Build <tt>TERM</tt> in shared mode with full <tt>TERM</tt> networking.
  252.  
  253. To build <tt>TERM</tt> in this way you need to execute the following commands (both for root and ordinary user):
  254.  
  255.  
  256. <verb>
  257.   ./configure --root  OR --user
  258.   make share installnet installman
  259. </verb>
  260.  
  261. This builds the binaries and installs these binaries and the manual pages.
  262. </item>
  263. </enum>
  264.  
  265. <sect2> Build <tt>TERM</tt>, versions 1.16 up to 1.19
  266. <p>
  267.  
  268. To build these versions of <tt>TERM</tt> you can now choose one of the following ways:
  269.  
  270. <enum>
  271. <item>As an ordinary user, build <tt>TERM</tt> in private mode</item>
  272. <item>As an ordinary user, build <tt>TERM</tt> in shared mode</item> 
  273. <item>As root, build <tt>TERM</tt> in private mode</item>
  274. <item>As root, build <tt>TERM</tt> in shared mode</item>
  275. </enum>
  276.  
  277. Below, it will be explained how to enable/disable shared features during the compilation of <tt>TERM</tt>.
  278.  
  279. <enum>
  280. <item>You are an ordinary user (no root access) and you do NOT want to SHARE the <tt>TERM</tt> connection with other users.
  281.  
  282. As a user who does not want to share the <tt>TERM</tt> connection with other users you should do the following to build <tt>TERM</tt>:
  283.  
  284. <verb>
  285.   make DO=install OS-type
  286.   make installman
  287. </verb>
  288.  
  289. After this <tt>TERM</tt>, its clients and the manual pages are built and installed.
  290.  
  291. Furthermore, you need to create a directory '$HOME/.term'. This is the directory in which <tt>TERM</tt> will look for its 'termrc' file.
  292.  
  293. </item>
  294.  
  295. <item>You are an ordinary user (no root access) and you want to SHARE the <tt>TERM</tt> connection with other users.
  296.  
  297. As a user who wants to share the <tt>TERM</tt> connection you should do the following:
  298.  
  299. <verb>
  300.   make DO=installshare USERSHARE=$HOME/term OS-type
  301.   make installman
  302. </verb>
  303.  
  304. After this <tt>TERM</tt>, its clients and the manual pages are built and installed.
  305.  
  306. Furthermore, you will have a directory '$HOME/term' (default) with permissions 'drwxrwxr-x'. In this directory you will find at least the socket used by <tt>TERM</tt> for its connection ('tmp/private/socket=').
  307. </item>
  308.  
  309. <item>You are <tt>root</tt> and you do NOT want to SHARE the <tt>TERM</tt> connection with other users.
  310.  
  311. As root who does not want the <tt>TERM</tt> connection to be shareable you should do the following to build <tt>TERM</tt>:
  312.  
  313. <verb>
  314.   make DO=install OS-type
  315.   make installman
  316. </verb>
  317.  
  318. After this <tt>TERM</tt>, its clients and the manual pages are built and installed.
  319.  
  320. Furthermore, you now have a directory called '/usr/local/lib/term' (default) with permissions 'drwxr-xr-x'. In this directory you will at least find the socket used by <tt>TERM</tt> for its connection ('tmp/private/socket=').
  321.  
  322. </item>
  323.  
  324. <item>You are <tt>root</tt> and want to SHARE the <tt>TERM</tt> connection.
  325.  
  326. First, make sure you have read the section about 'sharing' above.
  327.  
  328. As root who wants to share the <tt>TERM</tt> connection you should do the following:
  329.  
  330. <verb>
  331.   make DO=installshare OS-type
  332.   make installman
  333. </verb>
  334.  
  335. After this <tt>TERM</tt>, its clients and the manual pages are built and installed.
  336.  
  337. Furthermore, you now have a directory called '/usr/local/lib/term' (default) owned by group <tt>TERM</tt> and with permissions 'drwxrwxr-x'. In this directory you will at least find the socket used by <tt>TERM</tt> for its connection ('tmp/private/socket=').
  338.  
  339. </item>
  340. </enum>
  341.  
  342. <sect2> Build <tt>TERM</tt> up to version 1.15
  343. <p>
  344.  
  345. For these versions of <tt>TERM</tt> building should invoke no more than the commands
  346.  
  347. <verb>
  348.   make DO=install OS-type
  349.   make installman
  350. </verb>
  351.  
  352. You will find <tt>TERM</tt>, its clients and the manual pages nicely built and installed and ready for use after this.
  353.  
  354. Furthermore, you need to create a directory '$HOME/term'. This directory <tt>TERM</tt> will use to look for its termrc file.
  355.  
  356. The only thing you may want to do is change some of the paths in the <tt>Makefile</tt> or change some of the compiler flags.
  357.  
  358. <sect1> client.a, libtermnet.a, libtermnet.sa, libtermnet.so
  359. <p>
  360.  
  361. With <tt>TERM</tt> a library with functions for <tt>TERM</tt> clients is provided.
  362.  
  363. Up to version 1.16 this library was called <tt>client.a</tt>. During compilation of <tt>TERM</tt> this library was built and then used during the compilation of the <tt>TERM</tt> clients. It was not installed in another directory.
  364.  
  365. Starting with version 1.16 the name of the library is changed to <tt>libtermnet.a</tt>. Up to version 1.19 this library is created in the <tt>TERM</tt> directory and then used during compilation of the <tt>TERM</tt> clients. It is not installed in another directory.
  366.  
  367. Starting with version 2.0.0, beside libtermnet.a also <tt>libtermnet.so</tt> and <tt>libtermnet.sa</tt> (shared library and exported initialized library data) are created during compilation of the <tt>TERM</tt> package. During the installation of all the parts of the package also these three library files are installed in the directory '/usr/local/lib' (default). Then a link is made from libtermnet.so.2 to libtermnet.so.2.x.x. Finally, <tt>ldconfig</tt> is run to create the necessary links and cache (for use by the run-time linker, ld.so) to the most recent shared libraries found in the directories specified on the command line, in the file '/etc/ld.so.conf', and in the trusted directories ('/usr/lib' and '/lib'). If the installation is done correctly the three library files can now be used by <tt>TERM</tt> clients which are built with dynamic instead of static libraries. Also, these libraries can now be used to port your own software to make it <tt>TERM</tt> aware (see belo!
  368.  w).
  369.  
  370. <sect1> Setting environment variables
  371. <p>
  372.  
  373. <tt>TERM</tt> knows a couple of environment variables which can be set by users. The first three of those that I will explain are
  374.  
  375. <itemize>
  376. <item>TERMDIR</item>
  377. <item>TERMSHARE</item>
  378. <item>TERMMODE</item>
  379. </itemize>
  380.  
  381. By setting these variables you can control the way <tt>TERM</tt> is run.
  382.  
  383. For <tt>TERM</tt> versions up to 1.15 only the variable <tt>TERMDIR</tt> is important (these versions do not know the shared mode). For these versions TERMDIR should be set as follows:
  384.  
  385. <verb>
  386.   setenv TERMDIR $HOME     (csh or tcsh)
  387.   export TERMDIR=$HOME     (bash)
  388. </verb>
  389.  
  390. Starting with version 1.16 <tt>TERM</tt> also knows the variables <tt>TERMSHARE</tt> and <tt>TERMMODE</tt>. With these variables <tt>TERM</tt> can be told to run in <tt>private</tt> mode or in <tt>shared</tt> mode. I will explain how to set the variables for private mode and shared mode.
  391.  
  392. TERMMODE knows the following three values;
  393. <itemize>
  394. <item> 0 = private</item>
  395. <item> 1 = system shared</item>
  396. <item> 2 = user shared</item>
  397. </itemize>
  398.  
  399. <enum>
  400. <item>Running <tt>TERM</tt> in private mode can be done setting the variables TERMDIR and TERMMODE in the following way:
  401.  
  402. For csh or tcsh
  403. <verb>
  404.   setenv TERMDIR $HOME
  405.   setenv TERMMODE 0
  406. </verb>
  407.  
  408. For bash
  409. <verb>
  410.   export TERMDIR=$HOME
  411.   export TERMMODE=0
  412. </verb>
  413. </item>
  414.  
  415. <item>When you want to use <tt>TERM</tt> in shared mode there are two ways of setting the variables:
  416.  
  417. <enum>
  418. <item>When <tt>TERM</tt> is installed as a SUID program only TERMMODE has to be set.
  419.  
  420. <verb>
  421.   setenv TERMMODE 2    (csh or tcsh)
  422.   export TERMMODE=2    (bash)
  423. </verb>
  424. </item>
  425.  
  426. <item>When <tt>TERM</tt> is installed as a SGID program the variables have to be set in the following way:
  427.  
  428. For csh or tcsh
  429. <verb>
  430.   setenv TERMMODE 1
  431.   setenv TERMDIR /usr/local/lib/term
  432.   setenv TERMSHARE $TERMDIR
  433. </verb>
  434.  
  435. For bash
  436. <verb>
  437.   export TERMMODE=1
  438.   export TERMDIR=/usr/local/lib/term
  439.   export TERMSHARE=$TERMDIR
  440. </verb>
  441.  
  442. Setting the variables in this way makes it possible to start old clients (clients linked to an older version of <tt>client.a</tt>) in shared mode.
  443. </item>
  444. </enum>
  445. </enum>
  446.  
  447. Starting with version 2.0.0 <tt>TERM</tt> also knows the variable <tt>TERMSERVER</tt>. You need to set this variable when you have multiple modems and you have more than one connection at a time. To specify which connection to use, you must start <tt>TERM</tt> with a server name:
  448.  
  449. <verb>
  450.   nohup term -v /dev/modem1 Connection1 &
  451.   nohup term -v /dev/modem2 Connection2 &
  452. </verb>
  453.  
  454. Users should then set the variable TERMSERVER to the connection name they want to use:
  455.  
  456. <verb>
  457.   setenv TERMSERVER Connection1   (csh or tcsh)
  458.   export TERMSERVER=Connection2   (bash)
  459. </verb>
  460.  
  461. <sect1> Test <tt>TERM</tt>
  462. <p> 
  463.  
  464. Do a <tt>make test</tt> (or <tt>make termtest</tt> for newer versions of <tt>TERM</tt>) to build <tt>TERM</tt>'s test daemon. (term)test
  465. works by running two copies of <tt>TERM</tt> on your system, a
  466. 'local' and a 'remote'' copy. Both of these will read your
  467. 'termrc'; so you can adjust their behaviour. Now execute (term)test. You 
  468. should now be able to do a <tt>trsh</tt> and a <tt>tupload</tt> (try
  469.  
  470. <verb>
  471.   tupload ./term /usr/tmp
  472. </verb>
  473.  
  474.  - you should get a copy of the
  475. <tt>TERM</tt> binary in '/usr/tmp'). The local
  476. <tt>TERM</tt>'s output should show up in 'local.log', the
  477. remote's one in 'remote.log'. You can start <tt>TERM</tt> up with
  478. a <tt>-d255</tt> flag to enable debugging output to be written to
  479. these files, or enable debugging in your 'termrc' file.
  480.  
  481. NOTE: Run <tt>test</tt> as <tt>./test </tt> so as to avoid your system's <tt>test</tt>.
  482.  
  483. <sect1><tt>TERM</tt> and communication programs
  484. <p>
  485.  
  486. Before you can use <tt>TERM</tt> you must have established a connection via the modem using a communication program like kermit or seyon. In the documentation of your communication program you can find what you need to do to establish the conection with the remote machine.
  487.  
  488. when you have established the connection with the remote machine and you want to run <tt>TERM</tt> you need to suspend or quit your communication program without closing the connection with the remote machine. This needs to be done as otherwise the communication program will steal characters from linecheck or <tt>TERM</tt>.
  489.  
  490. Below for some communication programs I will explain how you can make sure that the connection will stay alive and the communication programs will not steal characters from linechech or <tt>TERM</tt>.
  491.  
  492. <sect2>
  493. Kermit
  494. <p>
  495.  
  496. Starting <tt>TERM</tt> when you use kermit is easy. At the local kermit prompt you type <it>suspend</it>. Now you see back your Linux prompt. From this prompt you can establish your <tt>TERM</tt> conection.
  497.  
  498. <sect2>
  499. Seyon
  500. <p>
  501.  
  502. An easy way to start linecheck or <tt>TERM</tt> when you are using seyon is to put linecheck and <tt>TERM</tt> in the Transfer Menu (controlled by the file '$HOME/.seyon/protocols').
  503.  
  504. In the file '$HOME/.seyon/protocols' add:
  505.  
  506. <verb>
  507.   "Line check" "$cd /tmp; linecheck"
  508.   "Term" "$term -c off -w 10 -t 150 -s 38400 -l $HOME/tlog"
  509. </verb>
  510.  
  511. Then, when you want to execute linecheck or <tt>TERM</tt> on the local machine, you can select the Transfer Menu, either the "Line check" or the "Term" item, and Go.
  512.  
  513. Of course, you can also use the shell command button, and type 'linecheck' or 'term' in the pop-up dialog box. This also does automatic redirection of input and output.
  514.  
  515. <sect1>
  516. Make a Transparent Link
  517. <p>
  518.  
  519. Presumably, you can establish a modem connection between your local
  520. and remote hosts. Typically, you are dialling into some kind of terminal
  521. server and connecting to your remote host from there. You are also
  522. using some kind of terminal software, such as <tt>kermit</tt> or
  523. <tt>seyon</tt> to talk to your modem (the examples in this document
  524. will use kermit, since that is what its author uses). If
  525. you are having trouble with your modem, or your terminal software, take
  526. a look at the Serial-HOWTO; that should help you out.
  527.  
  528. Having established your link, you want to make it as transparent as
  529. possible.  Check the commands on the terminal server (help or ? will
  530. usually get you started). Go for the 8 bit options whenever possible.
  531. This may mean changing the way you log in to a system, <it>e.g.</it> if
  532. the server uses rlogin, you may have to use it and give it the -8 flag
  533. to make it transparent.  Especially watch out for xon/xoff flow
  534. control. You do not want that. Try to enable rts/cts (hardware) flow
  535. control.  You may need to check your modem documentation to learn how to
  536. configure it to do 8-bit rts/cts communications.
  537.  
  538. <sect1>
  539. Run linecheck
  540. <p>
  541.  
  542. <bf>WARNING:</bf> In some of the documents the command line options for <tt>linecheck</tt> are mentioned in an incorrect order. I have checked this and found the order of options mentioned below to be the correct ones.
  543.  
  544. <bf>NOTE:</bf> Starting with <tt>TERM</tt> version 2.3.0 linecheck no longer needs to have the name of a log-file on its command line. It will write its output to the file 'linecheck.log' in the directory you start linecheck in.
  545.  
  546. <tt>Linecheck</tt> is a program that is supplied with <tt>TERM</tt>.
  547. It checks the transparency of a link, providing configuration
  548. information that <tt>TERM</tt> needs to run correctly.
  549. linecheck will send each of the 256 possible eight bit
  550. characters over the link and verify that each was transmitted
  551. successfully. <tt>TERM</tt> needs to be configured to deal with
  552. characters that cannot be transmitted over the link, and
  553. linecheck determines what characters these are. You use linecheck after you have established as transparent a modem
  554. link as possible. To run linecheck, do the following
  555.  
  556. <enum>
  557.  
  558. <item> On the remote system run 
  559. <verb>
  560.   linecheck linecheck.log
  561. </verb>
  562. </item>
  563.  
  564. <item> Escape back to your local system and suspend your communication program (see above)</item>
  565.  
  566. <item> On the local system run 
  567. <verb>
  568.   linecheck linecheck.log > /dev/modem < /dev/modem
  569. </verb>
  570. </item> 
  571.  
  572. </enum>
  573.  
  574. When linecheck is done, you will find a set of numbers at the
  575. bottom of the 'linecheck.log' files. These should be escaped
  576. in the termrc at the other end of the link. For example, in my system my local 'linecheck.log' said nothing and my remote 'linecheck.log' said to escape 29 and 157.  Therefore, my local
  577. 'termrc' escapes these characters and my remote 'termrc' escapes nothing. If I <it>escape</it> a character at one end,
  578. I have to also <it>ignore</it> it at the other; so, in this example,
  579. I shall have to ignore 29 and 157 in my remote system.
  580.  
  581. If linecheck hangs, try using  
  582.  
  583. <verb>
  584.   linecheck linecheck.log 17 19
  585. </verb>
  586.  
  587. on the remote system and
  588.  
  589. <verb>
  590.   linecheck linecheck.log 17 19 > /dev/modem < /dev/modem 
  591. </verb>
  592.  
  593. on the local system. This will escape your xon/xoff (flow control) characters, which will
  594. hang your line if you have got software flow control. If this solves the
  595. hanging problems, you will want to <it>escape</it> /<it>ignore</it>
  596. 17/19 in both 'termrc's'. If your terminal server has other characters that will shut it down, try running linecheck with
  597. those characters escaped, as above. You can spot these characters if
  598. linecheck hangs. If this is the case, kill it, then look in
  599. the log-files. The last characters transmitted are likely to be the
  600. culprits. Try it again with these characters escaped.
  601.  
  602. In summary, my local termrc has the lines
  603. <verb>
  604.   escape 29
  605.   escape 157
  606. </verb>
  607.  
  608. and my remote termrc has the lines
  609.  
  610. <verb> 
  611.   ignore 29
  612.   ignore 157
  613. </verb>
  614.  
  615. since my <it>remote</it> 'linecheck.log' said to escape 29
  616. and 157.
  617.  
  618. <sect1>
  619. Try Running <tt>TERM</tt>
  620. <p>
  621.  
  622. Log into the remote system, making the link as transparent as possible
  623. (if you have not already done so).  Fire up <tt>TERM</tt> at the remote end.
  624. I use the following:
  625.  
  626. <verb>
  627.   exec term -r -l $HOME/tlog -s 38400 -c off -w 10 -t 150.
  628. </verb>
  629.  
  630. Let us run down each option one by one (note that I could just as
  631. easily have put these options in my termrc. I did it this way because
  632. it saves editing a file while getting <tt>TERM</tt> set up).
  633.  
  634. <tt>exec</tt> means to destroy your current shell, running the given
  635. program in its place. I exec things because I do not intend
  636. to use my login shell again; so it is just wasting memory. If you are
  637. debugging the link and can reliably kill the remote <tt>TERM</tt>,
  638. you might not want to do an exec.
  639.  
  640. The <tt>-r</tt> option is needed at exactly one end. <tt>TERM</tt> will then see this end as the remote end of the connection (Note that <tt>TERM</tt>'s remote end can thus be your local machine). If you do not use this option at one end <tt>TERM</tt> clients will spontaneously crash.
  641.  
  642. <tt>-l $HOME/tlog</tt>. This logs errors to the file <tt>tlog
  643. </tt> in my home directory. Very useful for debugging. No reason not
  644. to do this.
  645.  
  646. <tt>-s 38400</tt> : I have got a 14400 baud modem, with compression.
  647. For optimal compression ratios, I want to be able to push bits down
  648. the pipe as fast as possible. For a slower modem, you should use
  649. something lower. Note that if you have a slower machine with 16450
  650. uart on your serial port, high baud rates can cause data loss by
  651. overloading the chip on your serial port. <tt>TERM</tt> will recover
  652. from this, but if you see a lot of error messages in your log file,
  653. (or get overrun warnings from linux kernel versions 0.99pl15 and up)
  654. you again might want to lower this number.
  655.  
  656. <tt>-c off</tt> : This turns data compression off. I have got a
  657. compressing modem, and I do not want to compress things twice.
  658.  
  659. <tt>-w 10 -t 150</tt> : Again, these are options to optimize my fast
  660. modem link. I have set my window to 10 and my timeout to 150. This is
  661. according to the recommendation in the <tt>term_setup</tt> man page.
  662.  
  663. Escape back to your local machine and suspend your communication program (see above). You do not want
  664. it running while <tt>TERM</tt> is running, because it will fight
  665. with <tt>TERM</tt> over the serial port. If you can convince your
  666. modem to not hang up when you exit your communication program (when it toggles
  667. DTR), you could just exit the program at this point.
  668.  
  669. Now run <tt>TERM</tt> locally. I use:
  670.  
  671. <verb>
  672.   term -c off -l $HOME/tlog -s 38400 -w 10 -t 150 < /dev/modem > /dev/modem &  
  673. </verb>
  674.  
  675. I need to tell <tt>TERM</tt>
  676. where the modem is; so I point both standard input and output at '/dev/modem' (that is what the <tt><</tt> and <tt>></tt> do). I
  677. also run it in the background; so I can use this screen for something
  678. else if I want to.
  679.  
  680. <tt>TERM</tt> should work now :-). Try a <tt>trsh,</tt> and see
  681. what happens. If you hang, or your link seems slow, take a look at
  682. your 'tlog' at each end.  Are you getting timeouts or error
  683. messages? If so, then you have configured something incorrectly. Try
  684. again (after you have finished reading this :-). Note that the
  685. connection will not seem blazingly fast, especially if you are using
  686. compression - it will be a little jumpy. The real speed comes in
  687. during file transfer and the like.
  688.  
  689. <sect1>Terminate your <tt>TERM</tt> connection
  690. <p>
  691.  
  692. Most certainly, after you have done a lot of work using <tt>TERM</tt>, you want to finish your work and bring your <tt>TERM</tt> connection down. For this to be realized there are four ways:
  693.  
  694. <enum>
  695. <item>Kill the <tt>TERM</tt> programs at both sides of the connection. This is the least recommended way of terminating your connection.</item>
  696. <item>A better way is to execute the following command locally:
  697.  
  698. <verb>
  699.   echo '00000' > /dev/modem
  700. </verb>
  701.  
  702. This will nicely terminate your <tt>TERM</tt> connection. It will work for all version of <tt>TERM</tt>. Make sure that the sequence of zeros contains at least <it>five</it> zeros.</item>
  703.  
  704. <item>In the termrc of <tt>TERM</tt> versions 2.0.0 and higher you can now enter a statement called <tt>terminate '<some string>'</tt>. This sets a string that will cause <tt>TERM</tt> to exit ('00000' by default). It must be at least <it>five</it> characters long, to avoid accidently terminations. </item>
  705.  
  706. <item>Starting with version 1.14 there is the program <tt>tshutdown</tt> (actually for version 1.14 it is available as a patch, for newer versions it is in the package). Executing tshutdown nicely terminates your <tt>TERM</tt> connection.</item>
  707. </enum>
  708.  
  709. <sect1>
  710. Removing <tt>TERM</tt> from your partition
  711. <p>
  712.  
  713. Ok, you asked for this. As some of you want to get rid of <tt>TERM</tt> I here
  714. present you the steps to be done in removing <tt>TERM</tt>. In the process of
  715. removing <tt>TERM</tt> you have to fulfil the following steps:
  716.  
  717. <itemize>
  718. <item>Removing directories with their contents. Depending on how you installed
  719. <tt>TERM</tt>, one or more of the following directorieswill exist on your machine:
  720.  
  721. <verb>
  722.   $HOME/.term/termrc
  723.   $HOME/.term/termrc.<server>
  724.   $HOME/term/termrc
  725.   $HOME/term/termrc.<server>
  726.   /usr/local/lib/term/termrc
  727.   /usr/local/lib/term/termrc.<server>
  728.   /etc/termrc
  729.   /etc/termrc.<server>
  730. </verb>
  731.  
  732. These directories can be removed together with their contents. Use '/bin/rm -rf' to get this done.</item>
  733.  
  734. <item>The group 'term'. For some of the ways of installation you had to create a group 'term'. Check the file '/etc/group' for the 'term' entry. When it exists you can remove the entry.</item>
  735.  
  736. <item>The <tt>TERM</tt>-package and <tt>TERM</tt>-aware executables. This is probably the hardest part in removing <tt>TERM</tt>. For the executables coming with the <tt>TERM</tt>-package you have to look in the directory '/usr/local/bin' or the directory '$HOME/bin'.
  737.  
  738. With executables you made <tt>TERM</tt>-aware yourself I cannot help you. You need to know what executables you made <tt>TERM</tt>-aware in order to know what executables you have to remove. Do not forget configuration, default and other files coming with some of these executables.</item>
  739.  
  740. <item>Library files. To remove these you best can execute the following commands:
  741.  
  742. <verb>
  743.   cd /
  744.   find . -name libtermnet* -exec /bin/rm {}
  745. </verb>
  746.  
  747. This will find and remove the library files.</item>
  748.  
  749. <item>Include file. Also for this one the easiest way is to execute the following two commands:
  750.  
  751. <verb>
  752.   cd /
  753.   find . -name termnet.h -exec /bin/rm {}
  754. </verb>
  755.  
  756. This will remove the include file.</item>
  757.  
  758. <item>Manual pages. When you have installed the <tt>TERM</tt> manual pages you can now find them back in one of the following directories:
  759.  
  760. <verb>
  761.   /usr/local/man/man1
  762.   /usr/local/man/cat1
  763.   $HOME/man/man1
  764.   $HOME/man/cat1
  765. </verb>
  766.  
  767. At least you have to check for the following manual pages: term, term_clients, term_setup, tdownload, linecheck, trdate, trdated, termrc, termtest, tmon, tredir, trsh, tshutdown, tudpredir, tupload, txconnand finally tiptest.</item>
  768.  
  769. <item>Temporary user directory. This is de directory '/usr/tmp/private' and its contents.</item>
  770. </itemize>
  771.  
  772. After this exercise you can be quite sure that you have removed everything related to <tt>TERM</tt>.
  773.  
  774. <sect1>
  775. Optimizing your connection
  776. <p>
  777.  
  778. Once you have got <tt>TERM</tt> running, you might want to try to get
  779. things optimized. A good way to measure the speed of your link is to
  780. run <tt>tmon</tt> in one window while up/downloading a file in
  781. another. Try both (big) text files and compressed files; the plain
  782. text should go a factor of two-ish faster than the compressed files.
  783. The parameters you want to fiddle with are baud rate (<tt>-s</tt>), compression (<tt>-c</tt>), windows (<tt>-w</tt>), timeout (<tt>-t</tt>) and retrain (<tt>-A</tt>).
  784.  
  785. Watch out with the retrain parameter. With <tt>TERM</tt> version 1.19 I got a performance decrease of 80&percnt to 90&percnt compared to running <tt>TERM</tt> without the retrain parameter. It is not clear if this is a bug in <tt>TERM</tt> version 1.19 and if this problem exists only with <tt>TERM</tt> version 1.19.
  786.  
  787. <tt>Baudrate</tt>: the maximum number of bits per second <tt>TERM</tt> will try to send over the serial link. <tt>TERM</tt> will avoid sending characters at a higher data rate than this. The default is to use the speed of your computer's serial port, but be warned that this may be too high if your modem runs at a lower rate over the phone line. The baud rate option is intended for systems that buffer output to the modem. During setup and tuning it is better to use a small baud rate rather than one which is too large. For high speed links (> 38400), making it unlimited is probably advantageous. This is achieved by using the value 'off'. <tt>TERM</tt> will then rely solely on your kernel to do flow control. 
  788.  
  789. <tt>Compression</tt>: you want this on if you do not have a
  790. compressing modem.  If you do have such a modem, turn compression off,
  791. otherwise you will be compressing things twice, which typically <it>
  792. increases</it> the amount of data transmitted. Compressing modems are
  793. those that use the MNP-5 or V42.bis protocols. Check your modem
  794. documentation and the message when your modem connects.
  795.  
  796. <tt>Windows</tt>: this is the number of chunks of data, or packets,
  797. that <tt>TERM</tt> will let go over the line before it gets an
  798. acknowledgment (or ack) from the remote <tt>TERM</tt>. For fast
  799. modems, increasing this can be a win; for slower links this can
  800. overwhelm the remote end.
  801.  
  802. <tt>Timeout</tt>: the time <tt>TERM</tt> will wait for an ack. If
  803. you have increased windows, and you are getting timeouts in your log-file,
  804. try increasing this.
  805.  
  806. For 14400/V42.bis, I use <tt>-c off -w 10 -t 150</tt>. I get around 1700 cps on compressed files and 3500 cps on ASCII files
  807. using tupload.
  808.  
  809. <sect1>
  810. Troubleshooting
  811. <p>
  812.  
  813. In this section some thoughts are given about what to check when you have problems executing <tt>TERM</tt> or one of its clients.
  814.  
  815. <itemize>
  816. <item>Did you clean up the <tt>TERM</tt> directory structure? With newer versions of <tt>TERM</tt> the structure of the directory tree under '/usr/local/lib/term' has changed a couple of times. If you are not aware of this, it can cause all kinds of error messages. The best thing to do is to delete the directory tree under '/usr/local/lib/term' (save your 'termrc') and then install your new <tt>TERM</tt> version. This way, you avoid the struggle with a messed up directory tree.</item>
  817.  
  818. <item>Did you remove old sockets? When you update your <tt>TERM</tt> version remove all the sockets (called 'socket=') created by <tt>TERM</tt>. No doing this can cause strange problems. To find out what socket <tt>TERM</tt> is listening to you can use the "netstat" program.</item>
  819.  
  820. <item><tt>TERM</tt> does not compile correct on sunOS 4.1.3? You have configured <tt>TERM</tt> with './configure --user'. During compilation you are getting a assembler error on a unknown '-k' flag. The reason of this error is unknown. The solution to this error is to configure <tt>TERM</tt> with static libraries. So, you have to do './configure --user --static' and then continue with the compilation process the way you normally do. Now <tt>TERM</tt> should compile correct.
  821.  
  822. <item><tt>termtest</tt> is presenting you the error: 'Term: failed to connect to term socket '/root/.term/sockettest''? When termtest runs it expects the executable 'term' to be in the same directory as termtest. When you do a 'make install' prior to running termtest, the TERM binary is moved to '/usr/local/bin' (or some other bin directory).
  823.  
  824. The workaround for this is to link the binary to the source directory:
  825.  
  826. <verb>
  827.   ln -s /usr/local/bin/term /usr/src/term-<version_number>/term
  828. </verb>
  829.  
  830. <item>Are you running the right binary? <tt>TERM</tt> has been updated
  831. quite a lot, and many systems have different versions of the programs
  832. floating around. Make sure you are using the right version. Note that
  833. this applies to linecheck too. You can use bash's <tt>type -a</tt>
  834. or the <tt>whereis</tt> command to find which program is being run.
  835. <tt>TERM</tt> versions after 1.11 should print out their version
  836. number when they start up.  (Although version 1.14 claims to be 1.12.
  837. Sigh.)</item>
  838.  
  839. <item>Do you have the right 'termrc' in the right place? Depending on the version of <tt>TERM</tt> you are running and the way you installed <tt>TERM</tt> (being root or user) this file has to be in one of the following directories: 
  840.  
  841. <verb>
  842.   $HOME/.term/termrc
  843.   $HOME/.term/termrc.<server>
  844.   $HOME/term/termrc
  845.   $HOME/term/termrc.<server>
  846.   /usr/local/lib/term/termrc
  847.   /usr/local/lib/term/termrc.<server>
  848.   /etc/termrc
  849.   /etc/termrc.<server>
  850. </verb>
  851.  
  852. Some systems have pre-installed 'termrc' files; make
  853. sure they are gone before you set things up. If you are running things
  854. as root, lookout for '/.term'. <tt>TERM</tt> creates files
  855. (sockets actually) while it is running; so it has its own directory,
  856. '$HOME/.term', where the file 'termrc' goes
  857. (note, there is <it>no</it> leading dot in 'termrc'!). </item>
  858.  
  859. <item>Does <tt>TERM</tt> find its 'termrc' file? when you start up <tt>TERM</tt> at both sides, you should see messages like the one below:
  860.  
  861. <verb>
  862.   Term version: 2.2.9
  863.   Reading file:  /usr/local/lib/term/termrc
  864.   Using shared mode.
  865. </verb>
  866.  
  867. When the second line is missing <tt>TERM</tt> cannot find its 'termrc' file and you know that something is gone wrong during the installation (unless you are not using a 'termrc' file and enter all the options to the command line :-). Check the place and the permissions of the 'termrc' file on the site <tt>TERM</tt> cannot find its 'termrc' file.</item>
  868.  
  869. <item>Do the entries in the 'termrc' file have the correct syntax and spelling? A known problem is that people who need to escape and ignore several characters enter
  870. them like this in the 'termrc' file:
  871.  
  872. <verb>
  873.   escape 1,4,30,255
  874.   ignore 1,4,30,255
  875. </verb>
  876.  
  877. Although <tt>TERM</tt> does NOT like this it will not complain. It only escapes or ignores the first character presented to the escape or ignore statement. The others characters are silently handled as not being there.
  878.  
  879. When you have to escape or ignore several characters you have to put them on separate lines in your 'termrc' file, each line starting with the keyword <bf>escape</bf> or <bf>ignore</bf>. Only when you have to escape or ignore a range of characters you can do it the following way:
  880.  
  881. <verb>
  882.   escape 16-19      # escape characters 16, 17, 18, 19
  883.   escape 23         # 23
  884.   escpae 255        # and 255
  885.   ignore 16-19      # ignore characters 16, 17, 18, 19
  886.   ignore 23         # 23
  887.   ignore 255        # and 255
  888. </verb>
  889. </item>
  890.  
  891. <item>Is you 'term' or '.term' directory mounted with NFS? If your 'term' or '.term' directory is mounted with NFS you need to set the flag -DTERM_NFS_DIR in the CFLAGS line of the Makefile. Alas, for the author this flag causes a compile error when <tt>TERM</tt> 1.19 is compiled on a machine running sunOS 4.*.</item>
  892.  
  893. <item>Are all files and directories owned by the correct user and group and do they have the correct permissions? This should be no problems as these permissions are set during the installation phase. However, when you port your own programs to <tt>TERM</tt> you must be aware of this. Also when you change the mode <tt>TERM</tt> is working in (i.e. from private mode to shared mode) file and directory ownerships and permissions have to be adapted.
  894.  
  895. <item>You are getting the error <it>gethostbyname: <hostname>: Non-authoritative `host not found', or, server failed</it>
  896.  
  897. To solve this you have to check the following things:
  898.  
  899. <enum>
  900. <item>Is the file '/etc/hosts' configured correctly? <hostname> is not the name of your host (old SLS releases and some old and new Slackware releases are shipped with hostname 'darkstar' for example). Change this in this file. It must at least contain a line like below (the format is described above it):
  901.  
  902. <verb>
  903.   # Local Hosts Format:
  904.   #  IP_NUMBER            HOSTNAME        ALIASES
  905.   #
  906.   # Here is the name of your host, first, followed by any aliases
  907.   127.0.0.1       localhost       linuxpc.domain  linuxpc
  908. </verb>
  909.  
  910. When your only connection to the outside world is by <tt>TERM</tt> the line above
  911. is the only one that may appear in the file '/etc/hosts'. Do not put actual addresses of frequently visited destinations in '/etc/hosts'. <tt>TERM</tt> does not like these to be in '/etc/hosts' and it will hang on them.
  912. </item>
  913.  
  914. <item>Are your '/etc/rc*' and '/etc/resolv.conf' files world readable (chmod ugo+r)?</item>
  915.  
  916. <item>Last, make sure that you have installed the TCP/IP loopback-interface on your machine. You can check for loopback by running the command 'ifconfig'. When you have installed the loopback-interface you will at least get something like:
  917.  
  918. <verb>
  919.   lo        Link encap:Local Loopback
  920.             inet addr:127.0.0.1  Bcast:127.255.255.255  Mask:255.255.255.0
  921.             UP BROADCAST LOOPBACK RUNNING  MTU:2000  Metric:1
  922.             RX packets:0 errors:0 dropped:0 overruns:0
  923.             TX packets:4984 errors:0 dropped:0 overruns:0
  924. </verb>
  925.  
  926. on your screen. During boot time you can furthemore check which protocols are in use. On my machine a line like the one below then appears:
  927.  
  928. <verb>
  929.   IP Protocols: ICMP, UDP, TCP
  930. </verb>
  931.  
  932. For the installation of TCP/IP and the loopback-interface, please read to the NET-HOWTO.
  933. </item>
  934. </enum>
  935. </item>
  936.  
  937. <item>You are getting all kinds of 'timed out' messages in your <tt>TERM</tt> log files?  This means that your <tt>TERM</tt> connection is not optimized. A small number of these messages every now and then is not a problem. These are most certainly due to temporal factors influencing the physical connection between your local and remote hosts. 
  938.  
  939. When you get a lot of these messages all the time your connection will slow down considerably. You have to fiddle with the parameters mentioned in the section 'Optimizing your connection' above. Alas, this part of the installation is a process of trial and error. No hard rules can be given about the numbers to be presented to the various parameters as many factors have an influence on the connection. These factors differ between the connections and even in time.</item>
  940.  
  941. <item>Normal FTP with redirected ports does not work for you? Alas, it is a known problem that redirection of the ports needed by FTP (20 and 21) does not give you a working FTP. The only solution is to get a <tt>TERM</tt>-aware ftp or ncftp version. Alas, also some <tt>TERM</tt>-aware ftp versions seem not to work.</item>
  942.  
  943. </itemize>
  944.  
  945. <sect><tt>TERM</tt> clients
  946. <p>
  947.  
  948. <tt>TERM</tt> provides several default clients. They include <tt>
  949. trsh</tt>, <tt>tmon</tt>, <tt>tupload</tt>, <tt>tredir</tt>,
  950.  <tt>txconn</tt> and in newer versions <tt>trdate</tt>, <tt>trdated</tt>. Furthermore, starting with version 2.0.0 <tt>tudpredir</tt> is available and from version 2.1.0 <tt>tdownload</tt> is available. This section will deal with <tt>
  951. trsh</tt>, <tt>tmon</tt>, <tt>tupload</tt>, <tt>tdownload</tt>, <tt>trdate</tt> and <tt>trdated</tt>.
  952. The others each have their own section.  No <tt>TERM</tt> client
  953. will work until you have established a <tt>TERM</tt> link.
  954.  
  955. <tt>tmon</tt> is a simple utility to monitor the statistics of your
  956. link.  It prints a time histogram of characters transmitted and
  957. received. It is invoked simply as tmon. Since around
  958. version 1.11, tmon has had a bug that causes some
  959. information to be garbled (??).
  960.  
  961. <tt>trsh</tt> is similar to <tt>rsh</tt>. Without arguments, it spawns
  962. an interactive shell on the remote system (<it>i.e.</it> it logs you
  963. in). trsh is one of the primary means of accessing the
  964. remote end of the link via <tt>TERM</tt>. If given an argument,
  965. trsh executes that argument as a command on the remote
  966. system. For example 
  967.  
  968. <verb>
  969.   trsh ls
  970. </verb>
  971. would give you a listing of the
  972. files in your home directory on the remote system.
  973.  
  974. <tt>tupload</tt> will transfer a file, given as its first argument, from local to remote. By default, the files will be put in the
  975. same directory that you invoked <tt>TERM</tt> from at the other
  976. side. To put files in another directory, give their names as a second
  977. argument to tupload. For example, if I want to put a copy
  978. of the file 'term114.tar.gz' in '/usr/tmp' on the
  979. remote system, I would type 
  980.  
  981. <verb>
  982.   tupload term114.tar.gz /usr/tmp
  983. </verb>. 
  984.  
  985. When you use tupload you can use wild cards like in 'tupload a.*'. The shell expands the wild card and tupload is called as 'tupload a.1 a.2 ......'.
  986.  
  987. <tt>tdownload</tt> will transfer a file, given as its first argument, from remote to local. By default, the files will be put in the
  988. same directory that you invoked <tt>TERM</tt> from at the local
  989. side. To put files in another directory, give their names as a second
  990. argument to tdownload. For example, if I want to put a copy
  991. of the file 'term114.tar.gz' in '/usr/tmp' on the
  992. local system, I would type 
  993.  
  994. <verb>
  995.   tdownload term114.tar.gz /usr/tmp
  996. </verb>.
  997.  
  998. When you use tdownload you <it>cannot</it> use wild cards like in 'tdownload a.*'. Reason for this is that the remote directory is not available to your local shell when you use tdownload; so your local shell cannot expand the wild cards.
  999.  
  1000. <tt>trdate</tt> is a time setting utility. It reads the time on the remote machine and sets the local clock to the remote time. It must be run as root.
  1001.  
  1002. <tt>trdated</tt> is the daemon version of trdate. When it is started in 'rc.local' it is run as daemon in which case it updates the time every 5 minutes (default). Even when there is no <tt>TERM</tt> connection, this daemon will start up when set in the rc.local. Once a <tt>TERM</tt> connection is created it starts updating the time.
  1003.  
  1004. <sect>X and <tt>TERM</tt>
  1005.  
  1006. <p> 
  1007. <tt>TERM</tt> allows users to open up X windows on the local machine
  1008. from clients that are running on a machine on the network. This is
  1009. done by using the <tt>txconn</tt> client. txconn is
  1010. executed on the remote, network-connected machine; it is invoked
  1011. simply as txconn. It goes into the background and returns a
  1012. number on the standard output; this number is the display number that
  1013. clients should use to access the X server on the local machine. An
  1014. example should make this clear.  I am logged in, via trsh,
  1015. to my remote <tt>TERM</tt> host, named <tt>foo.</tt> On foo, I do the following 
  1016.  
  1017. <verb>
  1018.   foo$ txconn 
  1019.   Xconn bound to screen 10 
  1020.   :10 
  1021.   foo$
  1022. </verb>
  1023.  
  1024. Now, on any host that I wish to run an X client on, that is to display on
  1025. my local machine's X server, I do
  1026.  
  1027. <verb>
  1028.   setenv DISPLAY foo:10
  1029. </verb>
  1030.  
  1031. (for <tt>bash</tt> you should use <tt>export DISPLAY=foo:10</tt>). In some cases it can furthermore be necessary to do a 
  1032.  
  1033. <verb>
  1034.   xhost + foo
  1035. </verb>
  1036. or even a 
  1037.  
  1038. <verb>
  1039.   xhost +
  1040. </verb>
  1041.  
  1042. on your local machine. Now when I start the client, it will try to connect to
  1043. screen 10 on machine foo, but txconn is listening to
  1044. this screen, and will forward all X protocol packets via <tt>TERM</tt>
  1045. to the X server on the local host - <it>i.e.</it> the window will open
  1046. up on your local machine.
  1047.  
  1048. It is possible to go the other way - run a client on your local
  1049. machine and have it open up a window on a remote machine on the
  1050. network; however we will defer explaining this until after we have
  1051. discussed tredir.
  1052.  
  1053. The X protocol is not very efficient; it wastes some bandwidth. This
  1054. is usually not a problem over an ethernet, but can be murder over a
  1055. modem. X11R6 is supposed to introduce a low bandwidth version of the X
  1056. protocol, LBX. If however you are using X11R5 you can use a utility named sxpc which compresses the X protocol, improving response over
  1057. serial lines. Sxpc includes a write-up on how to get it
  1058. working with <tt>TERM</tt>, and is recommended. The sxpc package also explains how to use xauth; so it is
  1059. doubly recommended.
  1060.  
  1061. <sect><tt>tredir</tt>
  1062. <p>
  1063.  
  1064. <tt>tredir</tt> is one of <tt>TERM</tt>'s most powerful utilities,
  1065. allowing most important network services to be performed over a <tt>
  1066. TERM</tt> link. Before we explain how to use tredir, it is
  1067. necessary to give some background on network services. We have talked
  1068. about network services before, but we have not said exactly what they
  1069. are. Services are just that - services that are provided by the
  1070. network. Examples of services include <tt>telnet</tt>, which provides
  1071. logins between machines, the File Transfer Protocol, <tt>ftp</tt>,
  1072. which transfers files between machines, and smtp, the Simple Mail
  1073. Transfer Protocol, which is used whenever you send electronic mail.
  1074. Each network service has a <it>port number</it> associated with it.
  1075. The mapping of port numbers to services is given in the file
  1076. '/etc/services'. This file should be the same on all
  1077. internet-connected machines.
  1078.  
  1079. How are these services invoked? Each networked machine runs a daemon
  1080. called <tt>inetd</tt>, which listens for attempts to connect to the
  1081. network ports. These requests can come from either the network or the
  1082. local machine. A network service is obtained by connecting to a
  1083. particular inetd port.  When a network request is made,
  1084. inetd knows exactly which service is involved by the port
  1085. number the request is made on. If inetd is configured to do
  1086. so, it provides the relevant service to the requesting
  1087. connection. inetd's configuration is given by the file '/etc/inetd.conf', which has a list of the services that inetd provides. For more information, see the man pages for inetd and inetd.conf.
  1088.  
  1089. You can communicate directly with network services by using
  1090. <tt>telnet</tt> (<it>n.b.</it> not <tt>termtelnet</tt>). For example,
  1091. to talk to the <tt>sendmail</tt>, (or smtp) daemon on machine
  1092. <tt>machine_name</tt>, you can do a <tt>telnet machine_name smtp,</tt>
  1093. or <tt>telnet machine_name 25</tt>, (since 25 is the number assigned
  1094. to smtp in '/etc/services'). You should get a polite greeting
  1095. from the daemon on the remote machine. This is a very useful trick for
  1096. debugging network problems and checking ports redirected with tredir (see below).
  1097.  
  1098. Tredir works very much like inetd. It runs in the
  1099. background as a daemon, listening to the network ports, waiting for a
  1100. request. When a request for a service is made, instead of providing
  1101. that service, as inetd does, tredir forwards the
  1102. request over the <tt>TERM</tt> link to the remote <tt>TERM</tt>, which
  1103. makes the request over the network, returning the result back over the
  1104. link to the local client. Tredir can forward the request to
  1105. any machine on the network, but by default sends it to the machine at
  1106. the other end of the <tt>TERM</tt> link. Tredir <it>redirects</it> TCP (Transmission Control Protocol) network services over the <tt>TERM</tt> link.
  1107.  
  1108. The common command format of tredir is:
  1109.  
  1110. <verb>
  1111.   tredir [this_computer:]port [that_computer:]port
  1112. </verb>
  1113.  
  1114. An example should make this clear. Let us redirect a local port to the
  1115. telnet port on the remote machine. To do this we would do 
  1116.  
  1117. <verb>
  1118.   tredir 2023 23
  1119. </verb>
  1120.  
  1121. Now, anyone who connects to port 2023 on the local
  1122. machine will be redirected to port 23 (telnet) on the remote machine.
  1123. Here is an example session; the local machine is <tt>
  1124. mymachine.modem.home</tt> and the remote machine is <tt>netsun</tt>.
  1125.  
  1126. <verb> 
  1127.   $ tredir 2023 23 
  1128.   Redirecting 2023 to 23 
  1129.   $ telnet localhost 2023 
  1130.   Trying 127.0.0.1... 
  1131.   Connected to mymachine.modem.home 
  1132.   Escape character is '^]'. 
  1133.  
  1134.  
  1135.   SunOS UNIX (netsun)
  1136.   login: 
  1137. </verb>
  1138.  
  1139. This example is actually quite useful. If I were instead to do the
  1140. tredir on <tt>netsun</tt>. I could then telnet in to <tt>mymachine
  1141. </tt> from the network simply by connecting to the redirected port on
  1142. the networked machine (using telnet) - <it>i.e.</it> <tt>telnet
  1143. netsun 2023</tt>.
  1144.  
  1145. The general principle in using tredir is to redirect the
  1146. desired service to a machine on the network. Our next example will
  1147. allow us to read news on the local machine over our <tt>TERM</tt> link
  1148. from a news server on the network. News is provided by the nntp
  1149. service, port number 119.  All decent news readers allow you to specify
  1150. what port number they will use, either via a configuration file or an
  1151. environment variable. Let us specify this local port to be 2119. Now,
  1152. let us say that our news server is <tt>news.domain.org</tt>. We will
  1153. redirect port 2119 to port 119 on <tt>news.domain.org</tt>; we will
  1154. then tell our news reading software that the nntp server is located at
  1155. port 2119 on the local host. Since this will depend on the news reader
  1156. that you use, I will just test the link with <tt>telnet</tt> instead
  1157. of firing up a news reader:
  1158.  
  1159. <verb>
  1160.   $ tredir 2119 news.domain.org:119
  1161.   Redirecting 2119 to news.domain.org:119 
  1162.   $ telnet localhost 2119 
  1163.   Trying 127.0.0.1... 
  1164.   Connected to mymachine.modem.home. 
  1165.   Escape character is '^]'. 
  1166.   200 news.domain.org InterNetNews NNRP server INN 1.4 07-Dec-41 ready 
  1167.   (posting ok). 
  1168. </verb>
  1169.  
  1170. If you can get this far, all you have to do is configure your news
  1171. reader to be able to read news via <tt>TERM</tt>. (<it>n.b.,</it> if
  1172. you read news like this, be sure that in all your posts you set a
  1173. Reply-To: header to an network email address that you can be reached
  1174. at, otherwise people who want to get in touch with you will be sending
  1175. mail to whatever (wrong) data your news reader puts in the From:
  1176. header).
  1177.  
  1178. <sect1> <tt>tredir</tt> can bite!
  1179. <p>
  1180.  
  1181. The astute reader, after reading the last example will be wondering
  1182. why port 2119 was redirected to port 119 - since news readers default
  1183. to port 119, why could I not do a <tt>tredir 119 news.domain.org:119
  1184. </tt> and skip the news reader configuration? The answer is that all
  1185. ports numbered less than 1024 are ``reserved ports'', and only the
  1186. superuser can listen to them. If one is willing to take a security
  1187. risk and make tredir an SUID program, or run tredir as root, then one can redirect reserved ports and avoid the
  1188. hassle of renaming services.
  1189.  
  1190. Another problem with using reserved ports is that inetd is
  1191. often already listening to these ports, and only one program at a time
  1192. can listen to a port. In order to use such a port, you must change
  1193. 'inetd.conf' so that inetd no longer listens to the
  1194. port you want to redirect. This is most easily done by commenting out
  1195. the line with the offending service by putting a <tt>&num</tt>
  1196. character at the beginning of the line. The superuser must then send
  1197. inetd a HUP signal (kill -1 inetd-pid) to get it to reread its configuration.
  1198.  
  1199. <sect1> Stupid <tt>tredir</tt> tricks
  1200. <p>
  1201.  
  1202. In this section we will describe some of the more common uses for tredir. We have already described how to redirect nntp and
  1203. telnet services; here we will give some more complicated examples.
  1204.  
  1205. <sect2> X windows
  1206. <p>
  1207.  
  1208. In a previous section, we described how to get an X client running on
  1209. the network to open a window on your home machine using <tt>txconn</tt>. The same technique could be used on your home machine to display
  1210. a client on the machine at the remote end of your <tt>TERM</tt> link.
  1211. But how does one display an X client on a network machine that is not
  1212. the remote end? The answer lies in knowing that X uses a particular
  1213. network service just like the other programs we have been discussing. An
  1214. X server listens for a network request on a port whose number is given
  1215. by the formula <f> port = 6000 + display number</f>, <it>e.g.</it> an X
  1216. server managing screen 0 on a machine would listen to port 6000, if it
  1217. were managing screen 2, it would listen to port 6002.  When you set
  1218. your DISPLAY environment variable to <tt>xmachine:n</tt>, your X
  1219. clients will try to connect to port <f>6000 +n</f> on <tt>xmachine</tt>.
  1220.  
  1221. We can use this to trick X clients on your local machine to open up
  1222. windows on remote displays. Let us say I want to open up an <tt>xterm
  1223. </tt>, running on my local machine, on display 0 of machine <tt>
  1224. xmachine</tt>, which is running some place on the network. I first
  1225. pick a local display number, say 2 (do not use 0, since that is what
  1226. your local X server will be using). I will map this display to display
  1227. 0 on <tt>xmachine</tt>. In terms of ports, this means I want to
  1228. redirect the local port 6002 to the remote port 6000.  I do the
  1229. following
  1230.  
  1231. <verb>
  1232.   $ tredir 6002 xmachine:6000 
  1233.   $ setenv DISPLAY localhost:2
  1234.   $ xterm 
  1235. </verb>
  1236.  
  1237.  
  1238. This should open up an <tt>xterm</tt> on machine <tt>xmachine</tt>.
  1239. Note that I set the DISPLAY to <tt>localhost:2</tt>. This is because X
  1240. clients will sometimes use unix domain sockets instead of internet
  1241. domain sockets, at their own option, when connecting to a local
  1242. display, if DISPLAY is set to <tt>:2</tt>. <tt>localhost:2</tt> says
  1243. to use a TCP connection.
  1244.  
  1245. Note that as far as <tt>xmachine</tt> is concerned, the X request is
  1246. coming from the machine on the remote end of your <tt>TERM</tt> link
  1247. (<tt>remotemachine</tt>) - so if you need to authorize the connection,
  1248. you should either do an <tt>xhost + remotemachine</tt> on <tt>
  1249. xmachine</tt> or use xauth to update the '.Xauthority' file on your local machine for display number 2, using the key
  1250. from <tt>xmachine</tt>.
  1251.  
  1252. Again, to speed up X connections, you can use the program sxpc, which includes an explanation of how to use tredir
  1253. to establish the link and authorize it using xauth.
  1254.  
  1255. <sect2> Mail with <tt>TERM</tt>
  1256. <p>
  1257.  
  1258. Well, you asked for it. Electronic mail has the justifiable
  1259. reputation of being one of the most difficult things to get working
  1260. right on a UNIX system. To really get <tt>TERM</tt> working
  1261. correctly with mail means that you have to understand how mail works,
  1262. which is beyond the scope of this document. To learn more about mail,
  1263. you should consult a book on UNIX system administration and/or the
  1264. comp.mail.misc FAQ, available for anonymous ftp on rtfm.mit.edu:pub/usenet/comp.mail.misc. There are also currently two
  1265. packages available for anonymous ftp on sunsite.unc.edu that will help you get mail running under <tt>TERM</tt> - they are
  1266. <tt>term.mailerd+smail</tt> by Byron A. Jeff and the <tt>
  1267. BCRMailHandlerXXX</tt> by Bill C. Riemers.
  1268.  
  1269. That being said, we will give a thumbnail description of how mail works.
  1270. There are two parts to getting mail running, sending messages and
  1271. receiving messages. We will begin with sending messages from your local
  1272. box to the network.
  1273.  
  1274. There are two classes of mail programs. The first is the mail user
  1275. agent (MUA). MUA's help you read, compose and send messages. Examples
  1276. of MUA's are <tt>elm</tt>, <tt>pine</tt>, <tt>Mail</tt> and
  1277. <tt>vm</tt>.  MUA's do not really do any networking; they just put the
  1278. messages together - the real work of sending mail is done by the
  1279. second class of mail programs, the mail transfer agents (MTA's). These
  1280. are invoked by the MUA's. They take the message, decide where to send
  1281. it by looking at the address, and then actually deliver it over the
  1282. network.
  1283.  
  1284. The two most common MTA's on Linux systems are <tt>sendmail</tt> and
  1285. <tt>smail</tt>. The basic idea is to get your MTA to connect to
  1286. another MTA running on a machine on the net that will know what to do
  1287. with your message. This is done by redirecting a local port to the
  1288. smtp port on the net machine. You then have to tell you MTA to take
  1289. any message it does not know what to do with, and send it out over the
  1290. redirected port on your local machine to the MTA on the remote
  1291. machine, which will then route your message to its correct
  1292. destination.
  1293.  
  1294. How do we do this using smail?  We first redirect a port to
  1295. the smtp port on the network mail machine (<tt>mailhost</tt>):
  1296.  
  1297. <tt>
  1298. tredir XXXX mailhost:25
  1299. </tt>
  1300.  
  1301. here XXXX is the port number that the <tt>smail</tt> on the
  1302. localhost will connect to (note that I have to give this port a name
  1303. in my '/etc/services' to get smail to recognize
  1304. it). Smail has several configuration files that usually
  1305. live in '/usr/local/lib/smail'. The ones we care about are
  1306. 'config', 'routers' and 'transports'. Note
  1307. that I am assuming you have already got smail configured
  1308. correctly for local mail - delivery to files and pipes and such things.
  1309. Again, consult the documentation if you have not.
  1310.  
  1311. In the file 'config', we put the following definition:
  1312.  
  1313. <verb>
  1314.   smart_path=localhost
  1315. </verb> 
  1316.  
  1317. localhost is the machine that smail connects to when
  1318. it does not know what to do with a message.
  1319.  
  1320. In 'routers' we put
  1321.  
  1322. <verb> 
  1323.   smart_host: 
  1324.   driver=smarthost, 
  1325.   transport=termsmtp; 
  1326.   path = localhost 
  1327. </verb>
  1328.  
  1329. In 'transports' we put
  1330.  
  1331. <verb>  
  1332.   termsmtp:        driver=tcpsmtp, 
  1333.     inet,                    
  1334.     return_path, 
  1335.     remove_header="From", 
  1336.     append_header="From: YOUR_NET_ADDRESS", 
  1337.     -received, 
  1338.     -max_addrs, -max_chars; 
  1339.     service=YOUR_SMTP_SERVICE, 
  1340. </verb>
  1341.  
  1342. In the above, the header lines change the <tt>From</tt> header in all
  1343. your outgoing mail to the address, <tt>YOUR_NET_ADDRESS</tt>, which is
  1344. the network address you want mail sent to. If more than one user is
  1345. going to be using your <tt>TERM</tt> link, you will have to do something
  1346. more fancy, like keep a database of local user's network addresses and
  1347. insert these in the <tt>From:</tt> headers.
  1348.  
  1349. The service line is the name of the local port number that you have
  1350. redirected to the smtp port on the network connected machine. In my
  1351. version of smail, I cannot just set this to a number, I have
  1352. to set it to a name, like ``foo'', and then define ``foo'' in my '/etc/services' to be the number of my redirected port. If you use
  1353. a SUID tredir and just redirect the smtp port (25), you
  1354. do not need to define this.
  1355.  
  1356. This should be enough to get you going. If you decide to use <tt>
  1357. sendmail</tt>, the principles are the same but the details differ.
  1358. Ronald Florence (ron@mlfarm.com) told me that the stock Sun
  1359. sendmail will not send multiple queued messages over a
  1360. redirected port; BSD sendmail 8.6.9 works fine.  He made the following
  1361. changes to '/etc/sendmail.cf' to get it working with <tt>TERM</tt>. In his
  1362. case, the default sendmail port (25) is used for SMTP traffic over a
  1363. local ethernet so Internet mail is forwarded to a redirected TCP
  1364. port.
  1365.       
  1366. <verb>
  1367.   #
  1368.   #Create the termsmtp mailer, which sends mail via a re-directed TCP port  
  1369.   #
  1370.   Mtermsmtp,P=[TCP], F=mDFMuCXe, S=22, R=22, A=TCP $h PORTNUMBER
  1371. </verb>
  1372.  
  1373. Here, <tt>PORTNUMBER</tt> is the number of the redirected port on the
  1374. local machine. This should be an unused port over 2000. We next tell
  1375. sendmail which machine to connect to, and set termsmtp as the
  1376. default mailer.
  1377.  
  1378. <verb>
  1379.   #
  1380.   # major relay mailer
  1381.   #
  1382.   DMtermsmtp
  1383.   #
  1384.   # major relay host: use the $M mailer to send mail to other domains
  1385.   #
  1386.   DR HOSTNAME
  1387.   CR HOSTNAME
  1388. </verb>
  1389.  
  1390. Here <tt>HOSTNAME</tt> is the name of your local host (does
  1391. <tt>localhost</tt> work?). The last entry goes under Rule 0 to forward
  1392. Internet mail.
  1393.  
  1394. <verb>
  1395.   # Pass other valid names up the ladder to our forwarder
  1396.   R$*<@$*.$+>$*        $#$M    $@$R $:$1<@$2.$3>$4    user@any.domain
  1397. </verb>
  1398.   
  1399. When the <tt>TERM</tt> connection is established to the Internet host, run the
  1400. following commands on the local machine.
  1401.  
  1402. <verb>
  1403.   tredir PORTNUMBER internet.host:25
  1404.   /usr/lib/sendmail -q
  1405. </verb>
  1406.  
  1407. We now turn to receiving electronic mail using <tt>TERM</tt>. We will
  1408. assume that mail is sent to your account on the network machine <tt>
  1409. mailhost</tt>. The simplest solution is to just use trsh or
  1410. termtelnet to log on to <tt>mailhost</tt> and read your mail
  1411. on there. However, it is also possible to have your mail
  1412. automatically downloaded to your local machine. One way to do this is
  1413. to use the Post Office Protocol, (POP). POP was designed for exactly
  1414. this purpose: to deliver mail to machines that have intermittent
  1415. network connections. To use POP, you must have a POP server installed
  1416. on <tt>mailhost</tt>. Assuming that you do, you can then use a POP
  1417. client to download your mail every few minutes. This is done, as you
  1418. might expect, using tredir. The POP service is 110 (<bf>
  1419. note</bf> that there is an older protocol, POP-2, which uses port 109;
  1420. in this document we describe POP-3, which is the latest version of
  1421. POP). There are several POP clients available. One, written in the
  1422. script language <tt>perl</tt> is pop-perl-1.X, written by William
  1423. Perry and maintained by myself - it can be found on sunsite.unc.edu:pub/Linux/system/Mail.
  1424.  
  1425. To use POP, you redirect a local port to port 110 on <tt>mailhost
  1426. </tt> and configure your client to retrieve your mail from localhost
  1427. using the local port. As an example, we will assume that there is a POP
  1428. server running on <tt>mailhost</tt>. We will redirect the local port
  1429. 2110, and fire up the pop-perl client:
  1430.  
  1431. <verb>
  1432.   $ tredir 2110 mailhost:110
  1433.   Redirecting 2110 to mailhost:110
  1434.   $ pop 
  1435.   Username: bill 
  1436.   Password: <enter your password for mailhost>
  1437.   Pop Host: name of local 
  1438.   Pop Port: 2110 
  1439.   Starting popmail daemon for bill 
  1440. </verb>
  1441.  
  1442. If you do not have a POP server available, the BCRMailHandler package
  1443. has a program to download your mail over a <tt>TERM</tt> link to
  1444. your local machine. I have not used it, but anyone who has is welcome
  1445. to comment. You can also use the term.mailerd+smail package for this purpose. 
  1446. Alas, both BCRMailHandler and the term.mailerd.smail package do not work anymore with <tt>TERM</tt> versions 2.0.0 and higher.
  1447.  
  1448. <sect><tt>tudpredir</tt>
  1449. <p>
  1450.  
  1451. <tt>tudpredir</tt> is similar to tredir when you look at what these programs do and how they are executed. The big difference between the two programs is that tredir is used to redirect TCP network services while tudpredir redirects UDP (User Datagram Protocol) network services over the <tt>TERM</tt> link. One more important difference between the two programs is that tredir becomes a background daemon once it has successfully established the local port, while tudpredir commands must be placed in the background manually.
  1452.  
  1453. The common command format of tudpredir is:
  1454.  
  1455. <verb>
  1456.   tudpredir [this_computer:]port [that_computer:]port
  1457. </verb>
  1458.  
  1459. <sect>Automating Things 
  1460. <p> 
  1461.  
  1462. Now that you know how to get all your network services over
  1463. <tt>TERM</tt>, it would be nice to set things up in such a way that your link is set
  1464. up and configured automatically. There are basically an infinite
  1465. number of ways of doing so, depending on what communication program you use
  1466. and how you log in to your remote system.
  1467.  
  1468. One program that I have not used, but I have heard is quite nice, is
  1469. <tt>fet</tt>: a front end for <tt>TERM</tt>. It is designed to log you
  1470. into a remote system and fire up <tt>TERM</tt> and all your
  1471. tredir's.  Any comments on fet would be most
  1472. welcome.
  1473.  
  1474. I shall now give an example of a set of commands that use <tt>kermit
  1475. </tt> to log into the remote system and then performs all of the
  1476. <tt>TERM</tt> initializations. Obviously, if you use these examples,
  1477. you will have to modify them for your own login procedures.
  1478.  
  1479. The command which is actually invoked is the shell script 'knet', given by:
  1480.  
  1481.  
  1482. <verb>
  1483.   #!/bin/sh
  1484.   /usr/bin/kermit -y $HOME/.kerm_term > $HOME/klog < /dev/null 2>&ero 1 
  1485.   exec $HOME/bin/tstart >> $HOME/klog 2>&ero 1
  1486. </verb>
  1487.  
  1488. The script '.kerm_term' is given by:
  1489.  
  1490. <verb> 
  1491.   pause 2 
  1492.   # The number you want to dial 
  1493.   output atdtXXXXXXX \13 
  1494.   # Login to the terminal server 
  1495.   input 145 {name: } 
  1496.   output MYNAME \13 
  1497.   input 3 {word: } 
  1498.   output MYPASSWORD \13 
  1499.   input 5 {xyplex>} 
  1500.   # Make the line transparent 
  1501.   output term telnet-t \13 
  1502.   output term stopb 1 \13 
  1503.   # Connect to the remote host 
  1504.   output telnet remotehost.somedomain.org \13 
  1505.   input 10 {ogin: } 
  1506.   output MYOTHERNAME \13 
  1507.   input 3 word: 
  1508.   output MYOTHERPASSWORD \13 
  1509.   pause 5  
  1510.   # Fire up term on the remote host
  1511.   output exec term -s 38400 -l $HOME/tlog -w 10 -t 150  \13
  1512.   ! /usr/bin/term -r -l $HOME/tlog -s 38400 -c off -w 10 -t 150 < /dev/modem  > /dev/modem &
  1513.   # Open other clients here
  1514.   suspend 
  1515.   !killall -KILL term 
  1516. </verb>
  1517.  
  1518. and finally, the script 'tstart' which fires up the <tt>TERM</tt> clients is given by
  1519.  
  1520. <verb> 
  1521.   #!/bin/sh 
  1522.   # 
  1523.   # This lets mail get out, can read news here, can pick up my mail here 
  1524.   # 
  1525.   /usr/local/bin/tredir 2025 25 2119 newshost:119 2110 pophost:110 
  1526.   # 
  1527.   # So I can open up Xwindows here 
  1528.   # 
  1529.   /usr/local/bin/trsh -s txconn 
  1530.   # 
  1531.   # So I will receive mail.... 
  1532.   # 
  1533.   /usr/local/bin/pop 
  1534.   # 
  1535.   # Clean out the queue, in case of boo-boos 
  1536.   # 
  1537.   /usr/bin/runq 
  1538.   # 
  1539.   # Done now 
  1540.   # 
  1541.   echo ^G^G > /dev/console 
  1542. </verb>
  1543.  
  1544. When finally you want to close the connection, you
  1545. resume and terminate kermit. The last line of the script kills
  1546. the local <tt>TERM</tt> and returns the system in its initial state.
  1547.  
  1548. (<tt> Note of the author: instead of doing '!killall -KILL term', I think it should be possible just to do '!tshutdown'. This should also work?</tt>)
  1549.  
  1550. As I said, there are zillions of ways to do so; these are just meant
  1551. as examples to get you started. Other examples can be found in the packages <tt>autoterm</tt> and <tt>JoelTermStuff</tt>. 
  1552.  
  1553. <sect>
  1554. Porting software for use with <tt>TERM</tt>
  1555. <p>
  1556.  
  1557. In principle, all programs that can be used over a network can also be used in combination with <tt>TERM</tt>. Some of them you can get as binaries with <tt>TERM</tt> support already built in. These include telnet, (nc)ftp, Mosaic and many others. Most of these programs are compiled for <tt>TERM</tt> 1.17 or earlier. They should, however, still work with the newer versions of <tt>TERM</tt>.
  1558.  
  1559. Another way to make programs <tt>TERM</tt> aware is to port them yourself. This process will be described in the next subsection.
  1560.  
  1561. The last way to make your programs <tt>TERM</tt>-aware is to <tt>termify</tt> them.
  1562.  
  1563. <sect1>
  1564. Port and compile the sources
  1565. <p>
  1566.  
  1567. Porting software to <tt>TERM</tt> can be done using a fairly simple porting procedure:
  1568.  
  1569. If installed in '/usr/local' by root:
  1570.  
  1571. <enum>
  1572. <item> Add to the compile flags <tt>-include /usr/local/include/termnet.h</tt></item>
  1573. <item> and add to the library list <tt>-ltermnet</tt></item>
  1574. </enum>
  1575.  
  1576. If installed in your home directory:
  1577.  
  1578. <enum>
  1579. <item> Add to the compile flags <tt>-include $HOME/term/termnet.h</tt></item>
  1580. <item> and add to the library list <tt>-L$HOME/term -ltermnet</tt></item>
  1581. </enum>
  1582.  
  1583. Now compile the software as described in the INSTALL or README document that came with the software. That should do!
  1584.  
  1585. At this point the commands should work both with and without <tt>TERM</tt>.
  1586.  
  1587. <verb>
  1588.   telnet localhost
  1589. </verb>
  1590.  
  1591. does not use <tt>TERM</tt> to connect, but
  1592.  
  1593. <verb>
  1594.   telnet bohr.physics.purdue.edu
  1595. </verb>
  1596.  
  1597. will use <tt>TERM</tt> only if you do not have some other type of network connection.
  1598.  
  1599. Some commands like <tt>rlogin</tt> can only be executed by root and the owner
  1600. of the <tt>TERM</tt> connection (privileged persons).
  1601.  
  1602. Some <tt>TERM</tt> commands will be <tt>TERM</tt> transparent and only use <tt>TERM</tt> when there is not another option. Some common examples are telnet and ftp.
  1603.  
  1604. Others require an external flag to tell them it is all right to use <tt>TERM</tt>. These programs include xarchie, fsp and ytalk.
  1605.  
  1606. You can either flag these programs to use <tt>TERM</tt> by setting the environmental variable TERMMODE as specified in README.security, or running <tt>make installnet</tt>. Eventually, the 'termnet' file created will contain special networking instructions, but for now only its existence is checked.
  1607.  
  1608. If you add an <tt>ethernet connection</tt>, you can then simply remove the 'termnet' file and continue to use the same binaries!
  1609.  
  1610. <tt>NOTE</tt>: Programs that were ported back in the days of <tt>client.a</tt>, can still be recompiled for use with newer versions of <tt>TERM</tt> simply by changing the <tt>client.a</tt> reference to <tt>libtermnet.a</tt>.
  1611.  
  1612. <sect1>Termify
  1613. <p>
  1614.  
  1615. This package will convert dynamically linked binaries for <tt>TERM</tt> use.
  1616.  
  1617. Before you can use <tt>termify</tt> you have to make sure that you have <tt>TERM</tt> version 2.2i (is this version 2.2.8?) or later and libc.so.4.5.26 or later. Then you have to create the file 'libt.so.4' in the directory '/lib' (see the README file in the package).
  1618.  
  1619. Problem at this moment is that you have to remake the file 'libt.so.4' every time you upgrade <tt>TERM</tt> versions.
  1620.  
  1621. After you have created the library you can let termify 'crunch' the program you want to make <tt>TERM</tt>-aware, by using the command:
  1622.  
  1623. <verb>
  1624.   termify <command name>
  1625. </verb>
  1626.  
  1627. When you do not like the result you can 'un'termify the program you have just termified using the command:
  1628.  
  1629. <verb>
  1630.   termify -u <command name>
  1631. </verb>
  1632.  
  1633. Last, the package also contains a script for completely termifying 'smail'; so no special transport definitions are necessary. The only thing you possibly want to change is the 'From: ' address.
  1634.        
  1635. <sect>Term clients
  1636. <p>
  1637.  
  1638. <sect1>Term clients available on ftp sites.
  1639. <p>
  1640.  
  1641. Below a list of application running with <tt>TERM</tt> is given. I am not stating that this list is complete; so any completion is welcome. As far as possible I will present the site and directory where the application can be found (all to my knowledge). When I state <tt>sunsite.unc.edu</tt> as the place to find the application I mean that you can find it in one of the following two directories:
  1642.  
  1643. <enum>
  1644. <item>/pub/Linux/apps/comm/term/apps</item>
  1645. <item>/pub/Linux/apps/comm/term/extra</item>
  1646. </enum>
  1647.  
  1648. Here we go :-)
  1649.  
  1650. <bf><tt>TERM</tt> package:</bf>
  1651.  
  1652. <tscreen><verb>
  1653. tupload
  1654. tdownload           (versions 2.1.0 and higher)
  1655. trsh
  1656. tmon
  1657. tredir
  1658. tudpredir           (versions 2.0.0 and higher)
  1659. txconn
  1660. trdate(d)
  1661. tshutdown
  1662. libtermnet
  1663. </verb></tscreen>
  1664.  
  1665. <bf>File transfer:</bf>
  1666.  
  1667. <tscreen><verb>
  1668. ftpd                sunsite.unc.edu
  1669. termncftp           sunsite.unc.edu
  1670. ncftp185            sunsite.unc.edu:/pub/Linux/system/Network/file-transfer
  1671. fsp                 sunsite.unc.edu:/pub/Linux/system/Network/file-transfer
  1672. </verb></tscreen>
  1673.  
  1674. <bf>Information systems:</bf>
  1675.  
  1676. <tscreen><verb>
  1677. lynx                
  1678. Mosaic              sunsite.unc.edu:/pub/Linux/system/Network/info-systems/Mosaic
  1679. chimera
  1680. netscape            sunsite.unc.edu:/pub/Linux/system/Network/info-systems
  1681. httpd
  1682. xgopher
  1683. gopher              sunsite.unc.edu
  1684. </verb></tscreen>
  1685.  
  1686. <bf>Remote login:</bf>
  1687.  
  1688. <tscreen><verb>
  1689. termtelnet          sunsite.unc.edu
  1690. rlogin              physics.purdue.edu:/pub/bcr/term/extra
  1691. rsh                 physics.purdue.edu:/pub/bcr/term/extra
  1692. </verb></tscreen>
  1693.  
  1694. <bf>Netnews:</bf>
  1695.  
  1696. <tscreen><verb>
  1697. tin 1.3             sunsite.unc.edu:/pub/Linux/system/Mail/news
  1698. news2               sunsite.unc.edu
  1699. </verb></tscreen>
  1700.  
  1701. <bf>Mail:</bf>
  1702.  
  1703. <tscreen><verb>
  1704. slurp               sunsite.unc.edu
  1705. smail               sunsite.unc.edu
  1706. term.mailerd+smail  sunsite.unc.edu
  1707. BCRMailHandlerXXX   physics.purdue.edu:/pub/bcr/term
  1708. </verb></tscreen>
  1709.  
  1710. <bf>Automating scripts:</bf>
  1711.  
  1712. <tscreen><verb>
  1713. JoelTermStuff       sunsite.unc.edu
  1714. autoterm            sunsite.unc.edu
  1715. fet                 sunsite.unc.edu
  1716. </verb></tscreen>
  1717.  
  1718. <bf>Other programs:</bf>
  1719.  
  1720. <tscreen><verb>
  1721. inetd               sunsite.unc.edu
  1722. rdate               sunsite.unc.edu
  1723. xgospel             sunsite.unc.edu:/pub/Linux/games/x11/networked
  1724. termify             physics.purdue.edu:/pub/bcr/term/extra
  1725. xboard              sunsite.unc.edu
  1726. ircII               sunsite.unc.edu:/pub/Linux/system/Network/chat
  1727. whois               
  1728. xwebster            sunsite.unc.edu
  1729. sxpc                ftp.x.org:/R5contrib
  1730. xztalk              sunsite.unc.edu:/pub/Linux/apps/sound/talk
  1731. </verb></tscreen>
  1732.  
  1733. <sect1>The termnet package
  1734. <p>
  1735.  
  1736. The package <tt>termnet-2.0.4-Linux-bin.tar.gz</tt> (sunsite.unc.edu:/pub/Linux/apps/comm/term) contains a couple of pre-compiled <tt>TERM</tt> clients and a couple of scripts, manual pages and libtermnet.so.2.00.04. The clients are compiled using this version of libtermnet.so. The package contains the following clients:
  1737.  
  1738. <tscreen><verb>
  1739. fet         perl        sperl4.036  tmon        tshutdown   xgopher
  1740. finger      perl4.036   suidperl    trdate      tudpredir   ytalk
  1741. ftp         rcp         taintperl   trdated     tupload
  1742. fwhois      rlogin      telnet      tredir      txconn
  1743. ncftp       rsh         term        trsh        xarchie
  1744. </verb></tscreen>
  1745.  
  1746. WARNING: The package also contains the complete set of compiled clients of <tt>TERM</tt> 2.0.4 including <tt>TERM</tt> itself. Do not install this package before you are sure about what you want. You will destroy other versions of <tt>TERM</tt> and its clients when you start moving executables around.
  1747.  
  1748. <sect1>Asked for but not yet supported
  1749. <p>
  1750.  
  1751. <enum>
  1752. <item> <tt>DOOM</tt>: The problem with this game seems to be the fact that it uses port 5029 both as client and as server.</item>
  1753. <item> <tt>NFS</tt>: The NFS server is only supposed to accept requests
  1754. if the socket requesting the connection is bound to a port below 1024. This seems to be troublesome. However, some NFS servers have an 'insecure' option.  In this case NFS might work eventually, if RPC support is added to Term. </item>
  1755. </enum>
  1756.  
  1757. <sect>Term and Security
  1758. <p>
  1759.  
  1760. In this section I will point to some security aspects of <tt>TERM</tt>. The problems will be explained and a way to improve security will be given.
  1761.  
  1762. <sect1>trsh
  1763. <p>
  1764.  
  1765. <tt>Trsh</tt> is insecure when it is used to access the local Linux box from the remote system. The problem with <tt>TERM</tt> and its clients is that beside the owner of the <tt>TERM</tt> connection also 'root' can execute <tt>TERM</tt>-aware programs over the connection.
  1766.  
  1767. This also means that 'root' on the remote system can execute trsh and thus can enter the login which owns the <tt>TERM</tt> connection quite easy. If this owner on the local box is 'root' then you will be in hell.
  1768.  
  1769. The solution to this problem is easy: you just have to put the following line in the termrc┤ file on the local box:
  1770.  
  1771. <verb>
  1772.   denyrsh on
  1773. </verb>
  1774.  
  1775. With this set in the 'termrc' file, nobody can use trsh on the remote site anymore to access your machine. When you and others want to access your local Linux box over the <tt>TERM</tt> connection this can still be done using <tt>telnet</tt> and redirected ports. 
  1776.  
  1777. <sect1>txconn and xauth
  1778. <p>
  1779.  
  1780. Txconn is not terribly secure; anyone can connect to your local server via <tt>TERM</tt> and perform all sorts of mischief. I you are worried about this sort of thing, it might be a good idea to consider using xauth to authorize your connections. See the next section for an example of using xauth for securing your connections.
  1781.  
  1782. <sect1>sxpc, xhost and xauth
  1783. <p>
  1784.  
  1785. <tt>Sxpc</tt> in combination with 'xhost +' is very dangerous when you are not using <tt>xauth</tt>.
  1786.  
  1787. Using xauth is very important to maintaining security when using sxpc. If you do not use xauth when using sxpc all the dangers of running with 'xhost +' apply. These dangers include but are not limited to:
  1788.  
  1789. <itemize>
  1790. <item>Someone watching what is displayed on your screen</item>
  1791. <item>Someone watching what you type</item>
  1792. <item>Someone typing in one of your windows (for example: a command to delete all your files :-(</item>
  1793. </itemize>
  1794.  
  1795. Xauth is available in X releases R4 and later. Here I will describe how to set up basic usage of xauth.  This configuration is vulnerable to network snooping, but if you can live with that it should be fine.
  1796.  
  1797. <bf>NOTE:</bf> when using xauth your $DISPLAY variable must NOT be set to localhost (or localhost:whatever). If your $DISPLAY variable does use localhost the clients will be unable to find the appropriate authorization information. The workaround is to use the real hostname of the machine. If you follow the compilation instructions in the README, and compile without -DNOGETHOSTNAME then everything should work.
  1798.  
  1799. The machine where you will be running clients will be called C, the machine where you wish to display them will be called D.
  1800.  
  1801. First choose a 'key', up to 16 pairs of hexadecimal digits (so an even number of characters from the ranges 0-9 and a-f).  You will need to supply this key in place of <key> in the example below.
  1802.  
  1803. On C:
  1804.  
  1805. <verb>
  1806.   % xauth
  1807.   xauth:  creating new authority file $HOME/.Xauthority
  1808.   Using authority file $HOME/.Xauthority
  1809.   xauth> add Chostname:8 MIT-MAGIC-COOKIE-1 <key>
  1810.   xauth> exit
  1811. </verb>
  1812.  
  1813. On D:
  1814.  
  1815. <verb>
  1816.   % xauth
  1817.   xauth:  creating new authority file $HOME/.Xauthority
  1818.   Using authority file $HOME/.Xauthority
  1819.   xauth> add Dhostname/unix:0 MIT-MAGIC-COOKIE-1 <key>
  1820.   xauth> add Dhostname:0 MIT-MAGIC-COOKIE-1 <key>
  1821.   xauth> exit
  1822. </verb>
  1823.  
  1824. When starting the X server on D you should give the flag <it>-auth $HOME/.Xauthority</it>.  You may need to edit or create a '$HOME/.xserverrc' to control how the X server is started.  For example:
  1825.  
  1826. <verb>
  1827.   #!/bin/sh
  1828.   exec X  -auth $HOME/.Xauthority $*
  1829. </verb>
  1830.  
  1831. Make sure that your '.Xauthority' file is readable only by you on both C and D.
  1832.  
  1833. <sect>Things to remember
  1834. <p>
  1835.  
  1836. In this section I try to present you with a list of useful ftp addresses, URL's etc. where you can find software and information about <tt>TERM</tt>.
  1837.  
  1838. <bf>Ftp:</bf>
  1839.  
  1840. <verb>
  1841. sunsite.unc.edu:/pub/Linux/apps/comm/term/<whole-directory-tree>
  1842. sunsite.unc.edu:/pub/Linux/docs/HOWTO/<whole-directory-tree>
  1843. physics.purdue.edu:/pub/bcr/term/<whole-directory-tree>
  1844. </verb>
  1845.  
  1846. <bf>URL:</bf>
  1847.  
  1848. <verb>
  1849. http://sunsite.unc.edu/mdw/HOWTO/Term-HOWTO.html
  1850. http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html  (always the newest version)
  1851. http://physics.purdue.edu/~bcr/homepage.html
  1852. </verb>
  1853.  
  1854. <bf>Netnews:</bf>
  1855.  
  1856. <verb>
  1857. comp.os.linux.announce           announce of new TERM versions and Term-HOWTO
  1858. comp.os.linux.help               ask your questions about TERM here
  1859. comp.os.linux.misc               or here
  1860. comp.protocols.misc              answers to TERM questions are also posted here.
  1861. </verb>
  1862.  
  1863. <bf>Related documents:</bf>
  1864.  
  1865. <verb>
  1866. Using Term to Pierce an Internet Firewall HOWTO    by Barak Pearlmutter,
  1867.                                                       bap@learning.scr.siemens.com
  1868. Firewall HOWTO                                     by David Rudder,
  1869.                                                       drig@execpc.com
  1870. Serial HOWTO                                       by Greg Hankins,
  1871.                                                       gregh@cc.gatech.edu
  1872. Net-2/Net-3 HOWTO                                  by Terry Dawson,
  1873.                                                       terryd@extro.ucc.su.oz.au
  1874. </verb>
  1875.  
  1876. When you start asking questions on netnews please make sure that you give people in the groups as much information as they need to solve your problem (<tt>TERM</tt> version number, way you set up your connection etc.). At this moment many <tt>TERM</tt> versions are in use and all have their specific and common problems. Therefore, when you want a useful answer, at least state the version of <tt>TERM</tt> you are using. Otherwise, in some cases only wild guesses are possible to help you solve your problems.
  1877.  
  1878. <sect>
  1879. Reliability of <tt>TERM</tt> versions
  1880. <p>
  1881.  
  1882. Many versions of <tt>TERM</tt> are around now. The maintainer of <tt>TERM</tt>, Bill Riemers, has made a list of <tt>TERM</tt> versions stating what versions are reliable and what versions you had better avoid. This list is the following:
  1883.  
  1884. <tscreen><verb>
  1885.         term110          --> cannot really say
  1886.         term111          --> cannot really say
  1887.         term112          --> cannot really say
  1888.         term113          --> cannot really say
  1889.         term114          --> fairly stable BETA version
  1890.         term115          --> unstable BETA version
  1891.         term116          --> unstable BETA version
  1892.         term117          --> unstable BETA version
  1893.         term118          --> semi-stable BETA version
  1894.         term119          --> stable GAMMA version
  1895.         term-2.0.X       --> semi-stable BETA versions
  1896.         term-2.1.X       --> more stable BETA versions
  1897.         term-2.2.X       --> new BETA versions
  1898.         term-2.3.X       -->
  1899. </verb></tscreen> 
  1900.  
  1901. <sect>Term speed table
  1902. <p>
  1903.  
  1904. Thanks to Bill McCarthy we now have a table with <tt>TERM</tt> speed information for different modems, <tt>TERM</tt> versions and connection conditions. Its purpose is to give new and experienced users some idea what other people are using and the results they are getting.
  1905.  
  1906. <tscreen><verb>
  1907.                LINUX TERM CHART 8/14/94
  1908.  
  1909.  
  1910. |___modem speed/make___|___line speed__|__avg cps__|__high__|__term ver_|
  1911. | 1)  USR SP 14.4      |   9600        |  950      |  963   | 1.17      |
  1912. | 2)  USR SP 14.4      |  14400        | 1376      |  n/a   | 1.18p06   |
  1913. | 3)  Zoom 2400        |   2400        |  220      |  230   | 1.19      | 
  1914. | 4)  Boca V.32bis 14  |  57600        | 1400      |  n/a   | 1.01/09?  |
  1915. | 5)  Viva 14.4        |  14400        | 1300      |  n/a   | 1.16      |
  1916. | 6)  USR SP 14.4      |  14400+       | 1550      | 1680   | 1.19      |
  1917. | 7)  Intel 14.4 Fax   |  14400        | 1400      | 1650   | 2.0.4     | 
  1918. | 8)  cable tv hookup  |  57600        | 1500      | 1800   | 1.18p06   |
  1919. | 9)  Twincom 144/DFi  |  57600        | 1500      | 4000?  | 2.0.4     |
  1920. | 10) USR SP 14.4      |  14400        | 1200      | 1500   | 1.08      |
  1921. | 11) cable tv hookup  |  19200        | 1300      | 1800   | 1.19      |
  1922. |-----------------------------------------------------------------------|
  1923.  
  1924. +Command flags/termrc settings:
  1925.  
  1926. 1) default escapes   2) window 5       3) baudrate 2400    4) n/a            
  1927.    baudrate 9600        timeout 200       window 3
  1928.    window 10                              noise on
  1929.    timeout 150
  1930.  
  1931. 5) compress off      6) baudrate 19200  7) ignore 19+17    8) compress off
  1932.    window 10            compress on        window 4           escape 0, 13, 
  1933.    timeout 150                             timeout 90         16-19, 255
  1934.    baudrate 38400                                             baudrate 0
  1935.                                                               shift 224
  1936.                                   flowcrtl 500
  1937.                                   window 10
  1938.                                   timeout 70
  1939.                                   retrain on
  1940.                                   breakout 24
  1941. 9) compress off     10) compress off      11) baudrate 19200
  1942.    baudrate 57600       baudrate 38400        compress on
  1943.    window 10            escape 17, 19         shift 224
  1944.    timeout 200          remote                escape 0, 13 16-17
  1945.    noise on                                   19, 255
  1946.    share on                                   window 10
  1947.    remote                                     timeout 40
  1948.  
  1949. Escaping characters at one end also implies ignoring them on the other end.
  1950. </verb></tscreen>
  1951.  
  1952. <sect>
  1953. Hints and Tricks found on the net
  1954. <p>
  1955.  
  1956. In the Linux related newsgroups many questions about <tt>TERM</tt> are coming back every couple of weeks, together with the answers to these questions. To reduce traffic to the newsgroup, in this section I shall try to make a composition of these questions and the answers to them. Some of the answers have been checked by me as I also had related problems. Others, I have just taken from the newsgroups without testing them.
  1957.  
  1958. <itemize>
  1959. <item>Many people, especially those who are using Ultrix, seem to have trouble with <tt>vi</tt> presenting less than 24 lines on a window with 24 lines. There are three ways to get rid of this problem:
  1960.  
  1961. <enum>
  1962. <item>Log in into the remote system using: 
  1963. <verb>
  1964.   trsh -s telnet <hostname>
  1965. </verb></item>
  1966. <item>Put 'resize; clear' in your '.login' file
  1967. </item>
  1968. <item>The best solutions seems to be to enter the following remote:
  1969. <verb>
  1970.   stty 38400
  1971. </verb></item>
  1972. </enum></item>
  1973.  
  1974. <item>
  1975. Many people seem to have problems with crashing <tt>TERM</tt> connections, whatever may be the reason of the crashes. So before starting applications people want to know whether their <tt>TERM</tt> connection is still alive or not. This can be checked using the following small shell script examples:
  1976.  
  1977. When you are using tcsh:
  1978.  
  1979. <verb>
  1980.   if ( { trsh -s true } ) then
  1981.     ...
  1982.   endif
  1983. </verb>
  1984.  
  1985. When you are using bash:
  1986.  
  1987. <verb>
  1988.   if trsh -s true; then
  1989.     ...
  1990.   fi
  1991. </verb>
  1992. </item>
  1993.  
  1994. <item>
  1995. The WWW browser <tt>Netscape</tt> is causing people problems to get it to work with <tt>TERM</tt>. The good news is that it will work under <tt>TERM</tt>. Here is how:
  1996.  
  1997. <verb>
  1998.     1. Termify netscape
  1999.     2. Fire up termnetscape
  2000.           under Options | Preferences | Mail/Proxys
  2001.           leave _all_ of the proxy boxes blank
  2002.           set the SOCKS box to 'remotehost' & 80
  2003.         3. Ignore the error you get when you exit the Options menu.
  2004.     4. If termnetscape fails to work right:
  2005.           under Options | Preferences | Mail/Proxys
  2006.           leave _all_ of the proxy boxes blank
  2007.           set the SOCKS box to 'none' & 80
  2008.         5. Ignore the error you get when you exit the Options menu.
  2009. </verb>
  2010.  
  2011. Scott Blachowicz mailed me stating that it is even easier to get Netscape or any other browser to work with <tt>TERM</tt> if you have a proxy server (e.g. CERN's httpd)
  2012. installed for use on the <it>remote</it> side of your <tt>TERM</tt> link. On the local
  2013. side, you can then do this:
  2014.  
  2015. <verb>
  2016.         1. tredir localhost:8080 remotehost:80
  2017.  
  2018.               where 'remotehost' is the hostname of your proxy server system.
  2019.  
  2020.         2. Run your particular browser, then in the preferences or options or
  2021.               whatever it is called, point your proxies at 'localhost' port
  2022.               8080.
  2023.               Some browsers might like environment variables like
  2024.  
  2025.                   export http_proxy=http://localhost:8080/
  2026.                   export ftp_proxy=http://localhost:8080/
  2027. </verb>
  2028. </item>
  2029. </itemize>
  2030.  
  2031. <sect>Other Things
  2032. <p>
  2033.  
  2034. Some things that might be included:
  2035.  
  2036. <itemize>
  2037. <item>Extension of troubleshooting</item>
  2038. <item>Extension of security issues</item>
  2039. <item>Termwrap</item>
  2040. <item>Suggestions</item>
  2041. </itemize>
  2042.  
  2043. Anyway, if you have suggestions, criticism, suggestions, or anything else to say about this document, please fire away. At the moment I, Patrick Reijnen, have taken over the authorship of the <tt>TERM</tt>-HOWTO. I can (currently) be reached at <tt>patrickr@bart.nl</tt>.
  2044.  
  2045. <sect>Acknowledgements
  2046. <p>
  2047.  
  2048. A lot of people have to be thanked. First and foremost Michael O'Reilly and all the developers of <tt>TERM</tt>, who have provided us with such a great tool. I would also like to thank everyone who gave feedback and contributed to this HOWTO. They include Bill Reynolds, the former author of this HOWTO, Ronald Florence, Tom Payerle, Bill C. Riemers, Hugh Secker-Walker, Matt Welsh, Bill McCarthy, Sergio, Weyman Martin and everybody I forgot to mention.
  2049.  
  2050. </article>
  2051.