GithubHelp home page GithubHelp logo

luisdanielroviracontreras / custom-motd Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sixbytesunder/custom-motd

0.0 1.0 0.0 227 KB

Highly customizable Message of the Day script for Raspberry Pi

License: MIT License

Shell 100.00%

custom-motd's Introduction

Custom MOTD

Highly customizable Message of the Day script for Raspberry Pi

Written in Bash. No other dependancies. So far tested with Raspbian Jessie only, but should work with most other Linux distributions.

The following steps may vary depending on the OS.

  • Download and save the motd.sh bash script onto your machine. Remember to add execute permissions and change the owner:

    $ sudo cp motd.sh /etc/profile.d/motd.sh
    $ sudo chown root:root /etc/profile.d/motd.sh
    $ sudo chmod +x /etc/profile.d/motd.sh

    Just run the script to test if it works

    ./etc/profile.d/motd.sh
  • You can remove default MOTD, but it's not necessary since the script will clean the screen anyway.

    $ sudo rm /etc/motd
  • For the same reason as above, not necessary, but you may want to remove the "last login" message. Disable the PrintLastLog option from the sshd service.

    $ sudo vim.tiny /etc/ssh/sshd_config

    You should see:

    PrintLastLog yes
    

    Change it to:

    PrintLastLog no
    

    Restart the sshd service:

    $ sudo systemctl restart sshd

Options

At the top of the file are variables allowing customization of the messages:

  • settings array contains all possible messages to be displayed. Comment lines with a # for messages you don't want to see. Change order of items in array to change order of displayed messages.

  • weatherCode set region code for the weather message. Full list of available Accuweather location codes

  • colour array, lets you set your own clours. List of colour codes:

    Colour Value
    black 0
    red 1
    green 2
    yellow 3
    blue 4
    magenta 5
    cyan 6
    white 7

custom-motd's People

Contributors

sixbytesunder avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.