SSH terminal login screen 'motd' OSMC Logo

motd

Message of the day - OSMC Logo and dimmed command prompt
For SSH terminal login screen

(created with jp2a)

Install

  • create install.sh and copy-paste the following script
  • chmod +x install.sh
  • ./install.sh
#!/bin/bash

# install.sh

# uninstall
echo '#!/bin/bash
mv /etc/motd{.original,}
rm /etc/motd.logo
rm /etc/profile.d/motd.sh

sed -i -e "/^PS1=/ d
" -e "/^#PS1=/ s/^#//
" /etc/bash.bashrc

echo "Relogin to see original motd."' > uninstall_motd.sh
chmod +x uninstall_motd.sh

# motd
echo "
               ,:x0XNlNX0x:,             
           .oONWKOfffffffOKWNOo.         
       .lKWO:'              ':0WKl.      
     .xWK:                      :KWx.    
    lWK;                          :XNc   
   OMx       ;              ;       kMk  
  kMo        OXl         .oNk        dMx 
 cMO         OMWNl     .oWWMk         0M:
 KM,         OM::XNo..dWK::Mk         ;MO
 WW.         OM:  :NWWK:  :Mk         .MN
 WW.         OM: .dWX:    :Mk         .MN
 0M;         OMldWK:      :Mk         :MO
 :M0         OMMX:        :Mk         KM;
  xMx        OK:          :Q:        kMd 
   xMk       '                     .OMd  
    :NX:                          cNN:   
     .oWXl.                    .oNNo     
        cOWKd;.            .:dXWO:       
           .oONWKOxooooxOKWNOo.          
               ':x0XNNX0x:'              
 " > /etc/motd.logo
 
# install

mv /etc/motd{,.original}

echo '#!/bin/bash
color=33
echo -e "\e[38;5;${color}m$( < /etc/motd.logo )\e[0m"
'> /etc/profile.d/motd.sh

sed -i -e '/^PS1=/ s/^/#/
' -e '/PS1=/ a\
color=242\
PS1=\x27\\[\\e[38;5;\x27$color\x27m\\]\\u@\\h:\\[\\e[0m\\]\\w \\$ \x27
' /etc/bash.bashrc

echo "Uninstall: ./uninstall_motd.sh"
echo "Relogin to see new OSMC logo motd."

or
One-liner Install (view code on GitHub)

wget -qN --show-progress https://github.com/rern/OSMC/raw/master/motd/install.sh; chmod +x install.sh; ./install.sh
3 Likes

Neat!

Do you mind pasting the install.sh here instead of pointing to an external source?

Sam