Refrshd is a daemon that keeps track of all windows that were created by
programs that were run by biditex-ed programs, and refreshes them whenever
there is a change in the biditext status (when biditext was enabled or
diabled, or when the base directionality was changed).

refreshd supports multiple clients using different ".rev" flag-files: If you
have some clients that use .rev, but 'biditext netscape' uses .rev.netscape
then changing the status of .rev.netscape will only cause a refresh of
netscape.

Building the refreshd package:
==============================

refreshd is now part of the r2l package. See the toplevel README file for
instructions.

Remarks: 

1) To build refreshd with debug options, pass the command-line switch
   --enable-debug-refreshd . This will compile refreshd with -DNOISY .

2) The default build procedure does not build the tests. To build them, run

      make test

   Note that this only builds them. It doesn't run them.

   At the time of writing this one of the test programs (test_refreshd_cnt)
   does not build with my system (gcc 2.95.3, mandrake 8.1)

---------------------------------------------------------------------------

Running:
========
1) start the refreshd program from the bin directory

refreshd [ --no_auto ]

refreshd accepts the --no_auto option to disable automatic refreshing.
In this case the refresh should be initiated by an application
linking with librefreshd_cnt.a and calling the rdRefreshNow() function.
See the test_refreshd_cnt.cc file under the test/refreshd_cnt for
an example of how to call this function.

2) In order to start a bidi application, run a program under biditext, where
biditext is launched with the flag --auto-refresh :

  biditext --auto-refresh program [args]

You should do that only after the refreshd has been launched. See biditext (1)
for more information.

Remarks:
1) The refresh daemon tries to detect if a previously instance is already 
running. If it detects this, it fails and prints an appropriate error
message suggesting a fix.

2) If the program fails with 

error in loading shared libraries: refreshd_hook.so: cannot open shared object
 file: No such or directory

or similar, adjust the LD_LIBRARY_PATH environment variable to include 
the problematic shared object file. See also the Program Library HowTo 
for more information.

3) If your program fails with 

Error: Refresh daemon does not respond.

and/or

Error: refreshd_hook initialization failed

this probably means that the refresh daemon does not run. Start it.


4) If you want debug messages to be printed, recompile the refresh daemon
(refreshd) with the -DNOISY option. Edit its Makefile, and uncomment the line

#NOISY = -DNOISY

Also you might want to look inside the debug.h file The debug.h file allows 
finer control over the amount of debug information printed. 

Rebuild the refresh daemon. The refresh daemon logs errors to
syslog, so you can still see important errors in 

/var/log/messages


Have fun!
