The server allows you to run dogtail on a remote machine and returns an Atspi object, similar to a local launch. This allows you to interact with the remote application as with a native one.
The server runs in an environment with a graphical user interface (GUI). The client must also be running a Linux OS with a GUI for proper processing and interaction with the Atspi object.
- Install the required libraries (example for Debian-based systems):
sudo apt update
sudo apt install -y python3-venv git build-essential pkg-config libcairo2-dev python3-dev libgirepository1.0-dev python3-pyatspi at-spi2-core - Clone
pyatspirepository
cd ~ && git clone https://gitlab.gnome.org/GNOME/pyatspi2.git - Check your at-spi2-core version:
sudo apt-cache policy at-spi2-core - If necessary, switch the pyatspi repository to the corresponding version of at-spi2-core (e.g., version 2.46.1):
cd pyatspi
git checkout PYATSPI_2_46_1Available tags can be found at: pyatspi2 history
5. Copy the pyatspi module to Python's library directory:
sudo cp -r ~/pyatspi2/pyatspi /usr/lib/python3/dist-packages/- Enable desktop interaction:
gsettings set org.gnome.desktop.interface toolkit-accessibility true - Make the launch file executable:
chmod +x start_dogtail_serverTo start the server, use the following command:
./start_dogtail_server 4723Where 4723 is the port on which the server will listen. The default port is 8080.
To use the service from a remote client, you need to connect to the server via RPyC and call the Dogtail startup method.
Example:
import rpyc
conn = rpyc.connect("10.10.10.10", 4723)
opts = {
'app_path': '/path/to/application',
'app_name': 'ApplicationName',
'timeout': 30,
'dumb': False
}
driver = conn.root.remote(opts, debug=True)The driver will represent an absolutely identical Atspi object that is running on the remote machine.