Skip to main content

Errol is a file sender that rely on inotify. It can be used to watch a directory and automatically transfer the new files (or modified ones) with XMPP.

Project description


Errol is a file sender that rely on inotify. It can be used to watch a directory and automatically transfers the new files (or modified ones) with XMPP.


Errol needs the following requirements:

  • A system supporting inotify (Linux).

  • an XMPP (jabber) account supporting the following XEPs: Stream Management, Publish-Subscribe, Multi-User Chat

  • A pubsub service where the nodes can be set as open. The node name is defined in the configuration file. I personally use sat_pubsub. A pubsub component developed for the project Salut à Toi.

  • A Multi-User Chat because not all XMPP accounts support PubSub. For now, some information are still shared through MUC messages. This behavior could change in the future.

You can use your own XMPP server or choose a XMPP service among the following list.

Create the pubsub node

This step is optional if you already have a write access on the pubsub node. The following example use jp, the Salut à  Toi command-line interface but slixmpp or sleekxmpp can be used.

$ jp pubsub node create -f publish_model open be.agayon.errol:0 -s -c

The node name be.agayon.errol:0 is recommended in order to identify the functionnality.

As an example, there are the node options on the service

$ jp pubsub node info be.agayon.errol:0 -s
persist_items: True
deliver_payloads: True
serial_ids: False
publish_model: open
access_model: open
send_last_published_item: on_sub

You can test your setup with the examples scripts of slixmpp.


./ -j -p pass -r -f /path/to/file.txt

See the scripts for more information.

Getting started with Errol

First you need to clone the repository. Errol needs the following dependencies:


You can easily install errol with pip:

$ pip install errol


$ python3 install

Errol can easily be installed in a virtualenv.


A PKGBUILD will be available soon.


You need to provide information about the XMPP account.

$ cat config.example.ini

  • jid : the jabber account

  • password: the xmpp password

  • pubsub: the pubsub server (publish activity)

  • room: the MUC (chatroom) where errol display information.

  • presence_file: a writable file used to keep track of presences. When receiver is online, the file contains ‘1’ and ‘0’ otherwise.

The files will be sent by and received by . The nicks are the usernames used on the MUC.


Once installed, Errol can be launched in a terminal.

$ errol --help
usage: errol [-h] [-e EVENTS] [-f FILE] [-d] -p PATH -c COMMAND

Automatic XMPP file sender and directory watcher

optional arguments:
  -h, --help            show this help message and exit
  -e EVENTS, --events EVENTS
                        Number of events to watch (delete, create modify) in
                        the directory. Once reached, the program stops.
  -f FILE, --file FILE  Config file containing XMPP parameters
  -d, --debug           set logging to DEBUG
  -p PATH, --path PATH  The path watched.
  -c COMMAND, --command COMMAND
                        The executed command: xmpp or watcher

On device A

If you want to watch the directory /tmp/sender, the following command can be used:

$ errol -f config.example.ini -p /tmp/sender -c watcher

All modified or new files created in the watched location will be sent by XMPP.

On device B

If you want to receive the files, you have to launch Errol with the following command line.

$ errol -f config.example.ini -p /tmp/receiver -c xmpp

All the received files will be stored in the directory defined with the option ‘-p’.

Launch with systemd

Errol can be launched with systemd. Two unit files are provided to help you:

  • errol_sender.service

  • errol_watcher.service

First, you need to create the config directory and copy the unit files.

$ mkdir -p ~/.config/errol/
$ mkdir -p ~/.config/systemd/user/
$ cp systemd/ ~/.config/errol/
$ cp systemd/errol_watcher.service ~/.config/systemd/user/
$ cp systemd/errol_sender.service ~/.config/systemd/user/

Then, you can edit the environment and the unit files to match your preferences and reload the units.

$ systemctl --user daemon-reload

The units can then be launched and activated at boot:

$  systemctl --user start errol_sender
$  systemctl --user start errol_watcher
$  systemctl --user enable errol_sender
$  systemctl --user enable errol_watcher

If you encounter some problems, you can read the logs with the following command:

$ journalctl --user -xe
$ systemctl --user status errol_watcher.service
$ systemctl --user status errol_sender.service


This project is licensed under the GPLv3 - see the LICENSE.txt file for details


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

errol-1.0.7-py3-none-any.whl (15.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page