Remove lfs-uefi.txt symlink
[linux_from_scratch_hints.git] / PREVIOUS_FORMAT / linuxlogo.txt
blob02e42baf62c0629458b3b2939bcb4004adb30992
1 TITLE:          Using Linux Logo to Spruce Up Your Login Prompt
2 LFS VERSION:    4.0 (should work with earlier versions without much hassle)
3 AUTHOR:         Robert Park <rbpark@ualberta.ca>
5 SYNOPSIS:
6         How to get an attractive login prompt using the Linux Logo utility.
8 HINT:
10 Changelog
11 ---------
13 Revision 1.8  2002/12/24 08:39:20  feztaa
14 Fixed stupid typo ;)
16 Revision 1.7  2002/12/24 08:02:23  feztaa
17 Updated to version 4.06
19 Revision 1.6  2002/09/15 05:40:33  feztaa
20 Changed email address, among other misc fixes.
22 Revision 1.5  2002/06/09 03:56:36  feztaa
23 Added some initial notes, and changed the style of the code blocks so they'd
24 (hopefully) be easier to read.
26 Revision 1.4  2002/05/05 04:30:07  feztaa
27 Removed references to the logo I created, in favor of a better logo
28 that comes with linux_logo
30 Revision 1.3  2002/05/05 03:17:36  feztaa
31 Misc changes to improve readability.
33 Revision 1.2  2002/04/27 20:26:52  feztaa
34 Updated to LFS 3.3, LinuxLogo 4.02.
36 Intro
37 -----
39 If you've used mandrake, and seen it boot into runlevel 3, you've probably
40 noticed the cute ANSI/ASCII-art Tux that precedes the login prompt. This hint
41 will tell you how to create the same effect on your LFS system.
43 Notes
44 -----
46 In an attempt to make this easier to read, all "code blocks" that you should
47 execute on the commandline start and end with "##--CODE--##". Feel free to copy
48 that onto the commandline along with the code itself, it won't hurt anything.
50 Requirements
51 ------------
53 All you need is the source code to linux logo, which can be found here:
55 http://www.deater.net/weave/vmwprod/linux_logo
57 I used version 4.06 to write this hint, but other versions will work as well.
59 This hint uses SysVInit bootscripts, though it's not hard at all to implement
60 this with BSD-style bootscripts.
62 Instructions
63 ------------
65 1. Unpack linux_logo, and compile it like this:
67 ##--CODE--##
68 make logos-all &&
69 make install
70 ##--CODE--##
72 2. I advise you to read the README and configure linuxlogo to the way you want
73 it to display the logo when you are logging in. I configured mine like this:
75 ##--CODE--##
76 echo -n '-L 13 -F "\n\nFeztux GNU/#O #V on #H.\nCompiled #C.' > /etc/linux_logo.conf
77 echo '\n#N #M #X #T #P.\n#R RAM, #B Bogomips Total. \n#E"' >> /etc/linux_logo.conf
78 ##--CODE--##
80 Explanation: we are creating the config file for the program, which really is
81 just a file that contains commandline options for it.
83 The -L option tells it to use the 13th logo, which is the one I happen to like
84 the most, but keep in mind that you might be compiling with a different set of
85 logos, so your numbers may vary. (try "linux_logo -L list" to see a list of
86 available logos, and then pick the one you want).
88 The -F option configures how the system information is formatted (read the
89 readme on how to set this option).
91 If you want to have linux_logo clear the screen before printing the logo, and
92 thus hiding the output of your bootscripts after everything finishes loading,
93 add the -f option to this file. This also has the added benefit of clearing the
94 screen whenever you log out; so if other people use your computer, they won't
95 be able to see what you were doing before you logged out.
97 3. Now we'll make the bootscript for it:
99 ##--CODE--##
100 cat > /etc/rc.d/init.d/issue << "EOF"
101 #!/bin/bash
102 # Begin $rc_base/init.d/issue
104 source /etc/sysconfig/rc
105 source $rc_functions
107 case "$1" in
108         start|stop)
109                 echo "Setting /etc/issue..."
110                 linux_logo -t "Console: \l" >/etc/issue 2>&1
111     evaluate_retval
112                 ;;
114         *)
115                 echo "Usage: $0 {start|stop}"
116                 exit 1
117                 ;;
118 esac
120 # End $rc_base/init.d/issue
122 chmod 755 /etc/rc.d/init.d/issue
123 ##--CODE--##
125 The -t option here simply specifies some custom text that we want to display in
126 the issue file, but that we wouldn't want to display when linux_logo is run
127 normally (which is why we don't put it in the config file). When you boot,
128 certain codes in the /etc/issue file are interpreted and replaced with some
129 information.  In this case, the '\l' is being replaced with your current tty.
131 5. Finally, make the symlinks to the script. You can run the script while your
132 computer boots and shuts down if you wish, but it really only makes sense to
133 run it while the computer is booting. So, only make the symlink in /etc/rc3.d,
134 assuming you boot to runlevel 3:
136 ##--CODE--##
137 cd /etc/rc.d/rc3.d &&
138 ln -s ../init.d/issue S35issue
139 ##--CODE--##
141 The End
142 -------
144 You're done! Reboot your computer and enjoy the new logo. ;)
146 If you have any questions, do not hesitate to ask!