# Welcome Message on Boot

## lain iwakura

here's a simple script to add to your /etc/init.d folder to display a Welcome message and kernel info.  make a file in /etc/init.d called issue (or whatever you want to call it) and insert this code into the file:

#!/bin/sh

#  Local system initialization script

RELEASE="release 1.1a"

COLOR1="\033[1;6m\033[35;40m" # bright magenta on black

COLOR2="\033[1;6m\033[37;40m" # bright white on black

COLOR3="\033[1;6m\033[39;40m"

COLOR_RESET="\033[0m"

rm -f /etc/issue

echo -e $COLOR1"Gentoo"$COLOR2 "Linux"$COLOR_RESET "$RELEASE" "(\l)">>/etc/issue

echo "Kernel $(uname -r) on an $(uname -m)" >> /etc/issue

echo -e $COLOR3"Welcome to the Wired!">>/etc/issue

echo >>/etc/issue

cp -f /etc/issue /etc/issue.net

you can edit and change it to what you want it to say, of coarse.  now after you save the new file, as root run rc-update add issue default.  everything should work after reboot!

now if somebody could make a cool ansi gentoo logo  -- that would be nice  :Exclamation: 

----------

## zen_guerrilla

Great script. I' ve got 2 additions to make it a little bit cooler :

1) add 

/usr/bin/clear >> /etc/issue

after the rm -f /etc/issue line to have the screen cleared before output.

2) download cowsay (check freshmeat for url) and put :

/usr/local/bin/cowsay "Hello World" >> /etc/issue

after the clear line to have a nice ascii cow.  :Smile: 

----------

## JefP@@

Nice, even the cow is working ... 

could someone give me some more colors? would be nice  :Wink: 

Grtz

----------

## JefP@@

btw: What's the color3 supposed to look like? because it's the same as color2 ?

----------

## JefP@@

some colors I've found :

Black 0;30 Dark Gray 1;30

Blue 0;34 Light Blue 1;34

Green 0;32 Light Green 1;32

Cyan 0;36 Light Cyan 1;36

Red 0;31 Light Red 1;31

Purple 0;35 Light Purple 1;35

Brown 0;33 Yellow 1;33

Light Gray 0;37 White 1;37

----------

## Aurix

 *zen_guerrilla wrote:*   

> /usr/bin/clear >> /etc/issue
> 
> 

 

Great!  I've been looking how to do the screan clear  :Smile: 

I've modified mine to have similar sort of Gentoo colours.... (green, purple)

COLOR1="\033[1;6m\033[32;40m" # bright green on black

COLOR2="\033[1;6m\033[34;40m" # bright purple on black

COLOR3="\033[1;6m\033[31;40m" # bright red on black

COLOR4="\033[1;6m\033[33;40m" # bright yellow on black

COLOR_RESET="\033[0m"

rm -f /etc/issue

/usr/bin/clear >> /etc/issue

echo -e $COLOR1"Gentoo"$COLOR2 "Linux" $COLOR4"$RELEASE" $COLOR_RESET"(\l)">>/etc/issue

echo -e $COLOR3"Kernel $(uname -r) on an $(uname -m)"$COLOR_RESET >> /etc/issue

echo >>/etc/issue

cp -f /etc/issue /etc/issue.net

Thanks for the tips =)

----------

## zen_guerrilla

Another nice addition is having a fortune cookie after log-in. Here is how-to :

- emerge fortune-mod

- add these lines on /etc/profile :

# fortune cookies

echo

fortune

echo

- log out & back in or source /etc/profile and have a nice fortune cookie  :Smile: 

----------

## recluse

I continue you get a "Bad Interpretter" Error. Any suggestions while I try to figure this one out?

Cool tip btw   :Wink: 

----------

## zen_guerrilla

try running 'fortune' on a shell. if it works then check how you wrote it on /etc/profile. 

ps. I only tried it on bash, I don't know if it works in other shells...

----------

## Harri

I created my first E-build (I'm not really a programmer, but this one wasn't too hard). I present to you, linux_logo. I also made a gentoo logo and included that into the e-build. 

Linux_logo draws a nice ansi logo (tux by default) and displays some system information (processor, kernel version, etc.). You can then copy that to the issue and issue.net. All the "big" distributions use this with their own logos, so I figured we need this also  :Smile: 

emerge app-misc/linux_logo

For example I run the following script in my crontab (I want to brag about my uptime   :Twisted Evil:  )

```

/usr/bin/linux_logo -L 3 -F "#H\nRunning Gentoo Linux Kernel #V\n#M #X #T, #R RAM, #B Bogomips\n#U (Updated every 15min)" > /etc/issue

echo >> /etc/issue

cp -f /etc/issue /etc/issue.net

```

----------

## zen_guerrilla

I guess u should work a little bit more on that ebuild. Running 'qpkg -l linux_logo' outputs :

app-misc/linux_logo-4.02 *

CONTENTS:

/usr

/usr/share

/usr/share/doc

/usr/share/doc/linux_logo-4.02

/usr/share/doc/linux_logo-4.02/BUGS.gz

/usr/share/doc/linux_logo-4.02/TODO.gz

/usr/share/doc/linux_logo-4.02/CHANGES.gz

/usr/share/doc/linux_logo-4.02/COPYING.gz

/usr/share/doc/linux_logo-4.02/README.gz

/usr/share/doc/linux_logo-4.02/README.CUSTOM_LOGOS.gz

/usr/share/doc/linux_logo-4.02/USAGE.gz

/usr/share/doc/linux_logo-4.02/LINUX_LOGO.FAQ.gz

/var

/var/tmp

/var/tmp/portage

/var/tmp/portage/linux_logo-4.02

/var/tmp/portage/linux_logo-4.02/image

/var/tmp/portage/linux_logo-4.02/image/usr

/var/tmp/portage/linux_logo-4.02/image/usr/bin

/var/tmp/portage/linux_logo-4.02/image/usr/bin/linux_logo

/var/tmp/portage/linux_logo-4.02/image/usr/man

/var/tmp/portage/linux_logo-4.02/image/usr/man/man1

/var/tmp/portage/linux_logo-4.02/image/usr/man/man1/linux_logo.1.gz

^^^^^^^^^^^^^^^^^^^^^

Please consider -r1 ebuild, I'd like to check out your logo

----------

## lain iwakura

here's my updated /etc/init.d/issue file.  i'm glad Harri added that ebuild package for linux_logo -- very nice.  I was using the prog for a while and was going to post where to find it and such but now that there's an ebuild -- much simpler.  

anyways, below is my updated script file that you put in /etc/init.d/ .  updated with Aurix's nice colors and the linux+logo line.  the "-f" option clears the screen.

#!/bin/sh

#  Local system initialization script

RELEASE="Release 1.1a"

COLOR1="\033[1;6m\033[32;40m" # bright green on black

COLOR2="\033[1;6m\033[34;40m" # bright purple on black

COLOR3="\033[1;6m\033[31;40m" # bright red on black

COLOR4="\033[1;6m\033[33;40m" # bright yellow on black

rm -f /etc/issue

/usr/bin/linux_logo -c -f>>/etc/issue

echo -e $COLOR1"Gentoo"$COLOR2 "Linux" $COLOR4"$RELEASE" $COLOR_RESET"(\l)">>/etc/issue

echo -e $COLOR3"Welcome to the Wired!">>/etc/issue

echo >>/etc/issue

cp -f /etc/issue /etc/issue.net

I ike the gentoo logo ya did, but I still am liking the classic tux peguin the best.  well,  I guess it's just a matter of taste.  :Razz: 

----------

## Harri

zen_guerrilla:

I'm not that familiar with portage, yet, but the e-build works fine. 

It doesn't install anything into var/tmp/portage... etc. 

I think that list is part of the sandbox thingy, but I don't even use make install and put anything there in the e-build. Someone who knows a little more can come up with an explanation, but as I said the ebuild works fine when I tested it in 2 machines.

Also I just added it to the bugzilla, and some dev actually added it to the cvs tree.

Iwakura:

Thanks  :Smile:  I'm not an artist, and I know the logo could be better, thats all I could come up with after 3 hours of sweat and tears.

Some actual ansi-artists (if there still are any left  :Smile:  ) should draw us some cool gentoo logos. It took me for ever to even find a piece of software that could do ansi drawings. I found an old dos software called TheDraw that run under XP, and used that to make the logo.

----------

## Zu`

Hmmmm. Thanks for all the tips, I made something like this  :Smile: 

It only shows a new fortune cookie after each boot, I don't like it every time I log in, that's just too much

So here it is, maybe someone likes it

```

RELEASE="1.1a"

COLOR1="\033[1;6m\033[32;40m" # bright green on black

COLOR2="\033[1;6m\033[34;40m" # bright purple on black

COLOR3="\033[1;6m\033[31;40m" # bright red on black

COLOR4="\033[1;6m\033[33;40m" # bright yellow on black

COLOR_RESET="\033[0m"

rm -f /etc/issue

/usr/bin/clear >> /etc/issue

echo -e "[" $COLOR1"Gentoo" $COLOR2"Linux" $COLOR_RESET"]" $COLOR3"$RELEASE"$COLOR_RESET >>/etc/issue

echo -e $COLOR3"Kernel $(uname -r) on an $(uname -m)"$COLOR_RESET >> /etc/issue

echo -e "" >> /etc/issue

fortune >> /etc/issue

echo -e "" >> /etc/issue

cp -f /etc/issue /etc/issue.net

```

----------

## JefP@@

I tried to make an ascii gentoo g ... (I used an image converter, called jitac)

```

                                          __q@@@@m_

                                        _q@@@@@@@@@@_

                                       _@@@@@@@@@@@@@@m

                                      q@@@@@@@@@@@@@@@@@_

                                     _@@@@@@@@@@##@@@@@@@h

                                     @@@@@@@@@@@@##@@@@@@@@_

                                     7##@@@@@@@@__@@@@@@@@@@,

                                      "####@@@@@@@@@@@@@@@@@@

                                       ` ####@@@@@@@@@@@@@@@@

                                         `q@@@@@@@@@@@@@@@@#W

                                         q@@@@@@@@@@@@@@@@@@/

                                       _@@@@@@@@@@@@@@@@#@@"

                                .~ _a*q@@@@@@@@@@@@@@@#@##^

                             .' ,+"_m#@@@@@@@@@@@@@@#@#W=^__ .

                          ,~ _#"_#*_q@@@@@@@@@@@@@#@#*>*__,. --

                         ' ,* g#_g#"p@@@@@@@@@@@#@##%#*_imw+*"_

                         ," g*_pF_##_##@@@@@##@#@#g@#*_pm#*__.

                          _# g# gW_#W_#@@@@@@#@@#Wg##"_m#"_.

                          " #"_# q# g#_p@@@@q#Wq#W_##",w*

                           s  # gF #"q#"g#_#W_#*q#*_#"

                             #  * #  # qW #"q# gW #"

                               {  " q  # q" #  F #

                                    '    d  F    !
```

do you guys like this ?

I can try to rescale etc...  :Wink: 

Grtz

----------

## orkid

 *Harri wrote:*   

> I found an old dos software called TheDraw that run under XP

 

Those were the days! It's amazing that program even runs under XP (all that backwards compatibility baggage I guess  :Smile: 

----------

## lain iwakura

Jeffp@@, does the logo look the same in a terminal?

i.e. color.  could ya change that?  

f* around with it and see what you can come up with!   :Very Happy: 

----------

## faithfull

Hello guys, I see that you are devoted to the beautification of the boot process, so pharaps anyone can tell me how to display a large (more than 80x80) image on kernel boot.

I'm talking about the penguin image (more than one if you have an SMP system) that you see if you turn on the framebuffer feature in kernel config.

----------

## zen_guerrilla

 *faithfull wrote:*   

> how to display a large (more than 80x80) image on kernel boot. I'm talking about the penguin image (more than one if you have an SMP system) that you see if you turn on the framebuffer feature in kernel config.

 

I don't think that using a larger than 80x80 image on kernel booting is allowed but we can always change that penguin picture. Some gentoo pics for kernel & grub are located on :

http://gentoo.tkdack.com/

(I use the 'cow' currently :^) )

And you can always use yours with this prog :

http://www.libpng.org/pub/png/apps/png2linuxlogo.html

although I've never tried it myself to know about the results.  :Surprised:   :Cool: 

----------

## Beavis

If you wanna create your own ascii picture... there's a nice program that  helps out with the drawing called JavE.  I believe its a java applet, so it should run fine under Linux.  The website is http://www.jave.de/

Beavis

----------

## lain iwakura

cool.  i'm gonna give the java applet a try and see what i can come up with.

----------

## bidz

really like the startup scripts, but, one question - any idea on how i can add my custom/own ascii to be displayed ? i've got a cool ascii here that i'd like to use, but i dont know how to get it displayed/or if i it can display a pure ascii, or if i have to convert it, or whatever.. ?

for instance, a way to replace the ansi in linux_logo with the ascii 've got? any possibility? and if so, how?

--- nevermind, i just made my own .logo file  :Smile:  thanks for the tips regarding this tho, very nice stuff  :Smile: 

----------

## pjp

Using the above examples with an echo line for each line of ascii art?  Not sure, just an idea.

----------

## zen_guerrilla

Hello world,

I'm trying to make my custom welcome message and I want it print uptime in linux_logo style (X days Y hours). Is it possible to modify uptime's output using i.e. sed to look like linux_logo' s & how ? 

.:: zen ::.

----------

## phong

Coincidentally, I've been working on a program to create ansi art out of .png files...  Here's one of the first results, it needs some work still:

[img:88be938764]http://www.phong.org/tuxansi.png[/img:88be938764]

----------

## BWW

Phong...that is nice.

----------

## debian

That was a funny case I've read in some government forums.

If you've ever sought FBI's help in securing your servers/routers(after you've been hacked and your lost exceeds $5000) then the first thing they'll tell you is to remove all welcome messages that sound so 'inviting'. E.g. "Welcome to...." "Greetings!" "Enjoy your stay in....", etc.

There was a case that a guy lost his legal ground in suing a cracker because he had explicitly granted right to others to enter his server(router? can't recall).

We were ordered to remove all 'inviting' message in public servers and routers when I were working at IBM.

The welcome message recommended(by FBI?) is like "Only authorized personnel is allowed to access to.....you forfeit your legal right by...." something like that. I lost the exact message already, but it sounds scary.  :Smile: 

Of course, I think a penguin picture is okay.  :Smile: 

----------

## debian

I think I found one example I note previously that shall be used in production server:

```
     THIS IS A DEPARTMENT OF DEFENSE COMPUTER SYSTEM. THIS COMPUTER SYSTEM,

     WHICH INCLUDES ALL RELATED EQUIPMENT, NETWORKS AND NETWORK DEVICES

     (SPECIFICALLY INCLUDING ACCESS TO THE INTERNET), ARE PROVIDED ONLY FOR

     OFFICIAL U.S. GOVERNMENT BUSINESS.

     DOD COMPUTER SYSTEMS MAY BE MONITORED BY AUTHORIZED PERSONNEL TO ENSURE

     THAT THEIR USE IS AUTHORIZED, FOR MANAGEMENT OF THE SYSTEM, TO FACILITATE

     PROTECTION AGAINST UNAUTHORIZED ACCESS, AND TO VERIFY SECURITY PROCEDURES.

     MONITORING INCLUDES "HACKER" ATTACKS TO TEST OR VERIFY THE SECURITY OF

     THIS SYSTEM AGAINST USE BY UNAUTHORIZED PERSONS. DURING THESE ACTIVITIES,

     INFORMATION STORED ON THIS SYSTEM MAY BE EXAMINED, COPIED AND USED FOR

     AUTHORIZED PURPOSES, AND DATA OR PROGRAMS MAY BE PLACED INTO THIS SYSTEM.

     THEREFORE, INFORMATION YOU PLACE ON THIS SYSTEM IS NOT PRIVATE.

     USE OF THIS DOD COMPUTER SYSTEM, AUTHORIZED OR UNAUTHORIZED, CONSTITUTES

     CONSENT TO OFFICIAL MONITORING OF THIS SYSTEM. UNAUTHORIZED USE OF A DOD

     COMPUTER SYSTEM MAY SUBJECT YOU TO CRIMINAL PROSECUTION. EVIDENCE OF

     UNAUTHORIZED USE COLLECTED DURING MONITORING MAY BE PROVIDED TO APPROPRIATE

     PERSONNEL FOR ADMINISTRATIVE, CRIMINAL OR OTHER ACTION.
```

Message as such is not only to scare people away, but also protect your legal grounds.

Yeah, I know it's the most boring welcome message you'd prefer.  :Razz: 

----------

## BWW

Such are the times, I guess.

----------

## Netdale

What does this line do for u??

```
cp -f /etc/issue /etc/issue.net 
```

Dale

----------

## arkane

when people telnet or ssh into your system, they don't have anything but a vt100 or ansi terminal.  So, the issue.net file is shown instead of issue.

That simply copies the issue to issue.net, making them identical.

If you don't do anything fancy that only works on direct console, then that's alright.  (I haven't found anything that I do)

or if you wanna warn people that they are being monitored when coming in from the net, the issue.net is where ya do it.

----------

## Cassini

If you would like to make a nice message on boot you need to edit the .bashrc file found in the users ~. I have no idea if there is a global one to.  :D

----------

## dreamsofxion

Well...for a global boot message, that's what this thread seems to be about...

...but as you used the term "users" in your post, I'll assume that you mean that you want a login message - a message displayed for all users when they log in...

...and that's as simple as editing your /etc/motd file. If it doesn't exist, create one and...voila...when you log in...you get the Message of the Day...

----------

## Phildeeze

 *lain iwakura wrote:*   

> 
> 
> #!/bin/sh
> 
> #  Local system initialization script
> ...

 

When I boot with this script I get '/sbin/rc: /mnt/.init.d/softscripts/issue: /bin/sh: bad interpreter: Permission denied'   :Crying or Very sad: 

----------

## riceboy50

Have you tried making the first line read #!/bin/bash instead of #!/bin/sh ?

I have no idea if that will help.

----------

## riceboy50

 *Cassini wrote:*   

> If you would like to make a nice message on boot you need to edit the .bashrc file found in the users ~. I have no idea if there is a global one to.  

 

As long as you have:

# Source global definitions

if [ -f /etc/profile ]; then

        . /etc/profile

fi

in your .bashrc file within the home directories you will grab the global settings in /etc/profile

----------

## flow

The Gentoo release version is ofcourse already available on your system. Therefor you can just parse the /etc/gentoo-release file and add it to your Linux_Logo  :Wink: 

```

#!/bin/sh 

# Local system initialization script 

/usr/bin/clear >> /etc/issue 

COLOR1="\033[1;6m\033[32;40m" # bright green on black 

COLOR2="\033[1;6m\033[34;40m" # bright purple on black 

COLOR3="\033[1;6m\033[31;40m" # bright red on black 

COLOR4="\033[1;6m\033[33;40m" # bright yellow on black 

COLOR_RESET="\033[0m"         # reset colours

rm -f /etc/issue 

/usr/bin/linux_logo -L 3 -f -t "`cat /etc/gentoo-release`" >>/etc/issue 

echo -e $COLOR_RESET >>/etc/issue 

cp -f /etc/issue /etc/issue.net

```

It really isn't that much harder to display the Gentoo release version in several colours if you for example use awk/gawk to parse the gentoo-release file, but personally I liked this method best.

----------

## Twink

I love this, however I don't really see the point in an uptime message if the computer is a server and not logged into much, as it only updates if you login then log back out, all my terminals all show different uptimes

----------

## alspnost

So, here goes my first Gentoo forum post!   :Laughing: 

I was playing around tonight and knocked up my own little /etc/issue script, which creates a little purple "g" Gentoo logo and a few lines of relevant banner text. Obviously, feel free to hack and improve it as you want....

[code]

#!/bin/bash

# AL's custom console greeting script for Gentoo Linux

# This will overwrite /etc/issue at every boot. So, make any changes you

# want to make to /etc/issue here or you will lose them when you reboot.

if [ -f /etc/gentoo-release ]; then

   printf "\e[2J\e[H" > /etc/issue

   R=$(cat /etc/gentoo-release | awk '{ print $5,$6 }')

   C=$(cat /proc/cpuinfo | grep 'el na' | awk '{ print $5,$6,$7 }')

   K=$(uname -r)

   H=$(/bin/hostname -f)

   M=$(( `dmesg | grep "Dentry" | awk '{print $9}'` / 1024 ))

   KS=`dmesg | grep "Swap" | awk '{print $3}'`

   S=$(( ${KS%k} / 1024 ))

   DARK="\033[1;30m"       # dark grey

   GREY="\033[0m"          # default grey / white

   WHITE="\033[1;37m"      # bright / bold white

   PURPLE="\033[0;35m"     # purple

   BR_GREEN="\033[1;32m"   # bright green

   BR_BLUE="\033[1;34m"    # bright blue

   echo -e "$PURPLE     _,-=-." >> /etc/issue

   echo -e "$PURPLE    (      \`.    $BR_GREEN Gentoo$BR_BLUE Linux$GREY release $R" >> /etc/issue

   echo -e "$PURPLE    \`\\\\\  ()   )    $GREY Kernel$WHITE $K" >> /etc/issue

   echo -e "$PURPLE      >     /'     $GREY $C processor" >> /etc/issue

   echo -e "$PURPLE    /'   ,/'         $GREY"$M"Mb memory / "$S"Mb swap" >> /etc/issue

   echo -e "$PURPLE   (__.=~     $DARK 

----------

## ozt

emerge Welcome2l

rc-update add Welcome2l default

----------

## RoelVanDijk

Very simple trick. Makes the cow say a fortune cookie.

```
echo -e "$(cowsay "$(fortune)")" >> /etc/issue
```

I thought it was nice  :Smile: 

```

----------

## Roderik

i've taken my swing at something like this

using alspnost code as base and the ascii G on page 1

Output:

```

       __q@@@@m_

     _q@@@@@@@@@@_

    _@@@@@@@@@@@@@@m         Gentoo Linux release 1.4.2.8

   q@@@@@@@@@@@@@@@@@_

  _@@@@@@@@@@##@@@@@@@h      Hostname:  ashlar.mayfair.ro

  @@@@@@@@@@@ ##@@@@@@@@_

  7##@@@@@@@___@@@@@@@@@@,   Kernel:    2.4.20-gentoo-r1

    ####@@@@@@@@@@@@@@@@@@   Processor: AMD Athlon(tm) Processor ( 750.254 MHz => 1470.46 bogomips)

      ####@@@@@@@@@@@@@@@@   Memory:    512 Mb

       q@@@@@@@@@@@@@@@@#W   Swap:      972 Mb

      q@@@@@@@@@@@@@@@@@@/

    _@@@@@@@@@@@@@@@@#@@     Uptime:    13:58:43 up  1:39,  3 users,  load average: 0.00, 0.00, 0.00

   q@@@@@@@@@@@@@@@#@##^

  m#@@@@@@@@@@@@@@#@#W

 _q@@@@@@@@@@@@@#@#*>        Unauthorized users _WILL_ be shot!

  p@@@@@@@@@@@#@##%

   _##@@@@@##@#@#g

     _#@@@@@@#@@

       _p@@@@q

  Fry: Leela, Bender, we're going grave-robbing.

 Bender: I'll get my kit!

```

Script:

```

#!/bin/bash

if [ -f /etc/gentoo-release ]; then

        printf "\e[2J\e[H" > /etc/issue

        R=$(cat /etc/gentoo-release | awk '{ print $5,$6 }')

        C=$(cat /proc/cpuinfo | grep 'model name' | awk '{ print $4,$5,$6 }')

        CS=$(cat /proc/cpuinfo | grep 'cpu MHz' | awk '{ print $4 }')

        CB=$(cat /proc/cpuinfo | grep 'bogomips' | awk '{ print $3 }')

        K=$(uname -r)

        H=$(/bin/hostname -f)

        M=$(( `dmesg | grep "Dentry" | awk '{print $9}'` / 1024 ))

        KS=`dmesg | grep "Swap" | awk '{print $3}'`

        S=$(( ${KS%k} / 1024 ))

        U=$(uptime)

        F=$(fortune -n 80  -s)

        DARK="\033[1;30m" # dark grey

        GREY="\033[0m" # default grey / white

        WHITE="\033[1;37m" # bright / bold white

        PURPLE="\033[0;35m" # purple

        BR_GREEN="\033[1;32m" # bright green

        BR_BLUE="\033[1;34m" # bright blue

        echo -e "$PURPLE       __q@@@@m_" >> /etc/issue

        echo -e "$PURPLE     _q@@@@@@@@@@_" >> /etc/issue

        echo -e "$PURPLE    _@@@@@@@@@@@@@@m        $BR_GREEN Gentoo$BR_BLUE Linux$GREY release $R" >> /etc/issue

        echo -e "$PURPLE   q@@@@@@@@@@@@@@@@@_" >> /etc/issue

        echo -e "$PURPLE  _@@@@@@@@@@##@@@@@@@h     $GREY Hostname: $WHITE $H" >> /etc/issue

        echo -e "$PURPLE  @@@@@@@@@@@ ##@@@@@@@@_" >> /etc/issue

        echo -e "$PURPLE  7##@@@@@@@___@@@@@@@@@@,  $GREY Kernel:   $WHITE $K" >> /etc/issue

        echo -e "$PURPLE    ####@@@@@@@@@@@@@@@@@@  $GREY Processor:$WHITE $C ( $CS MHz => $CB bogomips)" >> /etc/issue

        echo -e "$PURPLE      ####@@@@@@@@@@@@@@@@  $GREY Memory:   $WHITE $M Mb" >> /etc/issue

        echo -e "$PURPLE       q@@@@@@@@@@@@@@@@#W  $GREY Swap:     $WHITE $S Mb" >> /etc/issue

        echo -e "$PURPLE      q@@@@@@@@@@@@@@@@@@/" >> /etc/issue

        echo -e "$PURPLE    _@@@@@@@@@@@@@@@@#@@    $GREY Uptime:  $WHITE $U" >> /etc/issue

        echo -e "$PURPLE   q@@@@@@@@@@@@@@@#@##^" >> /etc/issue

        echo -e "$PURPLE  m#@@@@@@@@@@@@@@#@#W" >> /etc/issue

        echo -e "$PURPLE _q@@@@@@@@@@@@@#@#*>       $BR_GREEN Unauthorized users _WILL_ be shot!" >> /etc/issue

        echo -e "$PURPLE  p@@@@@@@@@@@#@##%" >> /etc/issue

        echo -e "$PURPLE   _##@@@@@##@#@#g" >> /etc/issue

        echo -e "$PURPLE     _#@@@@@@#@@" >> /etc/issue

        echo -e "$PURPLE       _p@@@@q" >> /etc/issue

        echo "" >> /etc/issue

        echo -e "$BR_GREEN $F" >> /etc/issue

        echo "" >> /etc/issue

fi

```

and i added "5 * * * * /etc/init.d/issue" to my crontab to update the uptime and fortune every 5 minutes.

Note: The /proc/cpuinfo says Athlon(tm) Processor so i don't have to manually add "processor" to the script, maybe for your cpu you will have to add it.

----------

## bumpus

 *Quote:*   

> i added "5 * * * * /etc/init.d/issue" to my crontab to update the uptime and fortune every 5 minutes. 

 

I think that the crontab line you're looking for is */5 * * * * /etc/init.d/issue which will run the /etc/init.d/issue script every five minutes. The line you have will run the script every hour at five past.

----------

## Niek

```
emerge app-misc/Welcome2L
```

Try this program, it features a really cool welcome screen  :Smile: 

----------

## therobot

when I try this, i get

```
manmachine root # rc-update add issue default

 * issue not executable; skipping

 * Caching service dependencies...                                        [ ok ]

 * rc-update complete.

```

anybody know how to fix this?

----------

## danbee

make /etc/init.d/issue executable

----------

## therobot

```
manmachine root # make /etc/init.d/issue executable

make: Nothing to be done for `/etc/init.d/issue'.

make: *** No rule to make target `executable'.  Stop.

```

----------

## danbee

 *therobot wrote:*   

> 
> 
> ```
> manmachine root # make /etc/init.d/issue executable
> 
> ...

 

lol!  no, it wasn't a command.  you actually want to type:

```
chmod 755 /etc/init.d/issue
```

that will make the file /etc/init.d/issue executable

----------

## therobot

haha, ya, I realized that after sleeping a while...

thanks

----------

## compuboy86

Ok, I'm having a bit of difficulty setting this up.  Here is the process I took:

```

touch /etc/init.d/motd (message of the day)

nano -w /etc/init.d/motd

```

At this point I copied the entireity of the nice gentoo image and processor specs, etc word for word. (The poster escapes me atm)

I also used chmod 755 /etc/init.d/motd then copied that to /etc/motd.  However, it prints out EXACTLY the text with all the code as well.  It doesn't parse it.  Any ideas??

-Compuboy86

EDIT:  My mistake, I had #!/bin/sh instead of #!/bin/bash...now the error I get is 

```

line 13: Unexpected BOF while looking for matching `' '

line 57: syntax error: unexpected at end of file

```

----------

## christsong84

I'm really bad a shell scripting...is there a way to make the login screens refresh themselves with uptime?  (while not disturbing the other consoles with people loged in or X running)...just wondering.

----------

## compuboy86

Ok, I fixed my errors on my motd script by pretty much going line by line and appyling my c++ knowledge to anything that didn't look right.  Pretty simple errors.

To update the uptime and fortune (if you have it) simply add */ 5 * * * * to your /etc/crontab.  Follow the examples below and change the location of your motd/issue.  Hope that helps!

-Compuboy86

----------

## christsong84

so the cron will automatically refresh the screen?  I though it just updated the file.

----------

## compuboy86

Ok here is what I did, I may have an extra file or two floating around but oh well.

wrote my motd that I wanted to display, saved it in /etc/init.d/motd

```

cp that file to /etc/motd

chmod 755 /etc/init.d/motd

chmod 755 /etc/motd

```

At this point motd wouldn't refresh by itself (either that or I didn't wait longer enough  :Smile: ) so I wrote a simple update script.

```

#!/bin/bash

cp /etc/init.d/motd /etc/motd

chmod 755 /etc/motd

/etc/motd

```

I put that file in /etc and /etc/init.d.  Then rc-update add updatemotd default and add the following line to your /etc/crontab.

```

*/5 * * * *      root     /etc/updatemotd

```

Viola!  Every 5 minutes and/or login the update script is called.  Hope that helps.

-Compuboy86

----------

## christsong84

hmmm...the cron entry only updates the file...that means I have to log-out and login to get updated results...it would be nice to have it automatically refresh every so often...I've never seen it done (in console) but I was wondering if it was possible? (to update the uptime on the login screen while it's still up)

----------

## Verbal

Thanks for this. I had a setup similar to this, but not as nice. I like these aditions. Here is a screenshot of mine, if you're interested: http://verbal.wronger.com/gentoologin.jpg

----------

## Sedated

install linux_logo:

```
# emerge -p linux_logo

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[ebuild  N   ] app-misc/linux_logo-4.07

# emerge linux_logo
```

init script config

file: /etc/conf.d/linux_logo

```
# Seq   Description             Output

# ----------------------------------------------------------------

# ##                            #

# #B    Bogomips                374.37

# #C    Compiled Date           #47 Fri Jan 8 10:37:09 EST 1999

# #E    User Text               My Favorite Linux Distribution

#       Displayed with -t

# #H    Hostname                deranged

# #L    Load average            Load average 0.04, 0.01, 0.01

# #M    Megahertz               188Mhz

#       where supported

# #N    Number of CPU's         Two

# #O    OS Name                 Linux

# #P    Processor or Processors Processor

# #R    Ram                     64M

#       in Megabytes

# #S    Plural                  s

# #T    Type of CPU             K6

# #U    Uptime                  Uptime 10 hours 59 minutes

# #V    Version of OS           2.2.0-pre5

# #X    CPU Vendor              AMD

# \\n   carriage return

FORMAT="Gentoo #O `cat /etc/gentoo-release | awk '{ print $5,$6 }'`\n#O #V, Compiled #C\n#N #X #T #M CPU#S, #R RAM, #B Bogomips\n#U\n#H / \l  \n"

FORMATNET="Gentoo #O `cat /etc/gentoo-release | awk '{ print $5,$6 }'`\n#O #V, Compiled #C\n#N #X #T #M CPU#S, #R RAM, #B Bogomips\n#U\n#H\n"

OPTIONS="-L 3 -f -u"
```

init script

file: /etc/init.d/linux_logo

```
#!/sbin/runscript

start() {

  LOGOBIN="/usr/bin/linux_logo"

  if [ ! -x $LOGOBIN ]

  then

    eerror "ERROR:  linux_logo not found !"

    return 1

  fi

  einfo "Starting linux_logo"

  ebegin "  Creating /etc/issue"

  $LOGOBIN $LOGO $OPTIONS -F "${FORMAT}" > /etc/issue

  eend $? "  Failed to create /etc/issue"

  ebegin "  Creating /etc/issue.net"

  $LOGOBIN $LOGO $OPTIONS -F "${FORMATNET}" > /etc/issue.net

  eend $? "  Failed to create /etc/issue.net"

}
```

let it run hourly

file: /etc/cron.hourly/linux_logo

```

#!/bin/sh

if [ -x /etc/init.d/linux_logo ]

then

  /etc/init.d/linux_logo restart

fi
```

make the init executable, add it to the default runlevel and run it once:

```
# chmod 755 /etc/init.d/linux_logo

# chmod 644 /etc/conf.d/linux_logo

# rc-update add linux_logo default

 * linux_logo added to runlevel default...

 * Caching service dependencies...                                        [ ok ]

# /etc/init.d/linux_logo start

 * Starting linux_logo

 *   Creating /etc/issue...                                               [ ok ]

 *   Creating /etc/issue.net...                                           [ ok ]
```

results:

```
.....####......................................###.............................

....#######....................... ###.........###.............................

...##########.....................####....#############........................

...####..#######....#####........######...#############...#####.......#####....

...#############...#######......########...############..#######.....#######...

....###########.. ###.####..... ####.####......####.... #########...#########..

......########...########......#####..####.....####....###########.###########.

.......######....######........####....####....####....###########.###########.

......######.....######.......#####.....####...####....#####..####.#####..####.

.....######......##########...####.......####..####....##########..##########..

.....#####.......###########.#####........####.####.....########....########...

.....####.........##########.#####........####.####......######......######....

......##...........######## . ####.........##...###.......####........####.....

................................................................... ...........

                             Gentoo Linux 1.4.2.9

        Linux 2.4.20-gentoo-r4, Compiled #2 Sat May 10 12:29:35 MDT 2003

            One Intel Celeron 500MHz CPU, 191M RAM, 999.42 Bogomips

                           Uptime 0 hours 15 minutes

                          therapy.nymphony.net / tty2

therapy.nymphony.net login:
```

----------

## christsong84

sorry to bring this up again so soon...but I kinda want a definate answer...no is ok but I just need to know...a constantly updating uptime count is not  possible?  (on the screen...sorta like the screen would be refreshed every minute or so, but only on the login)...perhaps it is not clear what I want?

----------

## Sedated

 *christsong84 wrote:*   

> sorry to bring this up again so soon...but I kinda want a definate answer...no is ok but I just need to know...a constantly updating uptime count is not  possible?  (on the screen...sorta like the screen would be refreshed every minute or so, but only on the login)...perhaps it is not clear what I want?

 

The only way i know of is to have it crontabbed or something and then hit "enter" on the login screen when you want it to update.  Running "killall -HUP agetty" after each time the issue files are updated would do it, but i have no idea what possible consequences there might be from this... seemed to work for me, but i have no intention of doing that regularly.

----------

## Master_Of_Disaster

Fine, made it as Sedated suggested, there is just one anoying problem:

```
fuero@bmfh fuero $ sudo /etc/init.d/issue start

 * Could not get dependency info for "issue"!

 * Could not get dependency info for "issue"!

 * Building Linux Welcome Message

 *      Creating /etc/issue...                     [ ok ]

 *      Creating /etc/issue.net...                 [ ok ]

fuero@bmfh fuero $

```

I think baselayout may be the culprit in this case, but I can't figure out why...

```
emerge -s baselayout

Searching...

[ Results for search key : baselayout ]

[ Applications found : 1 ]

*  sys-apps/baselayout

      Latest version available: 1.8.6.8-r1

      Latest version installed: 1.8.6.8-r1

      Size of downloaded files: 89 kB

      Homepage:    http://www.gentoo.org/

      Description: Base layout for Gentoo Linux filesystem (incl. initscripts and sysvinit)

```

BTW: @Sedated: You might change your entry in the crontab to

```
/etc/init.d/linux_logo restart && killall -HUP agetty
```

----------

## Sedated

Weird.  Works great for me.

```
hp root # /etc/init.d/linux_logo restart

 * Starting linux_logo

 *   Creating /etc/issue ...                                              [ ok ]

 *   Creating /etc/issue.net ...                                          [ ok ]

hp root #
```

works find with sudo too:

```
gokeefe@hp gokeefe $ sudo /etc/init.d/linux_logo restart

 * Starting linux_logo

 *   Creating /etc/issue ...                                              [ ok ]

 *   Creating /etc/issue.net ...                                          [ ok ]

gokeefe@hp gokeefe $
```

Does it fail to make the issue files, or is it just a goofy error message that means nothing?  You renamed the init script to "issue", did you also rename /etc/conf.d/linux_logo to /etc/conf.d/issue?  I have baselayout 1.8.5.9 installed... slightly older than yours.

----------

## Master_Of_Disaster

This error occurs even when booting...

But the script is executed correctly, the files are created.

Here is mine: (/etc/init.d/issue)

```
#!/sbin/runscript

buildissue() {

        if [ -f /etc/gentoo-release ]; then

                printf "\e[2J\e[H" > /etc/issue

                R=$(cat /etc/gentoo-release | awk '{ print $5,$6 }')

                C=$(cat /proc/cpuinfo | grep 'model name' | awk '{ print $4,$5,$6 }')

                CS=$(cat /proc/cpuinfo | grep 'cpu MHz' | awk '{ print $4 }')

                CB=$(cat /proc/cpuinfo | grep 'bogomips' | awk '{ print $3 }')

                K=$(uname -r)

                H=$(/bin/hostname)

                M=$(( `dmesg | grep "Dentry" | awk '{print $9}'` /1024 ))

                KS=`dmesg | grep "Swap" | awk '{print $3}'`

                S=$(( ${KS%k} / 1024 ))

                U=$(uptime)

                F=$(fortune -n 80  -s)

                DARK="\033[1;30m" # dark grey

                GREY="\033[0m" # default grey / white

                WHITE="\033[1;37m" # bright / bold white

                PURPLE="\033[0;35m" # purple

                BR_GREEN="\033[1;32m" # bright green

                BR_BLUE="\033[1;34m" # bright blue

                COLOR_RESET="\033[0m"

                echo -e "$PURPLE       __q@@@@m_" >> /etc/issue

                echo -e "$PURPLE     _q@@@@@@@@@@_" >> /etc/issue

                echo -e "$PURPLE    _@@@@@@@@@@@@@@m        $BR_GREEN Gentoo$BR_BLUE Linux$GREY release $R" >> /etc/issue

                echo -e "$PURPLE   q@@@@@@@@@@@@@@@@@_" >> /etc/issue

                echo -e "$PURPLE  _@@@@@@@@@@##@@@@@@@h     $GREY Hostname: $WHITE $H" >> /etc/issue

                echo -e "$PURPLE  @@@@@@@@@@@ ##@@@@@@@@_" >> /etc/issue

                echo -e "$PURPLE  7##@@@@@@@___@@@@@@@@@@,  $GREY Kernel:   $WHITE $K" >> /etc/issue

                echo -e "$PURPLE    ####@@@@@@@@@@@@@@@@@@  $GREY Processor:$WHITE $C ( $CS MHz => $CB bogomips)" >> /etc/issue

                echo -e "$PURPLE      ####@@@@@@@@@@@@@@@@  $GREY Memory:   $WHITE $M Mb" >> /etc/issue

                echo -e "$PURPLE       q@@@@@@@@@@@@@@@@#W  $GREY Swap:     $WHITE $S Mb" >> /etc/issue

                echo -e "$PURPLE      q@@@@@@@@@@@@@@@@@@/" >> /etc/issue

                echo -e "$PURPLE    _@@@@@@@@@@@@@@@@#@@    $GREY Uptime:  $WHITE $U" >> /etc/issue

                echo -e "$PURPLE   q@@@@@@@@@@@@@@@#@##^" >> /etc/issue

                echo -e "$PURPLE  m#@@@@@@@@@@@@@@#@#W" >> /etc/issue

                echo -e "$PURPLE _q@@@@@@@@@@@@@#@#*>       $BR_GREEN Unauthorized users _WILL_ be shot!" >> /etc/issue

                echo -e "$PURPLE  p@@@@@@@@@@@#@##%" >> /etc/issue

                echo -e "$PURPLE   _##@@@@@##@#@#g" >> /etc/issue

                echo -e "$PURPLE     _#@@@@@@#@@" >> /etc/issue

                echo -e "$PURPLE       _p@@@@q" >> /etc/issue

                echo "" >> /etc/issue

                echo -e "$BR_GREEN $F" >> /etc/issue

                echo "" >> /etc/issue

                echo -e "$COLOR_RESET" >> /etc/issue

        fi

}

start() {

        einfo "Building Linux Welcome Message"

        ebegin "\tCreating /etc/issue"

        buildissue

        eend $? "\tFailed creating /etc/issue"

        ebegin "\tCreating /etc/issue.net"

        cp -f /etc/issue /etc/issue.net

        eend $? "\tFailed creating /etc/issue.net"

}
```

----------

## cmay4

I am trying to get a message to display before the prompt when I ssh into the box.  I read this thread, and can't seem to get anything to work.

I simplified the problem to this:

```
$ echo testing > /etc/issue.net

$ chmod 755 /etc/issue.net
```

and I thought the message "testing" would appear before the login prompt when I ssh into my box.  But no message appears.

Any ideas?

----------

## Sedated

add or uncomment the following line from your sshd_config file, probably /etc/ssh/sshd_config:

```
Banner /etc/issue.net
```

/etc/issue and /etc/issue.net are only simple text files, they don't need to be executable.  just give them 644 permissions.

----------

## cmay4

 *Sedated wrote:*   

> add or uncomment the following line from your sshd_config file, probably /etc/ssh/sshd_config:
> 
> ```
> Banner /etc/issue.net
> ```
> ...

 

That was it.  Thanks for the help!

----------

## Fuzeron

Sedated, i get errors when i try to start linux_logo

```

root@localhost etc # /etc/init.d/linux_logo start

/sbin/runscript.sh: line 4:  : command not found

/sbin/runscript.sh: line 5:  : command not found

/sbin/runscript.sh: line 6:  : command not found

/sbin/runscript.sh: line 7:  : command not found

/sbin/runscript.sh: line 8:  : command not found

/sbin/runscript.sh: line 9:  : command not found

/sbin/runscript.sh: line 11:  : command not found

/sbin/runscript.sh: line 13:  : command not found

/sbin/runscript.sh: line 14:  : command not found

/sbin/runscript.sh: line 15:  : command not found

/sbin/runscript.sh: line 17:  : command not found

/sbin/runscript.sh: line 18:  : command not found

/sbin/runscript.sh: line 19:  : command not found

```

what did i do wrong? besides being a newb

----------

## Sedated

 *Fuzeron wrote:*   

> Sedated, i get errors when i try to start linux_logo
> 
> ```
> 
> root@localhost etc # /etc/init.d/linux_logo start
> ...

 

i can't even begin to guess... perhaps didn't copy and paste properly, i have no idea.

----------

## SeJo

hi there, 

been playing round with it, but got a problem: 

here is my code: 

```

#!bin/sh

rm -f /etc/issue

/usr/bin/clear >> /etc/issue

echo -e "SeJo's Gentoo $(uname -sr) on $(uname -p)" >> /etc/issue

echo "$(cowsay -f stimpy "w00t")" >> /etc/issue

echo >> /etc/issue

cp -f /etc/issue /etc/issue.net

```

but the stimpy image isn't properly displayed the is properly in the /etc/issue but displayed on console some of the chars are escaped or something...

how do i solve that?

----------

## joda

ive been playing around with this myself, and i made an ascii for gentoo if anyone's interested.

if anyone would clean up my code, add extra features, please feel free to do so. some pointers on how to make the script start just before the login prompt would also be nice.

screenshot here: http://www.smallville.no/joda2k/console.png

ascii logo + the perl script i made for the info can be found here:

http://www.smallville.no/joda2k/bootinfo.tar.gz

----------

## _r00t_

Hi, look at a Gentoo logo.

```
#!/sbin/runscript

buildissue() {

                PURPLE="\033[0;35m" # purple

      GREY="\033[0m" # default grey / white

echo -e "$PURPLE       __q@@@@m_" >> /etc/issue

echo -e "$PURPLE     _q@@@@@@@@@@@_" >> /etc/issue

echo -e "$PURPLE    _@@@@@@@@@@@@@@@m" >> /etc/issue

echo -e "$PURPLE   q@@@@@@@@@@@@@@@@@@@_" >> /etc/issue

echo -e "$PURPLE  _@@@@@@@@@@@@@@@@@@@@@" >> /etc/issue

echo -e "$PURPLE  @@@@@@@@@   #@@@@@@@@@@" >> /etc/issue

echo -e "$PURPLE  @##@@@@@@@___#@@@@@@@@@|" >> /etc/issue

echo -e "$PURPLE   ####@@@@@@@@@@@@@@@@@@@" >> /etc/issue

echo -e "$PURPLE    #@##@@@@@@@@@@@@@@@@@@" >> /etc/issue

echo -e "$PURPLE     *o@@@@@@@@@@@@@@@@#W" >> /etc/issue

echo -e "$PURPLE     /@@@@@@@@@@@@@@@@@@" >> /etc/issue

echo -e "$PURPLE    @@@@@@@@@@@@@@@@@#*" >> /etc/issue

echo -e "$PURPLE   q@@@@@@@@@@@@@@@#@^" >> /etc/issue

echo -e "$PURPLE  m#@@@@@@@@@@@@#@#" >> /etc/issue

echo -e "$PURPLE  @@@@@@@@@@@@@@'" >> /etc/issue

echo -e "$PURPLE  p@@@@@@#@#@'" >> /etc/issue

echo -e "$PURPLE   @@##g@*'" >> /etc/issue

echo -e "$PURPLE    **'" >> /etc/issue

echo "" >> /etc/issue

echo -e "$GREY " >> /etc/issue

echo "" >> /etc/issue

fi

}

start() {

        einfo "Building Linux Welcome Message"

        ebegin "\tCreating /etc/issue"

        rm -f /etc/issue /etc/issue.net

        buildissue

        eend $? "\tFailed creating /etc/issue"

        ebegin "\tCreating /etc/issue.net"

        cp -f /etc/issue /etc/issue.net

        eend $? "\tFailed creating /etc/issue.net"

}
```

----------

## koma

```
# rc-update add issue default

 * issue not executable; skipping

 * Caching service dependencies...                                        [ ok ]

 * rc-update complete.

```

why?

iv'e done all :\

----------

## aridhol

try

```
#chmod 755 /etc/init.d/issue
```

----------

## koma

Thz A lot =)

----------

## Headhunter123

Hi !

I don't know if someone has already mentioned it, but you can also edit your /etc/issue to display boot messages. And if you put and "clear" in .bash_profile you'll get an double effect  :Wink: 

Btw, for some nice ascii art (requires mostly 1024x768 text console), you can look here : http://jojo.j-ws.de/showtopic.php?forum=computer.for&index=2

----------

## DrkPlague

for a good ascii converter, play around with this: http://www.text-image.com/

Additionally, for those who havn't heard of it, AAlib is the most amazing advance in ascii-art ever.  try the following sometime:

```
emerge -v aalib

aafire
```

I would really likes someone to do something here with aafire.  i think it would make a GREAT login screen if you could find a way to "contain" it.  until then i will just have to continure to use it as my console screensaver.[/code]

----------

## Headhunter123

Hi !

How can you use a screensaver in the console ? I have always tried to use cmatrix, but I don't know how to start a program after a certain time of inactivity.

And to aalib :

Try compiling your mplayer with aalib, and choose it as videooutput (-vo). Pretty weird, but nevertheless cool  :Smile: 

----------

## DrkPlague

i am all about aalib.  there are some great programs out there for it.  and for a screensaver, I have "setterm -blank 0" run at startup to disable console blanking, then run aalib on an empty console when i am done for a while.  i am still trying to find a way to make it an actual screensaver like in freeBSD.

----------

## epretorious

Hello, All:

I'm stumped: If your login screen doesn't need to change, why not just edit the /etc/issue file using vi? i.e., Why create a script that removes a file just to  create the same file again?

----------

## usingloser

so the stats contained in the welcome message can be updated, like uptime, usage, etc..

----------

## epretorious

 :Exclamation:  I'll repeat the question for clarity:

 *Quote:*   

> If your login screen doesn't need to change, why not just edit the /etc/issue file using vi?

 

I haven't seen a single solution here that uses a static /etc/issue but have seen many login screens that don't produce dynamic information. (The reason that I ask is this: I would like to know how to create a static login screen that contains the ANSI color escape codes without having to create /etc/init.d/issue. Every other solution on the 'Net also uses the `echo -e "\033[#;#m...` approach...

----------

## Gandalf_Grey_

I made a custom startup screen that other Canadians might be interested in, here is a screenshot 

[img:070178b44c]http://www.geocities.com/gamer_vil/Screenshot.txt[/img:070178b44c]

and the source is

```

#!/bin/sh

AUTHOR="Ryan Vilim"

Red="\033[1;6m\033[0;31m" # Red

White="\033[1;6m\033[1;37m" # White

Green="\033[1;6m\033[0;32m" # Green

COLOUR_RESET="\033[0m"

#rm -f /etc/issue

echo -e $Red"|i|i|i|i|i|i|"$White"qmmmmmmmmmmmmmmmmmmmmmmmmmmz"$Red"|i|i|i|i|i|i">> /etc/issue

echo -e $Red"i||||||||||||"$White"mQQQQQQQQQQQQQQQQQQQQQQQQQQe"$Red"||||||||||||">> /etc/issue

echo -e $Red"|||||i||i||||"$White"mWQQQQQQQQQQQQQQQQQQQQQQQQQe"$Red"|||||i||i||i">> /etc/issue

echo -e $Red"||i||||||||i|"$White"mQQQQQQQQQQQQCWQQQQQQQQQQQQe"$Red"|||i||||||||">> /etc/issue

echo -e $Red"i|||i||i||i||"$White"mWQQQQQQQQQQ@"$Red"|"$White"]QQQQQQQQQQQQe"$Red"||||||i||i|i">> /etc/issue

echo -e $Red"|||i|||||||||"$White"mWQQQQQQQWTW"$Red"(||"$White"Q@YQQQQQQQQQe"$Red"|||||i||||||">> /etc/issue

echo -e $Red"i|||||i||i|||"$White"mWQQQQQQQW"$Red"||i||||j"$White"QQQQQQQQQe"$Red"||||i||||i|i">> /etc/issue

echo -e $Red"||i||i|||||||"$White"mQQQQQQQQQc"$Red"||||i|"$White"jQQQQQQQQQc"$Red"||||||||i|||">> /etc/issue

echo -e $Red"i||||||||i|i|"$White"mWQQQQQQQQz"$Red"||||||"$White"mQWQQQQQQQC"$Red"|||i|||i|||i">> /etc/issue

echo -e $Red"|||i||i||||||"$White"mWQQRWQk?Qk"$Red"|||i|i"$White"Q@(WQRQQQQe"$Red"||||||i|||||">> /etc/issue

echo -e $Red"i|||||||i||||"$White"mQQQc"$Red"|"$White"*"$Red"||"$White"?h"$Red"|||||"$White"xD"$Red"||"$White"}|+dQQQc"$Red"|||i||||||i|">> /etc/issue

echo -e $Red"||i||i|||||i|"$White"mWQQz"$Red"|||||"$White"I"$Red"|||||"$White"I"$Red"||||||"$White"QQQQe"$Red"||||||i|||||">> /etc/issue

echo -e $Red"i||||||i||i||"$White"mWQQk"$Red"|||||||||i||i||i|"$White"{QQQQe"$Red"|||i|||||i|i">> /etc/issue

echo -e $Red"|||i||i||||||"$White"mWQW1"$Red"|||||||i||||||||||"$White"4QQQc"$Red"|||||i||i|||">> /etc/issue

echo -e $Red"i|||||||||i||"$White"mWQQc"$Red"|||i|i|||||i||i||"$White"imQQQC"$Red"||i||||||||i">> /etc/issue

echo -e $Red"||i||i||i||||"$White"mQQQQp+i"$Red"||||||i|||i||"$White"xQQQQQe"$Red"|||||i||i|||">> /etc/issue

echo -e $Red"i||||||||||||"$White"mWQQQWp>"$Red"|||i|i|||i||"$White"uQQQQQQe"$Red"||||i|||||i|">> /etc/issue

echo -e $Red"|||i||i||i|||"$White"mQQQQQQm>"$Red"|||||||i||"$White"wQQQQQQQe"$Red"|||||||i||||">> /etc/issue

echo -e $Red"i|||||||i||||"$White"mWQQQQQWE"$Red"|||||||||"$White"{QQQQQQQQc"$Red"|||i||||||i|">> /etc/issue

echo -e $Red"||i||i|||||i|"$White"mQQQQQQQCiaww"$Red"z"$White"wwa%xQQQQQQQQe"$Red"|||||i|i||||">> /etc/issue

echo -e $Red"i||||||i|||||"$White"mWQQQQQQQQQWQ"$Red"k"$White"QWQQWQQQQQQQQc"$Red"|i||i|||||i|">> /etc/issue

echo -e $Red"|||i||i|||i||"$White"mWQQQQQQQQQQQ"$Red"k"$White"WWQQQQQQQQQQQe"$Red"|||||||||i||">> /etc/issue

echo -e $Red"i||||||||||||"$White"mQQQQQQQQQQQQ"$Red"k"$White"WWQQQQQQQQQQQc"$Red"|i||i||i||||">> /etc/issue

echo -e $Red"||i||i||i||i|"$White"mWQQQQQQQQQQW"$Red"k"$White"BQQQQQQWQQQWQe"$Red"|||||||||||i">> /etc/issue

echo -e $Red"i||||||||||||"$White"mWQQQQQQQWQQQ"$Red"m"$White"QQQQWQQQQQQQQe"$Red"|||i||i||i||">> /etc/issue

echo -e $Red"|||||i|||i|||"$White"mWQQQQQQQQQQQQQWQQQQQQQQQQQc"$Red"||i||||||||i">> /etc/issue

echo -e $Red"iiiiii|iii|ii"$White"3"$Green" A Proud Canadian Penguin "$White"1"$Red"ii|iiiiiiii|" >> /etc/issue

echo >>/etc/issue

cp -f /etc/issue /etc/issue.net

```

I got a picture of the canadian flag, used gimp and aalib to export it to a text file, then did the colouring myself  :Very Happy: 

----------

## jaska

Maybe I am dyslexic, but how do you make the cowsay appear when i open up aterm? I saw a screenshot with something like that happening, but it could have been only an ssh loging?

----------

## jaska

Nevermind, I think its fixed now.

----------

## dhurt

Thanks for this great thread.  I have really enjoyed setting this up on my computer.  I have a question though. The script that I have cobbled together from posts in this thread updates correctly /etc/issue and /etc/issue.net and it works correctly as far as I can tell.  But I keep getting errors from the cron daemon.

The errors are as follows:

```

Date: Fri, 22 Aug 2003 09:45:00 -0700 (PDT)

From: Cron Daemon <root@mcising.net>

To: root@mcising.net

Subject: Cron <root@shadow>  /etc/init.d/issue

                                                                                

TERM environment variable not set.

```

```

Date: Fri, 22 Aug 2003 09:45:00 -0700 (PDT)

From: Cron Daemon <root@mcising.net>

To: root@mcising.net

Subject: Cron <root@shadow> root /etc/init.d/issue

                                                                                

/bin/sh: line 1: root: command not found

```

I get this error everytime the cron job runs and it is just annoying to have it fill up my mail box.  The bash script that I run every ten minutes via cron is the following:

```

#!/bin/bash

                                                                                                                                                  

if [ -f /etc/gentoo-release ]; then

                                                                                                                                                  

R=$(cat /etc/gentoo-release | awk '{ print $5,$6 }')

C=$(cat /proc/cpuinfo | grep 'model name' | awk '{ print $4,$5,$6 }')

CS=$(cat /proc/cpuinfo | grep 'cpu MHz' | awk '{ print $4 }')

CB=$(cat /proc/cpuinfo | grep 'bogomips' | awk '{ print $3 }')

K=$(uname -r)

H=$(/bin/hostname -f)

M=$(( `dmesg | grep "Dentry" | awk '{print $9}'` / 1024 ))

KS=`dmesg | grep "Swap" | awk '{print $3}'`

S=$(( ${KS%k} / 1024 ))

U=$(uptime)

F=$(fortune 40% calvin 30% hitchhiker 10% chalkboard 10% starwars 10% bofh-excuses)

                                                                                                                                                  

DARK="\033[1;30m" # dark grey

GREY="\033[0m" # default grey / white

WHITE="\033[1;37m" # bright / bold white

PURPLE="\033[0;35m" # purple

BR_GREEN="\033[1;32m" # bright green

BR_BLUE="\033[1;34m" # bright blue

BLACK="\033[0;30m" # black

RED="\033[0;31m" # Red

LT_RED="\033[1;31m" # Light Red

YELLOW="\033[1;33m" # Light Red

                                                                                                                                                  

/usr/bin/clear >> /etc/issue

echo -e " " >> /etc/issue

echo -e "$BR_GREEN Gentoo$BR_BLUE Linux$RED Release $R" >> /etc/issue

echo -e " " >> /etc/issue

echo -e "$GREY Hostname: $WHITE $H" >> /etc/issue

echo -e " " >> /etc/issue

echo -e "$GREY Kernel:   $WHITE $K" >> /etc/issue

echo -e "$GREY Processor:$WHITE $C ( $CS MHz => $CB bogomips)" >> /etc/issue

echo -e "$GREY Memory:   $WHITE $M Mb    $GREY Swap:  $WHITE $S Mb" >> /etc/issue

echo -e "$GREY Uptime:  $WHITE $U" >> /etc/issue

echo -e " " >> /etc/issue

echo -e "$YELLOW$F$WHITE" >> /etc/issue

echo -e " " >> /etc/issue

cp /etc/issue /etc/issue.net

cp /etc/issue /etc/motd

chmod 644 /etc/motd

fi

```

The crontab entry looks like this:

```

*/10 * * * *     root    /etc/init.d/issue

```

Any suggestions would be most appriciated.  Thanks in advance.

----------

## dhurt

In case anyone else is having the same error.  The solution is to change these lines:

```

/usr/bin/clear >> /etc/issue

echo -e " " >> /etc/issue

```

To This

```
 

TERM=linux /usr/bin/clear > /etc/issue

printf "\e[2J\e[H" >> /etc/issue

```

That fixes the first error of the environment variable not being set.  The next error of root not being a command, is because I am noob and added in the job to the cron daemon wrong.  I looked at /etc/crontab for how to format the entry and it has root in as the sixth entry, but when you do a crontab -e, the sixth item should be the job and the user should not be listed. So the crontab entry should look like this:

```

*/10 * * * *     /etc/init.d/issue 

```

----------

## radr

it is possible 

<after a few hrs of hairpulling>

add these lines to /etc/profile

#linux_logo

echo

linux_logo -L 3

echo

now even my remote users can see the goodness =)

ps. i followed all previous posts to get the linux_logo workin

----------

## IvoryTiger

[quote="Master_Of_Disaster"]Fine, made it as Sedated suggested, there is just one anoying problem:

```
fuero@bmfh fuero $ sudo /etc/init.d/issue start

 * Could not get dependency info for "issue"!

 * Could not get dependency info for "issue"!

 * Building Linux Welcome Message

 *      Creating /etc/issue...                     [ ok ]

 *      Creating /etc/issue.net...                 [ ok ]

fuero@bmfh fuero $

```

/sbin/depscan.sh will fix the dependancy errors.

I added the start/stop to my script and then ran /sbin/depscan.sh and those errors are now gone.

----------

## quark

Hi all...

  I started to make my own /etc/init.d/issue after reading this thread a while  :Smile: 

This is what I ended up with:

```
    .vir.       Gentoo Gnu/Linux        

 .d$$$$$$b.                                     

 $$$$( )$$$b    Hostname: lappy.potro.net

 Q$$$$$$$$$$B   Kernel:   2.6.0-test8-mm1

   "$$$$$$$P    Uptime:   3:02

  d$$$$$$P"                                     

 $$$$$$$P       ALL UNAUTHORIZED USERS WILL BE CONDEMNED TO DIE!

 `Q$$P"                                          

Wed Oct 22 01:02:19 EEST 2003
```

The g is taken from the linux-logo -ebuild's gentoo logo and the rest is mostly inspired by this thread  :Smile:  I used a simple awk line to take just the uptime and nothing but the uptime from the output of "uptime". It's not as easy as you might think  :Wink: 

Here is the code (if someone is interested):

```
#!/bin/sh

LGRAY="\033[1;6m\033[1;37m"

YELLOW="\033[1;6m\033[1;33m"

PURPLE="\033[1;6m\033[1;35m"

WHITE="\033[1;6m\033[1;37m"

COLOR_RESET="\033[0m"

# Let's simplify this a bit :)

UPTIME=`uptime | awk '{for ( i = 3; i <= NF-7; i++ ) if ( i != NF-7 ) \

        print $i; else print substr($i,1,length($i)-1);}'`  

rm -f /etc/issue

echo -e $PURPLE'                                                ' >> /etc/issue

echo -e $PURPLE'    .vir.       Gentoo '$WHITE'Gnu/Linux        ' >> /etc/issue

echo -e $PURPLE' .d$$$$$$b.                                     ' >> /etc/issue

echo -e $PURPLE' $$$$( )$$$b    '$LGRAY'Hostname: '$(hostname -a) >> /etc/issue

echo -e $PURPLE' Q$$$$$$$$$$B   '$LGRAY'Kernel:   '$(uname -r)    >> /etc/issue

echo -e $PURPLE'   "$$$$$$$P    '$LGRAY'Uptime:   '$UPTIME        >> /etc/issue

echo -e $PURPLE'  d$$$$$$P"                                     ' >> /etc/issue

echo -e $PURPLE' $$$$$$$P       '$YELLOW'ALL UNAUTHORIZED USERS WILL BE'\

                                'CONDEMNED TO DIE!' >> /etc/issue

echo -e $PURPLE' `Q$$P"                                          '>> /etc/issue

echo -e $LGRAY"\n$(date)" >> /etc/issue

echo -e $COLOR_RESET >> /etc/issue

cp -f /etc/issue /etc/issue.net
```

----------

## Thulle

 *lain iwakura wrote:*   

> 
> 
> echo -e $COLOR3"Welcome to the Wired!">>/etc/issue
> 
> 

 

<offtopic> apparently more than me who like s.e lain ^_^</offtopic>

----------

## Antimatter

sorry for this bumpage but i'm having some problem with this

i got the issue file to display correctly before i am able to log in but i have another problem

i created an issue.net and enabled banner /etc/issue.net 

then i ssh in from my windows machine though putty and i get no message, zip nada, none

so is it just something with putty or ?

thanks

UPDATE:

if i log in using ssh1 i get nothing just a login prompt then when i log in it display last time i log in.

now if i switch to ssh2 i get a log in prompt i type in the login name, then i get the message from issue.net then it presents me with the password field.

this is partway there but i want it to all display BEFORE the login thing is even printed to screen meaning it print to screen then let u to log in. and also wondering why it partly work with ssh2 but not ssh1

thanks

----------

## jtp755

Here are some screenshots of some simple ones i just did. Its my first attmept at this but i thought it was cool. Hope yall like them.

[img:1742f29d0c]http://www.eternalfireproof.com/gentoopics.GIF[/img:1742f29d0c]

[img:1742f29d0c]http://www.eternalfireproof.com/gentoopic1.GIF[/img:1742f29d0c]

[img:1742f29d0c]http://www.eternalfireproof.com/gentoopic2.GIF[/img:1742f29d0c]

If you want me to send the text files let me know.

----------

## maxulanhot

I just put the issue to run level default,but when I reboot it say 

issue dependency error?

why?

----------

## DumbAss

Hi, I think this is a cool topic. It is one of those things that makes your computer "special".

Maybe anyone knows a script that outputs the number of the terminal you are logged in to? I searched google and the fora but I couldn't find anything.

----------

## OdinsDream

I thought I'd mention that some of you guys might be interested in trying figlet, it's a great program for making banners out of ASCII "fonts"... like so:

```

localhost odinsdream # echo "farscapeone" | figlet -f chunky -w 120

  ___                                                            

.'  _|.---.-.----.-----.----.---.-.-----.-----.-----.-----.-----.

|   _||  _  |   _|__ --|  __|  _  |  _  |  -__|  _  |     |  -__|

|__|  |___._|__| |_____|____|___._|   __|_____|_____|__|__|_____|

                                  |__|                           

localhost odinsdream # 

```

emerge figlet && showfigfonts | less

... I'm working on adding this kind of functionality to /etc/init.d/issue, so that I can get a chunky output of uname -r...

But, is the definitive answer that this isn't just a matter of dropping stuff into /etc/issue itself? Is there no way to convert that into a script? What process reads and prints the contents of /etc/issue? man issue talks about expansions of anything that getty understands, like \s. Where can I find more information about getty, what it is, and what it can expand on?

----------

## Klainn

For some reason I can't get my box to use either /etc/init.d/issue or /etc/issue instead of /etc/issue.logo

anyone know how I can fix that ?

----------

## gieltje

./greet: line 14: / 1024 : syntax error: operand expected (error token is "/ 1024 ")

That is when I get when I try to run (https://forums.gentoo.org/viewtopic.php?t=2972&postdays=0&postorder=asc&start=25&sid=4c49743afe24fb84392c6d4ba8526193)

Line 14 is;

        S=$(( ${KS%k} / 1024 ))

Anyone got an idea?

Found it

KS=`dmesg | grep "Swap" | awk '{print $3}'`

should be;

KS=`dmesg | grep "swap" | awk '{print $2}'`

(watch the Swap to swap to)

----------

## ares

cat messaggio | cowsay -f daemon

  

----------

