raspberrypi-motd

motd

Message of the Day for the Raspberry Pi

Written in bash and tested with the Raspbian distribution.

Just clone the repositoy git clone https://github.com/plasmoduck/raspberrypi-motd/ then set the execution permissions and change the owner:

cd  /path/to/raspberrypi-motd/
sudo chown root:root motd.sh
sudo chmod +x motd.sh

I found that the previous method of placing the script in /etc/profile.d/ leads to the desktop login manager getting stuck in an endless loop asking for password in Raspbian.

However, the script motd.sh should not be exicuted by placing in /etc/profile. The correct method is to source the motd.sh script in the file ~/.profile by placing a link to it at the end of the file like /path/to/motd.sh and it will be executed after login.

Be sure to remove the default MOTD.

  $ sudo rm /etc/motd

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