[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

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

Posted on 2004-10-21
7
Medium Priority
?
220 Views
Last Modified: 2013-12-06
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.
0
Comment
Question by:SiliconDirect
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
7 Comments
 
LVL 5

Expert Comment

by:Anonymouslemming
ID: 12378568
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
 

Author Comment

by:SiliconDirect
ID: 12380358
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
 
LVL 5

Expert Comment

by:Anonymouslemming
ID: 12381816
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
 

Author Comment

by:SiliconDirect
ID: 12383419
so I have to edit the following files?

 .bashrc
.profile



0
 
LVL 5

Accepted Solution

by:
Anonymouslemming earned 300 total points
ID: 12388664
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

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month14 days, 14 hours left to enroll

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question