home *** CD-ROM | disk | FTP | other *** search
/ Amiga GigaPD 3 / Amiga_GigaPD_v3_3of3.iso / netbsd / contrib / bsd / aterm.readme < prev    next >
Text File  |  1993-06-25  |  13KB  |  286 lines

  1. Introduction
  2. ------------
  3.  
  4. aterm is a port of the linux/unix term107 communications program to
  5. amiga netbsd.  term is a dnet-like term program - you compile term
  6. on your unix dialup account, and you compile it on your home/unix
  7. machine.  You use a term program like kermit to dial in to your
  8. dialup unix account, and run term there.  Then you quit kermit (QUIT
  9. kermit, quit kermit, quit kermit :-).  Then on your home machine, you
  10. run term and the two sides make a connection.  There are several
  11. client programs for term, including trsh (to start a remote shell on
  12. your dialup machine), tupload (for doing file transfers either direction),
  13. and tredir (more about this later).  There is also a hacked version of
  14. the irc client so you can run that on your home machine...
  15.  
  16. Installing on the amigabsd side:
  17. --------------------------------
  18.  
  19. 1) Login as root!
  20. 2) cd / ; mkdir /.term ; chmod 775 /.term
  21. 3) cd /.term
  22. 4) create /.term/termrc as per the documentation in the aterm.tar.z
  23.    distribution (TERMRC.doc file).
  24.    Mine looks like this:
  25.  
  26. baudrate 38400
  27. window 6
  28. compress on
  29. timeout 80
  30.  
  31. 5) If you have a 7-bit line or need to have escape characters, use
  32.    the linecheck.c program to have it tell you what to escape.  I haven't
  33.    needed to use it, so you are on your own here...
  34.  
  35. 6) unpack the aterm.tar.z file on your home machine.  Here's my
  36.    /etc/fstab (output of df command):
  37.  
  38. Filesystem 512-blks    used   avail capacity  Mounted on
  39. /dev/sd6a     15326   10294    3498    75%    /
  40. /dev/sd1d     98666   77122   11676    87%    /usr
  41. mfs:44        61934      28   55712     0%    /tmp
  42. /dev/sd1e     39884    5406   30488    15%    /proj
  43. /dev/sd1f     98902       2   89008     0%    /opt
  44. /dev/sd1g     98526      14   88658     0%    /home
  45. /dev/sd1h     50518       2   45464     0%    /home2
  46.  
  47.    I use /proj to unpack stuff like aterm, screen, or whatever, to install
  48.    it.  /tmp is a good place, too.  It will unpack into  ./term107/ subdir
  49.    from where you run tar.  Use this command to unpack:
  50.    tar xzvfp aterm.tar.z
  51.  
  52. 7) Time to set up /usr/local.  The /usr stuff posted by mtk doesn't have
  53.    this part of the filesystem set up yet :-)  Use the following commands:
  54.    mkdir /usr/local ; mkdir /usr/local/bin ; mkdir /usr/local/lib
  55.    mkdir /usr/local/man ; mkdir /usr/local/man/man1 ... 
  56.    mkdir /usr/local/man8
  57.    chmod -R 755 /usr/local
  58.  
  59. 8) install term itself:
  60.    cd ./term107
  61.    make install
  62.    make installman
  63.  
  64. 9) before you can run term, you need an environment variable to be set:
  65.     setenv TERMDIR /
  66.         or
  67.     export TERMDIR=/
  68.    I recommend you put these in your .bashrc or .cshrc (and for every
  69.    user!).  This tells term and its clients to use the /.term subdir
  70.    for communications between the processes.  It will allow others who
  71.    are logged in to your bsd to share the term connection!
  72.  
  73. 10) for security reasons, you may want to add a group to your /etc/group
  74.     file.  I have added group "modem" to mine, and root and user mykes
  75.     are the only members of the group.  If you do this, then do:
  76.     chgrp modem /usr/local/bin/trsh /usr/local/bin/tredir 
  77.     chgrp modem /usr/local/bin/term /usr/local/bin/txconn
  78.     What this does is to preclude any users not in group modem in the
  79.     /etc/group file from running a trsh and getting access to a shell
  80.     on your dialup account! Beware, because someone could telnet IN
  81.     to your netbsd machine, run trsh, then rm -rf * to your homedir! :)
  82.  
  83. Instructions for building term on your remote/dialup unix machine:
  84. ------------------------------------------------------------------
  85.  
  86. 1)  I haven't tested this, but you may be able to use the sources
  87.     from the aterm.tar.z file.  There are several Makefiles provided
  88.     for various flavors of unix.  Do NOT use the default makefile,
  89.     since it is for linux, and I hacked it to work for netbsd :-)
  90.  
  91. 2)  ALWAYS examine the makefile in your editor!  Look at where the
  92.     makefile wants to install things.  If you are NOT root on your
  93.     dialin machine, you will get permission errors when the makefile
  94.     tries to copy stuff into /usr/local/bin or /usr/local/man.  On
  95.     my portal dialup account, I have ~/bin and ~/man and hack the
  96.     makefiles to install stuff there.  You probably already have
  97.     your own procedure for installing stuff like this.
  98.  
  99. 3)  If all else fails, there is a term107.tar.z file on the ftp site
  100.     which is the original term107 distribution, untouched by my
  101.     hacker fingers.  You should be able to get that distribution to
  102.     build.  Unlike dnet, the unix side of term has been ported all
  103.     over the place to many flavors of unix.
  104.  
  105. 4)  Be sure to do make install ; make installman on your remote/dialup
  106.     account.  Also be sure to have the term binaries and man pages
  107.     on your path and manpath (i.e. edit your .cshrc if needed).
  108.  
  109. 5)  Look at the readmes and man pages for the term binaries on your
  110.     remote side.  mtk hasn't ported groff to netbsd yet, so manpages
  111.     aren't working yet (they are there tho, just hard to read in nroff
  112.     format :-)
  113.  
  114. 6)  I assume you are NOT root on your remote machine (I'm not root on
  115.     portal, for example).  Normally, term looks for termrc in ~/.term
  116.     but this can be overridden with the TERMDIR env varialbe.  On the
  117.     remote side, you just need to make a .term subdir in your homedir
  118.     and you need a termrc file there.  It should be the same as your
  119.     one at home (unless you use escapes, see man pages in that case)
  120.     with one exception.  Add the line "remote" to the start of the
  121.     termrc on the remote side (technically, remote must be in one
  122.     side's termrc or the other, but NOT both).
  123.  
  124. Instructions for using kermit to dialin and start term
  125. ------------------------------------------------------
  126.  
  127. 1)  here's my .kermrc file, from my /home/mykes subdir:
  128.     set escape 29
  129.     set file type binary
  130.     set flow none
  131.     set line /dev/tty00
  132.     set baud 38400
  133.     set block 3
  134.  
  135. 2)  run kermit
  136. 3)  c (to connect.. dumb terminal mode)
  137. 4)  AT&D0     (this tells the modem NOT to hang up when you drop dtr)
  138. 5)  ATDT...   (dial into your dialin account)
  139. 6)  do whatever you normally do to get to your shell prompt (login/passwd)
  140. 7)  run term:
  141.     term
  142.     term will then be waiting for a connection from your amiga bsd machine.
  143.     if you want to kill term on the remote side, just type 5 zeros to it:
  144.     00000
  145.     and it will exit and give you back your prompt.
  146. 8)  QUIT kermit:
  147.     ctrl-]  (^]) control key AND ] key
  148.     q
  149.     (you now have your bsd shell prompt again)
  150.     if you did not do step 4) above (AT&D0), then the modem will hang up!
  151. 9)  run term on the netbsd side:
  152.     term -n on -l /dev/null </dev/tty00 >/dev/tty00 &
  153.     specifically, this runs term in the background, redirecting
  154.      standard in and standard out to the modem, directing error text to
  155.      null.  On the remote side, stdout/stdin is the modem, but on the
  156.      amigabsd side, stdout/stdin is the console (keyboard+screen).
  157.     I recommend adding an alias for term to your .cshrc:
  158.     alias term 'term -n on -l /dev/null </dev/tty00 >/dev/tty00 &'
  159.     If you do this, then you can just type term on the amiga side, too.
  160. 10) The two term instances should connect to eachother.  Try to open
  161.     a remote shell with the trsh command:
  162.       trsh
  163.     you should get a command line prompt for a shell on your remote
  164.     machine.  Type "exit" to kill the remote shell and return to your
  165.     netbsd prompt.
  166.  
  167. Miscellaneous:
  168. --------------
  169.  
  170. The console handler for netbsd is very crude at this early stage of
  171. netbsd's existance on the amiga.  There is a concept called virtual
  172. consoles, which _should_ eventually be implemented in the console
  173. driver to allow you to hit the function keys to switch between up to
  174. 10 different shell contexts - to allow you to have more than one
  175. shell running at a time.  With virtual consoles (or xterm windows :-)
  176. you can have multiple trsh running at the same time.  One can be
  177. running irc, another ftp, another tupload (sending files home), etc.,
  178. at the same time...
  179.  
  180. Even without virtual consoles, some wonderful person has already written
  181. a program called "screen" which almost gives you virtual consoles on a
  182. standard console.  mtk has ported it and it is on the ftp site already.
  183. Since he only put the binary there, I am uploading the source/makefile
  184. and binary for my port of it as well (it makes it easier to install
  185. this way, IMO).  If you use screen, you can have two shells on your
  186. bsd at the same time and switch between them.  You can run trsh in
  187. both at the same time, or have a trsh in one and a bsd shell in the
  188. other.  use as you see fit :-)  In any case, even if you don't use
  189. term, screen is a MUST :-)
  190.  
  191. Other term clients (I haven't ported these yet):
  192. ------------------------------------------------
  193.  
  194. There is a hacked irc client that uses the term connection.  This
  195. allows you to run the client on your bsd machine instead of the remote
  196. machine.  /dcc works coming in, and thus files people dcc to you go
  197. to your bsd hard disk directly (if you ran irc on the remote machine,
  198. the file goes to its hard disk :).  /dcc out doesn't work... there may
  199. be a future version that does have full dcc working.  For the time
  200. being, you can trsh and run irc on the remote side to do /dcc send.
  201. The file is called ircII2.(whatever)term.tar.z
  202.  
  203. There is a hacked version of ncftp (ncftp+term.tar.z) that allows you
  204. to ftp directly from your bsd machine, over internet, to the various
  205. ftp sites.  You can put/get files from/to your bsd hard drive directly.
  206.  
  207. There is a hacked version of telnet (termtelnet.tar.z) that allows you
  208. to telnet from your bsd machine, over internet, to any other machine
  209. on internet.
  210.  
  211. There is a hacked gopher client for term, too.  I've never used it :-)
  212.  
  213. There are scripts and programs for automating news and mail over term,
  214. too.  But I haven't used these either :-)
  215.  
  216. The miracle of tredir :-)
  217. -------------------------
  218.  
  219. tredir provides term with some amazing capabilites that dnet only
  220. dreams of :-)  tredir is a port redirector program.  You can redirect
  221. any port on your host/bsd side to any port on your remote/dialup side,
  222. and vice versa.  tredir only supports tcp ports, and not udp ports.
  223. But a new version of term is being developed (called SLAP) that will
  224. do udp.  With udp, you will be able to mount wuarchive, eunet.ch :-),
  225. or your remote machine homedir as part of your bsd filesystem.
  226.  
  227. The most basic use for tredir is to allow anyone on the internet to
  228. telnet IN to your amigabsd!  The telnet daemon for unix listens to
  229. port 23 for telnet connections.  The remote side's port 23 is being
  230. used to listen for telnets from the internet, so you can't redirect
  231. it to your port 23 (amigabsd side)... However, you can pick a random
  232. port # and redirect that to your port 23 :-)  Typically, I use port
  233. number 5551, but any unused port will do...  Here's how to do it:
  234.  
  235. 1) Run a trsh
  236. 2) in that trsh, type:
  237.     tredir 5551 23
  238.  
  239. In my case, my remote machine is jobe.unix.portal.com.  So after I
  240. do the tredir, anyone can telnet to my netbsd:
  241.     telnet jobe.unix.portal.com 5551
  242. and they get a login/password prompt from my netbsd!  If you want
  243. people to have accounts on your netbsd machine, set them up accounts!
  244. If these people have the TERMDIR env variable set in their .cshrc,
  245. they can use ircIIterm, ncftp+term, termtelnet, etc., back out over
  246. the term connection!  They can also run trsh and get to your dialup
  247. account, so beware and set up the /etc/group and ownership as I mentioned
  248. above!
  249.  
  250. Sounds almost like slip, right?  Well, it is different from slip:
  251. 1) you must tredir to allow people to telnet in
  252. 2) with slip, your machine gets its own ip address.  Then people
  253.    could mail to ANY user on the netbsd machine.  Without an
  254.    ip address, mail only works to your remote account.
  255.  
  256. Note: I never tried tredir to redirect ftp, but it should work.
  257. Note2: you can use tredir on the netbsd side to redirect ports in
  258.    the other direction:
  259.     tredir 6667 nova.portal.unix.com:6667
  260.    this allows me to telnet 6667 locally and get to nova's irc port.
  261.  
  262. Uploading and downloading files
  263. -------------------------------
  264.  
  265. There is a term client called tupload that uploads files from the machine
  266. it is run on to the other side.  If you run tupload on the amigabsd side,
  267. it will upload files from amigabsd to your remote account.  If you run
  268. tupload on the remote side, it sends files home.  Examples:
  269.  
  270. example 1: sending a file home
  271.     trsh
  272.     tupload file /tmp   (sends file "file" to /tmp on the bsd machine)
  273. example 2: sending a file to the remote side:
  274.     tupload file   (sends file "file" to your the dir on the remote
  275.             machine where term was run from)
  276. example 3: running tupload in the background:
  277.     tupload file &
  278.  
  279. notes:
  280.     if you trsh, then tupload in the background, you can exit the
  281.     trsh and the transfer continues.
  282.  
  283.     tupload will resume a file transfer from where it left off if
  284.     the modem conection has been broken (or you ^C the tupload).
  285.  
  286.