Awesome Open Source
Awesome Open Source


MQTT to Desktop Notification script, for use with dm8tbr's irssi script.

GPLv3 license

What sends irssi's notifications to an MQTT broker (such as mosquitto). takes those messages and turns them into desktop notifications.


If irssi runs in GNU Screen or tmux on a remote system then translating IRC notifications into desktop notifications is not trivial, but some solutions do exist such as irssi-over-ssh-notifications (which I used successfully for many years). Most of these solutions require that a remote port is forwarded via ssh -R to the client to transmit the notifications—which is fine until you'd like to receive that notification on your phone so you don't miss your team lunch or use mosh where port forwarding isn't possible.

How uses

  • paho to access the MQTT broker
  • libnotify to make desktop notifications
  • libsecret to store and retrieve passwords
  • dbus-python and glib to run the main loop and track notification closures

Setup can be run as a systemd user service or started manually.

Setting up an MQTT broker is left as an exercise to the reader. mosquitto is relatively simple to set up. Ensure that you set up mqtts:// so that your messages are secure in transit (easily done with Let's Encrypt). Various guides are available online.


$ mkdir -p ~/bin
$ cp ~/bin
$ mkdir -p ~/.config/systemd/user/
$ cp mqtt-notify.service ~/.config/systemd/user/


A simple example configuration file is available at config. Copy and modify to suit your needs.

$ mkdir -p  ~/.config/mqtt-notify/
$ cp config ~/.config/mqtt-notify/


The user's MQTT authentication password is stored with libsecret and will be looked up via the username and the hostname stored in config. Add the password to the libsecret database.

$ secret-tool store --label="mqtts://" user myuser service mqtt host
Password: **********


As a user service

$ systemctl --user daemon-reload
$ systemctl --user enable --now mqtt-notify


(Assumes that ~/bin is in your $PATH)

$ -c ~/.config/mqtt-notify/config

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Python (1,143,485
Python3 (33,391
Mqtt (3,006
Notifications (2,721
Dbus (231
Notify (179
Desktop Notifications (68
Paho Mqtt (61
Glib (57
Libnotify (45
Irssi (44
Libsecret (8
Dbus Python (7
Glib2 (5
Related Projects