{"id":16947613,"url":"https://github.com/x70b1/motd-on-acid","last_synced_at":"2025-06-17T19:37:31.557Z","repository":{"id":62287627,"uuid":"225406199","full_name":"x70b1/motd-on-acid","owner":"x70b1","description":"This MOTD has so many colors!","archived":false,"fork":false,"pushed_at":"2024-10-07T14:58:48.000Z","size":117,"stargazers_count":75,"open_issues_count":0,"forks_count":9,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T19:19:42.883Z","etag":null,"topics":["bash","motd"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/x70b1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-02T15:21:06.000Z","updated_at":"2025-04-06T23:51:03.000Z","dependencies_parsed_at":"2023-01-25T21:46:19.658Z","dependency_job_id":"4c8ef2ce-431c-4c53-b84f-17d1cba29e5d","html_url":"https://github.com/x70b1/motd-on-acid","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/x70b1/motd-on-acid","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x70b1%2Fmotd-on-acid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x70b1%2Fmotd-on-acid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x70b1%2Fmotd-on-acid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x70b1%2Fmotd-on-acid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/x70b1","download_url":"https://codeload.github.com/x70b1/motd-on-acid/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x70b1%2Fmotd-on-acid/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260427400,"owners_count":23007503,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","motd"],"created_at":"2024-10-13T21:47:43.387Z","updated_at":"2025-06-17T19:37:26.537Z","avatar_url":"https://github.com/x70b1.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# motd-on-acid\n\n[![Actions](https://github.com/x70b1/motd-on-acid/actions/workflows/shellcheck.yml/badge.svg)](https://github.com/x70b1/motd-on-acid/actions)\n[![Contributors](https://img.shields.io/github/contributors/x70b1/motd-on-acid.svg)](https://github.com/x70b1/motd-on-acid/graphs/contributors)\n[![License](https://img.shields.io/github/license/x70b1/motd-on-acid.svg)](https://github.com/x70b1/motd-on-acid/blob/master/LICENSE)\n\nThis MOTD has so many colors! This thing is from hell.\n\nIt's colourful. It shows a lot. It's fun.\nBut I guess we have reached the limit.\nThe execution is sometimes too slow.\nIt makes it annoying when you log in.\nSo be careful.\nI warned you.\n\n\n## Preview\n\n![motd-on-acid](preview.png)\n\nThe most of the icons in this preview are from Font Awesome 5 Pro.\nI also used [fontello](http://fontello.com/) to create some own icons.\n\n\n## Setup\n\n1. Check the dependencies.\n   Some modules require `jq`, the banner needs `figlet`.\n   Install them.\n\n2. Copy `motd-on-acid.sh` to `~/.bashrc_motd` on your system.\n\n3. Run `motd-on-acid` at the end of your `.bashrc`.\n  Add the modules as arguments.\n  The output is ordered in the same way.\n\n4. Replace the predefined values with your own.\n   The complete list of vars is [at the top](motd-on-acid.sh#L4) of the script.\n\n```sh\n# example snippet for your .bashrc:\n\nsource ~/.bashrc_motd\n\nBANNER_KERNEL_ICON=\"X\"\nBANNER_UPTIME_ICON=\"Y\"\nBANNER_DEBIAN_ICON=\"Z\"\n\nbash_motd --banner --processor --memory\n```\n\n\n### Make it better\n\nIf you use the example above you will get some problems.\n\n1. You only want to see `motd-on-acid` if you login with `ssh` on an interactive shell.\n\n2. You need a way to disable it sometimes.\n\nThe result would look like this:\n\n```sh\n# example snippet for your .bashrc:\n\nif [ -n \"$SSH_CONNECTION\" ] \u0026\u0026 [ $SHLVL -eq 1 ] \u0026\u0026 [[ $- == *i* ]]; then\n    if [ -z \"$MOTD\" ] || [ \"$MOTD\" -ne 0 ]; then\n        source ~/.bashrc_motd\n\n        BANNER_KERNEL_ICON=\"X\"\n        BANNER_UPTIME_ICON=\"Y\"\n        BANNER_DEBIAN_ICON=\"Z\"\n\n        bash_motd --banner --processor --memory\n    fi\nfi\n```\n\nAlso add `AcceptEnv MOTD` to your `/etc/ssh/sshd_config`.\n\nNow you can run `export MOTD=0; ssh -o SendEnv=MOTD -t host.name.net` to disable MOTD.\nThat is useful if you run `ssh` commands in scripts.\n\n\n### Remove other output\n\nYou still have disturbing output which is not required.\n\nChange some values in your `/etc/ssh/sshd_config`:\n\n```\nPrintMotd no\nPrintLastLog no\nBanner none\n```\n\nDisable or remove all `pam_motd.so` PAM includes in `/etc/pam.d/sshd`\n\n```\n# session    optional     pam_motd.so\n```\n\n\n## Modules\n\n### --banner\n\nPrints a `figlet` banner, linux distribution, kernel version and uptime.\n\n\n### --cpu\n\nPrints the loadavg threshold and hardware info.\n\n\n### --memory\n\nPrints a usage bar for your memory.\n\n\n### --swap\n\nPrints a usage bar as summary for your swap space.\n\n\n### --diskspace\n\nPrints a usage bar for all mounted filesystems.\n\n\n### --services\n\nPrints the status of a defined list of systemd services.\n\nThe default file is `.bashrc_motd_services.txt`.\nIt should look like the example. The separator is`;`.\n\n1. The printed name [required]\n2. `systemd` service name [required]\n3. `dpkg` or `rpm` package name for version info [not required, will print `--` if empty]\n\n```\nOpenSSH;ssh;openssh-server\nWebserver;nginx\n```\n\n\n### --podman\n\nPrints the status of your local `podman` containers.\n\nYou have to add `podman` to the `/etc/sudoers` for your user:\n\n```\nusername ALL=(ALL) NOPASSWD: /usr/bin/podman version --format json\nusername ALL=(ALL) NOPASSWD: /usr/bin/podman images --format json\nusername ALL=(ALL) NOPASSWD: /usr/bin/podman pod ls --sort name --format json\n```\n\n\n### --docker\n\nPrints the status of your local `docker` containers.\n\nYou have to add `curl` to the `/etc/sudoers` for your user:\n\n```\nusername ALL=(ALL) NOPASSWD: /usr/bin/curl -sf --unix-socket /var/run/docker.sock http\\:/v1.40/info\nusername ALL=(ALL) NOPASSWD: /usr/bin/curl -sf --unix-socket /var/run/docker.sock http\\:/v1.40/containers/json?all=true\n```\n\n\n### --updates\n\nPrints your available linux distribution updates.\n`apt` and `dnf` is supported at the moment.\n\n\n### --letsencrypt\n\nPrints the expiration status of all your certs.\nDon't forget to set the path to your cert.\n\nYou have to add `find` and `openssl` to the `/etc/sudoers` for your user:\n\n```\nusername ALL=(ALL) NOPASSWD: /usr/bin/find \u003c/your/path/to/ssl\u003e -name cert.pem\nusername ALL=(ALL) NOPASSWD: /usr/bin/openssl\n```\n\n\n### --login\n\nPrints the previous login time, logout time and IP of your current user.\n\n\n### --include\n\nCreate your own script and print it on your MOTD!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fx70b1%2Fmotd-on-acid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fx70b1%2Fmotd-on-acid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fx70b1%2Fmotd-on-acid/lists"}