Is it possible to use notify-send to send messages to other users on the system?
preferably to a specified user, but system wide would work aswell.

Ubuntu/Debian with libnotify installed

link|improve this question

77% accept rate
feedback

2 Answers

up vote 1 down vote accepted

If you have the other users password you can do sudo -u somedude notify-send Hello. somedude must have an X-session started.

Edit: Found this script for use with cron:

#!/bin/bash
PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin
export DISPLAY=:0.0
export $(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$(pgrep -session)/environ )
TIME=$1
shift
/usr/bin/notify-send -t 36000 $1 $2
link|improve this answer
with slight modification, that script does what i need it to do, thanks – madmaze Oct 5 '11 at 16:49
feedback

If the users are on terminals the following commands will be of use -

write user [tty]

or to send to all users

wall
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.