=========================================================
                    xtell

Radovan Garabik  http://www.fmph.uniba.sk/~garabik/

=========================================================

Xtell is a simple network messaging client, much like netwrite. I wrote it
because such a client (and server) is running on local VAX  machines, and I
needed to send messages back and forth. Incidentaly, the VMS code (author
Jozef 2Knepp) is based on similar unix code from Radovan Semancik, but
this program is a bit too complicated for such a simple use and segfaults
anyway :-).

So I took ident2 program written by Michael Bacarella, wiped
apart his auth code and replaced with mine.

Requirements: Linux. The program itself depends on libident (you can get it
from  ftp://ftp.lysator.liu.se/pub/ident/libs). If you cannot install it,
you  can still compile xtelld, just uncomment #define DONT_HAVE_LIBIDENT in
define.h and remove -lident in the Makefile.

However, without ident the messages coming to you can  be easily spoofed.

Similary, if you do not have snprintf, uncomment DONT_HAVE_SNPRINTF in
define.h.	
	
How to compile and install:

1) look at Makefile and define.h

2) type make
   This skould produce two executables, xtelld (the server) and xtell (the 
   client).
   If it worked, ok, if not, there is an error somewhere :-)

3) become root (if you can't, go to step 8)

4) type make install  

5) decide if you want to run it as daemon or from inetd (preferred)
   if daemon, just make sure it is started each time you boot
   your computer, or you have to start it manualy (you should start it as 
   user nobody to avoid security risk:
     # su nobody -c xtelld  
   should do it).
   if from inetd, add this line to /etc/services :
  
xtell	4224/tcp			# xtell server

   and this line to /etc/inetd.conf :
  
xtell	stream	tcp	nowait	nobody	/usr/sbin/tcpd /usr/local/sbin/xtelld

Notice that the entries are separated by tabs, not spaces.

6) restart inetd with killall -HUP inetd

7) enjoy

8) what to do if you are a normal user and want to run xtell daemon:
  
   You can't run it from inetd, obviously. Just start ./xtelld to use xtell
   on default port (4224). In this case, xtell can write messages only to
   you. If there is another user on that system willing to get messages,
   either s/he starts xtelld on another port (e.g. ./xtelld -p4225), or
   makes his/her tty writable by you (e.g. chmod a+rw /dev/tty*  -ignore
   error messages) 
  


How to use it:
suppose you want to send a message to user katka on computer frru.utcru.sk
Just type:

    xtell katka@frru.utcru.sk Hi

To send multiple lines long message to user 7memerscheim at computer 
pascal.fmph.uniba.sk, type

    xtell 7memerscheim@pascal.fmph.uniba.sk
    Hi 
    How are you today 
    Please answer
    <empty line>

in this case, finish sending messages with empty line.

If you want to send message to user holik on local computer, you can do it
either by typing:

xtell holik@localhost Hi

or simply:

xtell holik Hi


To send message to certain tty, append the tty to username, separated by
colon:

xtell stanys:ttyp2@pedro.dnp.fmph.uniba.sk 'Sveikas Tomai'

will send message 'Sveikas Tomai' to user stanys on ttyp2 at computer
pedro.dnp.fmph.uniba.sk


To specify other port than the default 4224, append the port to computer 
name, separated by per cent sign 

xtell vanya@eccentrica.dnp.fmph.uniba.sk%7777 'Szia Pistike'

assumes the xtell daemon runs at computer eccentrica on port 7777, and
sends the message 'Szia Pistike' to user vanya.  

Option -v turns verbose mode on. Xtell will then display some messgaes 
about connecting, which is usefull especially when the connection is sl

Example:

xtell -v eva@galileo.dnp.fmph.uniba.sk

If the user has created in his/her/its home directory the file .xtell-log, 
and the file is writable by nobody, all messages will be written to this 
file as well as to the screen (handy when the screen is overwritten and 
you could not see the message).
