2 min read

Modifikasi welcome screen saat login ke vps linux

Dari posting di LET, saya jadi ingin membuat tutorial cara memodifikasi welcome screen saat login ke vps linux. Secara default, shell akan menampilkan kata-kata yang tersimpan di /etc/motd, namun kita juga bisa menambahkan sebuah banner dengan memakai linuxlogo.
Berikut adalah cara memodifikasi welcome screen di vps Debian 6 :

  • Install linuxlogo
    # apt-get install linuxlogo -y
  • Modifikasi file /etc/linux_logo.conf dengan menambahkan kode berikut pada baris paling akhir
    # nano /etc/linux_logo.conf
    # /etc/linux_logo.conf
    #
    # This conf file controls linux_logo. Place your command-line options
    # for linux_logo on the first line of this file. Users may use a
    # ~/.linux_logo file which will over-ride this file.
    #
    # The following logos are compiled in to the Debian version of linux_logo:
    #
    #        Num     Type    Ascii   Name            Description
    #        1       Classic Yes     aix             AIX Logo
    #        2       Classic Yes     bsd             FreeBSD Logo
    #        3       Banner  Yes     bsd_banner      FreeBSD Logo
    #        4       Classic Yes     irix            Irix Logo
    #        5       Banner  Yes     solaris         The Default Banner Logos
    #        6       Banner  Yes     banner-simp     Simplified Banner Logo
    #        7       Banner  Yes     banner          The Default Banner Logo
    #        8       Classic Yes     classic-nodots  The Classic Logo, No Periods
    #        9       Classic Yes     classic-simp    Classic No Dots Or Letters
    #        10      Classic Yes     classic         The Default Classic Logo
    #        11      Classic Yes     core            Core Linux Logo
    #        12      Banner  Yes     debian_banner   Debian Banner (white)
    #        13      Classic Yes     debian_old      Debian Old Penguin Logos
    #        14      Classic Yes     debian          Debian Swirl Logos
    #        15      Classic Yes     gnu_linux       Classic GNU/Linux
    #        16      Banner  Yes     mandrake_banner Mandrake(TM) Linux Banner
    #        17      Banner  Yes     mandrake        Mandrakelinux(TM) Banner
    #        18      Banner  Yes     mandriva        Mandriva(TM) Linux Banner
    #        19      Banner  Yes     pld             PLD Linux banner
    #        20      Banner  Yes     redhat          RedHat Banner (white)
    #        21      Banner  Yes     slackware       Slackware Logo
    #        22      Banner  Yes     sme             SME Server Banner Logo
    #        23      Banner  Yes     sourcemage_ban  Source Mage GNU/Linux banner
    #        24      Banner  Yes     sourcemage      Source Mage GNU/Linux large
    #        25      Banner  Yes     suse            SUSE Logo
    #        26      Banner  Yes     ubuntu          Ubuntu Logo
    #
    # See the man page or the output of linux_logo -h for a complete
    # list a command-line options.
    # -L debian
    -y -u -L 14 -F "#O Version #V\nCompiled #C\n#N #M #X #T Processor#S, #R RAM\n#B Bogomips Total\n#L\n#U\ninfo@erawanarifnugroho.com\n"
  • Modifikasi file /root/.bashrc dengan menambahkan linuxlogo pada baris paling akhir
    # nano /root/.bashrc
    [ -z "$PS1" ] && return
    shopt -s checkwinsize
    if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
    	color_prompt=yes
    fi
    if [ "$color_prompt" = yes ]; then
    	PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
    else
    	PS1='\u@\h:\w\$ '
    fi
    unset color_prompt
    if [ -x /usr/bin/dircolors ]; then
    	test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
    	alias ls='ls --color=auto'
    fi
    #umask o=
    # Tambahkan baris "linuxlogo" pada akhir file
    linuxlogo

Hasilnya seperti berikut ketika kita membuka jendela ssh
welcome-screen