Raspi-Config/motd_files
mrjohndowe e42aa0ffe6 Update .bash_aliases, .nanorc, and 15 more files... 2021-11-30 11:25:36 -07:00
..
install-motd Update .bash_aliases, .nanorc, and 15 more files... 2021-11-30 11:25:36 -07:00
README.md Update .bash_aliases, .nanorc, and 15 more files... 2021-11-30 11:25:36 -07:00
motd1.png Update .bash_aliases, .nanorc, and 15 more files... 2021-11-30 11:25:36 -07:00
motd1.sh Update .bash_aliases, .nanorc, and 15 more files... 2021-11-30 11:25:36 -07:00
motd2.png Update .bash_aliases, .nanorc, and 15 more files... 2021-11-30 11:25:36 -07:00
motd2.sh Update .bash_aliases, .nanorc, and 15 more files... 2021-11-30 11:25:36 -07:00
motd3.png Update .bash_aliases, .nanorc, and 15 more files... 2021-11-30 11:25:36 -07:00
motd3.sh Update .bash_aliases, .nanorc, and 15 more files... 2021-11-30 11:25:36 -07:00
motd4.png Update .bash_aliases, .nanorc, and 15 more files... 2021-11-30 11:25:36 -07:00
motd4.sh Update .bash_aliases, .nanorc, and 15 more files... 2021-11-30 11:25:36 -07:00
motd5.png Update .bash_aliases, .nanorc, and 15 more files... 2021-11-30 11:25:36 -07:00
motd5.sh Update .bash_aliases, .nanorc, and 15 more files... 2021-11-30 11:25:36 -07:00
motd6.sh Update .bash_aliases, .nanorc, and 15 more files... 2021-11-30 11:25:36 -07:00

README.md

raspberry-pi-motd

Message of the Day for the Raspberry Pi

All the work below is my customisation of motd from the forum thread on raspberrypi.org

motd1.sh:

motd2.sh:

motd3.sh:

motd4.sh:

motd5.sh:

motd6.sh: same than 4 with undervoltage info

Written in bash and tested with the Raspbian distribution.

  • Create file motd.sh in /etc
sudo nano /etc/motd.sh

Use one of the 2 different motd layout to fill this file.

  • Change owner and make it executable:
sudo chown root:root /etc/motd.sh && sudo chmod +x /etc/motd.sh
  • Add /etc/motd.sh as the last line in your ~/.profile to execute the script when the user logs in via a tty console or ssh.

  • Remove the original motd file:

  sudo rm /etc/motd

You can remove the "last login" information. However it is considered a security risk. If you wish to do so, you should disable the PrintLastLog option from the sshd service. Edit the /etc/ssh/sshd_config file and uncomment the line #PrintLastLog yes:

sudo nano /etc/ssh/sshd_config

Before:

#PrintLastLog yes

After:

PrintLastLog no

Restart the sshd service:

sudo /etc/init.d ssh restart

Now simply SSH into the Pi and enjoy the new motd.

Note: If you don't see the degree Celsius character correctly (º) make sure you have enabled a UTF8 locale.

motd2.sh is copied from Retropie (Replaced Joystick with Raspberry Logo).

The ASCII logo came from a forum thread on raspberrypi.org

Auto installation:

git clone https://github.com/yoannportugal/raspberry-pi-motd
sudo chown root:root /home/pi/raspberry-pi-motd/install-motd/install-motd && sudo chmod +x /home/pi/raspberry-pi-motd/install-motd/install-motd
sudo sh /home/pi/raspberry-pi-motd/install-motd/install-motd
cd /raspberry-pi-motd/install-motd
sudo sh install-motd
sudo echo "/etc/motd.sh" >> ~/.profile
rm -R /home/pi/raspberry-pi-motd