2

When I start the terminal (which uses bash) a echoed message appears several times right before the message "You have mail." and it is added by someone that has used my computer. It also happens when I create a new tab in the terminal.

Now I would like to remove it's appearance, what suggestions do you have?

0

2 Answers 2

1

If it only happens for one user account, check the following files:

  • ~/.bash_profile (and any files sourced therein)
  • ~/.bashrc (if it exists)
  • your Terminal preferences: Under the Startup tab, is there a command defined to be run when starting Terminal?
  • your Terminal preferences again: Under the Settings tab, check to see if your selected terminal style/configuration defines a startup command under the tab Shell.

As per the comments to this post:

  • Check /etc/motd to see if a message of the day is defined for login
7
  • Crediting the users commenting on this question.
    – Daniel Beck
    Commented Dec 23, 2010 at 21:38
  • Checked the files /etc/profile, /etc/bashrc (no signs leading to any output) and none of ~/.bash_login, ~/.bash_profile or ~/.profile existed. Also checked the preferences in the Terminal application, but no traces of any script running there either.
    – Rikard
    Commented Dec 23, 2010 at 21:47
  • @Rikard Change your shell in Terminal preferences, does the problem go away? Use another terminal application, such as iTerm, does the problem go away then?
    – Daniel Beck
    Commented Dec 23, 2010 at 21:49
  • @Joey: As I understand the question, the problem is not the message regarding mail, but something repeatedly echoed before that message.
    – Daniel Beck
    Commented Dec 23, 2010 at 21:51
  • Changed the shell in the Terminal preferences and also tried with iTerm, both with the same result as before.
    – Rikard
    Commented Dec 23, 2010 at 21:56
1

You can try the following

touch $HOME/.hushlogin

If the message still shows up, it is probably located in one of the bash configuration files. Check those for an echo or print command.

1
  • The previous question gave a answer to locate where the message came from, but I applied your solution afterwards in order to hide the "You have mail." message. In my case your tip would also have solved the problem.
    – Rikard
    Commented Dec 25, 2010 at 11:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .