You can send a message to logged in Linux users with ‘wall’ (write all). In the unlikely event you want to send a popup message to desktop user, it’s possible with xwrited and some setup.
Users actually want to work with their computers, so you shouldn’t send them useless messages.
$ echo "Backup batteries will run out in 10 minutes"|wall
If you want to send messages to graphical X desktop, it’s possible. These instructions are written from memory.
$ sudo apt-get install xwrited
You must then set xwrited to start with the users session. In xfce4 (e.g. Xubuntu), you can do this in
Main menu: Settings: Session and StartUp: Application Autostart: Add
Name: xwrited
Description:
Command: xwrited