Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hackerb9/notify-send-all
Send a pop-up message to all users logged into a machine, asynchronously.
https://github.com/hackerb9/notify-send-all
command-line dbus messages notifications notify-send sysadmin wall wayland x11
Last synced: 3 months ago
JSON representation
Send a pop-up message to all users logged into a machine, asynchronously.
- Host: GitHub
- URL: https://github.com/hackerb9/notify-send-all
- Owner: hackerb9
- License: cc0-1.0
- Created: 2023-06-08T05:58:04.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-18T09:35:29.000Z (9 months ago)
- Last Synced: 2024-07-30T21:01:53.558Z (5 months ago)
- Topics: command-line, dbus, messages, notifications, notify-send, sysadmin, wall, wayland, x11
- Language: Shell
- Homepage:
- Size: 15.6 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# notify-send-all
Send a pop-up notification message to all users logged into a machine.
Similar to the `wall` command, but for graphical logins (X & Wayland).
Messages are sent asynchronously, not blocking, but `--action` can still be used to wait for a response from each user. Responses are prefixed with the username and a TAB.## Installation
It's just a shell script. Download [notify-send-all](https://raw.githubusercontent.com/hackerb9/notify-send-all/main/notify-send-all), make it executable, and put it in your path. Or clone the repository, and add the working copy to your path.
```
wget raw.githubusercontent.com/hackerb9/notify-send-all/main/notify-send-all
chmod +x notify-send-all
sudo mv notify-send-all /usr/local/bin/
```## Requirements
Users must be logged in graphically (X or Wayland) with dbus and a notification daemon running. This program does not yet work for users logged in on the console.
## Usage
**notify-send-all** _[options]_ \
### Simple usagenotify-send-all "My hovercraft is full of eels"
### More complex example
notify-send-all --urgency=critical \\
--action=run="Run away!" \\
--action=hide="Hide!" \\
"Warning: Nuclear launch imminent"
Click to see example output
andy run
circus hide
hackerb9 run## Bugs
* `-?`, `--help` only works correctly if it is the first argument.
* If a user is logged in on a console instead of a graphical session
(X or Wayland), then `notify-send` hangs for a long time before
timing out on StartServiceByName for org.freedesktop.Notifications.
This seems to be a bug in libnotify-1.8.1.This bug is also triggered when the user is logged in on both
console and graphical sessions and logged into the console first.
In that case, not only does notify-send hang, but notifications
will not show up at all in the graphical session.
## Bonus commands
### notify-send-to
If you make a symlink called `notify-send-to`, you can use it to send a pop up notification to a single user.
### notify-send-others
If you make a symlink called `notify-send-others`, you can use it to send a pop up notification to all users but yourself.