Versuchen GOLD - Frei

MakerSpace Send Raspberry Pi and Arduino notification messages to your desktop You've Been Notified

Linux Magazine

|

#297/August 2025: Cleaning Up

If you use sensors with a Raspberry Pi or Arduino in your home network, you may want to get desktop notifications on your Linux PC whenever some interesting event is detected. You can send messages via SSH or through simple TCP connections and display them with notify-send.

- By Pete Metcalfe

There are some great libraries and techniques that let you pass sensor data from micro- controllers to centralized data servers and IoT dashboards. If you spend a lot of time on your laptop or behind a Linux desktop PCs, there are also some simple options that you can use to push notifications from Raspberry Pis or Ar- duino modules to the Linux desktop. Two techniques that I like to use are

  • Running a remote command via an SSH login

  • Sending a message to a small TCP socket server script on my laptop (Figure 1)

Both of these approaches have their pros and cons. For a Raspberry Pi or a similar machine running a full Linux system, it's a simple task to log in to your desktop via ssh and execute some notification com- mand. Unfortunately, however, most Ar- duino modules don't support SSH. Also, depending on what you're doing on your local machine, you may not want to let ex- ternal devices log in via SSH.

The TCP socket server method offers more security, but it requires a small, four-line Bash script that you will need to run on your desktop. TCP client librar- ies exist for both Python and C/C++, so all wireless Arduino modules and, of course, all Raspberry Pi models support this approach.

notify-send and Zenity

The first step in getting remote notifica- tions working is to install a notification application. Two commonly used com- mand-line notification programs are Notify-send (a tool in the Libnotify package) [1] and Zenity [2]. Zenity is a great general-purpose dialog creator, whereas notify-send just does desktop notification messages.

Linux Magazine

Diese Geschichte stammt aus der #297/August 2025: Cleaning Up-Ausgabe von Linux Magazine.

Abonnieren Sie Magzter GOLD, um auf Tausende kuratierter Premium-Geschichten und über 9.000 Zeitschriften und Zeitungen zuzugreifen.

Sie sind bereits Abonnent?

WEITERE GESCHICHTEN VON Linux Magazine

Linux Magazine

Exercise Place

The GRUB 2 boot manager might seem intimidating at first glance. All the more reason to spin up a virtual playground so you can practice.

time to read

10 mins

#298/September 2025: Indie Game Studio

Linux Magazine

Terminal Mosaic

What's better than one command line? Many command lines that never die. Take the terminal to new places with Zellij.

time to read

9 mins

#298/September 2025: Indie Game Studio

Linux Magazine

Linux Magazine

MakerSpace

Build a Long-Range Sensor Network with ChirpStack Sensor Symphony

time to read

14 mins

#298/September 2025: Indie Game Studio

Linux Magazine

Linux Magazine

How Flatpak, AppImage, and Snap are changing software distribution Ship It!

Modern-day package systems solve some problems posed by classic formats like DEB and RPM. We look at Flatpak, AppImage, and Snap and describe how they differ.

time to read

12 mins

#298/September 2025: Indie Game Studio

Linux Magazine

Linux Magazine

Dashboard Delight

Simplify the chaos of self-hosted services with Homepage, a customizable dashboard with widgets that put service statistics at your fingertips.

time to read

9 mins

#298/September 2025: Indie Game Studio

Linux Magazine

Linux Magazine

MADDOG'S DOGHOUSE

Free software, and the FOSS community, can help technology students get the education they desire in Brazil and elsewhere.

time to read

3 mins

#298/September 2025: Indie Game Studio

Linux Magazine

Linux Magazine

Rethinking the Terminal

The Warp AI agent takes the guesswork out of working at the command line. We show you how to build a simple website with one prompt.

time to read

4 mins

#298/September 2025: Indie Game Studio

Linux Magazine

Just in Time

Just is a command runner that lets you define project-specific tasks in a declarative justfile.

time to read

7 mins

#298/September 2025: Indie Game Studio

Linux Magazine

Linux Magazine

The Watcher

This versatile security app checks for vulnerabilities, watches logs, and acts as a single interface for other tools.

time to read

7 mins

#298/September 2025: Indie Game Studio

Linux Magazine

Linux Magazine

NO INTERNETREQUIRED

This new utility lets you update a system that is notconnected to the Internet.

time to read

4 mins

#298/September 2025: Indie Game Studio

Listen

Translate

Share

-
+

Change font size