This is a tiny script that forwards messages to a (local) notification daemon. Client side simply dumps all data to port 1337, server side listens (netcat) and passes received stuff to notify-send. Startup and server reloading is managed via systemd unit file.
- netcat
- systemd (local machine)
- notify-send (local machine)
-
Clone the repo (all relevant machines):
git clone git@github.com:ondras/rnotify.git
-
Symlink the
rnotify.service
to your per-user systemd configuration directory (only the local machine):cd rnotify mkdir -p ~/.config/systemd/user ln -s `pwd`/rnotify.service ~/.config/systemd/user systemctl --user daemon-reload
-
Start the listening service:
systemctl --user start rnotify
-
Test it locally:
./rnotify-send "This is a test"
-
Create a forwarding tunnel to another machine:
ssh -R 1337:0:1337 user@host
-
Test it remotely:
user@host> ./rnotify-send "This is a remote test"
/script install notify_send.pl
/set plugins.var.perl.notify_send.command "/path/to/rnotify/rnotify-send $type $name $message"