Can I Send messages to other users in Mandrake 10 without installing anything?

I'm using mandrake 10.
Can I Send little messages to other users on the server so they get them when they log in to it ?
I don't want to install any programs if possible?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You can always use echo...
Find out what tty the user is logged into by running w
Then send a message to a user as follows:

echo "hello user" > /dev/pts/1 (or whatever TTY the user is logged into)
SiliconDirectAuthor Commented:
I wrote "so they get them when they log in to it ?"
This sentence would mean that the other user is not logged on yet.
Sorry - I missed that part.

If you want to send to all users at once, you could just add the message to /etc/motd and ensure that this is displayed by /etc/profile

If you want to send to individual users, you could add the following lines to each user's .bashrc, .profile or .bash_profile (Whichever is appropriate for your distro)

cat $HOME/.loginmessage
cat /dev/null > $HOME/.loginmessage

Then when you want to send a message to a user at login, just edit .loginmessage in their homedirectory. The next time that they login, the contents of this file will be displayed and then the file will be blanked, so the user will only see it once.


SiliconDirectAuthor Commented:
so I have to edit the following files?


I'm not sure how Mandrake will handle these files as many Linux distributions handle them differently.

On Fedora (all I have at the moment), .bash_profile includes .bashrc right near the beginning. So any setting in .bashrc that is also in .bash_profile will use the value from .bash_profile.

I would suggest starting with .profile, and if that doesn't work, move it to .bashrc

A good thing to look for would be the following line in .profile
. ~/.bashrc

If that appears, then .profile is including .bashrc and you shuold edit .profile
The reverse is true if you find the line
. ~/.profile
in .bashrc

Also, if you want this functionality for any new users that you create, you should add those lines to whichever file turns out to be correct (.bashrc or .profile) in /etc/skel

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Distributions

From novice to tech pro — start learning today.