NAME
xitalk - an X intercept talk, write, etc. requests utility
SYNOPSIS
xitalk [ -toolkitoption ... ]
DESCRIPTION
The xitalk program intercepts stuff like talk and write requests and allows predefined responses (such as a talk reply) at the touch of a button. It stops you getting your xterms filled with garbage when you dont want to have your xterm obscured. To respond to a talk request (for e.g.) you can click on respond and avoid having to manually open another window and run talk or write manually or close down whatever you're running to respond to the talk/write request. Also it can be set up to automatically reply to messages, allowing you to respond automagically to write etc requests while you're not there (as an answering machine). xitalk supports xpm and bitmap files, which it displays to indicate what type of request has been recieved. Another feature of xitalk is its ability to watch files for changes, primarily allowing it to be used as a mail notification program.
To do this you must have mesg n run in every terminal. xitalk is not very magical, it (like xterm) logs you into the utmp file, and waits on the input it gets. It pattern matches against the input to determine what it is receiving, as many machines have different messages for different events, youll probably have to put the the appropiate patterns into your ~/.xitalkrc , data on patterns can be found in the PATTERN and COMMAND sections, and its advisable to look at the examples (probably in /usr/local/lib/xitalk or /usr/lib/xitalk).
Write and talk requests usually go the the most recently active writable terminal found in utmp, which is unlikely to be xitalk's if any other is writable. So remember to use mesg n
xitalk uses regexp to pattern match the input it recieves and determine the response. See configuration for details on this.
Another thing about xitalk is that as you have run mesg n in every terminal, xitalk has to be able to (and does) provide a mechanism to initiate a talk/write etc request. There are two scrollable lists a who list and a tty list which displays the ttys that a user is logged into, a + after a tty means it is writable, a - indicates that it is not. A left mouse click on the xitalk main window pops up xitalk's control dialog, a right click on the main window runs the currently selected response, an example dialog with xitalk would be, a talk message arrives as xitalks pseudu-tty, xitalk parses it and recognizes it to be a talk request, and readies a response to that user. right clicking on the main window (probably displaying a picture of a telephone) spawns a talk to that individual, left clicking brings up more information on the request, who its from etc, and clicking on respond in this dialog spawns the talk program.
OPTIONS
xitalk accepts all of the standard X Toolkit command line options (see X(1) ). The order of the options in unimportant.
CONFIGURATION
xitalk has inbuilt default patterns to recognize talk/write and wall requests, but these vary from system to system, so its a good bet that they won't work on many systems. So to get your xitalk working happily you'll probably have to write a ~/.xitalkrc. A sample .xitalkrc was provided with the source of xitalk, the probably easiest way to set xitalk up is to edit that. Its possibly to be found is /usr/local/lib/xitalk.
GLOBAL OPTIONS
- LIBPATH = place_to_look_for_bitmaps_and_xpm_files_etc
-
this path is used to search for picture files and sounds to use to indicate a recieved request.
- SOUNDHANDLER = program to use to play sounds
-
this program is used to play sounds listed in the PATTERN section e.g SOUNDHANDLER = auplay and then "auplay soundfile" takes place. Its very simple support for sound. If SOUNDHANDLER is unset and a soundfile is listed to be played, itll be catted to /dev/audio. If you are running xitalk on a machine thats not where its displaying to, nas the network audio system available on ftp.x.org is a good choice to use to play audio to your workstation. set SOUNDHANDLER to NONE to have no sound or beeps
- AUTOANSWER = [YES|NO]
-
whether or not to reply to requests automatically. default NO
- AUTORUN = [YES|NO]
-
whether or not to run a command immediately after the user selects it bypassing the need to press execute. default NO
- AUTOREFRESH = [YES|NO]
-
whether or not to constantly update the list of users logged on. default NO
INCOMING PATTERN OPTIONS
- PATTERN_BEGIN
-
defines the beginning of a pattern
- TITLE = text string
-
the title of the pattern
- PATTERN = regexp string
-
the pattern to match against
e.g.
PATTERN = talk: respond with: talk (.*)@(.*)
will match the strings
talk: respond with: talk [email protected]
and
talk: respond with: talk [email protected]the words that match the pattern (.*) are stored, and are accessable in the COMMAND section as %(1), %(2) etc etc.
- COMMAND = command string
-
the command to execute in response to the pattern, there is a special pattern %(-1) which exists only for COMMAND and MAILBOX it is the name of the tty device that xitalk is logged in on, its primary use is for keeping xitalk unidle on who. e.g.
COMMAND = xterm -ut -exec ytalk -x %(1)@%(2)
where %(x) where x is a number is the x'th wildcard used in the pattern.
- PICTURE = [ bitmap | xpm ]
-
the picture to display when the pattern is matched, xitalk can handle xpm and bitmap files. The path mentioned for the file is searched first if that fails, the LIBPATH is prepended and an attempt to open the file is re-tried.
- SOUNDCLIP = filename_to_play
-
the soundfile to play when the pattern is matched, xitalk just spawns off its SOUNDHANDLER program with this filename. If soundhandler isnt set it cat it to /dev/audio. The path mentioned for the file is searched first if that fails, the LIBPATH is prepended and an attempt to open the file is re-tried.
- PATTERN_END
-
signifies the end of a pattern.
MENU ENTRY OPTIONS
- MENU_BEGIN
-
signifies the beginning of the user selectable commands. the commands put in these sections are selectable from a menu in xitalk
- TITLE = name
-
the name is used as the word in the menu
- DETERMINED = command string
-
here is the command to be run when selected from the menu, e.g.
xterm -exec write %(u) %(t) in this command, you can put %(u) to mean user and %(t) to mean tty, these values will be filled in from the selected (if any) entries in the who and tty lists.
- MENU_END
-
this denotes the end of a menu entry.
CONFIG MENU OPTIONS
- CONFIGS_BEGIN
-
this denoted the beginning of a configuration menu entry. The configuration menu is a menu of alternative configuration files to use, by selecting one of those entries you effectively restart xitalk with that as the initilization file.
- TITLE = name
-
the name is used as the word in the menu
- FILE = filename
-
the file to use as configuration. e.g.
/home/sysadm/caolan/.xitalk
- CONFIGS_END
-
brings a config entry to an end
- It might be important to note that the mail/filewatch event only fires
FILEWATCH/MAILBOX OPTIONS
when the file being watched gets bigger that the previously seen size. It wont fire if the file is truncated. If you have ACCEPT_EXTERNAL_READ set which is the default, then if the event has fired and then the box become smaller or is read by any program then the event will unfire and xitalk will react as if ignore was pressed. This allows external programs to read mail and for xitalk to acknowledge that the user is therefore no longer interested in being told that mail arrived. The catch is that some of the files youll being watching will be fiddled with by other programs behind your back and youll never know that they changed. Setting ACCEPT_EXTERNAL_READ to off for everything except mailboxes is suggested unless you are sure of whats going on.
- CHECKMAIL_BEGIN
-
this denoted the beginning of a file watch entry. This section allows the user to define a response to execute when a particular file changes.
- TITLE
-
the title of the file watch
- MAILBOX = filename
-
this is the file to be watched by xitalk e.g. MAILBOX = /var/spool/mail/caolan there is a special pattern %(-1) which exists only for COMMAND and MAILBOX it is the name of the tty device that xitalk is logged in on, its primary use is for keeping xitalk unidle on who. See the TOUCH option for more details. e.g. MAILBOX = %(-1)
- TOUCH = [YES|NO]
-
this option is kind of an antiwatch option, it touches a file instead of checking to see has it been changed. Its primary use is for keeping xitalk in an unidle state for who listing etc. a full example would be
#this one continually touches the tty device we're logged in to to #keep you fairly unidle CHECKMAIL_BEGIN TITLE = keep unidle MAILBOX = %(-1) TOUCH = YES CHECKMAIL_END
- ACCEPT_EXTERNAL_READ = [YES|NO]
-
If the watched file is read by another program and this is set to YES then xitalk will react as if the user pressed ignore. Yes is the default state, as it allows a user thats been notified of mail to use a mail program without spawning it from xitalk and still have xitalk do the right thing.
- PICTURE = filename
-
the picture to display when the selected file changes
- SOUNDCLIP = filename_to_play
-
the soundfile to play when the pattern is matched, xitalk just spawns off its SOUNDHANDLER program with this filename. If soundhandler isnt set it cat it to /dev/audio. The path mentioned for the file is searched first if that fails, the LIBPATH is prepended and an attempt to open the file is re-tried.
- COMMAND = command_string
-
the command to run when the file is changed
- CHECKMAIL_END
-
this beings the file watch section to an end.
FILES
- /usr/local/lib/system.xitalkrc
-
system wide config file.
SEE ALSO
AUTHOR
Caolan McNamara
WWW: http://skynet.csn.ul.ie/~caolan
Mail: [email protected]