forked from deater/linux_logo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
422 lines (316 loc) · 17.9 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
#####
#######
@ ##O#O##
###### @@# #VVVVV#
## # ## VVV ##
## @@@ ### #### ### ### ##### ###### # ##
## @ @# ### ## ## ## ### ## # ##
## @ @# ## ## ## ## ### # ###
## @@# ## ## ## ## ### QQ# ##Q
## # @@# ## ## ## ## ## ## QQQQQQ# #QQQQQQ
## ## @@# # ## ## ### ### ## ## QQQQQQQ# #QQQQQQQ
############ ### #### #### #### ### ##### ###### QQQQQ#######QQQQQ
Linux Version 5.5.0-1-amd64, Compiled #1 SMP Debian 5.5.13-2 (2020-03-30)
Four 2.7GHz Intel i5 Processors, 3.8GB RAM, 12800 Bogomips Total
orvavista
/*--------------------------------------------------------------------------*\
LINUX_LOGO 6.01 -- Shows a Logo With some System Info - 22 July 2022
by Vince Weaver ( <[email protected]> , http://www.deater.net/weave )
SUPPORTS Linux (most architectures) and some non-Linux OSes
\*--------------------------------------------------------------------------*/
HISTORY:
Back in the summer of 1997 there was a recurring topic on the linux-kernel
list about having a "boot-up" penguin on all architectures. There
were many arguments back and forth, but eventually the primary consensus
was that this would be better done in user-space. [Eventually the fbcon
people snuck it in anyway]. In any case, those of us running on text
consoles wanted a penguin too, and barring some attempts to use a vga-font
hack to get one displayed, the best way to get this was a user-space
text-mode program.
I used a ppm of the Linux penguin and a ppm2ansi converter from
Rasterman [www.rasterman.com], and then touched it up with a trial
version of THEDRAW under DosEmu. Dredging up some talents left
over from my Ansi-art BBS days I eventually hacked together a rough
likeness of Ewing's Linux Penguin. I added some system info from
/proc, and linux_logo was born.
The program itself has grown more "feature-full" as people around the
world send in their patches. The newer versions are primarily minor
cosmetic fixes. But I get a lot of positive feedback from this tiny
little program I created one summer day........
-----------------------------------------------------------------------
CONFIG FILES
-----------------------------------------------------------------------
As of 3.9b5 linux_logo now reads ~/.linux_logo [that is, the
hidden file .linux_logo in your home directory] and
/etc/linux_logo.conf before parsing the command line options.
The format of the config files is a bit of a hack. Just put in the
file the command line options you want passed to linux_logo.
Thus if you put in ~/.linux_logo
-a -c -F "Linux Logo on a #M Mhz Machine"
Then when you run "linux_logo" it will automatically show an ASCII classic
logo with the formatting command applied.
This is a bit ugly, but is was simpler and [at the time] seemed more elegant
than writing a separate dot file parser....
----------------------------------------------------------------------->
POTENTIAL USES FOR linux_logo
----------------------------------------------------------------------->
There are so many uses, I split them off into a separate "USAGE" file.
----------------------------------------------------------------------->
QUICKLY INSTALLING linux_logo
----------------------------------------------------------------------->
untar and uncompress the file
tar -xzvf linux_logo-6.01.tar.gz
enter the directory
cd linux_logo-6.01
run "configure"
./configure
compile the program
make
install (you'll probably want to do this as root) with
make install
-------------------------------------------------------------------------->
ADVANCED LINUX_LOGO Installation
-------------------------------------------------------------------------->
Destination directory:
By default linux_logo is installed under /usr/local/
To change this, run configure with
"./configure --prefix=/usr"
Where you can replace /usr with any location you want.
Picking logos:
You can choose which logos are compiled into linux_logo.
Many contributed logos can be found in the ./logos directory.
By editing the file logo_config, you can pick which logos are included.
You can create a linux_logo binary with ALL of them
by doing
make logos-all
Note: this will overwrite the current logo_config, so be careful.
Then use "linux_logo -L list" to see them, or
"linux_logo -L random" to randomly go through them
Compile time changes:
Edit the "defaults.h" file to change a lot of linux_logo's default
behaviors.
Translations:
Initial internationalization support has been added. If you are running
with the LANGUAGE environmental variable set, and there is a translation
for your language, then you should get linux_logo in your own tongue.
This can be turned off by changing the USE_I18N option at the top
of the defaults.h file.
Cross compiling:
If you are using linux_logo on an embedded system you might
want to cross compile. I tried to make this as easy as possible.
For example, to cross-compile for avr32 on x86 (assuming you
have all of the avr32 cross-compile tools installed) I do this:
env CROSS=avr32-linux- ./configure
make CROSS=avr32-linux- LDFLAGS=-static ARCH=avr32
And the result is a working avr32 version of linux_logo
On non-Linux architectures:
You'll have to use GNU make. This is often called "gmake".
--------------------------------------------------------------------------->
COMMAND LINE OPTIONS
--------------------------------------------------------------------------->
Usage: linux_logo [-a] [-b] [-c] [-d] [-D file] [-e file] [-f] [-F] [-g]
[-h] [-i] [-k] [-l] [-n] [-o num] [-p] [-s] [-t str] [-u] [-v]
[-w Num] [-x] [-y] [-F format] [-L num | list | random_xx]
[-a] -- Display an ascii-only Logo
[-b] -- Display a Banner Logo!
[-c] -- Display a "Classic" type logo
[-d] -- disable "prettying" of output
[-D file]-- use custom logo from "file"
[-e file]-- Use "file" instead of /proc/cpuinfo [for debugging
[-f] -- force the screen clear before drawing
[-F format] Format output. See README.
B [-g] -- give system info only
[-h] -- this help screen
[-i] -- ignore the ~/.linux_logo and /etc/linux_logo.conf files
[-k] -- keep sysinfo flushed-left (non-centered)
B [-l] -- display logo only
C [-o Num] -- offset output Num spaces to the right
[-p] -- preserve cursor location
[-s] -- skip Bogomips [speeds up on non-Linux platforms]
[-t str] -- display user-supplied string
* [-u] -- show uptime
[-v] -- version information
[-w Num] -- set width of screen to Num [default 80]
* [-y] -- show load average
[-L ...] -- multiple Logo options.
B=Banner mode only, C=Classic Mode Only *=Works Only in Linux
More detailed explanations:
[-a] : This option makes linux_logo output no fancy colors. This is
useful if you are viewing linux_logo over a black and white
terminal, or a terminal that can't handle fancy escape sequences
well [like default win95 telnet].
[-b] : This option makes linux_logo display the first compiled-in "banner"
style logo.
[-c] : This option makes linux_logo display the first compiled-in
"classic" style logo. Many people prefer this version of the
logo. I made it myself using some complex manipulation of TheDraw
and the 'official' logo.xpm that comes with the linux_sources.
[-d] : This option turns off Megahertz rounding and cpuinfo "prettying".
That is, it prints your /proc/cpuinfo's "model name" verbatim,
instead of being clever and making it look nice.
[-D file]: Use an alternate logo on disk. Just make sure 'file' points
to a valid '.logo' file. Read README.CUSTOM_LOGOS for more
info on how to make these. Some can be found in the
./logos directory of the linux_logo distribution.
[-e file]: Specify an alternate cpuinfo file. This is only really useful
if you are debugging a /proc/cpuinfo file that is not from
your own computer. Theoretically you could also use this to
make your old 386 appear to be a Pentium to users ;)
[-f] : This option simply clears the screen before drawing the logo.
[-F format]: Use this to super-customize the output of the cpuinfo. You
pass a string, for example "#V\n#U\n#L\n". See the section
below entitled "THE NEAT NEW FORMAT COMMAND" for further info.
[-g] : This option makes linux_logo display the system_info only.
[Note.. this option only works in banner mode]. This is
useful if you have your own, better, ansi logo and you don't
want to mess with include files. Just
"cat My_Logo >> out; linux_logo -g >> out" to get your logo with
my sysinfo.
[-h] : This simply displays the help screen, which is much less verbose
than this write-up.
[-i] : linux_logo will look in ~/.linux_logo and /etc/linux_logo.conf
for information on how to run linux_logo. If the -i option
is passed, linux_logo will ignore those files
[-k] : keep sysinfo flushed-left (non-centered)
In older versions of Linux_logo this modified how the logo
looked, I apologize for re-using the command-line option,
but there are only so many letters of the alphabet.
[-l] : This option displays the logo only [Only works in banner mode].
This is useful if for whatever reason you don't want to see the
system info.
[-L num | NAME | list | random_xy]: This option is used to manipulate compiled-in
custom logos. As of linux_logo 3.9 you can compile in an
arbitrary amount of logos, although the default is to just have
the original and banner logos.
"-L list" will list all of the logos available
"-L NAME" will display the logo with name NAME.
the names available can be seen with the "-L list" command
"-L num" will display logo number num, where the number is
obtained using the "-L list" command
"-L random_xy" will pick a logo at random, with criteria xy.
When you replace x with the letter:
b : pick a random banner mode logo
c : pick a random classic mode logo
e : pick a logo from either banner or classic
When you replace y with the letter:
a: pick a random ascii logo
n: pick a non-ascii logo
e: pick either type of logo
So to summarize "-L random_ba" picks a random ascii banner,
"-L random_ce" picks a random classic logo
"-L random_ee" picks any logo, etc, etc
See README.CUSTOM_LOGOS for more info
[-n] : This option has been removed from linux_logo 3.9 and above.
If you want to create a logo that looks different than the
default, read README.CUSTOM_LOGOS.
[-o Num] : This option will offset the logo towards the right of the screen
Num spaces.
[-p] : This option preserves the position of the cursor on the screen
while drawing the logo under it.
[-rX] : This option has been removed from linux_logo 3.9 and above.
If you want to create a logo that looks different than the
default, read README.CUSTOM_LOGOS.
[-s] : This option skips the bogomips test on non-linux ports. On
platforms that don't have the bogomips value in a /proc file,
linux_logo calculates the value itself using a GPL'd routine.
This can take a while, especially on slower machines, so it can
be disabled.
[-t str] : This option displays user-supplied string (for example,
Red Hat release or welcome...') in first line of system info.
See the "Things to do" section for ways to use this.
[-u] : This option displays the uptime along with the other system
information. While useless when putting logos in issue or motd
files, this option comes in handy if you are using linux_logo
to impress your friends. Also, when used in conjunction with
the -g option, you can use linux_logo in Server-Side includes
in web pages.
[-v] : This option displays the version of linux_logo you are using.
[-w Num] : Use this option to set the width of the screen. It helps in trying
to center the banner mode. Default is 80 columns.
[-x] : This option has been removed from linux_logo 3.9 and above.
If you want to create a logo that is narrower than the
default, read README.CUSTOM_LOGOS.
[-y] : Display the load average. [Yes I have just about run out of
letters to use as command line options ;)]
--------------------------------------------------------------------------->
TROUBLESHOOTING
--------------------------------------------------------------------------->
Know bugs:
Different architectures have odd /proc files. If you send me
a copy of relevant files (/proc/cpuinfo and /proc/version usually)
I can see about adding support.
On non-Linux platforms the BogoMips check can be quite slow. To skip
it use "linux_logo -s"
To make easy updates to ansi files with difficult editors,
the combination ^[ is read as the ESC code (#27 decimal)
so this combination cannot be used in a picture.
------------------------------------------------------------------------>
THE NEAT FORMAT COMMAND
------------------------------------------------------------------------>
These are instructions on how to use the Format command added in Linux Logo 3.0
The command line argument is -F.
Special sequences start with "#" use "##" to make the "#" sign. All other
characters [except "\n", the carriage return] are printed as is.
Special Stands For Example
________________________________________________________________
#B Bogomips "374.37"
#C Compiled Date "#47 Fri Jan 8 10:37:09 EST 1999"
#E User Text [given with the -t] "Given with -t option"
#H Hostname "deranged"
#L Load average "Load average 0.04, 0.01, 0.01"
#M Megahertz [where supported] "188Mhz "
#N Number of CPU's "Two"
#O Operating System Name "Linux"
#P Singular or Plural of "Processor" "Processor"
#R Ram [in Megabytes] "64M"
#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
Notes:
+ The letter after the # must be capitalized.
+ Options not available are silently ignored.
+ Megahertz only available on some platforms and newer kernels.
+ See "defaults.h" on how to have #N report in non-english numbers.
+ Plural [#S] gives nothing if there is 1 cpu, gives 's' otherwise.
+ Processor [#P] gives "Processor" [or i18n equiv] when 1 cpu,
"Processors" if more than 1.
+ The "-y" and "-u" [display uptime and load average] command line options
don't affect the output if a custom format is used.
For example the default banner format is
"#O Version #V, Compiled #C\n#N #M#X#T #P, #R RAM, #B Bogomips Total\n#H\n"
which on my computer gives an output of:
Linux Version 2.2.0-pre5, Compiled #47 Fri Jan 8 10:37:09 EST 1999
One 188MHz AMD K6 Processor, 64M RAM, 374.37 Bogomips Total
deranged
Another example would be
linux_logo -F "Redhat Linux 5.2\nKernel Version #V\n#U\n#L\n"
which would give
Redhat Linux 5.2
Kernel Version 2.2.0-pre5
Uptime 11 hours 4 minutes
Load average 0.00, 0.00, 0.00
As you can see, the possibilities are endless.
------------------------------------------------------------------------>
CREATING/USING CUSTOM LOGOS
------------------------------------------------------------------------>
See the file README.CUSTOM_LOGOS for more than you ever wanted to know
about making and using your own logo files.
------------------------------------------------------------------------->
WHERE TO GET LINUX_LOGO:
------------------------------------------------------------------------->
http://www.deater.net/weave/vmwprod/linux_logo
http://sunsite.unc.edu/pub/Linux/logos/penguin/
Check out other programs by me at http://www.deater.net/weave/vmwprod
-------------------------------------------------------------------------->
THANKS FOR 25 YEARS OF LINUX_LOGO
-------------------------------------------------------------------------->
Many thanks to the people sending in patches and /proc/cpuinfo entries.
Without you linux_logo wouldn't work on so many machines.
Special thanks to Kristina (KRG) and my friends John Clemens and Marie
Prosser.
-----------------
Vince `deater` Weaver