3

I'm new to Slackware and I think It's beautiful Distro. When I login it with ssh it prints motd, quote and a line for informing mail like this

Linux 3.10.17.
Last login: Thu Oct 23 06:28:08 +0330 2014 on /dev/pts/0.
No mail.

"The other day I put instant coffee in my microwave oven ... I almost
went back in time."
            -- Steven Wright

ahmad@SLKW:/$ 

I want to know how does the quotes and mail messages work and where are the config files.

Thank you.

Ahmad
  • 33
  • 4

1 Answers1

1

(Disclaimer: I'm an Arch user, never used Slackware.)

The program that prints the quotes is usually called fortune. It's available on most distros I have used, but the specific set of quotes may vary. Look in /etc/profile, or in scripts in /etc/profile.d for mentions of fortune. According to the description of the bsd-games package:

Adds a call to 'fortune' to /etc/profile.d/ so that users will get a fortune message when they log in.

The mail message is usually printed by pam_mail, a PAM plugin, but I think Slackware does not use PAM (What are the reasons Slackware still refuses to include PAM?).

According to this Linux Questions forum post for Slackware 14, the mail notification is also printed due to commands in /etc/profile:

...
# Notify user of incoming mail.  This can be overridden in the user's
# local startup file (~/.bash.login or whatever, depending on the shell)
if [ -x /usr/bin/biff ]; then
 biff y 2> /dev/null
fi
...
muru
  • 69,900
  • 13
  • 192
  • 292