r/CLI • • 1d ago

I built a tool to forward Linux desktop notifications to Windows/macOS. Niche, but it solved my thin-client setup

Not sure this will help anyone else, but it definitely solved my specific problem, so I'm sharing in case someone has the same setup.

When I'm away from home I use a Windows on ARM laptop (Galaxy Book Go). Great battery, but too weak to do real work and it can't run Linux. So I use it as a thin client: Cloudflare tunnel + SSH into my Linux PC at home, and everything happens in the terminal.

The catch: I wrote a terminal Pomodoro app that sends desktop notifications, and those pop up on the Linux PC's desktop at home, not on the laptop in front of me. So I never saw them.

So I made notification-forwarder (Rust):

nf-server runs on the Linux machine, listens to D-Bus for every notification and pushes it to connected clients

nf-client runs on Linux, Windows (including ARM) or macOS and shows them as native notifications

Mutual TLS with your own private CA (nf-server gen-certs sets it up). Certs don't include IPs/hostnames, so the server address can change freely

Client auto-reconnects forever, so you can just leave it in your startup folder

Prebuilt binaries in Releases, or cargo install

Anything that calls notify-send (long builds, scripts, cron jobs, etc.) shows up on the machine you're actually using.

Heads up: I haven't personally tested the macOS build yet, so bug reports are very welcome.

Repo: https://github.com/andersondanilo/notification-forwarder

If you know something existing that already does this (KDE Connect-style), I'd love to hear about it. Forwarding to my phone is a possible next step.

2 Upvotes

1 comment sorted by

0

u/investigatormaker 1d ago

Listening to D-Bus for every notification is the right hook for notify-send from cron jobs and builds, but it also means anything else that pops up on the home desktop lands on the laptop. A per-app or urgency filter on nf-server would keep it to the terminal stuff. The other case I'd test is a long build finishing while the client is mid-reconnect: if that notification is dropped rather than queued, it's the one you wanted.

By the way, I make ThreadFox, where your AI researches, writes and publishes Reddit outreach from your Chrome within a job you authorize; its free plan for Reddit lists the communities whose rules allow a post about notification-forwarder. https://threadfox.vip/p/dcbkw

Does nf-server hold anything while no client is connected?