Updated linuxlogo.txt

Rob 'Feztaa' Park feztaa at shaw.ca
Thu Mar 7 18:24:04 PST 2002

Simply revised the hint to leave linux_logo in a more useable state (ie,
frees up -t option  so that users can set their own custom string).

Also, made it so that it now displays your current console when you're
logging in ;)


Rob 'Feztaa' Park
feztaa at shaw.ca
Arguing with an engineer is like wrestling with a pig in the mud.
After a while, you realize the pig enjoys it. 
-------------- next part --------------
TITLE:		Using Linux Logo to Spruce Up Your Login Prompt
AUTHOR:		Robert Park <feztaa at shaw.ca>

	How to get an attractive login prompt using the Linux Logo

Fri 8th 2002 Ver. v1.1


If you've used mandrake, and seen it boot into runlevel 3, you've
probably noticed the cute ANSI/ASCII-art Tux that precedes the login
prompt. This hint will tell you how to create the same effect on your
LFS system.


All you need is the source code to linux logo, which can be found here:


You might also want the logo that I hacked together from one of the
logos packaged with Linux Logo (it looks a little better with small font
sizes, IMO):


This hint uses SysVInit bootscripts, though it's not hard at all to
implement this with BSD-style bootscripts.


1. Unpack linuxlogo, and move my logo into the logos subdirectory, if
you choose to use it.

2. Compile it like this:

make logos-all
make install

3. I advise you to read the README and configure linuxlogo to the way
you want it to display the logo when you are logging in. 

4. I configured mine like this:

cat > /etc/linux_logo.conf << "EOF"
-L 12 -F "\n\nFeztux GNU/#O #V on #H.\nCompiled #C.\n#N #M #X #T #P.\n#R RAM, #B Bogomips Total. \n#E     "

Explanation: we are creating the config file for the program, which
really is just a file that contains commandline options for it.

The -L option tells it to use the 12th logo, which is the one I altered.

The -F option configures how the system information is formatted (read
the readme on how to set this option).

If you want to have linux clear the screen before printing the logo, and
thus hiding the output of your bootscripts after everything finishes
loading, add the -f option to this file. More details and options are in
the readme.

5. Now we'll make the bootscript for it:

cat > /etc/init.d/issue << "EOF"
# Begin /etc/init.d/issue

# Include the functions declared in the /etc/init.d/functions file

source /etc/init.d/functions

case "$1" in
                echo -n "Setting /etc/issue ... "
                linux_logo -t "Console: \I" >/etc/issue 2>&1

                echo "Usage: $0 start"
                exit 1


# End /etc/init.d/issue

The -t option here simply specifies some custom text. When you boot,
certain codes in the /etc/issue file are interpreted and replaced with
some information.  In this case, the '\I' is being replaced with your
current tty.

6. Finally, make the symlinks to the script. You can run the script
while your computer boots and shuts down if you wish, but it really only
makes sense to run it while the computer is booting. So, only make the
symlink in /etc/rc3.d, assuming you boot to runlevel 3:

cd /etc/rc3.d &&
ln -s ../init.d/issue S350issue


If you tried to run linux_logo in a terminal, you probably noticed
a weird bug: After linux_logo is done printing the logo, bash will
draw the shell prompt somewhere inside of the logo, such that they
overlap, and it will look weird and bad. Don't worry: even though that
happens to bash, /etc/issue is still created properly. If you want to
run linux_logo from a terminal and not see this bug, run linux_logo as
'linux_logo;echo;echo;echo' and it should work.

Also, if you try to cat /etc/issue, you will have the same problem
as running linux_logo on it's own. Don't worry about this either, as
/etc/issue displays properly at the login prompt.

The End

Reboot your computer and enjoy the new logo! ;)

If you want to see what it looks like on my computer using the logo that
I made, see this:


That screenshot is from an xterm, though, so the colors will be slightly
different on the console when you boot the computer.

If you have any questions, do not hesitate to ask!

More information about the hints mailing list