Saturday, August 25, 2007

send a message to user's terminal

Here's another alternative on sending messages to specific and currently logged in remote terminal user.

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

This blog entry shows how to send message to specific and currently logged in user via terminal using write linux command. This approach comes handy during a non-X terminal communication exchanges between two currently logged in local box users from separate remote locations.

Here's the dirty and quick way to send messages to specific and currently logged in user.

If the other remote user 'vertito1' is currently logged in from tty2 of the remote box, you can send a message to that specific and currently logged in remote user. Do from local box as follows:

# write vertito1 tty2
Dude, no need to reboot this box.
Hit Control C when done

The above command is assuming that the other receiving user is not denying any terminal messages from his terminal setup. Denial of any messages can be done using mesg linux command.

If you wish the other user to see a portion of your remote screen as well, you can make use of copy and paste from your terminal. Any further lines you enter will be copied to the specified user’s terminal. If the other user wants to reply, they must run write as well.

To finish terminal converstaion, you simply type an end-of-file or interrupt character. The other user will see the message EOF indicating that the conversation is over.

Write blog entry done.


Sign up for PayPal and start accepting credit card payments instantly.
ILoveTux - howtos and news | About | Contact | TOS | Policy