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?
Thanks.
SiliconDirectAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
AnonymouslemmingConnect With a Mentor Commented:
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
0
 
AnonymouslemmingCommented:
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)
0
 
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.
0
 
AnonymouslemmingCommented:
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.

HTH

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

 .bashrc
.profile



0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.