File: wkndmech.html

package info (click to toggle)
lg-issue16 4-4
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,256 kB
  • ctags: 77
  • sloc: tcl: 89; makefile: 37; sh: 4
file content (945 lines) | stat: -rw-r--r-- 34,556 bytes parent folder | download | duplicates (2)
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
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
<!--startcut ==========================================================-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Draft//EN">
<HTML>
<HEAD><TITLE>Linux Weekend Mechanic - April 1997</TITLE></HEAD>

<BODY BGCOLOR=#FFFFFF>
<!--endcut ============================================================-->

<H4>
&quot;Linux Gazette...<I>making Linux just a little more fun!</I>&quot;
</H4>

<P> <HR> <P> 
<!--===================================================================-->

<CENTER>
<IMG SRC="../gx/fisk/wkndMech.gif" ALIGN=BOTTOM WIDTH=397 HEIGHT=150>
<H1>Welcome to The Linux Weekend Mechanic!</H1>
<H2>Published in the April 1997 Edition of the Linux Gazette</H2>
<FONT SIZE="2"><B>
Copyright (c) 1997 John M. Fisk &lt;fiskjm@ctrvax.vanderbilt.edu&gt;<BR>
The Linux Gazette is Copyright(c) 1997 <A HREF="http://www.ssc.com/">
Specialized Systems Consultants Inc.</A>
</B></FONT>
</CENTER>

<P><HR>

<H2>Time To Become... <I>The Linux Weekend Mechanic!</I></H2>
<TABLE>
<TR>
    <TD ALIGN=TOP>
    <IMG SRC="../gx/fisk/mechanic.gif" ALIGN=BOTTOM WIDTH=147 HEIGHT=66>

    <TD ALIGN=LEFT VALIGN=TOP>
    You've made it to the weekend and things have finally slowed down.  You
    crawl outa bed, bag the shave 'n shower 'cause it's Saturday, grab that
    much needed cup of caffeine (your favorite alkaloid), and shuffle down
    the hall to the den.  It's time to fire up the Linux box, break out the
    trusty 'ol Snap-On's, pop the hood, jack 'er up, and do a bit of
    overhauling!
</TABLE>

<P><HR><P>

<!-- TABLE OF CONTENTS ================================================ -->
<H2>Table of Contents</H2>

<UL>
    <LI><A HREF="#welcome">Welcome to the April 1997 Weekend Mechanic!</A>
    <LI><A HREF="#wallpaper">More Wallpapering ideas...</A>
    <LI><A HREF="#xlock">Wallpapering with <I>xlock</I>...?!</A>
    <LI><A HREF="#syslog">System Logging Ideas...</A>
    <LI><A HREF="#closing">Closing Up The Shop</A>
</UL>
<!-- END TABLE OF CONTENTS ============================================ -->

<P><HR><P>

<!-- WELCOME SECTION ================================================== -->
<H2><A NAME="welcome"><IMG SRC="../gx/fisk/attndant.gif" WIDTH=129 HEIGHT=99>
Welcome to the April 1997 Weekend Mechanic!</A></H2>

<P>
Hey, c'mon in!

<P>
Thanks for dropping by!  How y'all been doing?

<P>
I don't know about you, but life around the Fisk household has been pretty
busy of late.  I've been having a great semester at 
<A HREF="http://www.mtsu.edu">MTSU</A> and enjoying my classes which are
predictably starting to crescendo in unison into a frenzy of activity.  And
we're all starting to &quot;mood synchronize...&quot; :-)

<P>
I apologize that the articles and such in this edition are going to be a bit
short and hurried.  I've got a couple hours' worth of time before we leave to
visit family and I'll see what I can get written up.  I've got a growing
notebook full of ideas about which I'd like to write.  Which reminds me...

<P>
Have I preached recently on the virtues of keeping a notebook...

<P>
You say, <I>I haven't...?!</I> :-)

<P>
Well, y'all just settle back in for a few minutes while I loosen the belt,
take a deep breath, and start in!

<P>
Seriously, I'm convinced that keeping a notebook, journal, or just a stash of
note and ideas you've come across and jotted down is like <I>brushing and
flossing:  it's good for hygiene</I>.  Mental hygiene, that is.  It'll help
prevent &quot;Programmer Pattern Baldness&quot;, the kind that comes from
pulling your hair out trying to remember just the exact invocation of some 
obscure, and recalcitrant, system utility or repairing that delicately
situated configuration file that you were going to make such a <I>small little
change to...</I>

<P>
Having notes as to what you did to some configuration file; having a hardcopy
printout of the docs/manual pages/README files on some utility; or just having
a command line invocation scribbled out on the back of the phone bill envelope
and stuff into the back of your notebook may REALLY save your &quot;nether
parts&quot; some day.

<P>
And lest you think that I'm more obsessive-compulsive, anal-retentive than I
really am... I've actually got a small pile of legal pads sitting on the shelf
next to the computer desk that has all those stream-of-consciousness type
scribblings and notes.  It's not very well organized, there's a huge amount of
redundancy, and some of the stuff is totally illegible or frankly incoherent
(probably penned during moments of questionable lucidity at 2:00 AM...).
Still, this stuff has come in mighty handy from time to time and it's amusing
and instructive to look it over now and then.  

<P>
I've also found that keeping more or less detailed notes of installation
(which I've managed to do quite frequently over the past couple years) have
come in VERY handy when I've sat down to sketch out a new installation.  I've
worked out my own partitioning scheme that's been useful for me, developed my
own archiving and upgrading scheme, and so forth based on these notes.

<P>
Also, as I alluded to above, it's pretty useful to keep a stash of hardcopy
printouts of various README's, manual pages, and so forth.  While I appreciate
the versatility of online documentation -- info, man pages, HTML, and so
forth, nothing beats having a booklet in your hot little hand that you can
read without having to wait for Netscape to finish consuming your entire
colormap before it loads... :-)

<P>
<I>(I know, I know... you've been there, done that, got the t-shirt... :-)</I>

<P>
Seriously, having a printout to write all over and mark up is pretty handy.
If you keep all those things in some kind of notebook, binder, file folder, or
whatever, you'll probably save yourself some aggravation in the future.

<P>
Just a thought...

<P>
Anyway, I'm done now.  So, without further ado...

<P>
<B>On with the show!</B>

<P>
Hope you enjoy!

<P>
John M. Fisk<BR>
Nashville, TN<BR>
Friday, 28 March 1997

<!-- END WELCOME SECTION ============================================== -->

<P><HR><P>

<!--  ARTICLE ====================================================== -->
<H2><A NAME="wallpaper"><IMG SRC="../gx/fisk/desklamp.gif" WIDTH=79 HEIGHT=99
ALIGN=BOTTOM>More Wallpapering Ideas...</A></H2>

<P>
After the February WM column, <B>Irek Koziol</B> wrote about the wallpapering 
ideas that I'd mentioned:

<BLOCKQUOTE>
<P>
Date: Wed, 12 Feb 1997 15:28:28 -0600<BR>
From: Irek Koziol &lt;cft-inc@worldnet.att.net&gt;<BR>
Subject: X Window Wallpaper<BR>

<P>
I was using:

<PRE>
	xv -quit -root -max  image.gif
</PRE>

<P>
(If enlarging image is a goal to fit the whole screen ).

<P>
Could you please comment on it, and make a followup in LG?

<P>
Cordially, George.
</BLOCKQUOTE>

<P>
Well, let's see what we can say about this...

<P>
First, <B>John Bradley's</B> ubiquitous xv program is a definite must-have
utility and a veritable &quot;Swiss Army Knife&quot; of graphics goodies.  It
has, as all good UN*X programs do, a bazillion command line options that could
occupy a lifetime of study and reflection.  Fortunately, those that you need
to know to be productive are limited, and in the confines of the present
discussion, can be narrowed down to a manageable number.

<P>
Just for the fun of it, start up X and try something like:

<PRE>
	xv -help
</PRE>

<P>
Then stand back...

<P>
When you do this, xv disgorges something like:

<PRE>

Usage:
xv [-] [-/+24] [-/+2xlimit] [-/+4x3] [-/+8] [-/+acrop] [-aspect w:h] [-best24] 
   [-bg color] [-black color] [-bw width] [-/+cecmap] [-cegeometry geom] 
   [-/+cemap] [-cgamma rval gval bval] [-cgeometry geom] [-/+clear] [-/+close] 
   [-/+cmap] [-cmtgeometry geom] [-/+cmtmap] [-crop x y w h] [-cursor char#] 
   [-DEBUG level] [-dir directory] [-display disp] [-/+dither] [-drift dx dy] 
   [-expand exp | hexp:vexp] [-fg color] [-/+fixed] [-flist fname] 
   [-gamma val] [-geometry geom] [-grabdelay seconds] [-gsdev str] 
   [-gsgeom geom] [-gsres int] [-help] [-/+hflip] [-hi color] [-/+hist] 
   [-/+hsv] [-icgeometry geom] [-/+iconic] [-igeometry geom] [-/+imap] 
   [-/+lbrowse] [-lo color] [-/+loadclear] [-/+max] [-/+maxpect] [-mfn font] 
   [-/+mono] [-name str] [-ncols #] [-/+ninstall] [-/+nodecor] [-/+nofreecols] 
   [-/+nolimits] [-/+nopos] [-/+noqcheck] [-/+noresetroot] [-/+norm] 
   [-/+nostat] [-/+owncmap] [-/+perfect] [-/+poll] [-preset #] [-quick24] 
   [-/+quit] [-/+random] [-/+raw] [-rbg color] [-rfg color] [-/+rgb] [-RM] 
   [-rmode #] [-/+root] [-rotate deg] [-/+rv] [-/+rw] [-slow24] [-/+smooth] 
   [-/+stdcmap] [-tgeometry geom] [-/+vflip] [-/+viewonly] [-visual type] 
   [-/+vsdisable] [-vsgeometry geom] [-/+vsmap] [-/+vsperfect] [-wait seconds] 
   [-white color] [-/+wloop] [filename ...] 

</PRE>

<P>
Impressive... eh?

<P>
Whoops!  Whoa there!!  Don't leave me yet...

<P>
This isn't as bad as it looks.  Trust me... :-)

<P>
The basic command line options you'll need to do a bit of root window
wallpapering can be limited to the following:

<PRE>
	-root
	-rmode [0-9]
	-max
	-maxpect
	-quit
</PRE>

<P>
Now, you can go on and do more fancy things, but the above options will
certainly get you going.  So, let's take a quick look at what each of these
means.

<DL>
	<DT><KBD>-root</KBD>
	<DD>Display the image in the root window instead of in a separate window.
	How the image is displayed depends on the setting of the <KBD>-rmode</KBD>
	option (which defaults to 0).
	<P>

	<DT><KBD>-rmode</KBD> [0-9]
	<DD>Specifies how xv will display the image in the root window if the
	<KBD>-root</KBD> option has been given.  There are currently ten different
	modes which are indicated by using a number from 0 to 9.  To see a listing
	of what these modes are, you can give an argument of -1 to the
	<KBD>-rmode</KBD> option and xv will complain a bit and display the
	information concerning the <I>real</I> options:

	<PRE>
xv -root -rmode -1 ~/images/wallpaper/forest.gif
xv: unknown root mode '-1'.  Valid modes are:
	0: tiling
	1: integer tiling
	2: mirrored tiling
	3: integer mirrored tiling
	4: centered tiling
	5: centered on a solid background
	6: centered on a 'warp' background
	7: centered on a 'brick' background
	8: symmetrical tiling
	9: symmetrical mirrored tiling
	</PRE>

	<P>
	Pretty slick, eh?

	<P>
	This is where the <I>serious coolness</I> comes in.  You can not only
	specify your favorite 'ol image to brighten up your X window, but you can
	do all sorts of nifty things to it as well.

	<P>
	So, I know what you're thinking... &quot;<I>How in the world do I know
	what each of these means...?!</I>&quot;

	<P>
	Glad you asked.

	<P>
	The easiest way to find out what each of these options does is to start
	xv, select a file to display, and then use the <B>Root</B> menu item to
	select the various types of root window displays:

	<P>
	<IMG SRC="./gx/fisk/xv.gif" WIDTH=450 HEIGHT=375 ALT="XV Image">

	<P>
	The Root menu item will display the same listing as you saw above.  You
	can use the file browser to locate a file to play with, and then select
	the various menu options to see what they do.  Once you've hit upon an
	option that you like, jot down which one it is.  For instance, if you
	liked the &quot;integer mirrored tiling&quot; effect, you'd use something
	like:

	<PRE>
	xv -rmode 3 -quit ~/images/wallpaper/forest.gif
	</PRE>

	<P>
	And xv would wallpaper your root window with the forest.gif image using
	integer mirrored tiling.

	<P>
	And you thought this was going to be hard... :-)

	<P>
	One last note:  if you use the <KBD>-rmode</KBD> option, you don't have to
	specify the <KBD>-root</KBD> option as well as this is implicit in
	<KBD>-rmode</KBD>
	<P>

	<DT><KBD>-max</KBD>
	<DD>Another option, which Irek alluded to was the <KBD>-max</KBD> option.
	What this does is stretch the image so as to fit in the root window,
	without respect to the original image aspect.  So, for example, if you had
	an image that was 920x740 and you were running at 1024x768, using this
	option would cause the image to be &quot;stretched&quot; to fit into
	1024x768.  Now, depending on your original image, this could look a bit
	funny, I suppose, but at least it'd get the whole thing in.
	<P>

	<DT><KBD>-maxpect</KBD>
	<DD>This is quite similar to the above <I>except</I> that it preserves the
	image aspect.  So, assuming that you were using the same 920x740 image
	mentioned above, using the <KBD>-maxpect</KBD> option would scale the
	image up, but would keep the width:height aspect ration the same.  In this
	case, it's likely that the image would be stretched to a height of 768,
	while the width would be something less than 1024.
	<P>

	<DT><KBD>-quit</KBD>
	<DD>Ahhh... <I>this</I> is the magic word that says, &quot;Open
	Sesame!&quot;... &quot;please...&quot;

	<P>
	This option causes xv to display the first image given on the command line
	and then quietly exit once it's done.  This is how you can add a stanza to
	a script or startup file and have xv wallpaper the root window and
	peacefully terminate once this is done.
	<P>
</DL>

<P>
See, that wasn't so bad, now was it.  So, tying it all together:  suppose that
you had a directory off your home dir called &quot;/images/wallpaper/&quot;
that you put your wallpaper collection in.  You want to use that nifty
forest.gif image and have it integer tiled.  Easy as cake:

<PRE>
xv -rmode 1 -quit ~/images/wallpaper/forest.gif
</PRE>

<P>
<I>Viola!</I>, instant gratification! :-)

<P>
Now, you can easily do this from any xterm or rxvt command line.  Heck, you
can do this from emacs or vi if you know how to execute a shell command...

<P>
<I>(pssss...!  Hey buddy... yeah, you.  If you're using vi, just try something
like:</I>

<PRE>
:!xv -rmode 1 -quit ~/images/wallpaper/forest.gif
</PRE>
and you're golden).

<P>
The more convenient way to do this is to put it in one of your start up
scripts.  I've recently started using FVWM-95 and so this would go in my 
~/.fvwm2rc95 file under the &quot;InitFunction&quot; heading:

<PRE>
AddToFunc &quot;InitFunction&quot; &quot;I&quot; Module FvwmAuto 200
+                        &quot;I&quot; Module FvwmButtons
+                        &quot;I&quot; Module FvwmTaskBar
+                        &quot;I&quot; Exec syslogtk -geometry +2+2 &
+                        &quot;I&quot; Exec rxvt -ls -sb -sl 400 -fn 9x15 -geometry 80x32 &
+                        &quot;I&quot; Exec /usr/X11/bin/xv -rmode 1 -quit ~/forest.gif &
</PRE>

<P>
Other window managers will have their own initialization files that will need
to be customized.  RTFM.

<P>
And speaking of RTFM, there's an <I>extensive</I> manual that John Bradley has
provided with xv.  &quot;Everything You Always Wanted To Know About XV, And
Were Afraid To Ask...&quot;.  On my 'ol Slackware '96 distribution, the
documentation gets installed to /usr/doc/xv and the file to have a look at is
the <B>xvdocs.ps</B> file.  It's a HUGE postscript document describing the
program and all of its options and operations in detail.  If you're using xv
much at all, this is required reading.  You can use one of the postscript
viewers such as <B>ghostscript</B> or my current favorite, <B>MGV</B>, to view
the file.

<P>
Here are just a couple other thoughts on the subject of wallpapering...

<P>
<B>Keep the number of image colors small.</B>

<P>
If you haven't noticed, one of the more annoying things about X is that it's
remarkably easy to &quot;use up the colormap&quot;.  Programs like Netscape
are notorious for allocating a hoggish number of entries, leaving other
programs unable to allocate colors, OR, having to install their own private
colormaps.  When this happens, you end up with that migraine-grinding,
wildly psychedelic color flashing when you move from one window to the next.

<P>
One way to help prevent this is to use images with a small number of colors.
To determine how many colors are being use, load the image and watch the
status message that xv will print in the control window.  Another option, and
one that's easy to use on the command line, is to use the <B>xli</B> program:

<PRE>
xli -ident forest.gif
forest.gif is a 256x256 GIF89a image with 32 colors
</PRE>

<P>
To limit the number of colors, use XV's Save function and, if you're saving
the image in GIF format, you can select the &quot;Reduced Color&quot; option.
You can also use the excellent <B>ImageMagick</B> suite of graphics tools:
use the &quot;convert&quot; program with the <KBD>-colors</KBD> option to
specify the desired maximum number of colors to use:

<PRE>
convert -colors 24 forest.gif forest_rc.gif
</PRE>

is one way to accomplish this.  If you're handy with the <B>NetPBM</B>
utilities, then I'm sure that you can do a similar thing.

<P>
<B>Add wallpapering to your favorite buttonbar or menu.</B>

<P>
Got a <I>collection</I> of favorite images and just can't decide which one you
like?  Do you change your wallpaper more often than your socks?  Do yourself a
favor:  add this stuff to your favorite menu or buttonbar and have it
available at a whim's notice!

<P>
For example, if you're using FVWM-95 and the FvwmButtons module, you could add
something like:

<PRE>
*FvwmButtons	forest	gif.xpm		Exec &quot;&quot; xv -rmode -1 -quit ~/wallpaper/forest.gif &
*FvwmButtons	clouds	gif.xpm		Exec &quot;&quot; xv -rmode -1 -quit ~/wallpaper/clouds.gif &
*FvwmButtons	trees	gif.xpm		Exec &quot;&quot; xv -rmode -1 -quit ~/wallpaper/trees.gif &
*FvwmButtons	space	gif.xpm		Exec &quot;&quot; xv -rmode -1 -quit ~/wallpaper/space.gif &
*FvwmButtons	GTO 	gif.xpm		Exec &quot;&quot; xv -rmode -1 -quit ~/wallpaper/GTO.gif &
</PRE>

and so forth.

<P>
Now, you can change the root window as easy as clicking on the buttons!  You
can also do something like this with menus.  Just create your own custom
submenu and add it to your present menu.

<P>
Also, even if you're not using a window manager that provides its own buttons,
(such as OpenWindows), you can still use programs such as <B>tkgoodstuff</B>
or <B>tycoon</B> as &quot;aftermarket add-on's&quot; and end up with a
splendid buttonbar nonetheless.  You can find these programs at any
well-stocked Linux FTP archive or simply do an Alta-Visa or Yahoo search for
them.

<P>
So, how about that?  Think that this will give you something to do for a
while?  Messing around with this stuff can be a HUGE time sink, so for those
dreary rainy April Saturday afternoons, just tell your spouse that you're
going to be busy all day doing a bit of &quot;wallpapering...&quot;

<P>
Enjoy!

<P>
John

<!-- END ARTICLE ================================================== -->

<P><HR><P>

<!-- ARTICLE ================================================ -->
<H2><A NAME="xlock"><IMG SRC="../gx/fisk/desklamp.gif" WIDTH=79 HEIGHT=99
ALIGN=BOTTOM>Wallpapering with <I>xlock</I>...!?</A></H2>

<P>
Yup... :-)

<P>
Since we're on the subject of wallpapering anyway, I thought I'd throw this
out for what it's worth.

<P>
There are actually quite a variety of ways to spiff up your dull and lifeless
root window.  And if you're still using that hideous black and white
cross-hatch when X starts...

<P>
We're here to the rescue!!  Hang on!

<P>
From all of the various doodles and scribblings that that I've made over the
past couple months on the subject, there seems to be AT LEAST three basic
things that you can do with wallpapering your root window:

<OL>
	<LI>Color or color+texture
	<LI>Images
	<LI>Animations
</OL>

<P>
You can easily try colors or colors+textures by using the <B>xsetroot</B>
program.  Use the <KBD>-solid</KBD> option with the name of a color to set the
root window color to some value.  Also, try using the <KBD>-mod [x] [y]</KBD>
option which gives you a plaid texture.  You need to specify an x and y value
for the pattern, which are numbers between 0 and 16.  You also can specify the
foreground and background colors to use with this using the <KBD>-fg</KBD> and
<KBD>-bg</KBD> options, respectively.

<P>
We've talked at some length about using an image in the root window using a
program such as <B>xv</B>.  See the previous article in this months column for
all the gory details.  FWIW, you can also use the <B>xsetroot</B> with the
<KBD>-bitmap [filename]</KBD> option to use a black and white bitmap image if
you'd like.

<P>
Finally, you can use animations on your root window.  There are all kinds of
nifty little doodad's and thingamabob's around to do such things.  My favorite
is the <B>xearth</B> program, although I've fooled with and enjoyed the
<B>xfishtank</B> and the <B>xantfarm</B> programs as well.  You should be able
to find these at your friendly neighborhood Linux FTP site or on that
Christmas CD your spouse reluctantly bought for you... :-)

<P>
Here's <I>yet another</I> suggestion that you might not have tried...

<P>
Did you know that you can use the <B>xlock</B> program as wallpaper?  

<P>
No, seriously...  You gotta give this a try!

<P>
The xlock program has almost as many command line options as xv.  Again, if
you invoke it with the secret password...

<PRE>
xlock --help
xlock:  bad command line option &quot;--help&quot;

usage:  xlock [-help] [-resources] [-display displayname] [-name resourcename]
    [-/+mono] [-/+nolock] [-/+remote] [-/+allowroot] [-/+enablesaver]
    [-/+allowaccess] [-/+grabmouse] [-/+echokeys] [-/+usefirst] [-/+v]
    [-/+inwindow] [-/+inroot] [-/+timeelapsed] [-/+install] [-delay usecs]
    [-batchcount num] [-cycles num] [-saturation value] [-nice level]
    [-timeout seconds] [-lockdelay seconds] [-font fontname] [-bg color]
    [-fg color] [-username string] [-password string] [-info string]
    [-validate string] [-invalid string] [-geometry geom] [-/+use3d]
    [-delta3d value] [-right3d color] [-left3d color] [-program programname]
    [-messagesfile filename] [-messagefile filename] [-message string]
    [-mfont fontname] [-imagefile filename] [-gridsize] [-neighbors] [-mode ant
    | bat | blot | bouboule | bounce | braid | bug | clock | demon | eyes
    | flag | flame | forest | galaxy | geometry | grav | helix | hop | hyper
    | image | kaleid | laser | life | life1d | life3d | lissie | marquee | maze
    | mountain | nose | petal | puzzle | pyro | qix | rock | rotor | shape
    | slip | sphere | spiral | spline | swarm | swirl | triangle | wator
    | world | worm | blank | random]

Type xlock -help for a full description.
</PRE>

<P>
Impressive...

<P>
(... and if you're wondering why I didn't try the <KBD>xlock -help</KBD>
option as it suggested, the reason is that of brevity.  Try this yourself to
get the FULL description!)

<P>
The options that you want are the <KBD>-inroot</KBD> and the <KBD>-mode [name]
</KBD> options.  To install your favorite galaxy, pyro, blot, rock, rotor,
swarm, or whathaveyou onto your root window, just do something like:

<PRE>
xlock -inroot -mode swarm &
</PRE>

<P>
And stand back and enjoy the show.  Of course, you can get a bit dizzy
watching some of these, but it's kinda fun watching the bats careen around and
the swarm chasing that one little bugger all over the screen.  Add a couple
invocations like this to your favorite 'ol buttonbar or menu and you'll be the
envy of all your neighbors.  People will think you're pretty cool...  Maybe
you'll get a promotion... The cute gal/guy in the dorm next door will tell all
their friends that you just <I>wrok their world!...</I>  Maybe your complexion
will clear up... Who knows...?  It's worth a try... :-)

<P>
So, what do you think?  Got any other ideas or suggestions?  If you do, drop
me a note and I'll be glad to include it in the next column.  Who knows,
maybe we'll have to write a mini-HOWTO on X Window wallpapering... :-)

<P>
See ya!

<P>
John

<!-- END ARTICLE ================================================ -->

<P><HR><P>

<!-- ARTICLE ================================================ -->
<H2><A NAME="syslog"><IMG SRC="../gx/fisk/desklamp.gif" WIDTH=79 HEIGHT=99
ALIGN=BOTTOM>System Logging Ideas...</A></H2>

<P>
Several months ago, I had someone run a Satan attack on my home Linux system
(a standalone PC connected via dialup PPP to the INTERNET) shortly after I'd
gotten a dialup connection.  The idiot got no information as I had sendmail
configured for remote mail queuing.  Without going into all the details,
suffice it to say that after getting pretty angry about this and making several
phone calls and sending email demands of explanations, the perpetrator remains
anonymous.

<P>
Now, there are several things that I know next to nothing about, and
UN*X/Linux security is one of them.  For my standalone system, I closed a
couple holes by simply no longer loading up either inetd or sendmail at system
boot.  I mention this not so much to talk about security as to segue into the
topic of system logging.

<P>
After this incident, I starting wondering how to keep track of &quot;what's
going on&quot; with my system in terms of processes running, login attempts,
debugging/error messages, and so forth.  One solution to this was provided by
a reader quite some time ago which involved dumping ALL system logging
information to an unused VT by adding a stanza such as the following to
/etc/syslog.conf:

<PRE>
*.*				/dev/tty9
</PRE>

I won't go into the details of this except to mention that this sends all
logging information to VT number 9.  

<P>
It occurred to me a bit later that I could also dump this information to a
file and then run <B>tail</B> on it to see a continuous printout of the
information.  Under X, this is accomplished easily by running an xterm or rxvt
and then running tail on the system logging file.  To do this, you could:

<OL>
	<LI>Set up syslogd to print ALL logging information to a file by adding
	the following to your /etc/syslog.conf:

	<PRE>
*.*				/dev/tty9
*.*				/var/adm/syslog
	</PRE>

	This gives you a file with logging information from all facilities and
	from all all levels.
	<P>

	<LI>Starting up an xterm or rxvt and getting a tail process running on the
	logging file.  You'll obviously need read permissions on the file in order
	to do this:

	<PRE>
rxvt -sb -sl 200 -e tail -n 50 -f /var/adm/syslog &
	</PRE>
	
	My own preference is to use rxvt since it enjoys a much smaller memory
	footprint than xterms typically do.  The <KBD>-sb</KBD> option gives me a
	very handsome scrollbar; <KBD>-sl 200</KBD> saves 200 lines of output at a
	time;  and the <KBD>-e</KBD> option instructs rxvt to execute everything
	following it on the command line.

	<P>
	After doing this you can decrease the window size substantially by using a
	small font.  Depending on how rxvt was compiled, you may be able to
	interactively change the font size using the <KBD>ALT-&lt;</KBD> key
	combination (or the <KBD>ALT-&gt;</KBD>) -- on rxvt version 2.18 this
	causes a smaller font to be used.  You can also specify which font to use
	when you invoke rxvt itself using the <KBD>-fn</KBD> option.  Using a six
	or seven point font gives you a small, but still readable window.
	<P>
</OL>

<P>
Now, if you start up a second rxvt and run <B>top</B> in it, you'll find that
this will give you a good idea of what's going on with your system.  On my
box, this looks like:

<P>
<IMG SRC="./misc/syslog.gif" WIDTH=520 HEIGHT=912 ALT="Rxvt with tail and
top">

<P>
Obviously, there are MUCH more elegant and sophisticated solutions than
running a couple rxvt's with top and tail.  However, this is VERY easy to
setup and, if you add a stanza to do this in your window manager configuration
file, or add this to a menu or buttonbar, then it's very convenient as well.

<P>
I've also tinkered around with writing a small tcl/tk script that some of you
might be interested in.  The <B>syslogtk</B> script is a VERY simple little
program that allows you to easily view any of the logging files under
/var/adm.  On startup, it adds a menu item for each readable, regular file
under /var/adm which will then allow you to view that file.  It also
automagically loads the /var/adm/syslog file.  I've added a couple buttons to
resize the text window, move to the head and end of the file, and to update
the logging (this was a bit of a kludge since I found that the <B>tail</B>
process would &quot;hang&quot; after pppd terminated.  Any ideas as to why
this would happen... anyone?)

<P>
I've used this for the past little bit and really like it -- especially since
it lets me quickly see the status of things such as mail and print jobs.
Here's a screen dump of it in its &quot;normal&quot; and &quot;maximized&quot;
states:

<P>
<IMG SRC="./misc/syslogtk.gif" WIDTH=605 HEIGHT=220 ALT="syslogtk image">
<P>
The <B>syslogtk</B> program minimized.

<P>
<IMG SRC="./misc/syslogtk_max.gif" WIDTH=605 HEIGHT=500 ALT="syslogtk (max) image">
<P>
The <B>syslogtk</B> program maximized.

<P>
I'm sorry that I don't have a lot of time to discuss this simple utility more.
If you're interested in it, the sources are available here.  You can save the
following link to file OR simply load it up in your browser and save it as a
text file:

<H3><A HREF="./misc/syslogtk">syslogtk tcl source</A></H3>

<P>
As usual, this comes with ABSOLUTELY NO WARRANTEE:  if anything breaks, you
get to keep both pieces... :-)

<P>
I'm hoping, when I have a bit more time, to write up a simple guide to setting
up and using system logging with the excellent <B>sysklogd</B> package.  For
the time being, you're on your own.  BTW, I wrote syslogtk under tcl/tk
versions 7.6/4.2 -- there's nothing terribly fancy in them so it'll likely
work under older and newer versions as well.  Have a look at the beginning of
the script file for items that you might want to customize, especially the
file that gets loaded when the program starts.  The code isn't terribly robust
at the moment, so if it can't find something, it'll likely just whine and do
nothing...

<P>
Well, that should about do it!

<P>
Hope you have fun.  If you have any ideas or suggestions, drop me a note OR,
better yet, drop the LG editor (Marjorie Richardson at SSC) a letter or
article!

<P>
Cheers,

<P>
John

<!-- END ARTICLE ================================================ -->

<P><HR><P>

<!-- ARTICLE ================================================ -->
<H2><A NAME="closing"><IMG SRC="../gx/fisk/desklamp.gif" WIDTH=79 HEIGHT=99
ALIGN=BOTTOM>Closing Up The Shop</A></H2>

<P>
Well, again, I'm sorry that the articles have been a bit more rushed than I'd
hoped this month.  I just got back from visiting Bill and Sandy Emmett -- my
wife's brother and his wife and their kids -- over Easter Weekend.  We had a
great time and even got to do a bit of Linux'ing!  I recently bought some old
computer parts &quot;As Is&quot; from the church my wife and I attend and, after a bit
of card swapping and cable twiddling, I managed to get a working 486DX/4 100
box working.  I also found that it came with an Artisoft AE/2 NIC.

<P>
Hmmm... Serious Fun on the Horizon, Good Buddy...

<P>
My brother-in-law outfitted me with an old WD-8003 card he had lying around
and we were able to get some basic networking set up under Linux and Win95.
So, I'm going to be learning a bit of networking!  YeeeeHaaaa!!

<P>
That is, if I ever manage to get my schoolwork done so that I can pass Calc
III and Software Engineering... :-(

<P>
We'll have to see.

<P>
The other bit of news is that I'm planning on heading out to the 'ol <B>1997
Linux Expo</B> at NCSU again this year!  

<P>
Time for a road trip!! :-)

<P>
I'm getting seriously excited about this as the speaker roster looks like a
&quot;Heavy-Weight Who's Who's in the Linux Community&quot; round up.  The
conference talks all look interesting and, if this is anything like last
year's Expo, it should just be a WHOLE LOTTA FUN.  If any of you still haven't
heard about this and you're within any kind of driving, flying, running,
hitchhiking, or crawling distance from North Carolina State Univ., then by all
means...

<P>
GO!!

<P>
There's all kinds of information available at the <A HREF="http://www.linuxexpo.org">
Linux Expo</A> site.  I know that they've put in a HUGE amount of
work on this together with the folks at <A HREF="http://www.redhat.com">RedHat
Software, Inc.</A>.  Drop by the page and get the low down on speakers, 
exhibitors, events, conference talks, and so forth.

<P>
Several of us from 'ol Middle Tenn State Univ. are planning on taking a road
trip and making a weekend of this.  We'll be walking around with our pocket
protectors and name badges like the rest of you... if you happen to see:

<UL>
	<LI>Brad Curtis
	<LI>Steven Edwards (aka &quot;Maverick&quot;)
	<LI>John Hoover
	<LI>or, Your's Truly...
</UL>

<P>
Walk right up, introduce yourself, and shake a hand!  We'd love to chat
with you.  If I get the chance, I'll bring along the 'ol Canon and try
to get some shots of the going's on.  If I can get my hands on a scanner, I
might even put a couple of these up in the next column (with the permission of
the Expo folks, of course).

<P>
Anyway, hope to see you all there!!

<P>
Take care, Happy Linux'ing, and Best Wishes,

<P>
John M. Fisk<BR>
Nashville, TN<BR>
Sunday, March 30, 1997

<!-- END ARTICLE ================================================ -->

<P><HR><P>

<IMG SRC="../gx/fisk/mailme.gif" ALIGN=MIDDLE WIDTH=38 HEIGHT=30> If you'd like, 
drop me a note at: 
<ADDRESS> John M. Fisk 
<A HREF="mailto:fiskjm@ctrvax.vanderbilt.edu">
&lt;fiskjm@ctrvax.vanderbilt.edu&gt;</A>
</ADDRESS>

<P>
Last Modified: $Date: 1997/09/14 15:01:43 $
</B>
    
<!--===================================================================-->
<P><HR><P>
<center><H4>Previous "Weekend Mechanic" Columns</H4></center>
<P>
<A HREF="../issue11/wkndmech.html">Weekend Mechanic #1, November 1996</A><br>
<A HREF="../issue12/wkndmech.html">Weekend Mechanic #2, December 1996</A><br>
<A HREF="../issue14/wkndmech.html">Weekend Mechanic #3, February 1997</A>
<P><HR><P>
<center><H5>Copyright &copy; 1997, John M. Fisk <BR> 
Published in Issue 16 of the Linux Gazette, April 1997</H5></center>

<!--===================================================================-->
<P> <hr> <P> 
<A HREF="./lg_toc16.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif" 
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../lg_frontpage.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="./uniforum.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./lg_backpage16.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P> 
<!--startcut ==========================================================-->
</BODY>
</HTML>
<!--endcut ============================================================-->