Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question
add comment

3 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
share|improve this answer
    
with slight modification, that script does what i need it to do, thanks –  madmaze Oct 5 '11 at 16:49
add comment

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

write user [tty]

or to send to all users

wall
share|improve this answer
add comment

I stumbled upon the following project that implements a user notify: tinynotify-send

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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