I am in need to send a Alert(Pop up) box to remote users in my network. How can i do this? I have tried Zenity,Notofy-send and Xmessage it all works in local computer but not in remote pc. I am using Linux Os only. So please provide any package related to this topic.

Thanking you and thanks in advance.,

Velmurugan.M,
System Admin.

Dani AI

Generated

GUI popups fail to appear on remote desktops not because the notifier programs are broken, but because graphical notifications must run inside the target user’s graphical session. The desktop session owns a DISPLAY (X) or compositor surface (Wayland), an authorization token (XAUTHORITY) and a per-session D‑Bus address. Any admin-side invocation that lacks those environment values will produce no visible popup on the user’s screen.

A robust, long-term solution is a small per-session notifier agent started by each desktop session (autostart entry or systemd --user service). The agent runs with the user’s session environment and exposes a secure local API (Unix socket or a restricted HTTP endpoint) that a central server can write to. This works consistently under X11 and Wayland, avoids setuid binaries, and keeps the privilege boundary clear. Libraries commonly used for the agent are libnotify (for display) and a lightweight language binding (Python, Go, etc.) to handle the socket and authentication.

For occasional ad-hoc alerts from an admin shell, run the notifier command inside the user’s session environment by exporting the session’s DISPLAY/XAUTHORITY/DBUS_SESSION_BUS_ADDRESS and executing the notifier as that user. Example pattern (adjust UID, paths and display for the target session):

# run as root
export DISPLAY=:0
export XAUTHORITY=/home/alice/.Xauthority
export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
sudo -u alice notify-send "Alert" "Message text"

System specifics differ: on systemd-based desktops the session bus is typically at /run/user/UID/bus; on Wayland direct injection often fails and the agent approach is required. 's broadcast idea is appropriate when plain text to TTYs is acceptable, and 's security caution about setuid helpers is important—avoiding setuid root wrappers in favor of per-session agents or carefully permissioned sockets is strongly recommended.

Recommended Answers

All 2 Replies

Since you are using Linux take a look at the wall command. wall stands for write all and writes to all users connected to the server.

I think you want to send a message to every user on every device attached to your network, correct?
If so you would need to have a program accepting input on each device and then have it go suid so that it could use the wall app. This is a significant security risk that would be somewhat ameliorated by wrapping your app in xinetd.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.