XposeXtool: control and integration without graphical user interface

The command line mode of the xposextool program allows to control operations through a script, which can be associated, for instance, to a window manager action:

/opt/XSOXmetaX/bin/xposextool [-display display_name] -noGui \
configuration_statement...

The integration with browsers or file managers is much easier using the short form

/opt/XSOXmetaX/bin/xposextool file_name...

which lets xposextool replay the specified recording file(s) using default parameters (Playback).

Control by signals

xposextool may be controlled by the calling program by means of signals.

Start phase

The beginning communication has to be configured by one of the statements start record onSignal (Recording), start play onSignal (Playback), start directCopy onSignal (Copying), or start convert onSignal (Conversion).

The following communication takes place:

xposextool sends the USR2 signal to the calling process as soon as it is initialized, in case of playback or conversion positioned to the start time (Start, termination and speed) and ready for immediate start of the recording, playback, copying, or conversion process.

The calling program sends the USR2 signal to xposextool to start the process.

During runtime

While running the following signals are recognized:

The signal USR2 lets xposextool continue the recording with the next file of a sequence of recording files (Destination).

The process (with the exception of copying) is suspended by sending the USR1 signal. xposextool goes into the pause state without displaying the graphical user interface.

The process is resumed by sending the USR1 signal again(Destination).

Termination

The TERM signal stops xposextool gracefully.

Printing state changes

Printing state changes has to be configured by one of the statements start record traceState (Recording), start play traceState (Playback), start directCopy traceState (Copying), or start convert traceState (Conversion).

For each state change the program xposextool prints on the standard output stream stdout one of the following lines:

Initializing version="interface_version" pid="process_id"
NewFile path="file_name" timestamp reason="reason"
NewSnapshot number="number" timestamp reason="reason"
Recording timestamp reason="reason"
Playing timestamp reason="reason"
Paused timestamp reason="reason"
Seeking timestamp reason="reason"
Seeked timestamp reason="reason"
Screenshot number="number" to="file_name" timestamp reason="reason"
SpeedChanged speed="speed" synchronous="0_or_1" timestamp reason="reason"
Finished timestamp reason="reason"
Stopped timestamp reason="reason"
Exited timestamp reason="reason"

The interface_version currently is "1.0".

The timestamp denotes the absolute recorded time in ISO 8601 format, and the time elapsed since the last snapshot (Snapshots) in milliseconds:

time="2008-06-29 23:59:59.000 +01:00" elapsed="67690"

The speed is printed as factor (Start, termination and speed), like:

speed="1.0"

For 0_or_1 is printed 0 or 1 depending on synchronous or asynchronous playback was specified (Start, termination and speed).

The reason denotes a state change, e.g. "initialized", "GUI", "hotkey", "SIGUSR1", "SIGUSR2", "end of file reached", "error", "done", "time limit reached", "size limit reached".

Copyright © 2018 X-Software GmbH
info@x-software.com