TITLE: Using Linux Logo to Spruce Up Your Login Prompt LFS VERSION: All AUTHOR: Robert Park SYNOPSIS: How to get an attractive login prompt using the Linux Logo utility. HINT: Fri 8th 2002 Ver. v1.1 Intro ----- 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. Requirements ------------ All you need is the source code to linux logo, which can be found here: http://www.deater.net/weave/vmwprod/linux_logo 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): http://members.shaw.ca/feztaa/linux_logo/classic-plain.logo This hint uses SysVInit bootscripts, though it's not hard at all to implement this with BSD-style bootscripts. Instructions ------------ 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 " EOF 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" #!/bin/sh # Begin /etc/init.d/issue # # Include the functions declared in the /etc/init.d/functions file # source /etc/init.d/functions case "$1" in start|stop) echo -n "Setting /etc/issue ... " linux_logo -t "Console: \I" >/etc/issue 2>&1 evaluate_retval ;; *) echo "Usage: $0 start" exit 1 ;; esac # End /etc/init.d/issue EOF 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 Notes ----- 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: http://members.shaw.ca/feztaa/linux_logo/linux_logo.png 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!