home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga GigaPD 3
/
Amiga_GigaPD_v3_3of3.iso
/
netbsd
/
contrib
/
bsd
/
aterm.readme
< prev
next >
Wrap
Text File
|
1993-06-25
|
13KB
|
286 lines
Introduction
------------
aterm is a port of the linux/unix term107 communications program to
amiga netbsd. term is a dnet-like term program - you compile term
on your unix dialup account, and you compile it on your home/unix
machine. You use a term program like kermit to dial in to your
dialup unix account, and run term there. Then you quit kermit (QUIT
kermit, quit kermit, quit kermit :-). Then on your home machine, you
run term and the two sides make a connection. There are several
client programs for term, including trsh (to start a remote shell on
your dialup machine), tupload (for doing file transfers either direction),
and tredir (more about this later). There is also a hacked version of
the irc client so you can run that on your home machine...
Installing on the amigabsd side:
--------------------------------
1) Login as root!
2) cd / ; mkdir /.term ; chmod 775 /.term
3) cd /.term
4) create /.term/termrc as per the documentation in the aterm.tar.z
distribution (TERMRC.doc file).
Mine looks like this:
baudrate 38400
window 6
compress on
timeout 80
5) If you have a 7-bit line or need to have escape characters, use
the linecheck.c program to have it tell you what to escape. I haven't
needed to use it, so you are on your own here...
6) unpack the aterm.tar.z file on your home machine. Here's my
/etc/fstab (output of df command):
Filesystem 512-blks used avail capacity Mounted on
/dev/sd6a 15326 10294 3498 75% /
/dev/sd1d 98666 77122 11676 87% /usr
mfs:44 61934 28 55712 0% /tmp
/dev/sd1e 39884 5406 30488 15% /proj
/dev/sd1f 98902 2 89008 0% /opt
/dev/sd1g 98526 14 88658 0% /home
/dev/sd1h 50518 2 45464 0% /home2
I use /proj to unpack stuff like aterm, screen, or whatever, to install
it. /tmp is a good place, too. It will unpack into ./term107/ subdir
from where you run tar. Use this command to unpack:
tar xzvfp aterm.tar.z
7) Time to set up /usr/local. The /usr stuff posted by mtk doesn't have
this part of the filesystem set up yet :-) Use the following commands:
mkdir /usr/local ; mkdir /usr/local/bin ; mkdir /usr/local/lib
mkdir /usr/local/man ; mkdir /usr/local/man/man1 ...
mkdir /usr/local/man8
chmod -R 755 /usr/local
8) install term itself:
cd ./term107
make install
make installman
9) before you can run term, you need an environment variable to be set:
setenv TERMDIR /
or
export TERMDIR=/
I recommend you put these in your .bashrc or .cshrc (and for every
user!). This tells term and its clients to use the /.term subdir
for communications between the processes. It will allow others who
are logged in to your bsd to share the term connection!
10) for security reasons, you may want to add a group to your /etc/group
file. I have added group "modem" to mine, and root and user mykes
are the only members of the group. If you do this, then do:
chgrp modem /usr/local/bin/trsh /usr/local/bin/tredir
chgrp modem /usr/local/bin/term /usr/local/bin/txconn
What this does is to preclude any users not in group modem in the
/etc/group file from running a trsh and getting access to a shell
on your dialup account! Beware, because someone could telnet IN
to your netbsd machine, run trsh, then rm -rf * to your homedir! :)
Instructions for building term on your remote/dialup unix machine:
------------------------------------------------------------------
1) I haven't tested this, but you may be able to use the sources
from the aterm.tar.z file. There are several Makefiles provided
for various flavors of unix. Do NOT use the default makefile,
since it is for linux, and I hacked it to work for netbsd :-)
2) ALWAYS examine the makefile in your editor! Look at where the
makefile wants to install things. If you are NOT root on your
dialin machine, you will get permission errors when the makefile
tries to copy stuff into /usr/local/bin or /usr/local/man. On
my portal dialup account, I have ~/bin and ~/man and hack the
makefiles to install stuff there. You probably already have
your own procedure for installing stuff like this.
3) If all else fails, there is a term107.tar.z file on the ftp site
which is the original term107 distribution, untouched by my
hacker fingers. You should be able to get that distribution to
build. Unlike dnet, the unix side of term has been ported all
over the place to many flavors of unix.
4) Be sure to do make install ; make installman on your remote/dialup
account. Also be sure to have the term binaries and man pages
on your path and manpath (i.e. edit your .cshrc if needed).
5) Look at the readmes and man pages for the term binaries on your
remote side. mtk hasn't ported groff to netbsd yet, so manpages
aren't working yet (they are there tho, just hard to read in nroff
format :-)
6) I assume you are NOT root on your remote machine (I'm not root on
portal, for example). Normally, term looks for termrc in ~/.term
but this can be overridden with the TERMDIR env varialbe. On the
remote side, you just need to make a .term subdir in your homedir
and you need a termrc file there. It should be the same as your
one at home (unless you use escapes, see man pages in that case)
with one exception. Add the line "remote" to the start of the
termrc on the remote side (technically, remote must be in one
side's termrc or the other, but NOT both).
Instructions for using kermit to dialin and start term
------------------------------------------------------
1) here's my .kermrc file, from my /home/mykes subdir:
set escape 29
set file type binary
set flow none
set line /dev/tty00
set baud 38400
set block 3
2) run kermit
3) c (to connect.. dumb terminal mode)
4) AT&D0 (this tells the modem NOT to hang up when you drop dtr)
5) ATDT... (dial into your dialin account)
6) do whatever you normally do to get to your shell prompt (login/passwd)
7) run term:
term
term will then be waiting for a connection from your amiga bsd machine.
if you want to kill term on the remote side, just type 5 zeros to it:
00000
and it will exit and give you back your prompt.
8) QUIT kermit:
ctrl-] (^]) control key AND ] key
q
(you now have your bsd shell prompt again)
if you did not do step 4) above (AT&D0), then the modem will hang up!
9) run term on the netbsd side:
term -n on -l /dev/null </dev/tty00 >/dev/tty00 &
specifically, this runs term in the background, redirecting
standard in and standard out to the modem, directing error text to
null. On the remote side, stdout/stdin is the modem, but on the
amigabsd side, stdout/stdin is the console (keyboard+screen).
I recommend adding an alias for term to your .cshrc:
alias term 'term -n on -l /dev/null </dev/tty00 >/dev/tty00 &'
If you do this, then you can just type term on the amiga side, too.
10) The two term instances should connect to eachother. Try to open
a remote shell with the trsh command:
trsh
you should get a command line prompt for a shell on your remote
machine. Type "exit" to kill the remote shell and return to your
netbsd prompt.
Miscellaneous:
--------------
The console handler for netbsd is very crude at this early stage of
netbsd's existance on the amiga. There is a concept called virtual
consoles, which _should_ eventually be implemented in the console
driver to allow you to hit the function keys to switch between up to
10 different shell contexts - to allow you to have more than one
shell running at a time. With virtual consoles (or xterm windows :-)
you can have multiple trsh running at the same time. One can be
running irc, another ftp, another tupload (sending files home), etc.,
at the same time...
Even without virtual consoles, some wonderful person has already written
a program called "screen" which almost gives you virtual consoles on a
standard console. mtk has ported it and it is on the ftp site already.
Since he only put the binary there, I am uploading the source/makefile
and binary for my port of it as well (it makes it easier to install
this way, IMO). If you use screen, you can have two shells on your
bsd at the same time and switch between them. You can run trsh in
both at the same time, or have a trsh in one and a bsd shell in the
other. use as you see fit :-) In any case, even if you don't use
term, screen is a MUST :-)
Other term clients (I haven't ported these yet):
------------------------------------------------
There is a hacked irc client that uses the term connection. This
allows you to run the client on your bsd machine instead of the remote
machine. /dcc works coming in, and thus files people dcc to you go
to your bsd hard disk directly (if you ran irc on the remote machine,
the file goes to its hard disk :). /dcc out doesn't work... there may
be a future version that does have full dcc working. For the time
being, you can trsh and run irc on the remote side to do /dcc send.
The file is called ircII2.(whatever)term.tar.z
There is a hacked version of ncftp (ncftp+term.tar.z) that allows you
to ftp directly from your bsd machine, over internet, to the various
ftp sites. You can put/get files from/to your bsd hard drive directly.
There is a hacked version of telnet (termtelnet.tar.z) that allows you
to telnet from your bsd machine, over internet, to any other machine
on internet.
There is a hacked gopher client for term, too. I've never used it :-)
There are scripts and programs for automating news and mail over term,
too. But I haven't used these either :-)
The miracle of tredir :-)
-------------------------
tredir provides term with some amazing capabilites that dnet only
dreams of :-) tredir is a port redirector program. You can redirect
any port on your host/bsd side to any port on your remote/dialup side,
and vice versa. tredir only supports tcp ports, and not udp ports.
But a new version of term is being developed (called SLAP) that will
do udp. With udp, you will be able to mount wuarchive, eunet.ch :-),
or your remote machine homedir as part of your bsd filesystem.
The most basic use for tredir is to allow anyone on the internet to
telnet IN to your amigabsd! The telnet daemon for unix listens to
port 23 for telnet connections. The remote side's port 23 is being
used to listen for telnets from the internet, so you can't redirect
it to your port 23 (amigabsd side)... However, you can pick a random
port # and redirect that to your port 23 :-) Typically, I use port
number 5551, but any unused port will do... Here's how to do it:
1) Run a trsh
2) in that trsh, type:
tredir 5551 23
In my case, my remote machine is jobe.unix.portal.com. So after I
do the tredir, anyone can telnet to my netbsd:
telnet jobe.unix.portal.com 5551
and they get a login/password prompt from my netbsd! If you want
people to have accounts on your netbsd machine, set them up accounts!
If these people have the TERMDIR env variable set in their .cshrc,
they can use ircIIterm, ncftp+term, termtelnet, etc., back out over
the term connection! They can also run trsh and get to your dialup
account, so beware and set up the /etc/group and ownership as I mentioned
above!
Sounds almost like slip, right? Well, it is different from slip:
1) you must tredir to allow people to telnet in
2) with slip, your machine gets its own ip address. Then people
could mail to ANY user on the netbsd machine. Without an
ip address, mail only works to your remote account.
Note: I never tried tredir to redirect ftp, but it should work.
Note2: you can use tredir on the netbsd side to redirect ports in
the other direction:
tredir 6667 nova.portal.unix.com:6667
this allows me to telnet 6667 locally and get to nova's irc port.
Uploading and downloading files
-------------------------------
There is a term client called tupload that uploads files from the machine
it is run on to the other side. If you run tupload on the amigabsd side,
it will upload files from amigabsd to your remote account. If you run
tupload on the remote side, it sends files home. Examples:
example 1: sending a file home
trsh
tupload file /tmp (sends file "file" to /tmp on the bsd machine)
example 2: sending a file to the remote side:
tupload file (sends file "file" to your the dir on the remote
machine where term was run from)
example 3: running tupload in the background:
tupload file &
notes:
if you trsh, then tupload in the background, you can exit the
trsh and the transfer continues.
tupload will resume a file transfer from where it left off if
the modem conection has been broken (or you ^C the tupload).