Commit 996ba676 authored by Vincent Bernat's avatar Vincent Bernat

Imported Upstream version 1.08

Henrik Sandklef
Jon-Erling Dahl
Contributors (code fixes, comments etc):
Janice Waddick
Juan F. Codagnone
Lars Brinkhoff
Ton van Vliet
Nekrasov Alexander
Dr. Adrian Wrigley
Conall McGleenan
Bianchi Roberto
Thomas Riga
Stuart Guthrie
Volker Stolz
Xnee / bugs and limitations
No known bugs
See TODO for limtations
This diff is collapsed.
2003-04-15 Henrik Sandklef <>
* src/*/*.c "plugin -> resource"
* doc/*.texi "plugin -> resource"
2003-02-10 Henrik Sandklef <>
* vararg/stdargs
* src/lib/print_varargs.c:
* doc/xnee_exampl.texi (Examples):
* xnee.c: memset added
* AUTHORS: author added
* print_varargs.h: new file
2003-01-24 Henrik Sandklef <>
* building todo.html
* web/ new file
* web/ new file
2003-01-23 Henrik Sandklef <>
* src/lib/print_varargs.c: new file
2003-01-22 Henrik Sandklef <>
* src/cli/main.c: exit calls now uses enum ret values
* src/lib/xnee_record.c: exit calls now uses enum ret values
* src/lib/xnee.h: defines -> enum
* src/lib/print.h: moved all varargs functions to print_varargs.c
* src/lib/print_varargs.c: new file
* Makefile.xnee (CFLAGS): -DHAVE_HAVE_STDARG_H added
* src/cli/parse.c: XNEE_VERBOSE removed
* src/lib/xnee.c: removed longjump stuff
* src/cli/main.c (main): xd not global anymore
2003-01-20 Henrik Sandklef <>
* new file
* TODO: various updates
* doc/xnee_usage.texi: info updates
* doc/xnee_synch.texi: info updates
* doc/xnee_req.texi: info updates
* doc/xnee_intro.texi: info updates
* doc/xnee_install.texi: info updates
* doc/xnee_faq.texi: info updates
* doc/xnee_exampl.texi: info updates
* doc/xnee_develop.texi: info updates
* doc/xnee_devel_over.texi: info updates
* doc/xnee_devel_down.texi: info updates
* doc/xnee_devel_build.texi: info updates
* doc/xnee_copying: new file
* doc/texinfo.tex: replaced file
* doc/fdl.texi: new file
* doc/version.texi: new version
* doc/dev_version.texi: new version
* doc/xnee.texi: info updates
* src/lib/xnee_record.h: comment update
Sun Jan 19 14:21:56 2003 <>
* doc/xnee.texi: added GNU FDL stuff
* doc/xnee_develop.texi: added GNU FDL stuff
Sun Jan 19 14:21:14 2003 <>
* removed cp NEWS ChangeLog
Sun Jan 19 14:03:41 2003 <>
* src/cli/parse.c: changed printouts in usage and version
Sun Jan 19 14:02:21 2003 <>
* src/lib/xnee.c: changed printouts in usage and version
See doc/xnee.txt
which also can be found in various formats in the
Xnee Documentation Package that can be found at:
Download the Xnee Document Package from
for further information
*** This file is in BETA condition ****
1 Recording
1.1 Record all mouse/keyboard events
xnee --record --all-events
1.2 Record all mouse/keyboard events and save output
in a file called test1.xnee
xnee --record --device-event-range 2-6 -o test1.xnee
1.3 Record all mouse/keyboard and event 15 to 19 and save output
in a file called test2.xnee
xnee --record --device-event-range 2-6 --delivered-event-range 15-19 -o test2.xnee
1.4 Record all mouse/keyboard and event 15 to 17 and 19 and save output
in a file called test3.xnee
xnee --record --device-event-range 2-6 --delivered-event-range 15-17,19 -o test3.xnee
1.5 Record all mouse/keyboard and event 15 to 17 and 19 on display 0 on host
and save output in a file called test3.xnee
xnee --record --device-event-range 2-6 --delivered-event-range 15-17,19 -o test3.xnee --display
2 Replay/playback without synchronisation
2.1 Replay the session recorded in 1.2
xnee --replay --all-events -f test1.xnee --no-sync
2.2 Replay the session recorded in 1.3
xnee --replay -f test2.xnee --no-sync
2.3 Replay the session recorded in 1.4
xnee --replay -f test3.xnee --no-sync
2.4 Replay the session recorded in 1.4 to display 0 on host
xnee --replay -f test3.xnee --no-sync --display
2.5 Replay the session recorded in 1.4 to display 0 on default display
xnee --replay -f test3.xnee --no-sync
3 Replay/playback with synchronisation
3.1 Replay the session recorded in 1.2
xnee --replay --all-events -f test1.xnee --no-sync
3.2 Replay the session recorded in 1.3
xnee --replay -f test2.xnee --no-sync
3.3 Replay the session recorded in 1.4
xnee --replay -f test3.xnee --no-sync
3.4 Replay the session recorded in 1.4 to display 0 on host
xnee --replay -f test3.xnee --display
3.5 Replay the session recorded in 1.4 to display 0 on default display
xnee --replay -f test3.xnee
4 Distribution
4.1 Distribute your mouse/keyboard actions to display 0 on host
xnee --record --distribute
4.2 Distribute your mouse/keyboard actions to display 0 on hosts,
xnee --record --distribute,
4.3 Replay the session recorded in 1.4 with synchronisation (on default display)
and distribute it to display 0 on hosts,
xnee --replay -f test3.xnee --no-sync \
1.5 Record using netscape resource
xnee --record -p resources/netscape.xns
1.6 Replay using netscape resource
xnee --replay -p resources/netscape.xns
Xnee / FAQ
FAQ is now influded in the file
which can be found in various formats in the
Xnee Documentation Package that can be found at:
Basic Installation
These are generic installation instructions with some added Xnee specific information (Makefile.xnee)
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, a file
`config.cache' that saves the results of its tests to speed up
reconfiguring, and a file `config.log' containing compiler output
(useful mainly for debugging `configure').
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If at some point `config.cache'
contains results you don't want to keep, you may remove or edit it.
The file `' is used to create `configure' by a program
called `autoconf'. You only need `' if you want to change
it or regenerate `configure' using a newer version of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
Another way to build Xnee is :
1. `cd' to the directory containing the package's source code and type
make -f Makefile.openbsd
This way might seem easier but I can not guarantee that the Makefile
will work for all platforms ..... however it seems to work on Debian
There is no install rule in this Makefile. You have to copy as you pleas
are update various paths (e.g PATH and MANPATH).
To compile the documents in the doc directory:
1. make pdf
generates pdf version of the Manuals
2. make ps
generates pdf version of the Manuals
3. make txt
generates pdf version of the Manuals
4. make info
generates info version of the Manuals
5. make html
generates html version of the Manuals
5 make devel-doc
generates rtf, ps, pdf versions of the APIs
There is no install rule for thes files.
Compilers and Options
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. You can give `configure'
initial values for variables by setting them in the environment. Using
a Bourne-compatible shell, you can do that on the command line like
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
Or on systems that have the `env' program, you can do it like this:
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
Compiling For Multiple Architectures
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not supports the `VPATH'
variable, you have to compile the package for one architecture at a time
in the source code directory. After you have installed the package for
one architecture, use `make distclean' before reconfiguring for another
Installation Names
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=PATH' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
There may be some features `configure' can not figure out
automatically, but needs to determine by the type of host the package
will run on. Usually `configure' can figure that out, but if it prints
a message saying it can not guess the host type, give it the
`--host=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name with three fields:
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the host type.
If you are building compiler tools for cross-compiling, you can also
use the `--target=TYPE' option to select the type of system they will
produce code for and the `--build=TYPE' option to select the type of
system on which you are compiling the package.
Sharing Defaults
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/' if it exists, then
`PREFIX/etc/' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Operation Controls
`configure' recognizes the following options to control how it
Use and save the results of the tests in FILE instead of
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
debugging `configure'.
Print a summary of the options to `configure', and exit.
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
Print the version of Autoconf used to generate the `configure'
script, and exit.
`configure' also accepts some other, not widely useful, options.
See doc/
SUBDIRS = libxnee xnee
## -------------------- ##
## Forwarding targets. ##
## -------------------- ##
doc: html pdf info text man txt ps
html pdf info text man txt ps :
cd xnee/doc && $(MAKE) $(AM_MAKEFLAGS) $@
cd libxnee/doc && $(MAKE) $(AM_MAKEFLAGS) $@
devel-doc: doc
cd libxnee/doc && $(MAKE) $(AM_MAKEFLAGS) $@
cd xnee/test && ./
.PHONY: html pdf text info xnee.1 devel
## -------------------- ##
## EO Forwarding targets##
## -------------------- ##
build*.sh depcomp \
resources/*.xnr sessions/*.xns \
Makefile.xnee Makefile.openbsd Makefile.cvs
@echo "*** Retrieving configure tests needed by"
@ # echo "*** Scanning for include statements"
@ # autoheader
@echo "*** Building Makefile templates (step one)"
@echo "*** Building Makefile templates (step two)"
@if grep "ac_kw foo" configure &>/dev/null; then perl -p -i -e "s/ac_kw foo/ac_kw int foo/" configure; fi
@perl -pi -e 'if (/\[\/\$$\]\*. INSTALL=/) { print $$_ ; $$_ = "\"\") ;;\n"; }' configure
@-rm -f config.cache config.h
@echo "*** Create date/time stamp"
@echo "*** Finished"
@echo " Don't forget to run ./configure"
@echo " If you haven't done so in a while, run ./configure --help"
@if test ! -d CVS; then \
echo "you don't have a toplevel CVS directory."; \
echo "You most certainly didn't use cvs to get these sources."; \
echo "But this function depends on cvs's informations."; \
exit 1 ;\
pwd=`pwd` ;\
dirs=`find . -type d | grep -v CVS | sed -e "s#^./##"` ;\
for i in $$dirs; do \
if test ! -d $$pwd/$$i/CVS; then \
echo "D $$i" ;\
rm -rf $$pwd/$$i; \
continue; \
fi ;\
cd $$pwd/$$i ;\
for f in * .*; do \
if test ! -d $$f; then \
if grep "^/$$f/" CVS/Entries > /dev/null; then \
a="b"; \
else \
echo "F $$i/$$f"; \
rm -f $$pwd/$$i/$$f; \
fi; \
fi ; \
done; \
This diff is collapsed.
CFLAGS = -W -Wall -pedantic -pedantic-errors -Werror -DPACKAGE=${PACKAGE} -DVERSION=${VERSION} -I/usr/X11R6/include -I./libxnee/include/ -Ixnee/src -g -DHAVE_STDARG_H=1
LDFLAGS = -L/usr/X11R6/lib -L./lib -L/usr/X/lib
LIBS = -lX11 -lXext -lXtst -lpthread
CLI_OBJS = xnee/src/parse.o xnee/src/main.o
COMM_OBJS = libxnee/src/xnee.o libxnee/src/xnee_record.o libxnee/src/xnee_replay.o libxnee/src/print.o libxnee/src/print_varargs.o libxnee/src/datastrings.o libxnee/src/xnee_dl.o libxnee/src/xnee_sem.o libxnee/src/xnee_setget.o libxnee/src/xnee_fake.o libxnee/src/xnee_km.o libxnee/src/xnee_resolution.o libxnee/src/xnee_resource.o libxnee/src/xnee_buffer.o libxnee/src/xnee_callback.o libxnee/src/xnee_km.o libxnee/src/xnee_grab.o libxnee/src/xnee_time.o libxnee/src/xnee_threshold.o
${CC} -g ${CFLAGS} -c $< -o $@
XNEELIB = libxnee.a
XNEE_CLI= xnee/src/xnee
all : ${XNEE_CLI}
\rm -fr ${OBJS} ${XNEE_CLI} ${XNEELIB} src/*/*~ *~ src/*/*.o */a.out core
lib : ${XNEELIB}
ar -rv ${XNEELIB} ${OBJS}
bin : ${XNEE_CLI}
${CC} -o ${XNEE_CLI} ${CLI_OBJS} ${LDFLAGS} ${LIBS} -L./ -lxnee ${LIBS}
Xnee / NEWS
Changes in 1.08
- new options:
'--write-settings' writes a resource file from settings done
'--mouse' sets up ranges for all mouse events
'--keyboard' sets up ranges for all keynoard events
'--recorded-resolution' resolution used when recording
'--replay-resolution' resolution to use when replaying
'--no-resolution-adjustment' Don't use resolution adjustment
'--speed-percent [percent]' change the replaying speed
'--pause-key [k m]' key+modifier pauses xnee's current action
'--pause-key [k m]' key+modifier resume xnee's paused action
'--insert-key [k m]' key+modifier inserts a meta mark in the log file
'--max-threshold [nr]' sets the maximum threshold during sync
'--min-threshold [nr]' sets the maximum threshold during sync
'--tot-threshold [nr]' sets the total threshold during sync
'--retype-file [file]' retype the contents of file
'--retype-help ' retype the help printout
- synchronisation rewritten
Changes in 1.07
- version numbering changed (x.yz is used instead of x.y.z)
- plugin functionality renamed to resource
- plugin functionality added (plug in dynamic libs)
- synchronization rewritten
- force-replay option added
- replay delay rewritten
- Xnee can be configured (during configure) to:
+ exclude buffer verbose
- print functions replaced by function pointers
in dispatch functions,
- Added modifier+key binding to pause, resume
Changes in 1.0.6
- data names can now be more then 10 chars long ... errrh
- Xnee can be configured to:
+ exclude verbose mode
+ gcov compilation
+ grpof compilation
- new or modified options:
'--print-event-names' prints all event names and number
'--print-request-names' prints all request names and number
'--print-event-names' prints event name or number
'--print-request-names' prints request names or number
Changes in 1.0.6pre1
- multiple modifiers added
- data names can be used when setting ranges
- docs updated with the above changes
- range setting (when replaying) bug corrected
- speed increased (removed recording of device event when replying)
- Xnee is now a GNU package
Changes in 1.0.5
- Typos corrected in doc/ & README (after GNU review)
- Fiex parser error (--no_sync ----> --no-sync )
- Manual corrected (after GNU review)
- new options added to ease up usage a bit:
- info, manuals updated
Changes in 1.0.4