1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179
|
=========================================================
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, FreeBSD.
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 xtell, just add -DDONT_HAVE_LIBIDENT to the gcc options
(see Makefile).
However, without ident the messages coming to you can be easily spoofed.
Similary, if you do not have snprintf, add -DDONT_HAVE_SNPRINTF in
Makefile.
xtell can optionally use GNU readline. Add -DREADLINE to CFLAGS and
-lreadline to LDFLAGS in Makefile to enable it.
How to compile and install:
If you have debian system with all neccessary packages installed, type
dpkg-buildpackage in the package's directory, then type
dpkg -i ../xtell*deb
Else:
1) look at Makefile
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:
prompt:/usr/local/sbin# 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 gubas on computer trener.fsport.uniba.sk
Just type:
prompt:~% xtell gubas@trener.fsport.uniba.sk Hi
To send multiple lines long message to user 7tokarova at computer
pascal.fmph.uniba.sk, type
prompt:~% xtell 7tokarova@pascal.fmph.uniba.sk
Hi
How are you today
Please answer
^D
in this case, finish sending messages with EOF (CTRL D)
If you want to send message to user holik on local computer, you can do it
either by typing:
prompt:~% xtell holik@localhost Hi
or simply:
prompt:~% xtell holik Hi
To send message to certain tty, append the tty to username, separated by
colon:
prompt:~% xtell stanys:ttyp2@reaktor.ip.fmph.uniba.sk 'Sveikas Tomai'
will send message 'Sveikas Tomai' to user stanys on ttyp2 at computer
reaktor.ip.fmph.uniba.sk
To specify other port than the default 4224, append the port to computer
name, separated by colon:
prompt:~% xtell bosa@radon.dnp.fmph.uniba.sk:4000 'Ahoj'
assumes the xtell daemon runs at computer radon on port 4000, and
sends the message 'Ahoj' to user bosa.
Option -v turns verbose mode on. Xtell will then display some messgaes
about connecting, which is usefull especially when the connection is slow.
Example:
prompt:~% xtell -v rybar@dmpc.dbp.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).
One of very good examples how to use xtell is to put following into
your .procmailrc file:
:0 c
*
|/usr/bin/xtell you@at.your.computer 'You have new mail'
or:
:0 c
* ^From.*important@user.somewhere.in.the.net*
|/usr/bin/xtell you@somewhere.else 'New mail from important'
This will tell you whenever you get a new mail from
important@user.somewhere.in.the.net.
Unlike biff, you can configure it to display only certain kinds
of mails, and also unlike biff, it can send announcement about your new
mail to another computer (running xtelld).
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).
If xtell is invoked as write, it tries to mimick write(1) behaviour, i.e.
it expects username or username tty as parameters.
xtell checks the environmental variable XTELLPROMPT
If it exists, it is used as prompt for messages (not in write
compatibility mode).
Y2K notice: xtell is NOT year 2000 compliant. This is intentional.
This is A FEATURE. It saves two characters on your screen, which
you will appreciate when you get a message from user@hostname with a long
name.
Besides, if messages on your screen will last for more than one century, I will
pay you all damage you may suffer from xtell not being Y2K compliant :-).
Last notice: if you do not think zsh is the best shell, (besides doing a
mistake) replace prompt:~% in above text with prompt:~$ or whatever :-)
|