Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is possible to send a message (popup window or something) to local user logged into X (xdm, fluxbox) from console ? For example: user1 is logged and using X/fluxbox, user2 logging into the same box by ssh to console. Now - what user2 have to do to send message to user1 ?

share|improve this question
up vote 13 down vote accepted

The xmessage tool lets you do exactly that; present a popup window to users with a text message inside.

Example: user2 logs into a BASH session on the box and issues:

export DISPLAY=':0.0'
xmessage "some message here"

if you log into a TSCH session, it'd be something like this:

setenv DISPLAY ':0.0'
xmessage "some message here'

Alternatively, you can send messages to terminal sessions in one of two ways:

Using wall (=warn all [users])

From the man page:
Wall displays the contents of file or, by default, its standard input, on the terminals of all currently logged in users.

If you want to target a specific user, use write. Again, man tells us:

The write utility allows you to communicate with other users, by copying lines from your terminal to theirs.

share|improve this answer
If a recipient (user1 in my example) is logged into X11, and haven't opened xterm or other terminal - will wall work too ? I think that user1 will not see messages. – marioosh Jul 13 '11 at 7:33
I updated my answer to include the 'xmessage' solution. That will show a small window to the user, irrespective of whether they have a terminal open. – mjk Jul 13 '11 at 7:36
Incidentally, 'apropos' is a useful utility to know; it searches manual pages for the text you pass to it. Try running 'apropos message' and see what it returns. – mjk Jul 13 '11 at 7:44
I know xmessage but how to run it by user1 and get this small window opened on user2's screen ? is it even possible ? – marioosh Jul 13 '11 at 7:53
@marioosh I would also like to know how to do that. Did you ever get it figured out? – NotNotLogical Nov 28 '15 at 20:35

Your Answer


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.