File: issue13.txt

package info (click to toggle)
lg-issue13 3-2
  • links: PTS
  • area: main
  • in suites: potato
  • size: 1,056 kB
  • ctags: 114
  • sloc: makefile: 36; sh: 4
file content (5818 lines) | stat: -rw-r--r-- 233,878 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
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818

Linux Gazette... making Linux just a little more fun!

      Copyright © 1996-97 Specialized Systems Consultants, Inc.
      linux@ssc.com
      
   
   
   
     _________________________________________________________________
   
   
   
Welcome to Linux Gazette! (tm)

   
   
   Linux Gazette, a member of the Linux Documentation Project, is an
   on-line WWW publication that is dedicated to two simple ideas:
     * Making Linux just a little more fun
     * Sharing ideas and discoveries
       
   
   
   The basic idea behind these two concepts is that Linux is one cool OS,
   whose price for admission is a willingness to read, learn, tinker
   (aka, hack!), and then share your experiences. The Gazette is a
   compilation of basic tips, tricks, suggestions, ideas and short
   articles about Linux designed to make using Linux fun and easy. LG
   began as a personal project of John M. Fisk, and grew to include
   contributions freely provided by a growing number of authors. Linux
   Journal is now publishing the Gazette using material contributed by
   outside authors (note to potential authors). Without these authors
   there would not be a Gazette, and I thank them all. Drop a note to the
   author of anything that you find helpful or instructive--the author's
   e-mail address is included for this very purpose.
   
   Linux Gazette is a non-commercial publication and will remain that
   way. A tar, gzip file containing all issues of Linux Gazette and one
   containing the current issue can be found at ftp://ftp.ssc.com/pub/lg/
   
   
   Thanks to Matt Welsh, coordinator of the Linux Documentation Project,
   for graciously bringing the Linux Gazette under the auspices of the
   LDP. The material included in these documents is covered by a
   designedly liberal copyright. For information regarding copying and
   distribution of this material read the Copying License.
   
   A new table of contents will appear with each issue that will allow
   you to easily find articles of interest. A search engine is also
   provided to allow you to search all issues for items relating to a
   particular subject.
   
   Have fun!
   
   
     _________________________________________________________________
   
   
   
     * Table of Contents Issue #13
     * Table of Contents Issue #12
     * Table of Contents Issue #11
     * Table of Contents Issue #10
     * Table of Contents Issue #9
     * Table of Contents Issues #1-#8
     * Index of All Issues
       
   
     _________________________________________________________________
   
   Search In: [Linux Gazette (TM).......]
   Search For: ______________________________ ______
   
   
   
   
     _________________________________________________________________
   
   
   
Linux Gazette WWW & FTP Mirror Sites

   
   
    For those readers who are accessing Linux Gazette from outside the
   U.S. or are having problems with slow connections at a particular
   site, mirror sites are available worldwide. Thanks to all of the
   people who have kindly offered the use of their WWW and FTP sites in
   order to make this possible!
   
   
     _________________________________________________________________
   
   
   
   Linux Journal's latest -->
   
  HOT LINUX NEWS! 
  
   
     _________________________________________________________________
   
   
   
   -->
   
                             LINUX INFORMATION 
                                       
   Two SSC links that you might find useful. The first is to Linux
   Journal 's "Hot Linux News" page, and the second is to SSC's Linux
   Resources page.
   
   
     _________________________________________________________________
   
   
   
  LINUX GAZETTE IS PUBLISHED BY:
  
SSC - Publishers of Linux Journal (tm)

   
   
   
     _________________________________________________________________
   
   
   
   Got any great ideas for improvements! Send your comments, criticisms,
   suggestions and ideas.
   
   Linux Gazette, http://www.ssc.com/lg/
   This page written and maintained by the Editor of Linux Gazette,
   gazette@ssc.com
   
   
     _________________________________________________________________
   
   
   
   
   
   
     _________________________________________________________________
   
   
   
                                 LINUX GAZETTE
                                       
      Copyright © 1997 Specialized Systems Consultants, Inc.
      For information regarding copying and distribution of this material see
      the Copying License.
      
   
   
   
     _________________________________________________________________
   
   
   
                          TABLE OF CONTENTS ISSUE #13
                                       
   
   
   
     _________________________________________________________________
   
   
   
     * The Front Page
     * The MailBag
          + Help Wanted -- Article Ideas
          + General Mail
     * More 2 Cent Tips
          + Another 2cent Tip for LG
          + Console Trick Follow-up
          + GIF Animations
          + How to close and reopen a new /var/adm/messages file
          + How to truncate /var/adm/messages
          + Info-ZIP encryption code
          + Kernel Compile Woes
          + Letter 1 to LJ Editor re Titlebar
          + Letter 2 to LJ Editor re Titlebar
          + PPP redialer script--A Quick Hack 
          + TABLE tags in HTML
          + Text File undelete
          + Truncating /var/adm/messages
          + 2c Host Trick
          + Use of TCSH's :e and :r Extensions
          + Various notes on 2c tips, Gazette 12
          + Viewing HOWTO Documents
          + Xaw-XPM .Xresources troubleshooting tip
          + Xterm Titlebar
     * News Bytes
          + News in General
          + Software Announcements
     * The Answer Guy, by James T. Dennis
          + Dialup Problem
          + File Referencing
          + Combining Modems for More Speed
          + WWW Server
     * Comdex '96, by Belinda Frazier & Kevin Pierce
     * Filtering Advertisements from Web Pages using IPFWADM, by David
       Rudder
     * Floppy Disk Tips, by Bill Duncan
     * Graphics Muse, by Michael J. Hammel
          + History of Portable Network Graphics Format, by Greg Roelofs
     * Indexing Texts with Smart, by Hans Paijmans
     * Linux Text Editors and A New One, by Oleg L. Machulskiy
     * New Release Reviews, by Larry Ayers
          + Two New X Windows Mail Clients
          + Miscellaneous Notes
     * Petition to Cancel Filed Against Linux Trademark
     * SLEW: Space Low Early Warning, by James T. Dennis
     * The Back Page
          + About This Month's Authors
          + Not Linux
            
   
   
   Weekend Mechanic
   will return next month.
   
   
     _________________________________________________________________
   
   
   
   TWDT 1 (text)
   TWDT 2 (HTML)
   are files containing the entire issue: one in text format, one in
   HTML. They are provided strictly as a way to save the contents as one
   file for later printing in the format of your choice; there is no
   guarantee of working links in the HTML version.
   
   
     _________________________________________________________________
   
   
   
   Got any great ideas for improvements! Send your comments, criticisms,
   suggestions and ideas.
   
   
     _________________________________________________________________
   
   
   
   This page written and maintained by the Editor of Linux Gazette,
   
   
     _________________________________________________________________
   
   
   
    "Linux Gazette...making Linux just a little more fun!"
    
   
     _________________________________________________________________
   
The Mailbag!

   Write the Gazette at gazette@ssc.com
   
  CONTENTS:
     * Help Wanted -- Article Ideas
     * General Mail
       
   
   
   
   
   
     _________________________________________________________________
   
   
   
  HELP WANTED -- ARTICLE IDEAS
  
   
   
   
     _________________________________________________________________
   
   
   
   Date: Sun, 17 Nov 1996 18:49:56 -0600
   Subject: a reply type thing...
   From: Glenn E. Satan, insipid@onramp.net

> Subject: Xwindows depth
> From: James Amendolagine uq274@freenet.victoria.bc.ca
>
> I have recently been messing with my x-server, and have managed
> to get a depth of 16, ie 2^16 colors. This works
> really nice with Netscape, but some programs (doom, abuse, and
> other games) wont work with this many colors. Do
> you know of a fix? I have tried to get X to support multiple
> depths--to no avail. The man-page suggests that some
> video cards support multiple depths and some don't. How do I know
> if mine does.
>
> I would really like to see an article on this subject,

   I would like to say, yes, please someone help.... thought maybe a
   reply would motivate someone a little more to write a article on this.
   
     (All right a second request for help in this area. Anybody out there
     with suggestions and/or wanting to write an article? --Editor) 
     
   
   
   
     _________________________________________________________________
   
   
   
   Date: Sun, 01 Dec 1996 00:20:12 +1000
   Subject: Quilting and geometry 
   From: Chris Hennessy, chenness@enterprise.powerup.com.au 
   
   I liked your comment about quilting being an interest. We tend to
   forget that people have interests outside of computers in general (and
   linux in particular).
   
   Just like to say thanks for what is obviously an enormous effort you
   are putting into the gazette. I'm new(ish) to linux and I find it a
   great resource, not to say entertaining.
   
   Has anyone suggested an article on the use of Xresources? As I said
   I'm fairly new and find this a bit confusing... maybe someone would be
   interested in an example or three?
   
   Oh and with the quilting and geometry ... better make sure its not the
   80x25+1-1 variety.
   
     (Thanks, LG is a lot of work, as well as a lot of fun. And yes, I do
     have a life outside of Linux. Anyone interested in writing about
     Xresources? Thanks for writing. It's always nice to know we are
     attracting new readers. --Editor) 
     
   
   
   
     _________________________________________________________________
   
   
   
   Date: Wed, 4 Dec 1996 13:33:26 +0200 (EET)
   Subject: security issue! 
   From: Arto Repola, arepola@raahenet.ratol.fi 
   
   
   Hi there!
   
   I was wondering that could you write in some Gazette something about
   Linux security...how to improve it, how to setup firewall,shadow
   password systems etc?
   
   I'm considering to build up my own linux-server and i really would
   like to make it as secure as possible!
   
   Nothing more this time!
   
   http://raahenet.ratol.fi/~arepola
   
     (And another great idea for an article. Any takers? --Editor) 
     
   
   
   
     _________________________________________________________________
   
   
   
   Date: Wed, 04 Dec 1996 08:08:06 -0700
   Subject: Reader Response 
   From: James Cannon, cannonj@jads.kirtland.af.mil 
   Organization: JADS JTF
   
   
   Great Resource,
   
   I really like the resource Linux offers new users. I have already
   applied a few tricks to my PC. I wish some one would explain how to
   use the GNU C/C++ compiler with Linux. It is a tool resting in my hard
   drive. With commercial compilers, there is a programming environment
   that links libraries automatically. Are there any tricks to command
   line C/C++ programming with Linux?? Stay online!
   
   James Cannon
   
     (Thanks for the tip. Online is the best place to be. Anyone out
     there got some C++ help for this guy? --Editor) 
     
   
   
   
     _________________________________________________________________
   
   
   
   Date: Mon, 9 Dec 1996 23:27:21 +0000 (GMT)
   Subject: Linux InfraRed Support 
   From: Hong Kim, kimh@domp04.adm.intelsat.int 
   
   
   Hi,
   
   I have been so far unsuccessful in finding information for InfraRed
   support on Linux.
   
   I am particularly interested in hooking up Caldera Linux on a Thinkpad
   560 using Extended Systems JetEye Net Plus. Caldera on Thinkpad I can
   handle but the JetEye allows connection to ethernet or token ring
   networks via IR.
   
   My searches of Linux Resources page come up negative. I have posted to
   USENET and also emailed any web master that has any mention of
   ThinkPad or IR on their pages. Still no answer.
   
   Can you help me to find information. If I am successful, I would be
   willing to write an article about it.
   
   Hong
   
     (I have sent your question on to Linux Journal's Tech Support
     Column. Answers from this source can be slow as author contacts
     companys involved. Sounds like you have covered all the bases in
     your search -- can anyone out there help him? If you write the
     article, I'll be happy to post it in the LG so next person who
     needs this information will have a quicker answer. --Editor) 
     
   
   
   
     _________________________________________________________________
   
   
   
   Date: Thu, 5 Dec 96 13:00:01 MET
   Subject: Linux networking problem ...
   From: Tauche%fbm%mfh@mfhdvzis.mfh-iserlohn.de 
   
   
   Hi there,
   
   First I have to apologize for writing to this address with my problem,
   but I don't no where to search for an answer and university's network
   is so damned slow that surfing through the net searching for an answer
   makes no fun. Another reason is that I've got no access to Usenet...
   means can't post in comp.os.linux.networking... 8-((
   
   I tried to find a news server near to Germany which allows posting
   without using that damned -> identd Here's the problem:
   I want to setup Linux in our University's LAN but ran into problems,
   because the LAN is VINES-IP based so that normal TCP/IP packet drivers
   won't work. The admin says I do need a driver which can tunnel the
   normal Linux TCP/IP packets into those VINES-IP packets, so that they
   can be send over the LAN to that box which has Internet connection....
   
   
   Maybe you know if such thing is available and/or where I can get it.
   Or maybe you can give some Email-addresses for asking people which
   real knowledge 'bout Linux (maybe even that of Linus T. himself) and
   it's drivers.
   
   Hope you can help me 8-))
   
   Thanks in advantage
   Stefan 8-))
   
     (I've sent your problem on to Linux Journal's Technical Support
     column and will post it in Linux Gazette's Mailbag next month.
     Neither one will give you a fast answer.
     
     I did a search of LG, LJ and SSC's Linux Resources using VINES as
     the keyword. I found only one entry from an author's biography.
     It's old -- March 1995 -- and the guy was in the marine corp then
     so may or may not be a good address. Anyway here's what it said:
     "Jon Frievald ... manages Wide Area Network running Banyan VINES.
     ... e-mail to jaf@jaflrn.liii.com"
     
     Anyway you might give him a try for help ideas.
     
     For faster access to LG have you tried any of LG's mirror sites in
     Germany:
   
     * http://www.cs.uni-dusseldorf.de/~stein/lg 
     * http://vina12.va.htw-dresden.de/lg 
     * http://www.fokus.gmd.de/linux/lg 
       
     
     
     Please note that mirror sites wont help search time -- all
     searching is done on SSC site. --Editor) 
     
   
   
   
   
   
     _________________________________________________________________
   
   
   
  GENERAL MAIL
  
   
   
   
     _________________________________________________________________
   
   
   
   Date: Sat, 30 Nov 1996 20:35:17 -0600 (CST)
   Subject: Re: Slang Applications for Linux 
   From: Duncan Hill, dhill@sunbeach.net
   To: Larry Ayers, layers@vax2.rain.gen.mo.us 
   
   
   On Sat, 30 Nov 1996, Duncan Hill wrote:
   
   Greetings. I was reading your article in the Linux Gazette, and
   thought you might be interested to know that Lynx also has its own web
   site now at:
   http://lynx.browser.org/ 
   It's up to version 2.6 now, and is rather nice, specially with slang
   included :)
   
   Duncan Hill, Student of the Barbados Community College
   
     (Thanks for the tip! I really appreciate responses from readers;
     confirms that there are really readers out there! --Larry Ayers) 
     
   
   
   
     _________________________________________________________________
   
   
   
   Date: Sat, 30 Nov 96 16:42:58 0200
   Subject: Linux Gazette 
   From: Paul Beard, paulb@id.co.zw 
   
   
   Hello from Zimbabwe.
   
   Very nice production. Keep up the good work.
   
   Regards,
   Paul Beard.
   
     (Thanks. --Editor) 
     
   
   
   
     _________________________________________________________________
   
   
   
   Date: Thu, 28 Nov 1996 23:54:38 +0000
   Subject: Thanks! 
   From: Russ Spooner, russ1@rmplc.co.uk 
   Organization: Kontagx
   
   
   Hi,
   I have been an avid reader of Linux Gazette since its inception! I
   would just like to say that it has helped me a lot and that I am
   really glad that it has become more regular :-)
   
   The Image you have developed now has come a long way and it is now one
   of the best organized sites I visit!
   
   Also I would like to thank you for the link to my site :-) it was a
   real surprise to "see myself up in lights" :)
   
   Best regards!
   Russ Spooner, http://www.pssltd.co.uk/kontagx
   
   
     _________________________________________________________________
   
   
   
   Date: Thu, 28 Nov 1996 12:49:12 -0500
   Subject: LG Width 
   From: frank haynes, frank@vatmom.com 
   Organization: The Vatmom Organization
   
   
   Re: LG page width complaint, LG looks great here, and I don't think my
   window is particularly large. Keep up the fine work.
   
   --Frank, http://www.mindspring.com/~fmh
   
     (Good to hear. --Editor) 
     
   
   
   
     _________________________________________________________________
   
   
   
   Date: Fri, 29 Nov 1996 10:30:32 +0000
   Subject: LG #12 
   From: Adam D. Moss. adam@uunet.pipex.com
   
   
   Nice job on the Gazette, as usual. :)
   
   Adam D. Moss / Consulting
   
     ( :-) --Editor) 
     
   
   
   
     _________________________________________________________________
   
   
   
   Date: Tue, 3 Dec 1996 12:55:18 -0800 (PST)
   Subject: Re: images in tcsh article 
   From: Scott Call, scall@ccnet.com
   
   
   Most of the images in the TCSH article in issue 12 are broken
   
   -Scott
   
     (You must be looking at one of the mirror sites. I inadvertently
     left those images out of the issue12 tar file that I made for the
     mirror sites. When I discovered it yesterday, I made an update file
     for the mirrors. Unfortunately, I have found that not all the
     mirrors are willing to update LG more than once a month, so my
     mistakes remain until the next month. Sorry for the inconvenience
     and thanks for writing. --Editor) 
     
   
   
   
     _________________________________________________________________
   
   
   
   Date: Fri, 06 Dec 1996 21:21:00 +0600
   Subject: 12? why can you make so bad distributive????????????? 
   From: Sergey A. Panskih, serg@cnti.chel.su
   
   
   i ftpgeted lg12 and untar.gz it as made with lg11. lg11 was read as
   is: with graphics and so, but lg12... all graphics was loosed. i've
   verified hrefs and found out that href was written with principial
   errors : i must copy all it to /images in my httpd server!!!!
   
   this a pre-alpha version!!!
   
   i can't do so unfixed products!!!
   
   i'm sorry, but you forgotten how make a http-ready distrbutions... :)
   
   Sergey Panskih
   
   P.S. email me if i'm not true.
   
     (I'm having a little trouble with your English and don't quite
     understand what "all graphics was loosed" means. You shouldn't have
     to copy anything anywhere: what are you copying to /images?
     
     There is one problem I had that may apply to you. Are you throwing
     away previous issues and only getting the current one? If so, I
     apologize most humbly. I was not aware until this month that people
     were doing this and when I made the tar file I included only new
     files and those that had been changed since the last month. To
     correct this problem I put a new tar file on the ftp site called
     standard_gifs.html. It's not that I've forgotten how to make
     http-ready distributions, it's that I'm just learning all the
     complexities. In the future I will make the tar file to include all
     files needed for the current single issue, whether they were
     changed or not.
     
     I am very sorry to have caused you such problems and distress.
     --Editor) 
     
   
   
   
     _________________________________________________________________
   
   
   
   Date: Mon, 02 Dec 96 18:13:48
   Subject: spiral trashes letters 
   From: jep@jephill.com 
   
   
   It's clever and pretty, but the spiral notebook graphic still trashes
   the left edge of letters printed in the issue 12 Mailbag.
   
   Problem occurs using OS/2's Web Explorer version 1.2 (comes with OS/2
   Warp 4.0). Problem does NOT occur using Netscape 2.02 for OS/2 beta 2
   (the latest beta for OS/2).
   
   Problem occurs even while accessing www.ssc.com/lg
   
   Jep Hill
   
     (Problem will always occur with versions of either Microsoft
     Explorer or Netscape before 2.0. It is caused by a bug in TABLES
     that was fixed in the 2.0 versions. I don't have access to OS/2's
     Web Explorer, so I can only guess that it's the same problem. I'd
     recommend always using the latest version of your browser.
     --Editor) 
     
   
   
   
     _________________________________________________________________
   
   
   
   Date Mon, 9 Dec 1996 10:14:04 -0800 PST
   Subject: Background 
   From: rayvd@shocking.com 
   
   
   I run at a resolution of 1152x846 (a bit odd I suppose) and although
   the Gazette pages look very nice indeed, it is a bit hard to read when
   I have my Netscape window maximized. The bindings part of the
   background seems to be optimized for a width of 1024 and thus tiles
   over again on the right side of the page. This makes reading a bit
   difficult as some of the text now overlaps the bindings on the far
   right.
   
   I'm not sure if that's a great description of the problem, but I can
   easily make you a screenshot if you want to see what I mean.
   
   Anyhow, this is only a minor annoyance--certainly one I'm willing to
   live with in order to read your great 'zine. :)
   
   Ray Van Dolson -=-=- Bludgeon Creations (Web Design) - DALnet
   #Bludgeon -- http://www.shocking.com/~rayvd/
   
     (Screen shot wont be necessary. When the web master first put the
     spiral out there, the same thing happened to me -- I use a large
     window too, but not as large as yours. He was able to expand it to
     fix it at that time. I notified him of your problem, but not sure
     if he can expand it even more or not. We'll see. Glad it's a
     problem you can live with. :-) --Editor) 
     
   
   
   
     _________________________________________________________________
   
   
   
   Date: Sat, 7 Dec 1996 22:16:55 +0100 (MET)
   Subject: Problem with Printing.
   From: fm@M1.whitespace.de
   
   
   Hi,
   
   This is just to let you people know, that there might be a slight
   problem. I want to point out and make it perfectly clear that this is
   NOT a complaint. I feel perfectly satisfied with the Linux Gazette as
   it is.
   
   However sometimes I prefer to have a printed copy to take with me.
   Therefore I used to print the LG. from Netscape. I'm using the new 3.1
   version now. With the last two issues I have difficulties doing so.
   All the pages with this new nice look don't print too well. The
   graphics show up at all the wrong places and only one page is printed
   on the paper. The rest is swallowed. Did you ever try to print it?
   
   I had to use an ancient copy of Mosaic, that doesn't know anything
   about tables, to print these pages. They don't look too good this way
   too, and never did. I know this old Mosaic is buggy. At least it
   doesn't swallow half of the stuff. This could as well be a bug in
   Netscape. I know next to nothing about html.
   
   Anyway, have fun.
   Regards Friedhelm
   
     (No, I don't try to print it, but will look into it. Are you
     printing out "TWDT" from the TOC or trying to do it
     page by page? It is out there in multi-file format and so if you
     print from say the Front Page, the front page is all you'll get.
     "TWDT" is one single file containing the whole
     issue, and the spiral and table stuff are removed so it should
     print out for you okay. Let me know if this is already what you are
     printing, so I'll know where to look for the problem. --Editor) 
     
   
   
   
     _________________________________________________________________
   
   
   
   Date: Wed, 18 Dec 1996 04:02:37 +0200
   Subject: Greetings 
   From: Trucza Csaba, ctrucza@cemc.soroscj.roi
   To: fiskjm@ctrvax.Vanderbilt.Edu
   
   
   Well, Hi there!
   
   Amazing. I've just read the Linux Gazette from the first issue to this
   one, the 12th (actually I read just the first 7 issues through,
   because the others were not downloaded correctly).
   
   It's 4 in the morning and I'm enthusiastic. I knew Linux was good, I'm
   using it for a year (this is because of the lack of my english
   grammar, I mean the previous sentence, well...), so I knew it was
   good, but I didn't expect to see something so nice like this Gazette.
   
   It's good to see that there are a WHOLE LOT of people with huge will
   to share.
   
   I think we owe You a lot of thanks for starting it.
   
   Merry Christmas, a Happy New Year, and keep it up!
   
   Trucza Csaba, Romania
   
     (Thanks, I will. -- Editor) 
     
   
   
   
     _________________________________________________________________
   
   
   
   Date: Mon, 23 Dec 1996 12:16:30 -0800 (PST)
   Subject: lg issue 12 via ftp?
   From: schwarz@monet.m.isar.de (Christian Schwarz)
   
   I just saw that issue #12 is out and accessible via WWW, but I can't
   find the file on your ftp server nor on any mirrors.
   
     (Sorry for the problems. We changed web servers and I went on
     vacation. Somehow in the web server change, some of the December
     files got left behind. I didn't realize until today that this had
     happened. Sorry for the inconvenience. --Editor) 
     
   
   
   
     _________________________________________________________________
   
   
   
   Date: Fri, 20 Dec 1996 00:31:45 -0500
   Subject: Great IDEA 
   From: Pedro A Cruz, pcruz@panixc.com
   
   
   Hi:
   
   I visited your site recently and was astounded by the wealth of
   information there. I have lots of bandwidth to read your site. I
   noticed that you have issues for download. I Think it will be a great
   service to the LINUX community if you consider publishing a CDROM
   (maybe from walnut creek cdrom) as a subscription item.
   
   pedro
   
     (Yes, that is a good idea. I'll talk to my publisher about it.
     --Editor) 
     
   
   
   
     _________________________________________________________________
   
   
   
   Date: Sun, 22 Dec 1996 20:24:51 -0600
   Subject: Linux as router 
   From: Robert Binz, rbinz@swconnect.net
   
   
   I have found myself trying to learn how to use Linux as a usenet
   server to provide news feeds to people, and to use Linux as a IRC
   server. Information on these topics are hard to come buy. If you have
   any sources on these subjects that you can point me to I would be most
   appreciative.
   
   But any how, I have found an article in SysAdmin (Jan 96 (5.1)) that
   is titled Using Linux as a Router, by johnathon Feldman. Is it
   possible to reprint this article or get the author to write a new one
   for you?
   
   TIA
   Robert Binz
   
     (I'll look into it. In the meantime, I've forwarded your letter to a
     guy I think may be able to help you. --Editor) 
     
   
   
   
     _________________________________________________________________
   
   
   
   Date: Fri, 13 Dec 1996 03:57:09 -0500 (EST)
   Subject: Correction for LG #12 
   From: Joe Hohertz, jhohertz@golden.net
   Organization: Golden Triangle On-Line
   
   Noticed the folowing in the News section.
   
   A couple of new Linux Resources sites:
   
     (Seems I had Joe's address wrong. Sorry. --Editor) 
     
   
   
   
     _________________________________________________________________
   
   
   
   Date: Tue, 17 Dec 1996 01:19:43 -0500
   Subject: One-shot downloads 
   From: David M. Razler, david.razler@postoffice.worldnet.att.net
   
   Folks:
   
   While I realize that the economies of the LINUX biz require that there
   be some method of making money even on the distribution of free and
   "free" software, I have a request for them of us who 1) are currently
   scraping for the cash for our Internet accounts and 2) would like to
   try LINUX.
   
   How about a one-shot download? I mean, oh, everything needed to
   establish a LINUX system in one ZIP'ed (or tar/gz'd, though zip is a
   more compatible format) file, one for each distribution?
   
   I'm currently looking to establish LINUX on my "spare" PC, a 386DX-16
   w/4 meg and a scavenged 2500MB IDE drive, etc. It will be relatively
   slow, limited, lacks a CD-rom drive, but it's free, since the machine
   is currently serving as a paperweight.
   
   I could go out and buy a used CD-rom for the beast, or run a bastard
   connection from my primary, indispensable work machine and buy the
   CDs. But I am currently disabled and spending for these things has to
   be weighed against other expenses (admittedly, I am certainly lucky
   and not destitute, it would just be better)
   
   I could get a web robot and download umpteen little files, puzzle them
   out and put them together, though the load on your server would be
   higher.
   
   Or, under my proposed system, I could download Distribution Code,
   Documents, and Major accessories in one group, then go back for the
   individual bits and pieces I need to build my system.
   
   Again, I realize that running your site costs money, and that people
   make money, admirably little money, distributing LINUX on CDs, with
   the big bucks (grin) of LINUX coming in non-free software, support and
   book sales.
   
   But if the system is to spread, providing a series of one-shot
   downloads, possibly available only to individuals (I believe one could
   copyright the *package* and require someone downloading to agree to
   use it only on a single non-commercial system and not to redistribute,
   but I am not an intellectual properties lawyer), to make life easier
   for them of us who need to learn a UNIX-style system and build one on
   the cheap.
   
   dmr
   
   
     _________________________________________________________________
   
   
   
   [ TABLE OF CONTENTS ] [ FRONT PAGE ] Next 
   
      This page written and maintained by the Editor of Linux Gazette,
      gazette@ssc.com
      Copyright © 1997 Specialized Systems Consultants, Inc.
      
   
   
    "Linux Gazette...making Linux just a little more fun! "
    
   
   
   
     _________________________________________________________________
   
   
   
                                MORE 2 TIPS!
                                       
   
   Send Linux Tips and Tricks to gazette@ssc.com 
   
   
     _________________________________________________________________
   
   
   
  CONTENTS:
     * Another 2cent Tip for LG
     * Console Trick Follow-up
     * GIF Animations
     * How to close and reopen a new /var/adm/messages file
     * How to truncate /var/adm/messages
     * Info-ZIP encryption code
     * Kernel Compile Woes
     * Letter 1 to LJ Editor re Titlebar
     * Letter 2 to LJ Editor re Titlebar
     * PPP redialer script--A Quick Hack 
     * TABLE tags in HTML
     * Text File undelete
     * Truncating /var/adm/messages
     * 2c Host Trick
     * Use of TCSH's :e and :r Extensions
     * Various notes on 2c tips, Gazette 12
     * Viewing HOWTO Documents
     * Xaw-XPM .Xresources troubleshooting tip
     * Xterm Titlebar
       
   
   
   
     _________________________________________________________________
   
   
   
   
   
   
   
  ANOTHER 2CENT SCRIPT FOR LG
  
   Date: Wed, 11 Dec 1996 23:34:58 +0100
   From: Hans Zoebelein, zocki@goldfish.cube.net
   
   
   Hello LG people,
   
   here comes a short script which will check from time to time that
   there is enough free space available on anything which shows up in
   mount (disks, cdrom, floppy...)
   
   If space runs out, a message is printed every X seconds to the screen
   and 1 mail message per filled device is fired up.
   
   Enjoy!
   Hans

#!/bin/sh

#
# $Id: issue13.txt,v 1.1.1.1 1997/09/14 15:01:39 schwarz Exp $
#

#
# Since I got mysterious error messages during compile when
# tmp files filled up my disks, I wrote this to get a warning
# before disks are full.
#
# If this stuff saved your servers from exploding,
# send praising email to zocki@goldfish.cube.net.
# If your site burns down because of this, sorry but I
# warned you: no comps.
# If you really know how to handle sed, please forgive me :)
#

#
# Shoot and forget: Put 'check_hdspace &' in rc.local.
# Checks for free space on devices every $SLEEPTIME sec.
# You even might check your floppies or tape drives. :)
# If free space is below $MINFREE (kb), it will echo a warning
# and send one mail for each triggering device to $MAIL_TO_ME.
# If there is more free space than trigger limit again,
# mail action is also armed again.
#

# TODO: Different $MINFREE for each device.
# Free /*tmp dirs securely from old junk stuff if no more free space.


DEVICES='/dev/sda2 /dev/sda8 /dev/sda9'         # device; your put disks here
MINFREE=20480                                   # kb; below this do warning
SLEEPTIME=10                                    # sec; sleep between checks
MAIL_TO_ME='root@localhost'                     # fool; to whom mail warning


# ------- no changes needed below this line (hopefully :) -------

MINMB=0
ISFREE=0
MAILED=""
let MINMB=$MINFREE/1024         # yep, we are strict :)

while [ 1 ]; do
        DF="`/bin/df`"
        for DEVICE in $DEVICES ; do
                ISFREE=`echo $DF | sed s#.\*$DEVICE" "\*[0-9]\*" "\*[0-9]\*" "\
*## | sed s#" ".\*##`
                
                if [ $ISFREE -le $MINFREE ] ; then
                        let ISMB=$ISFREE/1024
                        echo  "WARNING: $DEVICE only $ISMB mb free." >&2
                        #echo "more stuff here" >&2
                        echo -e "\a\a\a\a"
                        
                        if [ -z  "`echo $MAILED | grep -w $DEVICE`" ] ; then
                                echo "WARNING: $DEVICE only $ISMB mb free.
(Trigger is set to $MINMB mb)" \
                                | mail -s "WARNING: $DEVICE only $ISMB mb free!
" $MAIL_TO_ME
                                MAILEDH="$MAILED $DEVICE"
                                MAILED=$MAILEDH
                                # put further action here like cleaning
                                # up */tmp dirs...
                        fi
                elif [ -n  "`echo $MAILED | grep -w $DEVICE`" ] ; then
                        # Remove mailed marker if enough disk space
                        # again. So we are ready for new mailing action.
                        MAILEDH="`echo $MAILED  | sed s#$DEVICE##`"
                        MAILED=$MAILEDH
                fi
        done
        sleep $SLEEPTIME

done

   
   
   
     _________________________________________________________________
   
   
   
   
   
   
   
  CONSOLE TRICK FOLLOW-UP
  
   Date: Wed, 27 Nov 1996 16:20:06 -0500 (EST)
   From: Elliot Lee, sopwith@cuc.edu 
   
   
   Just finished reading issue #12, nice work.
   
   A followup to the "Console Tricks" 2-cent tip:
   What I like to do is have a line in /etc/syslog.conf that says:

*.*                                                     /dev/tty10

   that sends all messages to VC 10, so I can know what's going on
   whether in X or text mode. Very useful IMHO.
   
   -- Elliot, http://www.redhat.com/
   
   
     _________________________________________________________________
   
   
   
   
   
   
   
  GIF ANIMATIONS
  
   Date: Thu, 28 Nov 1996 20:41:22 -0600 (CST)
   From: Greg Roelofs, newt@pobox.com 
   
   I too thought WhirlGIF (Graphics Muse, issue 12) was the greatest
   thing since sliced bread (well, aside from PNG) when I first
   discovered it, but for creating animations, it's considerably inferior
   to Andy Wardley's MultiGIF. The latter can specify tiny sprite images
   as parts of the animation, not just full images. For my PNG-balls
   animation (see http://quest.jpl.nasa.gov/PNG/), this resulted in well
   over a factor-of-two reduction in size (577k to 233k). For another
   animation with a small, horizontally oscillating (Cylon eyes) sprite,
   the savings was more than a factor of 20(!).
   
   MultiGIF is available as source code, of course. (And I had nothing to
   do with it, but I do find it darned handy.)
   
   Regards,
   Greg Roelofs, http://pobox.com/~newt/
   Newtware, Info-ZIP, PNG Group, U Chicago, Philips Research, ...
   
   
     _________________________________________________________________
   
   
   
   
   
   
   
  RE: HOW TO CLOSE AND REOPEN A NEW /VAR/ADM/MESSAGES FILE
  
   Date: Thu, 05 Dec 1996 01:09:27 -0800
   From: CyberTech, CyberTech@ns.cybertech.org
   
   
   Regarding the posting in issue #12 of your gazette, how to backup the
   current messages file & recreate, here is an alternative method...
   
   Place the lines at the end of this messages in a shell script
   (/root/cron/swaplogs in this example). Don't forget to make it +x!
   Execute it with 'sh scriptname', or by adding the following lines to
   your (root's) crontab:

# Swap logfiles every day at 1 am, local time
0 01 * * *       /root/cron/swaplogs

   The advantage to this method over renaming the logfile and creating a
   new one is that in this method, syslogd is not required to be
   restarted.

#!/bin/sh
cp /var/adm/messages /var/adm/messages.`date +%d-%m-%y_%T`
cat /dev/null >/var/adm/messages

cp /var/adm/syslog /var/adm/syslog.`date +%d-%m-%y_%T`
cat /dev/null >/var/adm/syslog

cp /var/adm/debug /var/adm/debug.`date +%d-%m-%y_%T`
cat /dev/null >/var/adm/debug

   
   
   
     _________________________________________________________________
   
   
   
   
   
   
   
  HOW TO TRUNCATE /VAR/ADM/MESSAGES
  
   Date: Mon, 02 Dec 1996 16:47:20 +0100
   From: Eje Gustafsson, gne@ffa.se 

>In answer to the question:
>
>            What is the proper way to close and reopen a new >/var/adm/message
s
>            file from a running system?
>
>       Step one: rename the file. Syslog will still be writing in it >after re
naming so you don't
>       lose messages. Step two: create a new one. After re-initializing >syslo
gd it will be used.
>just re-initialize.
>
>          1.mv /var/adm/messages /var/adm/messages.prev
>          2.touch /var/adm/messages
>          3.kill -1 pid-of-syslogd
>
>       This should work on a decent Unix(like) system, and I know Linux >is on
e of them.

   This is NOT an proper way of truncate /var/adm/messages.
   
   It is better to do:
    1. cp /var/adm/messages /var/adm/messages.prev
    2. >/var/adm/messages or cp /dev/null /var/adm/messages (both of them
       makes the file empty).
    3. No more.
       
   The problem is that when you remove the /var/adm/messages syslogd gets
   confused and unhappy and you have to give syslogd a HUPSIG but if you
   just sets the file length to zero without removing the file syslogd
   don't complain. And if you are really unlucky your system will go down
   because you didn't create /var/adm/messages quick enough or forgot it.
   
   
   Best of regards,
   Eje Gustafsson, System Administrator
   THE AERONAUTICAL RESEARCH INSTITUTE OF SWEDEN
   
   
   
     _________________________________________________________________
   
   
   
   
   
   
   
  INFO-ZIP ENCRYPTION CODE
  
   Date: Thu, 28 Nov 1996 20:58:39 -0600 (CST)
   From: Greg Roelofs, newt@pobox.com
   
   
   This is a relatively minor point, but Info-ZIP's Zip/UnZip encryption
   code is *not* DES as reported in Robert Savage's article (LG issue
   12). It's actually considerably weaker, so much so that Paul Kocher
   has pub- lished a known-plaintext attack (the existence of which is
   undoubtedly the reason PKWARE was granted an export license for the
   code). While the encryption is good enough to keep your mom and
   probably your boss from reading your files, those who desire *real*
   security should look to PGP (which is also based on Info-ZIP code, but
   only for compression).
   
   And while I'm at it, Linux users will be happy to learn that the
   upcoming releases of UnZip 5.3 and Zip 2.2 will be noticeably faster
   than the cur- rent publicly released code. In Zip's case this is due
   to a work-around for a gcc bug that prevented a key assembler routine
   from being used--Zip is now 30-40% faster on large files. In UnZip's
   case the improvement is due to a couple of things, one of which is
   simply better-optimized CRC code. UnZip 5.3 is about 10-20% faster
   than 5.2, I believe. The new ver- sions should be released in early
   January, if all goes well. And then... we start working on multi-part
   archives. :-)
   
   Greg Roelofs, http://pobox.com/~newt/
   Newtware, Info-ZIP, PNG Group, U Chicago, Philips Research, ...
   
   
     _________________________________________________________________
   
   
   
   
   
   
   
  KERNEL COMPILE WOES
  
   Date: Mon, 2 Dec 1996 21:35:29 +0400 (GMT-4)
   From: Duncan Hill, dhill@sunbeach.net
   
   
   Greetings. Having been through hell after a recompile of my kernel, I
   thought I'd pass this on.
   
   It all started with me compiling a kernel for JAVA binary support..who
   tell me do that. Somehow I think I got experimental code in..even
   worse :> Anyway, it resulted in a crash, and I couldn't recompile
   since then.
   
   Well, after several cries for help, and trying all sorts of stuff, I
   upgraded binutils to 2.7.0.3, and told the kernel to build elf support
   and in elf format, and hey presto. I'd been wrestling with the problem
   for well over a week, and every time, I'd get an error. Unfortunately,
   I had to take out sound support, so I'm going to see if it'll add back
   in.
   
   I have to say thank you to the folks on the linux-kernel mailing list
   at vger.rutgers.edu. I posted there once, and had back at least 5
   replies in an hour. (One came back in 10 minutes).
   
   As for the LG, it looks very nice seen thru Lynx 2-6 (no graphics to
   get messed up :>) I love the Weekend Mechanic, and the 2 cent tips
   mainly. Perhaps one day I'll contribute something,.
   
   Duncan Hill, Student of the Barbados Community College
   http://www.sunbeach.net/personal/dhill/dhill.htm
   http://www.sunbeach.net/personal/dhill/lynx/lynx-main.html
   
   
     _________________________________________________________________
   
   
   
   
   
   
   
  LETTER 1 TO THE LJ EDITOR RE TITLEBAR
  
   Date: Sat, 21 Dec 1996 15:18:01 -0600
   From: Roger Booth, Roger_Booth@crow.bmc.com
   To: linux@ssc.com The Jan97 Issue 33 of Linux Journal contained the
   "Linux Gazette Two Cent Tips". I was interested in the tip "X Term
   Titlebar Function". Although the text of the tip stated that the tip
   would work in ksh-based systems, I could not get it to work as shown.
   I think there are three problems. First, I think there are a few
   transcription errors in the script. Second, I believe the author is
   using embedded control characters and it was not obvious to me which
   character sequences are representations of control characters and
   which characters should be typed verbatim. Third, the author uses a
   command-line option to the echo command which is not available on all
   Unix platforms.
   
   I finally used the following script:

    if [ ${SHELL##/*/} = "ksh" ] ; then
        if [[ $TERM = x"term" ]] ; then
            HOSTNAME=`uname -n`
            label () { echo "\\033]2;$*\\007\\c"; }
            alias stripe='label $LOGNAME on $HOSTNAME - ${PWD#$HOME/}'
            cds () { "cd" $*; eval stripe; }
            alias cd=cds
            eval stripe
        fi
    fi

   I don't use vi, so I left out that functionality.
   
   The functional changes I made are all in the arguments to the echo
   command. The changes are to use \\033 rather than what was shown in
   the original tip as ^[, to use \\007 rather than ^G, and to terminate
   the string with \\c rather than use the option -n.
   
   On AIX 4.1, the command "echo -n hi" echoes "-n hi"; in other words,
   -n is not a portable command-line option to the echo command. I tested
   the above script on AIX 3.2, AIX 4.1, HPUX 9.0, HPUX 10.0, Solaris 2.4
   and Solaris 2.5. I'm still trying to get Linux and my Wintel box
   mutually configured, so I haven't tested it on Linux.
   
   I have noticed a problem with this script. I use the rlogin command to
   log in to a remote box. When I exit from the remote box, the caption
   is not updated, and still shows the hostname and path that was valid
   just before I exited. I tried adding

    exits () { "exit" $*; eval stripe; }
    alias exit=exits

   and

    rlogins () { "rlogin" $*; eval stripe; }
    alias rlogin=rlogins

   Neither addition updated the caption to the host/path returned to. Any
   suggestions?
   
   Roger Booth, rbooth@bmc.com
   
   
     _________________________________________________________________
   
   
   
   
   
   
   
  LETTER 2 TO THE LJ EDITOR RE TITLEBAR
  
   Date: Fri, 13 Dec 1996 23:03:37 -0700 (MST) From: Gary Masters,
   gmasters@csn.net
   
   
   Some further clarification is needed with respect to the X Term
   Titlebar Function tip in the Linux Gazette Two Cent Tips column of the
   January 1997 issue. With regard to the -print option to find, Michael
   Hammel says, "Linux does require this." This is yet another example of
   "Your mileage may vary." Some versions of Linux do not require the
   -print option. And, although Solaris may not, SunOS 4.1.3_U1 and 4.1.4
   do require the -print option. Also, if running csh or tcsh, remember
   to escape wildcards in the file specification ( e.g. find ./ -name
   \*txt\* ) so that the shell doesn't attempt to expand them.
   
   Second, for those tcsh fans out there, here is an xterm title bar
   function for tcsh.
   
   NOTE: This works on Slackware 3.0 with tcsh version 6.04.00, under the
   tab, fv, and OpenLook window managers. Your mileage may vary.

if ( $TERM == xterm ) then
  set prompt="%h> "
  alias cwdcmd 'echo -n "^[]2;`whoami` on ${HOST} - $cwd^G^[]1;${HOST}^G"'
  alias vi 'echo -n "^[]2;${HOST} - editing file-> \!*^G" ; vim \!* ;
cwdcmd'
  alias telnet '/bin/telnet \!* ; cwdcmd'
  alias rlogin '/usr/bin/rlogin \!* ; cwdcmd'
  cwdcmd
else
  set prompt="[%m]%~% "
endif
    1. Check to see if tcsh is running in an xterm.
    2. Set the prompt to show the current history event number.
    3. Set the alias cwdcmd to display the user, host, and current path
       in the xterm title bar, and set the icon name to the host name.
       cwdcmd is a special tcsh alias, which if set holds a command that
       will be executed after changing the value of $cwd.
    4. Set a vi alias to display the user, host, and file name under edit
       in the xterm title bar. And run cwdcmd on exit to restore the
       xterm title bar and icon name.
    5. Alias telnet and rlogin to restore the xterm title bar and icon
       name upon exit. NOTE: Paths to telnet and rlogin may vary.
    6. Run the alias cwdcmd to set the initial xterm title bar and icon
       name.
    7. If this wasn't an xterm, set the prompt to show hostname and path.
       Gary Masters
       
       
         _____________________________________________________________
       
       
       
       
       
       
       
  PPP REDIALER SCRIPT--A QUICK HACK
   Date: Sun, 08 Dec 1996 13:20:25 +0200
       From: Markku J. Salama, msalama@usa.net
       
       
       This here is the way I do it, but don't use it if your area has
       some regulations about redialing the same phone numbers over and
       over:

#!/bin/sh

# A quick hack for redialing with ppp by
# Tries 2 numbers sequentially until connected
# Takes 1 cmdline parm, the interface (ppp0, ppp1...)

# You need 2 copies of the ppp-on script (here called modemon{1,2}) with
# different telephone numbers for the ISP. These scripts should be
slightly
# customized so that the passwd is _not_ written in them, but is taken
# separately from the user in the main (a.k.a. this) script.

# Here's how (from the customized ppp-on a.k.a. modemon1):
# ...
# TELEPHONE=your.isp.number1 # Then make a copy of this script ->
modemon2
                             # and change this to your.isp.number2
# ACCOUNT=your.account
# PASSWD=$1                  # This gets the passwd from the main
script.
# ...

# /sbin/ifconfig must be user-executable for this hack to work.

wd1=1                                                   # counter start
stty -echo                                              # echo off
echo -n "Password: "                                    # for the ISP
account
read wd2
stty echo                                               # back on
echo
echo "Trying..."
echo 'ATE V1 M0 &K3 &C1 ^M' > /dev/modem                # modem init,
                                                        # change as
needed

/usr/sbin/modemon1 $wd2                                 # first try
flag=1                                                  # locked

while [ 1 ]; do                                         # just keep on
going

       if [ "$flag" = 1 ]; then                         # locked?

              bar=$(ifconfig | grep -c $1)        # check for a link

              if [ "$bar" = 1 ]; then                   # connected?
                     echo "Connected!"                  # if so, then
                     exit 0                             # get outta here
              else
                     foo=$(ps ax)                       # already
running?
                     blaat=$(echo $foo | grep "/usr/sbin/pppd")

                     if [ "$blaat" = "" ]; then         # if not, then
                            flag=0                      # unset lock
                     fi
              fi

       else                                             # no lock, ready
                                                        # to continue
              wd1=$[wd1+1]
              echo "Trying again... $wd1"

              if [ $[wd1%2] = 1 ]; then                 # this modulo
test
                     /usr/sbin/modemon1 $wd2            # does the
switching
              else                                      # between the 2
numbers
                     /usr/sbin/modemon2 $wd2            # we are using
              fi

              flag=1                                    # locked again

       fi

done                                                    # All done!
   There. Customize as needed & be an excellent person. Ant DON'T break
       any laws if redialing is illegal in your area!
       
       Mark
       
       
         _____________________________________________________________
       
       
       
       
       
       
       
  TABLE TAGS IN HTML
   Date: Fri, 20 Dec 1996 11:51:22 -0500
       From: Michael O'Keefe, Michael.OKeefe@LMC.Ericsson.SE 
       Organization: Ericsson Research Canada
       
       
       G'day,
       
       Just browsing through the mailbox, and I noticed your reply to a
       user about HTML standard compliance and long download times. You
       replied that you use the spiral image (a common thing these days)
       inside a <TABLE>.
       
       I hope you are aware that a browser cannot display any contents of
       a <TABLE> until it has received the </TABLE> tag (no matter what
       version of any browser - it is a limitation of the HTML tag)
       because the browser cannot run its algorithm until it has received
       all of the <TR> and <TD> tags, and it can't be sure of that until
       the </TABLE> tag comes through. I have seen many complex sites,
       using many images (thankfully they at least used the HEIGHT and
       WIDTH tags on those images to tell the browser how big the image
       will be so it didn't have to download it to find out) but still,
       putting it in a table nullifies much of the speediness that users
       require.
       
       A solution I often offer the HTML designers under me is to use a
       <DL><DD> combination. Though this doesn't technically fit the HTML
       DTD (certain elements are not allowed in a <DL>) and I use an
       editor that will not allow illegal HTML, so I can't do it myself
       (without going via a backdoor - but that's bad quality in my
       opionion). The downside of the this is of course that you don't
       know what sized FONT the user has set on the browser, and the FONT
       size affects the indetation width of the <DD> element. But if your
       spiral image is not too wide, then that could be made a NULL
       factor. The plus to the <DL><DD> is that the page can be displayed
       instantly as it comes down (again..providing the developer uses
       the HEIGHT and WIDTH attributes on *ALL* images so that the
       browser doesn't have to pause it's display to get the image and
       work out how to lay out around the image)
       
       Michael O'Keefe
       
       
         _____________________________________________________________
       
       
       
       
       
       
       
  TEXT FILE UNDELETE
   Date: Sat, 7 Dec 1996 15:00:58 +1300 (NZDT)
       From: Michael Hamilton, michael@actrix.gen.nz 
       
       
       Here's a trick I've had to use a few times.
       
       Desperate person's text file undelete.
       
       If you accidentally remove a text file, for example, some email,
       or the results of a late night programming session, all may not be
       lost. If the file ever made it to disk, ie it was around for more
       than 30 seconds, its contents may still be in the disk partition.
       
       You can use the grep command to search the raw disk partition for
       the contents of file.
       
       For example, recently, I accidentally deleted a piece of email. So
       I immediately ceased any activity that could modify that
       partition: in this case I just refrained from saving any files or
       doing any compiles etc. On other occasions, I've actually gone to
       the trouble of bring the system down to single user mode, and
       unmounted the filesystem.
       
       I then used the egrep command on the disk partition: in my case
       the email message was in /usr/local/home/michael/, so from the
       output from df, I could see this was in /dev/hdb5

  sputnik3:~ % df
  Filesystem         1024-blocks  Used Available Capacity Mounted on
  /dev/hda3              18621    9759     7901     55%   /
  /dev/hdb3             308852  258443    34458     88%   /usr
  /dev/hdb5             466896  407062    35720     92%   /usr/local

  sputnik3:~ % su
  Password:
  [michael@sputnik3 michael]# egrep -50 'ftp.+COL' /dev/hdb5 > /tmp/x
   Now I'm ultra careful when fooling around with disk partitions, so I
       paused to make sure I understood the command syntax BEFORE
       pressing return. In this case the email contained the word 'ftp'
       followed by some text followed by the word 'COL'. The message was
       about 20 lines long, so I used -50 to get all the lines around the
       phrase. In the past I've used -3000 to make sure I got all the
       lines of some source code. I directed the output from the egrep to
       a different disk partition - this prevented it from over writing
       the message I was looking for.
       
       I then used strings to help me inspect the output

  strings /tmp/x | less
   Sure enough the email was in there.
       
       This method can't be relied on, all, or some, of the disk space
       may have already been re-used.
       
       This trick is probably only useful on single user systems. On
       multi-users systems with high disk activity, the space you free'ed
       up may have already been reused. And most of use can't just rip
       the box out from under our users when ever we need to recover a
       file.
       
       On my home system this trick has come in handy on about three
       occasions in the past few years - usually when I accidentally
       trash some of the days work. If what I'm working survives to a
       point where I feel I made significant progress, it get's backed up
       onto floppy, so I haven't needed this trick very often.
       
       Michael
       
       
         _____________________________________________________________
       
       
       
       
       
       
       
  TRUNCATING /VAR/ADM/MESSAGES
   Date: Tue, 31 Dec 1996 15:32:57 GMT+100
       From: Michel Vanaken, michel@idtech.be
       Organization: IDtech
       
       
       Hi !
       
       About the topic "How to truncate /var/adm/messages", here's the
       way to do it with a shell script :

mv /var/adm/messages /var/adm/messages.prev
touch /var/adm/messages
mv /var/adm/syslog /var/adm/syslog.prev
touch /var/adm/syslog
kill -1 `ps x | grep syslog | grep -v grep | awk '{ print $1 }'`
   Happy new year !
       Michel
       
       
         _____________________________________________________________
       
       
       
       
       
       
       
  2C HOST TRICK
   Date: Tue, 10 Dec 1996 17:27:46 +0300
       From: Paul Makeev, mac@rosprint.ru
       
       
       In order to make DHCPD by ISC/Vixie to run under Linux, you should
       have route to host 255.255.255.255. Standard "route" from
       Slackware distribution does not like the string "route add -host
       255.255.255.255 dev eth0". But you can add hostname to your
       /etc/hosts file with address 255.255.255.255, and use "route add
       hostname dev eth0" instead. It works.
       
       Paul.
       
       
         _____________________________________________________________
       
       
       
       
       
       
       
  USE OF TCSH'S :E AND :R EXTENSIONS
   Date: Mon, 02 Dec 1996 23:25:23 -0500
       From: Bill C. Riemers, bcr@feynman.com
       
       
       I'd like to congratulate Jesper Pedersen on his article on tcsh
       tricks. Tcsh has long been my favorite shell. But most of the
       features Jesper hit upon are also found in bash. Tcsh's most
       useful and unique features are its variable/history suffixes.
       
       For example, if after applying a patch one wishes to undo things,
       by moving the *.orig files to there base names, the :r extension
       which means to strip the extension comes in handy. e.g.

 foreach a ( *.orig )
    mv $a $a:r
 end
   The same loop for ksh looks like:

  for a in *.orig; do=20
    mv $a `echo $a|sed -e 's,\.orig$,,g'`
  done
   Even better, one can use the :e extension to extract the file
       extension. For example, lets say we we want to do the same thing
       on compressed files:

  foreach a ( *.orig.{gz,Z} )
    mv $a $a:r:r.$a:e
  end
   The $a:r:r is the filename without .orig.gz and .orig.Z, we tack the
       .gz or .Z back on with .$a:e.
       
       Bill
       
       
         _____________________________________________________________
       
       
       
       
       
       
       
  VARIOUS NOTES ON 2C TIPS, GAZETTE 12
   Date: Wed, 04 Dec 1996 15:30:21 -0600
       From: Justin Dossey, dossey@ou.edu 
       
       
       I noticed a few overly difficult or unnecessary procedures
       recommended in the 2c tips section of Issue 12. Since there is
       more than one, I'm sending it to you:

#!/bin/sh
         # lowerit
         # convert all file names in the current directory to lower case
         # only operates on plain files--does not change the name of
directories
         # will ask for verification before overwriting an existing file
         for x in `ls`
           do
           if [ ! -f $x ]; then
             continue
             fi
           lc=`echo $x  | tr '[A-Z]' '[a-z]'`
           if [ $lc != $x ]; then
             mv -i $x $lc
           fi
           done
   Wow. That's a long script. I wouldn't write a script to do that;
       instead, I would use this command:

for i in * ; do [ -f $i ] && mv -i $i `echo $i | tr '[A-Z]' '[a-z]'`;
done;
   on the command line.
       
       The contributor says he wrote the script how he did for
       understandability (see below).
       
       On the next tip, this one about adding and removing users, Geoff
       is doing fine until that last step. Reboot? Boy, I hope he doesn't
       reboot every time he removes a user. All you have to do is the
       first two steps. What sort of processes would that user have
       going, anyway? An irc bot? Killing the processes with a simple

kill -9 `ps -aux |grep ^ |tr -s " " |cut -d " " -f2`
   Example, username is foo

kill -9 `ps -aux |grep ^foo |tr -s " " |cut -d " " -f2`
   That taken care of, let us move to the forgotten root password.
       
       The solution given in the Gazette is the most universal one, but
       not the easiest one. With both LILO and loadlin, one may provide
       the boot parameter "single" to boot directly into the default
       shell with no login or password prompt. From there, one may change
       or remove any passwords before typing ``init 3``to start multiuser
       mode. Number of reboots: 1 The other way Number of reboots: 2
       
       That's just about it. Thanks for the great magazine and continuing
       contribution to the Linux community. The Gazette is a needed
       element for many linux users on the 'net.
       
       Justin Dossey
       
       Date: Wed, 4 Dec 1996 08:46:24 -0800 (PST)
       Subject: Re: lowerit shell script in the LG 
       From: Phil Hughes, phil@ssc.com 
       
       
       The amazing Justin Dossey wrote:

> #!/bin/sh
> for i in * ; do [ -f $i ] && mv -i $i `echo $i | tr '[A-Z]' '[a-z]'`;
> done;
>
> may be more cryptic than
...
>
> but it is a lot nicer to the system (speed & memory-wise) too.
   Can't argue. If I had written it for what I considered a high usage
       situation I would have done it more like you suggested. The
       intent, however, was to make something that could be easily
       understood.
       
       Phil Hughes
       
       
         _____________________________________________________________
       
       
       
       
       
       
       
  VIEWING HOWTO DOCUMENTS
   Date: Sun, 22 Dec 1996 09:43:40 -0800
       From: Didier Juges, dj@destin.nfds.net
       
       
       >From a newbie to another, here is a short script that eases
       looking for and viewing howto documents. My howto's are in
       /usr/doc/faq/howto/ and are gzipped. The file names are
       XXX-HOWTO.gz, XXX being the subject. I created the following
       script called "howto" in the /usr/local/sbin directory:

#!/bin/sh
if [ "$1" = "" ]; then
    ls /usr/doc/faq/howto | less
else
    gunzip -c /usr/doc/faq/howto/$1-HOWTO.gz | less
fi
   When called without argument, it displays a directory of the available
       howto's. Then when entered with the first part of the file name
       (before the hyphen) as an argument, it unzips (keeping the
       original intact) then displays the document.
       
       For instance, to view the Serial-HOWTO.gz document, enter: $ howto
       Serial
       
       Keep up the good work.
       
       Didier
       
       
         _____________________________________________________________
       
       
       
       
       
       
       
  XAW-XPM .XRESOURCES TROUBLESHOOTING TIP.
   Date: Wed, 18 Dec 1996 17:02:07 +0100 (GMT+0100)
       From: Robin Smidsroed, dex@sysedata.no
       
       
       I'm sure a lot of you folks out there have installed the new
       Xaw-XPM and like it a lot. But I've had some trouble with it. If I
       don't install the supplied .Xresources-file, xcalc and some other
       apps (ghostview is one) segfaults whenever you try to use them.
       
       I found out that the entry which causes this, is this:

*setPixmap: /path/to/an/xpm-file
   If this entry isn't in your .Xresources, xcalc and ghostview won't
       work. Hope some of you out there need this.
       
       And while you're at ghostview, remember to upgrade ghostscript to
       the latest version to get the new and improved fonts, they
       certainly look better on paper than the old versions.
       
       Ciao!
       Robin
       
       PS: Great mag, now I'm just waiting for the arrival of my copy of
       LJ
       
       
         _____________________________________________________________
       
       
       
       
       
       
       
  XTERM TITLE BAR
   Date: Wed, 18 Dec 1996 21:21:47 -0800 (PST) From: bradshaw@nlc.com
       (Lee Bradshaw)
       
       Hi Guys,
       
       I noticed the "alias for cd xterm title bar tip" from Michael
       Hammel in the Linux Gazette and wanted to offer a possible
       improvement for your .bashrc file. A similar solution might work
       for ksh, but you may need to substitute $HOSTNAME for \h, etc:

if [ "x$TERM" = "xxterm" ]; then
   PS1='\h \w-> \[\033]0;\h \w\007\]'
else
   PS1='\h \w-> '
fi
   PS1 is an environment variable used in bash and ksh for storing the
       normal prompt. \h and \w are shorthand for hostname and working
       directory in bash. The \[ and \] strings enclose non-printing
       characters from the prompt so that command line editing will work
       correctly. The \O33]0; and \007 strings enclose a string which
       xterm will use for the title bar and icon name. Sorry, I don't
       remember the codes for setting these independently. (ksh users
       note: \033 is octal for ESC and \007 is octal for CTRL-G.) This
       example just changes the title bar and icon names to match the
       prompt before the cursor.
       
       Any program which changes the xterm title will cause
       inconsistencies if you try an alias for cd instead of PS1.
       Consider rlogin to another machine which changes the xterm title.
       When you quit rlogin, there is nothing to force the xterm title
       back to the correct value when using the cd alias (at least not
       until the next cd). This is not a problem when using PS1.
       
       You could still alias vi to change the xterm title bar, but it may
       not always be correct. If you use ":e filename" to edit a new
       file, vi will not update the xterm title. I would suggest
       upgrading to vim (VI iMproved). It has many nice new features in
       addition to displaying the current filename on the xterm title.
       
       Hopefully this tip is a good starting point for some more
       experimenting. Good luck!
       
       Lee Bradshaw, bradshaw@nlc.com
       
       
         _____________________________________________________________
       
       
       
       [ TABLE OF CONTENTS ] [ FRONT PAGE ] Back Next 
       
       
         _____________________________________________________________
       
       
       
      This page maintained by the Editor of Linux Gazette, gazette@ssc.com
      Copyright &copy; 1997 Specialized Systems Consultants, Inc.
   
       
    "Linux Gazette...making Linux just a little more fun!"
   
         _____________________________________________________________
       
       News Bytes
       
  CONTENTS:
          + News in General
          + Software Announcements
   
       
       
       
       
         _____________________________________________________________
       
       
       
  NEWS IN GENERAL
   
       
       
         _____________________________________________________________
       
       
       
  SECURITY: (LINUX-ALERT) LSF UPDATE#14: VULNERABILITY OF THE LPR PROGRAM.
   
       
       Date: Sat, 26 Nov 1996
       Linux Security FAQ Update -- lpr Vulnerability
       A vulnerability exists in the lpr program version 0.06. If
       installed suid to root, the lpr program allows local users to gain
       access to a super-user account.
       
       Local users can gain root privileges. The exploits that exercise
       this vulnerability were made available.
       
       lpr utility from the lpr 0.06 suffers from the buffer overrun
       problem. Installing lpr as a suid-to-root is needed to allow print
       spooling.
       
       This LSF Update is based on the information originally posted to
       linux-security mailing list.
       
       For additional information and distribution corrections:
       Linux Security WWW:
       http://bach.cis.temple.edu/linux/linux-security linux-security &
       linux-alert mailing list archives:
       ftp://linux.nrao.edu/pub/linux/security/list-archive 
       
       
         _____________________________________________________________
       
       
       
  LINUXEXPO '97 TECHNICAL CONFERENCE
   
       
       Durham, N.C. December 31,1996-- It was announced today that the
       third annual LinuxExpo Technical Conference will be held at the
       N.C. Biotechnology Center in Research Triangle Park, NC on April
       4-5, 1997. The conference will consist of fourteen elite
       developers who will give technical talks on various topics all
       related to the development of Linux. This year the event is
       expected to draw 1,000 attendees who will be coming not only for
       the conference, but to visit the estimated 30 Linux companies and
       organizations that will be selling their own Linux products and
       giving demonstrations. The event will also include a Linux User's
       Group meeting, an install fair, and a job fair for all of the
       computer programming hopefuls. LinuxExpo '97 will be complete with
       refreshments and entertainment from the Class Action Jugglers.
       
       For addtional information: Anna Selvia, anna@linuxexpo.org 
       LinuxExpo '97 Technical Conference, www.linuxexpo.org
       3201 Yorktown Ave. Suite 113
       Durham, NC 27713
       
       
         _____________________________________________________________
       
       
       
  WWW: LINUX ARCHIVE SEARCH SITE
   
       
       Date: Thu, 21 Nov 1996
       Tired of searching sunsite or tsx-11 for some program you heard
       about on irc? Well, the Linux Archive Search (LAS) is here. It is
       a search engine that searches an updated database of the files
       contained on sunsite.unc.edu, tsx-11.mit.edu, ftp.funet.fi, and
       ftp.redhat.com. You can now quickly find out where the files are
       hiding! The LAS is living at http://torgo.ml.org/las (It may take
       a second to respond, its on a slow link). So give it a whirl, who
       knows, you may use it a lot!
       
       For additional information:
       Jeff Trout, threshar@serve.com 
       The Internet Access Company, Inc.
       
       
       
         _____________________________________________________________
       
       
       
  NETHERLANDS - LINUX BOOK ON-LINE
   
       
       Date: Thu, 05 Dec 1996
       The very first book to appear in Holland on the Linux operating
       system has gone on-line and can be found at:
       
       http://www.cv.ruu.nl/~eric/linux/boek/
       
       And of course from every (paper) copy sold, one dollar is sent to
       the Free Software Foundation. For additional information:
       Hans Paijmans, KUB-University, Tilburg, the Netherlands
       paai@kub.nl , http://purl.oclc.org/NET/PAAI/ 
       
       
         _____________________________________________________________
       
       
       
  NEW O'REILLY LINUX WWW SITE
   Date: 26 Nov 1996
       
       
       Check out the new O'Reilly & Associates, Inc. Linux web site at
       http://www.ora.com/info/linux/ 
       
       It has:
          + Free excerpt from Linux Multimedia Guide
          + Interview with Olaf Kirch
          + Recommended links to the best Linux web sites.
          + Links to our Unix & Linux book pages
   For additional information:
       O'Reilly & Associates, Inc., john@ora.com 
       
       
         _____________________________________________________________
       
       
       
  PCTV REMINDER
   
       
       The "Unix III - Linux" show will air on the Jones Computer Network
       (JCN) and the Mind Extension University Channel (MEU) the week of
       January 20, 1997.
       
       The scheduled times are:
          + Mon. 11:30 PM - 12:00 AM
          + Wed. 9:30 PM - 10:00 PM
          + Thu. 11:30 PM - 12:00 AM
          + Fri. 9:30 PM - 10:00 PM
          + Sun. 9:30 PM - 10:00 PM
   This show will also air on the NBC Superchannel (CNBC) January 25,
       1997.
       
       It is best to call your local cable operator to find the
       appropriate channel.
       
       Tom Schauer, Production Assoc. PCTV 
       
       
       
       
         _____________________________________________________________
       
       
       
  SOFTWARE ANNOUNCEMENTS
   
       
       
         _____________________________________________________________
       
       
       
  DAVINCI V2.0.2 - GRAPH VISUALIZATION SYSTEM
   
       
       November 20, 1996 (Bremen, Germany) - The University of Bremen
       announces daVinci V2.0.2, the new edition of the noted
       visualization tool for generating high-quality drawings of
       directed graphs with more than 2000 installations worldwide. Users
       in the commercial and educational domain have already integrated
       daVinci as user interface for their application programs to
       visualize hierarchies, dependency structures, networks,
       configuration diagrams, dataflows, etc. daVinci combines
       hierarchical graph layout with powerful interactive capabilities
       and an API for remote access from a connected application. In
       daVinci V2.0.2, a few extensions related to improving performance
       and usage of the previous V2.0.1 release have been made based on
       user feedback.
       
       daVinci V2.0.2 is licensed free of charge for non-profit use and
       is immediately available Linux. The daVinci system can be
       downloaded with this form:
       
       http://www.informatik.uni-bremen.de/~davinci/daVinci_get_daVinci.h
       tml 
       
       For additional information:
       Michael Froehlich, daVinci Graph Visualization Project
       Computer Science Department, University of Bremen, Germany
       http://www.informatik.uni-bremen.de/~davinci ,
       daVinci@Informatik.Uni-Bremen.DE 
       
       
         _____________________________________________________________
       
       
       
  WWW: GETWWW 1.3 - DOWNLOAD AN ENTIRE HTML SOURCE TREE
   
       
       Date: Wed, 04 Dec 1996
       Getwww is designed to download an entire HTML source tree from a
       remote URL, recursively changing image and hypertext links.
       
       From the LSM:
       Primary-site: ftp.kaist.ac.kr /incoming/www 25kB
       getwww++-1.3.tar.gz
       Alternate-site: sunsite.unc.edu
       /pub/Linux/system/Network/info-systems/www 25kB
       getwww++-1.3.tar.gz
       Platform: Linux-2.0.24
       Copying-policy: GPL
       
       
       For additional information:
       In-sung Kim, Network Tool Group, kisskiss@soback.kornet.nm.kr
       
       
         _____________________________________________________________
       
       
       
  MOTIF INTERFACE BUILDER ON UNIFIX 2.0
   
       
       Date: Sun, 01 Dec 1996
       Unifix Software GmbH is proud to announce View Designer/X, a new
       Motif interface builder available for Linux. A demo version of VDX
       is included on Unifix Linux 2.0.
       
       With object oriented and interactive application development
       tools, the software developer is able to design applications with
       better quality and in shorter times.
       
       For more information and to download the latest demo version, see:
       
       
       http://www.unifix.de/products/vdx 
       
       For additional information: Unifix Software GmbH, info@unifix.de 
       
       
         _____________________________________________________________
       
       
       
  VIEW DESIGNER/X
   Date: Fri, 13 Dec 1996
       
       
       View Designer/X, a new Motif Interface Builder for Linux has been
       released. It enables application developers to design user
       interfaces with Motif 2.0 widgets and to generate C and C++ code.
       The VDX provides an interactive Wysiwyg View and a Widget Tree
       Browser which can be used to modify the structure of the user
       interface. All resources are adjustable by Widget Resource Editor
       and by using template files the code generation of VDX is more
       flexible than those of other interface builders.
       
       Bredex GmbH, Germany is distributing the View Designer/X via Web
       service. Please see following web page for more information and
       downloading the free demo version:
       
       http://www.bredex.de/EN/vdx/
       
       Dirk Laessig, dirk@unifix.de
       
       
         _____________________________________________________________
       
       
       
  X-FILES 1.21 - GRAPHICAL FILE MANAGER IN TCL/TK
   Date: Sun, 01 Dec 1996
       
       
       X-Files is a graphical file management program for Unix/X-Window
       environment developed on Linux.
       
       For more information and packages see:
       http://pinhead.tky.hut.fi/~xf_adm/
       http://www.hut.fi/~mkivinie/xfindex.html
       java.inf.tu-dresden.de:/pub/unix/x-files
       
       For questions:
       xf_adm@pinhead.tky.hut.fi
       
       
       For additional information:
       Mikko Kiviniemi, mkivinie@cc.hut.fi , jforsten@cc.hut.fi 
       Helsinki University of Technology
       
       
         _____________________________________________________________
       
       
       
       [ TABLE OF CONTENTS ] [ FRONT PAGE ] Back Next 
       
       
         _____________________________________________________________
       
       
       
      This page written and maintained by the Editor of Linux Gazette,
      gazette@ssc.com
      Copyright &copy; 1997 Specialized Systems Consultants, Inc.
   
       
       
       
       
         _____________________________________________________________
       
       
       
    "Linux Gazette...making Linux just a little more fun! "
   
       
       
         _____________________________________________________________
       
       
       
                               THE ANSWER GUY 
                                       
   
    By James T. Dennis, jimd@starshine.org
   
       
       
         _____________________________________________________________
       
       
       
  CONTENTS:
    8. Dialup Problem
    9. File Referencing
   10. Combining Modems for More Speed
   11. WWW Server
       
       
         _____________________________________________________________
       
       
       
       
       
       
       
  COMBINING MODEMS FOR MORE SPEED
   Date: Mon, 23 Dec 1996 23:37:00 -0800 (PST)
       From: liberty@pe.net (Keith)
       
       
       Thanks for reading this post. I have heard that it's possible to
       set up Linux to combine two analog modems into one so as to double
       the speed of a connection. Is this true, how does this work and
       where can I get more info, guidance, how-to, etc.? I have
       Slackware 96 from Infomagic. Your truly, Keith Bell
       
     I've heard of this as well. I've never used it but let's look it
     up...
     
     Ahh... that would be the EQL option in the kernel. Here's an
     excerpt from the 'make menuconfig' help pages (in the 2.0.27 kernel
     sources):
     
     Linux Kernel v2.0.27 Configuration
     
     EQL (serial line load balancing) support:
     If you have two serial connections to some other computer (this
     usually requires two modems and two telephone lines) and you use
     SLIP (= the protocol for sending internet traffic over telephone
     lines) or PPP (= a better SLIP) on them, you can make them behave
     has to be supported at the other end as well, either with a similar
     EQL Linux driver or with a Livingston Portmaster 2e. Say Yes if you
     want this and read drivers/net/README.eql.
     
     So that file is :
     EQL Driver: Serial IP Load Balancing HOWTO
     Simon "Guru Aleph-Null" Janes, simon@ncm.com
     v1.1, February 27, 1995
     
     
     (After reading this you'll know about as much on this subject as I
     do -- after using any of this you'll know *much* more). 
   
       
       
         _____________________________________________________________
       
       
       
       
       
       
       
  DIALUP PROBLEM
   Date: Tue, 31 Dec 1996 05:13:51 -0800 (PST)
       From: gekko@midusa.net
       
       
       I don't know if you can, or even are willing, help me witha
       problem i have. I'm running redhat 4.0, on a p120 w/24 megs of
       ram, kernel 2.0.18
       
     I'm willing. 
   anyway...i have this ppp connection problem and no I know knows what
       the problem is, i've looked through the FAQS, HOWTO's, tried
       #linux on irc, etc etc...no one knows what my problem is, so now
       i'm desperate.
       
       When i try to dial my isp, i get logged in fine, but its REALLY
       slow. i'm using the 'network module' ppp thing in control panel on
       X. mru=1500, asyncmap=0,speed=115000, i couldn't find a place to
       insert mtu, and when i tried putting that in /etc/ppp/options the
       script this program was using wouldn't work.
       
     Usually I see these symptoms when there is an IRQ conflict. Some of
     the data gets through -- with lots of errors and lots of
     retransmits but any activity on the rest of the machine -- or even
     just sitting there -- and you get really bad throughput and very
     unreliable connections. 
   I noticed that after i input something and then move the cursor off of
       the windows, it runs at a much faster speed, and it gets annoying
       moving the cursor back and forth. I tried dip, minicom, and this
       'network module' thing...all are slow
       
     I would do all of your troubleshooting from outside of X. Just use
     the virtual consoles until everything else works right. (Fewer
     layers of things to conflict with one another). 
   if you can shed any light on this, it would be much appreciated.
       thanks
       
     Take a really thorough look at the hardware settings for everything
     in the machine. Make a list of all the cards and interfaces -- go
     through the docs for each one and map out which ones are using
     which interfaces.
     
     I ended up going through several combinations of video cards and
     I/O cards before I got my main system all integrated. Luckily newer
     systems are getting better (this is a 386DX33 with 32Mb of RAM and
     a 2Mb video cards -- two IDE's, two floppy drives, two SCSI
     hardisks, an internal CD-ROM, and external magneto optical drive, a
     serial mouse, a modem (used for dial-in dial-out, uucp, and ppp)
     and null modem (I hook a laptop to it as a terminal for my wife)
     and an ethernet card.
     
     Another thing to check is the cabling between your serial connector
     and your modem. If you're configured for XON/XOFF you're in
     trouble. If you're configured for hardware flow control and you
     don't have the appropriate wires in your cable than you're in worse
     trouble.
     
     Troubleshooting of this sort really is best done over voice or in
     person. There are too many steps to the troubleshooting and testing
     to do effectively via e-mail. 
   
       
       
         _____________________________________________________________
       
       
       
       
       
       
       
  FILE REFERENCING
   Date: Wed, 18 Dec 1996 00:16:42 -0800 (PST)

> "A month of sundays ago L.U.S.T List wrote:"
>>      1. I do not know why on Linux some program could not run
>>      correctly.
>>              for example
>>      #include
>>      main()
>>      {
>>              printf("test\n");
>>              fflush(stdout);
>>      }
>>      They will not echo what I print.
>
> Oh yes it will. I bet you named the executable "test" ... :-)
> (this is a UNIX faq).
>

     I really suggest that people learn the tao of "./"
     
     This is easy -- any time you mean to refer to any file in the
     current directory precede it with "./" -- this forces all common
     Unix shells to refer to the file in THIS directory. It solves all
     the problems with files that start with dashes and it allows you to
     remove :.: from your path (which *all* sysadmins should do right
     NOW).
     
     That is the tao of "./" -- the two keystrokes that can save you
     many hours of grief and maybe save your whole filesystem too. 
   
       
       
         _____________________________________________________________
       
       
       
       
       
       
       
  WWW SERVER?
   Date: Tue, 31 Dec 1996 05:19:11 -0800 (PST)
       From: (Paulo Marcio Villaca Veiga) paulom@cedro.fisica.ufmg.bri
       
       
       Where can I get (or buy) a WWW server for LINUX?
       Please, help me.
       
     Web servers are included with most distributions of Linux. The most
     popular one right now is called Apache. You can look on your CD's
     (if you bought a set) or you can point a web client (browser) at
     http://www.apache.org for more information and for an opportunity
     to download a copy.
     
     There are several others available -- however Apache is the most
     well known -- so it will be the best for you to start with. It is
     also widely considered to offer the best performance and feature
     set (of course that is a matter of considerable controversy among
     "connosieurs" just as is the ongoing debate about 'vi' vs.
     'emacs'). 
   thank you
       
     You're welcome. 
   
       
       
         _____________________________________________________________
       
       
       
      Copyright &copy; 1997, James T. Dennis
      Published in Issue 13 of the Linux Gazette
   
       
       
         _____________________________________________________________
       
       
       
       [ TABLE OF CONTENTS ] [ FRONT PAGE ] Back Next 
       
       
         _____________________________________________________________
       
       
       
    "Linux Gazette...making Linux just a little more fun! "
   
       
       
         _____________________________________________________________
       
       
       
                                  COMDEX '96
                                       
    By Belinda Frazier and Kevin Pierce
   
       
       
         _____________________________________________________________
       
       
       
       Comdex/Fall '96 has come and gone once again. COMDEX is the second
       largest computer trade show in the world, offering multiple
       convention floors with 2000 exhibitors plying their new computer
       products to approximately 220,000 attendees in Las Vegas, Nevada
       in November of 1996.
       
       This year's show was a great success for Linux in general. The
       first ever ``Linux Pavilion'' was organized at the Sands
       Convention Center and Linux vendors from all over the country
       participated. The Linux International (LI) booth was in the
       center, giving away literature and information for all the Linux
       Vendors. Linux International is a not-for-profit organization
       formed to promote Linux to computer users and organizations.
       Staffed by volunteers including Jon ``Maddog'' Hall and Steve
       Harrington, the LI booth was a great place for people to go to
       have their questions answered. Needless to say, the Linux
       International Booth was never empty. Surrounding LI, were Red Hat
       Software and WorkGroup Solutions.
       
       Other vendors in the pavilion included Craftwork Solutions, DCG
       Computers, Digital Equipment Corporation, Frank Kasper &
       Associates, Infomagic, Linux Hardware Solutions, SSC (publishers
       of Linux Journal), and Yggdrasil Computing. Caldera, Pacific
       HiTech, and Walnut Creek both exhibited at Comdex, but not as part
       of the Linux Pavilion.
       
       SSC gave out Linux Journals at the show and actually ran out of
       magazines early Thursday morning. Luckily, we were able to have
       some more shipped to us, but we still ran out again on Friday, the
       last day of the show. Comdex ran five full days and the Sands
       pavilion was open from 8:30 to 6 most show days which meant long
       days for all the exhibitors there.
       
       Show management put up signs, directing attendees to the Linux
       Pavilion and to "more Linux vendors". The show was so large that
       it was easy to get lost.
       
       At the LI booth and at SSC's booth, the response to Linux was
       overwhelmingly positive. Questions ranged from ``I've heard a lot
       about Linux, but I'm not sure what it is, can you enlighten me?''
       to ``I haven't checked for a few days---what is the latest
       development kernel?''
       
       For next year's Comdex in November '97, Linux vendors, coordinated
       by Linux International, are already working to put together a
       Linux pavilion at least three times as big as the one this year.
       
       Vendors interested in being part of the Linux pavilion in November
       '97 may contact Softbank who put on Comdex at mandino@comdex.com
       or to do this through Linux International, contact ``Jon Maddog''
       Hall via e-mail at maddog@zk3.dec.com.
       
       
         _____________________________________________________________
       
       
       
      Copyright &copy; 1997, Belinda Frazier & Kevin Pierce
      Published in Issue 13 of the Linux Gazette
   
       
       
         _____________________________________________________________
       
       
       
       [ TABLE OF CONTENTS ] [ FRONT PAGE ] Back Next 
       
       
         _____________________________________________________________
       
       
       
       
       
       
         _____________________________________________________________
       
       
       
    "Linux Gazette...making Linux just a little more fun! "
   
       
       
         _____________________________________________________________
       
       
       
             FILTERING ADVERTISEMENTS FROM WEB PAGES USING IPFWADM
                                       
    By David Rudder drig@magicweb.com
   
       
       
         _____________________________________________________________
       
       
       
       Lately, a lot of Web pages have begun selling ad space "banners."
       Wasting valuable bandwidth, these banners often hawk products I
       don't care to hear about. I'd rather not see them, and not have to
       download their contents.
       
       There are two ways of filtering out these banners. The first is to
       deny all pictures that are wider than tall and generally towards
       the top or bottom of the page. The second is to simply block all
       the accesses to and from the web sites that are the notorious
       advertisers. This second approach is the one I'm going to take.
       
       When searching around the web, you will see that many of the
       banners come from the site ad.linkexchange.com. This is the site
       we will want to ban.
       
       
         _____________________________________________________________
       
       
       
  SETTING UP YOUR FIREWALL
   
       
       Our first order of business is to set up our firewall. We won't be
       using it for security, although this doesn't prohibit also using
       the firewall for security. First, we recompile the kernel, saying
       "Yes" to CONFIG_FIREWALL. This allows us to use the built in
       kernel firewalling.
       
       Then, we need to get the IPFWADM utility. You can find it at:
       http://www.xos.nl/linux/ipfwadm . Untar, compile and install
       this utility.
       
       Since we are doing no other firewalling, this should be
       sufficient.
       
       
         _____________________________________________________________
       
       
       
  BLOCKING UNWANTED SITES
   
       
       Now, we come to the meat of the maneuver. We need now to block
       access to our machine from ad.linkexchange.com. First, block out
       access to the sight, so that our requests don't even make it
       there. ipfwadm -O -a reject -P tcp -S 0.0.0.0/0 -D
       ad.linkexchange.com 80
       
       
       This tells ipfwadm to append a rule to the Output filter. The rule
       says to reject all packets of protocol TCP from anywhere to
       ad.linkexchange.com on port 80. If you don't get this, read Chris
       Kostick's excellent article on IP firewalling at
       http://www.ssc.com/lj/issue24/1212.html.
       
       The next rule is to keep any stuff from ad.linkexchange.com from
       coming in. Technically, this shouldn't be necessary. If we haven't
       requested it, it shouldn't come. But, better safe than sorry.
       ipfwadm -I -a reject -P tcp -S ad.linkexchange.com 80 -D 0.0.0.0/0
       
       
       Now, all access to and from ad.linkexchange.com is rejected.
       
       Note: this will only work when web browsing from that machine. To
       filter for a whole network, do them same but with -F instead of -O
       and -I.
       
       
         _____________________________________________________________
       
       
       
  TESTING IT OUT
   
       
       To test, visit the site http://www.reply.net. They have a banner
       on top which should either not appear or appear as a broken icon.
       Either way, no network bandwidth will be wasted downloading the
       picture, and all requests will be rejected immediately.
       
       
         _____________________________________________________________
       
       
       
  FILLING IT OUT
   
       
       Not all banners are so easily dealt with. Many companies, like
       Netscape, host their own banners. You don't want to block access
       to Netscape, so this approach won't work. But, you will find a
       number of different advertisers set up like linkexchange. As you
       find more, add them to the list of rejected sites. Good luck, and
       happy filtering!
       
       
         _____________________________________________________________
       
       
       
      Copyright &copy; 1997, David Rudder
      Published in Issue 13 of the Linux Gazette
   
       
       
         _____________________________________________________________
       
       
       
       [ TABLE OF CONTENTS ] [ FRONT PAGE ] Back Next 
       
       
         _____________________________________________________________
       
       
       
       
       
       
         _____________________________________________________________
       
       
       
    "Linux Gazette...making Linux just a little more fun! "
   
       
       
         _____________________________________________________________
       
       
       
                               FLOPPY DISK TIPS
                                       
    By Bill Duncan, VE3IED, bduncan@beachnet.org
   
       
       
         _____________________________________________________________
       
       
       
       
       
       Although more computers are becoming network connected every day,
       there are many instances where you need to transfer files by the
       ol' sneaker-net method. Here are some hints, tips and short-cuts
       for doing this, aimed at users who are new to Linux or Unix.
       (There may even be some information useful to old-timers...)
          + Formatting, Filesystems and Mounting
          + Backups, Cpio and Gzip
          + Floppy as a Raw Device for Large Files or Directories
          + Miscellaneous
   
       
       What do I use floppies for? As a consultant, I frequently do
       contract work for companies which, because of security policies,
       do not connect to the 'Net. So, FTP'ing files which I need from my
       network at home is out of the question.
       
       My current contract as an example, I am using Linux as an
       X-Windows terminal for developing software on their DEC Alphas
       running OSF. (I blew away the Windoze '95 which they had loaded on
       the computer they gave me.) I often need to bring files with me
       from my office at home, or backup my work to take back home for
       work in the evening. (Consultants sometimes work flex-hours, which
       generally means more hours...)
       
       
       
       Why use cpio(1) or tar(1) when copying files? Because it is a
       portable method of transferring files from a group of
       subdirectories with the file dates left intact. The cp(1) command
       may or may not do the job depending on Operating Systems and
       versions you are dealing with. In addition, specifying certain
       options will only copy files which are new or have changed.
       
       
       
       
         _____________________________________________________________
       
       
       
       
       
Formatting, Filesystems and Mounting

   
       
       
         _____________________________________________________________
       
       
       
       The first thing you need to do to make the floppies useful is to
       format them, and usually lay down a filesystem. There are also
       some preliminary steps which make using floppy disks much easier,
       which is the point of this article.
       
       I find it useful to make my username part of the floppy group in
       the /etc/group file. This saves you from needing to su to root
       much of the time. (You will need to log out and log back in again
       for this to take effect.) I also use the same username both on the
       client's machine and my home office which saves time. The line
       should now look like this:

floppy::11:root,username
   
       
       The following setup is assumed for the examples I present here.
       The root user must have the system directories in the PATH
       environment variable. Add the following to the .profile file in
       /root if not already there by su'ing to root.

su -   # this should ask for the root password.
cat >> .profile
PATH=/sbin:/usr/sbin:$PATH
<ctrl>-D
   You can also use your favorite editor to do this... I prefer vim(1)
       and have this symlinked to /usr/bin/vi instead of elvis(1) which
       is usually the default on many distributions. VIM has online help,
       and multiple window support which is very useful! (A symlink is
       created with a -s option to ln(1), and is actually called a
       symbolic link.)
       
       Next, add the following lines to the /etc/fstab file: (I have all
       the user mountable partitions in one place under /mnt. You may
       want a different convention, but this is useful. I also have
       /mnt/cdrom symlinked to /cd for convenience.)

/dev/fd0    /mnt/fd0  ext2    noauto,user 1 2
   
       
       Still logged in as root, make the following symlink: (If you have
       more than one floppy drive, then add the floppy number as well.)

ln  -s  /mnt/fd0  /fd

    -or-

ln  -s  /mnt/fd0  /fd0
   These two things make mounting and unmounting floppies a cinch. The
       mount(8) command follows the symlink and accesses the /etc/fstab
       file for any missing parameters, making it a useful shortcut.
       
       To make the floppy usable as an ext2fs Linux filesystem, do the
       following as root: (The username is whatever username you use on
       regularly on the system. You, of course, should not use the root
       user for normal use!)

export PATH=/sbin:/usr/sbin:$PATH   # not needed if you set environment
fdformat /dev/fd0
mke2fs /dev/fd0
mount /dev/fd0 /mnt/fd0
chown username /mnt/fd0
   You may need to specify the geometry of the floppy you are using. If
       it is the standard 3.5 inch double sided disk, you may need to
       substitute /dev/fd0H1440 for the device name (in 1.2.x kernels).
       If you have a newer 2.xx kernel and superformat(1), you may want
       to substitute this for fdformat. See the notes in the
       Miscellaneous section below, or look at the man page. You may
       now exit out of su(1) by typing:

exit
   
       
       From this point on, you may use the mount(8) and umount(8)
       commands logged in as your normal username by typing the
       following:

mount /fd
umount /fd
   
       
       
         _____________________________________________________________
       
       
       
       
       
Backups, Cpio and Gzip

   
       
       
         _____________________________________________________________
       
       
       
       
       
       For backing up my work to take home or to take back to the office
       I use cpio(1) instead of tar(1) as it is far more flexible, and
       better at handling errors etc. To use this on a regular basis,
       first create all the files you need by specifying the command
       below without the -mtime -1 switch. Then you can make daily
       backups from the base directory of your work using the following
       commands:

cd directory
mount /fd
find . -mtime -1 -print | cpio -pmdv /fd
sync
umount /fd
   
       
       When the floppy stops spinning, and the light goes out, you have
       your work backed up. The -mtime option to find(1) specifies files
       which have been modified (or created) within one day (the -1
       parameter). The options for cpio(1) specify copy-pass mode, which
       retain previous file modification times, create directories where
       needed, and do so verbosely. Without a -u (unconditional) flag, it
       will not overwrite files which are the same age or newer.
       
       This operation may also be done over a network, either from NFS
       mounted filesystems, or by using a remote shell as the next
       example shows.

mount /fd
cd /fd
rsh  remotesystem '(cd directory; find . -mtime -1 -print | cpio -oc)' |
     cpio -imdcv
sync
cd
umount /fd
   This example uses cpio(1) to send files from the remote system, and
       update the files on the floppy disk mounted on the local system.
       Note the pipe (or veritical bar) symbol at the end of the remote
       shell line. The arguments which are enclosed in quotes are
       executed remotely, with everything enclosed in braces happening in
       a subshell. The archive is sent as a stream across the network,
       and used as input to the cpio(1) command executing on the local
       machine. (If both systems are using a recent version of GNU cpio,
       then specify -Hcrc instead of c for the archive type. This will do
       error checking, and won't truncate inode numbers.)
       The remote system would have: cpio -oHcrc
       and the local side would have: cpio -imdvHcrc
       
       
       
       To restore the newer files to the other computer, change
       directories to the base directory of your work, and type the
       following:

cd directory
mount -r /fd
cd /fd
find . -mtime -1 -print | cpio -pmdv ~-
cd -
umount /fd
   
       
       If you needed to restore the files completely, you would of course
       leave out the -mtime parameter to find(1).
       
       
       
       The previous examples assume that you are using the bash(1) shell,
       and uses a few quick tricks for specifying directories. The "~-"
       parameter to cpio is translated to the previous default directory.
       In other words, where you were before cd'ing to the /fd directory.
       (Try typing: echo ~- to see the effect, after you have changed
       directories at least once.) The cd ~- or just cd - command is
       another shortcut to switch directories to the previous default.
       These shortcuts often save a lot of time and typing, as you
       frequently need to work with two directories, using this command
       to alternate between them or reference files from where you were.
       
       If the directory which you are tranferring or backing up is larger
       than a single floppy disk, you may need to resort to using a
       compressed archive. I still prefer using cpio(1) for this,
       although tar(1) will work too. Change directories to your work
       directory, and issue the following commands:

cd directory
mount /fd
find . -mtime -1 -print | cpio -ovHcrc | gzip -v > /fd/backup.cpio.gz
sync
umount /fd
   The -Hcrc option to cpio(1) is a new type of archive which older
       versions of cpio might not understand. This allows error checking,
       and inode numbers with more than 16 bits.
       
       Of course, your original archive should be created using find(1)
       without the -mtime -1 options. 
       
       
         _____________________________________________________________
       
       
       
       
       
Floppy as a Raw Device for Large Files or Directories

   
       
       
         _____________________________________________________________
       
       
       
       Sometimes it is necessary to backup or transfer a file or
       directories which are larger than a floppy disk, even when
       compressed. For this, we finally need to resort to using tar.
       
       Prepare as many floppies as you think you'll need by using the
       fdformat(8) command. You do not need to make filesystems on them
       however, as you will be using them in raw mode.
       
       If you are backing up a large set of subdirectories, switch to the
       base subdirectory and issue the following command:

cd directory
tar  -cv -L 1440 -M -f /dev/fd0  .
   This command will prompt you when to change floppies. Wait for the
       floppy drive light to go out of course!
       
       If you need to backup or transfer multiple files or directories,
       or just a single large file, then specify them instead of the
       period at the end of the tar command above.
       
       Unpacking the archive is similar to the above command:

cd directory
tar  -xv -L 1440 -M -f /dev/fd0
   
       
       
         _____________________________________________________________
       
       
       
       
       
Miscellaneous

   
       
       
         _____________________________________________________________
       
       
       
       Finally, here are some assorted tips for using floppies.
       
       The mtools(1) package is great for dealing with MS-DOG floppies,
       as we sometimes must. You can also mount(8) them as a Linux
       filesystem with either msdos or umsdos filesystem types. Add
       another entry to the /etc/fstab entry you made before, so that the
       two lines will look like this:

/dev/fd0    /mnt/fd0  ext2    noauto,user 1 2
/dev/fd0    /mnt/dos  msdos   noauto,user 1 2
   You can now mount an MS-DOS floppy using the command:

mount /mnt/dos
   You can also symlink this to another name as a further shortcut.

ln -s /mnt/dos /dos
mount /dos
   
       
       The danger of using the mount(8) commands rather than mtools(1)
       for users who are more familiar with MSDOS, is that you need to
       explicitly unmount floppies before taking them out of the drive
       using umount(8). Forgetting this step can make the floppy
       unusable! If you are in the habit of forgetting, a simple low-tech
       yellow Post-it note in a strategic place beside your floppy drive
       might save you a few headaches. If your version of Post-it notes
       has the <BLINK> tag, use it!   ;-)
       
     "umount me first!"
   
       
       Newer systems based on the 2.xx kernel are probably shipped with
       fdutils. Check to see if you have a /usr/doc/fdutils-xxx
       directory, where xxx is a version number. (Mine is 4.3). Also
       check for the superformat(1) man page. This supersedes fdformat(1)
       and gives you options for packing much more data on floppies. If
       you have an older system, check the
       ftp://ftp.imag.fr/pub/Linux/ZLIBC/fdutils/ ftp site for more
       information.
       
       The naming convention for floppies in newer 2.xx kernels has also
       changed, although the fd(4) man page has not been updated in my
       distribution. If you do not have a /dev/fd0H1440 device, then you
       probably have the newer system.
       
       
         _____________________________________________________________
       
       
       
      Copyright &copy; 1997, Bill Duncan
      Published in Issue 13 of the Linux Gazette
   
       
       
         _____________________________________________________________
       
       
       
       [ TABLE OF CONTENTS ] [ FRONT PAGE ] Back Next 
       
       
         _____________________________________________________________
       
       
       
       
       
       
         _____________________________________________________________
       
       
       
    "Linux Gazette...making Linux just a little more fun! "
   
       
       
         _____________________________________________________________
       
       
       
       Welcom to the Graphics Muse Set your browser to the width of the
       line below for best viewing.
       &copy 1996 by mjh
         _____________________________________________________________
       
       --> Button Bar --> muse:
         1. v; to become absorbed in thought
         2. n; [ fr. Any of the nine sister goddesses of learning and the
            arts in Greek Mythology ]: a source of inspiration
   W elcome to the Graphics Muse! Why a "muse"? Well, except for the
       sisters aspect, the above definitions are pretty much the way I'd
       describe my own interest in computer graphics: it keeps me deep in
       thought and it is a daily source of inspiration.
       
       [Graphics Mews] [Musings] [Resources] indent T his column is
       dedicated to the use, creation, distribution, and dissussion of
       computer graphics tools for Linux systems.
             Last month I introduced a new format to this column. The
       response was mixed, but generally positive. I'm still getting more
       comments on the format of the column rather than the content. I
       don't know if this means I'm covering all the issues people want
       to hear about or people just aren't reading the column. Gads. I
       hope its not the latter.
             This months issue will include another book review, a
       discussion on adding fonts to your system, a Gimp user's story,
       and a review of the AC3D modeller. The holiday season is always
       busy one for me. I would have liked to do a little more, but there
       just never seems to be enough time in the day. Graphics Mews 
       
             Disclaimer: Before I get too far into this I should note
       that any of the news items I post in this section are just that -
       news. Either I happened to run across them via some mailing list I
       was on, via some Usenet newsgroup, or via email from someone. I'm
       not necessarily endorsing these products (some of which may be
       commercial), I'm just letting you know I'd heard about them in the
       past month.
             I went wondering through a local computer book store this
       month and scanned the graphics texts section. I found a few new
       tidbits that might be of interest to some of you.
       
    3D Graphic File Formats: A Programmers Reference
         Keith Rule has written a new book on 3D Graphics File Formats.
       The book, which contains over 500 pages, has been published by
       Addison-Wesley Developers Press and is listed at $39.95. It
       includes a CD-ROM with a software library for processing various
       3D file formats (both reading and writing), but the code is
       written for MS systems. Keith states there isn't any reason why
       the code shouldn't be portable to other platforms such as Linux.
       Any takers out there?
       ISBN 0-201-48835-3 indent indent
       
    OpenGL Programming for the X Window System
         I noticed a new text on the shelf of a local book store
       (Softpro, in Englewood, Colorado) this past month - Mark J.
       Kilgard's OpenGL Programming for the X Window System. This book,
       from Addison Wesley Developers Press, appears to have a very good
       coverage of how to write OpenGL applications that make use of X
       Windows API's. I haven't read it yet (or even purchased it - yet,
       but I will) so can't say how good it is. Mark is the author of the
       GLUT toolkit for OpenGL. GLUT is to OpenGL what Xt or Motif is to
       Xlib. Well, sort of. indent
       
    Fast Algorithms for 3D-Graphics
          This book, by Georg Glaeser and published by Springer, includes
       a 3.5" diskette of source for Unix systems. The diskette, however,
       is DOS formatted. All the algorithms in the text are written using
       pseudocode, so readers could convert the algorithms to the
       language of choice. indent indent
       
    ImageMagick 3.7.8 released, including a new set of image library plug-ins
         A new release of ImageMagick has been released from Alexander
       Zimmermann. This release includes a "Plug In" library containing
       the various image libraries ImageMagick needs to run. Alexander
       has uploaded this new release to Sunsite as well as ImageMagick's
       Web site. indent
       
    MpegTV Player v0.9
          A new version of the MpegTV Player has been released. This
       version now includes audio support. indent indent
       
    Imaging Technology Inc. IC-PCI frame grabber board driver
         The second public release (v 0.2.0) of a kernel module for the
       Imaging Technology Inc. IC-PCI frame grabber board (rev 1) and the
       AM-VS acquisition module has been released. This driver is
       maintained by GOM mbH (Gesellschaft fuer optische Messtechnik) TU
       Braunschweig, Institute for Experimental Mechanics. A full motion
       video test program and a read function for original camera files
       are included.
       Author: Matthias Stein
       Maintained by: Dirk Bergmann
       This software is not really free (see the LICENSE file). indent
       
    Viewmol 2.0 released
          I don't know much about this tool, but it appears to have alot
       of graphics related features, so I thought I'd mention it here.
       The LSM gives the following information:
       
       Viewmol is a program for the visualization of outputs from quantum
       chemical as well as from molecular mechanics programs. Currently
       supported are Gaussian 9x, Discover, DMol/DSolid, Gulp, Turbomole,
       and PDB files. Properties visualized include geometry (with
       various drawing modes), vibrations (animated or with arrows),
       optimization history/MD trajectories, MO energy level diagram,
       MOs, basis functions, electron density. Drawings can be saves as
       TIFF, HPGL, Postscript, input files for Rayshade.
       
       ftp://ftp.ask.uni-karlsruhe.de/pub/education/chemistry/viewmol-2.0
       .tgz indent indent indent
       
    Did You Know?
          3D Site (http://www.3dsite.com/3dsite) is a Web site devoted to
       everything 3D. There are job postings, links to free repositories
       of 3D models and lots of other valuable information.
       
             3D Cafe (http://156.46.199.2/3dcafe/) is another Web site
       with various useful 3D information. It also maintains a large
       collection of DXF and 3DS model files.
       
    An Important Survey
          I've been talking to a couple of publishers about doing a book
       aimed at Linux users. I'd like to write a User's Guide for the
       Gimp but the publisher feels a more general text on doing
       Web-based graphics might have a wider appeal (face it - the Linux
       audience just isn't the size of the MS audience - yet - but the
       publishers are considering both types of books). I told them I'd
       ask my readers which type of text they'd like to see. The Gimp
       book would include details on how to use each of the applications
       features as well as a number of tutorials for doing various types
       of effects. The book on doing graphics for Web pages would include
       discussions on using HTML, information on tools besides the Gimp
       and a few case studies (including something on animation).
       However, the Web book wouldn't go into as much detail for each of
       the tools. That information would be more general in nature.
             I don't have a server to run any CGI scripts to register
       votes, so simply mail me with your opinions. Thanks!
       
    A Call for Help
          I plan on covering more 3D tools in the future, but I have to
       learn to use them first. The next tool I'm going to look into is
       BMRT. If you use BMRT and want to help me get started drop me a
       line. I'd like to do an introduction to BMRT in the March issue
       if possible but I want to make sure I know what I'm talking about
       first. Thanks! indent indent indent
       
       Musings 
       
       
    A Gimp User's Story (or "Why I Use the Gimp")
    The following piece was posted on the Gimp User's Mailing list by
       Mike Phillips.
       
             At work, we have a "Library News Network", which is actually
       a 386 pc running a TV via a video converter in a continual
       slideshow with information about upcoming events in the law
       library and the law school. Last year, my boss did some stuff in
       Freelance Graphics which, quite frankly, was rather limited in
       effect.
             This year, it's my baby, and I'm making the slideshow
       (640x480x256 GIF files, run by a simple DOS program and looped by
       a batch file) in the GIMP. Here are some things I've done to make
       the text more readable and make the display reasonably
       eye-catching. Nothing fancy, but hopefully the tricks will give
       other people ideas to play with on their own.
             First, don't use a plain background. The blend tool is very
       nice for this, and shaded green or blue with bright text is rather
       nice looking. Start with a color and add some noise Create a blend
       image of the same size and multiply by the image with noise. This
       creates a very cool background for a slide. Better yet, if there's
       an appropriate photograph, use it! (I used a gorgeous picture of
       Yosemite Park to announce an environmental law symposium, and a
       decent photo of the U.S. Supreme Court justices to announce our
       Supreme Court Preview.)
             On the subjects of backgrounds, since I don't remember
       seeing this tip, here's a quickie for clouds: Make a plasma of the
       appropriate size, grayscale it, convert it back to color, and
       Brightness/Contrast/Gamma it into submission. I usually knock the
       brightness up about 75-100, and the blue up to around 5 and the
       green to about 2. Instant pretty sky (Obviously, skies from other
       planets could be done with reds and greens and whatnot.)
             For the text, nothing beats some good fonts. Hit a font
       archive, or buy a $10-$15 CD filled with fonts. Granted, I have
       the Caldera Network Desktop, so I can use some fonts that (I
       think) XFree can't, thanks to the font server, but it's worth a
       shot. I got a CD with 1250 fonts for $13. [Ed. Next month I'll
       cover how to add fonts to your system so you can use them with the
       Gimp. mjh]
             Here's a variation on the rounded-text tips: work out your
       text, then Duplicate it once and Offset it once (say 4x4). Edge
       Detect then Invert the duplicate and Gaussian Blur the offset
       twice. Multiply the resulting images, and use the original as a
       mask to composite something else over the image resulting from the
       multiplication. Very nice, edged & floating/shadowed text. Shows
       up great on a TV monitor.
             For the text, use any appropriate single color. Bright
       colors and high contrast work very well for what I do, although
       I've played with textures, rippled blends, plasma clouds, and
       what-not.
             Of course, it can be spiced up with all sorts of clipart (I
       heartily recommend Barry's Clipart Server (www.barrysclipart.com),
       from which I shamelessly borrow, and voila, instant slideshow!
             I have left our Fall Break edition of the LNN at:
       http://www.lawlib.wm.edu/LNN-old/. if you want to see some of
       what can be done with it. You might be better off watching the
       show when the graphics aren't resized to 320x240. Also, the latest
       version of these is available at http://www.lawlib.wm.edu/LNN/.
       
       
       [Ed. Later Mike posted another message that included some
       interesting effects. I thought it might be appropriate to include
       them with his other posting.]
       
       
             Recently, while wandering through the plug-ins available, I
       found the charcoal plug-in. Compiled it, added it, used it. Rather
       nifty, actually. However, it got me thinking and experimenting,
       and I produced two potentially interesting effects:
       
       (1) Pastel sketch: Take a color (RGB) image, Edge-detect it,
       Invert, and (optionally) contrast autostretch. On many images,
       this will produce a nifty pastel sketch. If the image is too high
       of detail, degrade the color or pixelize it first, otherwise you
       may end up with too many extraneous lines.
       
       (2) Watercolor sketch: Take a color (RGB) image, make a grayscale
       of it. Edge Detect the grayscale (this will give you the sketch
       lines); this can be hard to balance the way you want, so you may
       want to threshold it or pixelize the image first. Then, pixelize
       and degrade the main image to 32 colors (16 or 20 works even
       better). Eliminate the background you don't want, Gaussian blur it
       a few times, and brighten it some. Multiply the edging onto it.
       Voila; (nearly) instant watercolor, akin to the court sketches on
       news shows.
       
       Mike Phillips, mike@lawlib.wm.edu indent
       
    Jim Blinn's Corner - A Trip Down the Graphics Pipeline
    indent I am not formally trained in computer graphics (1). Everything
       I know I've learned in the last year or so by reading, examining
       source code, and through the kind assistance of many members of
       the Net. So my ability to understand some of the more formal texts
       on computer graphics is limited.
             Given this limitation, I found I was still able to read and
       comprehend a good portion of Jim Blinn's book Jim Blinn's Corner -
       A Trip Down the Graphics Pipeline, which is a collection of
       articles taken from his column in the IEEE Computer Graphics and
       Applications journal. This book is the first of what may be two
       books, assuming there is sufficient interest in the first book.
       The second will cover a set of pixel arithmetic articles taken
       from the same column.
             In the preface Jim describes how he used a writing style
       that is "certainly lighter than a typical SIGGRAPH paper, both in
       depth and in attitude." I can't agree more. Computer graphics
       should be a fun subject and, despite the math, this book does
       provide a giggle here and there.
             Don't get me wrong, though. There is plenty of the technical
       details on how to compute positions in 3D space, perspective
       shadows, and subpixelic particles. Hefty stuff for the beginner.
       Nearly incomprehensible to the person who hasn't used matrix
       arithmetic in the past 8 years. Still, chapters like The Ultimate
       Design Tool (which talks about how an idea should start), and
       Farewell to Fortran (which talks about using various languages
       in computer graphics) provided enough non-mathematical discussions
       to let my brain recover while still keeping my interest peaked.
             I haven't read the book front to back yet. I'm saving whats
       left (about half the book) for my 16 days of freedom scheduled to
       start later this month. Its first on my reading list. Second will
       be my college Linear Algebra text. The first half of Jim's book
       reminded me about how much I'd forgotten in 8 years. Like the
       saying goes, one must strive for the impossible before they know
       what is possible. indent indent indent
        More Musings...
          + Review: The AC3D Modeller - An introduction to the very nifty
            3D modeller from Andy Colebourne. Warning: lots of images on
            this page!
          + History of the Portable Network Graphics (PNG) format - A
            detailed look at how an Internet-based cooperative effort
            brought about this graphics file format specification.
   indent indent indent
       indent
       
    The IRTC - A raytracing competition for the fun of it
    indent F or the past few months, I've been helping to administer an
       Internet-based competition for users of raytracing software. This
       competition, the Internet Ray Tracing Competition or IRTC, is open
       to anyone interested in creating 3D images using software on any
       platform as long as the software falls within a few basic
       guidelines. It is based on another competition started back in
       1994 by Matt Kruse. Matt eventually had to close down the contest
       due to the enormous amount of time it takes to run such a contest.
       At the time, he was more or less doing all the work himself.
             Earlier this year Chip Richards started to organize the
       contest once again. A group of interested individuals signed up to
       help out. In the end, most of us (myself included) provide only
       organizational input - ideas for rules or input on rulings
       regarding cheating (yes, there has been some of that), helping to
       select topics, and so forth. Most of the real work has been done
       by Chip, Bill Marrs, and Jon Peterson (although Jon has since had
       to move on to other things).
             The contest is made up independent rounds that last 2
       months. Each round has a topic which entrants must use as the
       basis for their images. Entries are supposed to be new images,
       created during the span of the contest, however most people use
       bits and pieces of older models that they or someone else has
       created. The tools allowed vary but raytracing tools are preferred
       and no post processing is allowed (for example, you can't add a
       lens flare after the image has been rendered). Anyone is allowed
       to vote (currently) on the images and winners receive small prizes
       like CDs and prints of their images.
       
       more IRTC... (same page as AC3D review)
       
       Resources 
       The following links are just starting points for finding more
       information about computer graphics and multimedia in general for
       Linux systems. If you have some application specific information
       for me, I'll add them to my other pages or you can contact the
       maintainer of some other web site. I'll consider adding other
       general references here, but application or site specific
       information needs to go into one of the following general
       references and not listed here.
       
       
       Linux Graphics mini-Howto 
       Unix Graphics Utilities 
       Linux Multimedia Page 
       
       
       
       
Future Directions

   Next month:
          + TkPOV - a POV-Ray scene file editor
          + Book Review: 3D Graphic File Formats by Keith Rule
          + Adding fonts to your system
          + Gimp Tips
          + ...and lots more!
   
       Let me know what you'd like to hear about!
       
       
         _____________________________________________________________
       
         1. Anyone having an extra, unclaimed scholarship in computer
            graphics is encouraged to contact me. I give preference to
            those who have them within commuting distance of Denver,
            where I live. 
   
       
       
         _____________________________________________________________
       
       
       
      Copyright &copy; 1997, Michael J. Hammel
      Published in Issue 13 of the Linux Gazette
   
       
       
         _____________________________________________________________
       
       
       
       [ TABLE OF CONTENTS ] [ FRONT PAGE ] Back Next 
       
       
         _____________________________________________________________
       
       
       
       
       
       
         _____________________________________________________________
       
       
       
       
       
More...

   
       Musings 
          + Review: The AC3D Modeller
          + more IRTC...
   indent
       &copy 1996 Michael J. Hammel indent
       
       
       
    Review: The AC3D Modeller
   
             There are only a few 3D modellers available for Linux: AMAPI
       (which may now only be available for the Mac, based on one report
       I've received), Midnight Modeller, SCED/SCEDA, and AC3D. Each of
       these has its advantages and disadvantages. I've tried each of
       these at least briefly. A couple, SCED and AC3D, I've used to
       actually create scenes. Lets take a quick look at one of these -
       AC3D.       AC3D comes from Andy Colebourne. It is a shareware
       modeller that comes in binary format only. It is available for
       Linux, SGI's and Sun's (both SunOS and Solaris). Once registered
       you have access to a private Web site from which you can download
       the full version of the software. Documentation is a bit sparse (a
       common problem with much of the software available for Linux, in
       this authors opinion), consisting of about 12 or 13 pages
       formatted in either HTML or Postscript. The distribution package
       contains the binary, the HTML manual with a few images and a set
       of object files that are necessary for packages which use the Mesa
       Graphics Library, which AC3D does. AC3D
       Figure 1: Example AC3D session (this is taken from the AC3D Web
       site).
             The interface consists of 4 view windows and a control
       panel. There are 3 orthographic views and a 3D view. Changes in
       one of the orthographic view windows are reflected in the other
       views. Edits are not allowed in the 3D view. The 3D view can
       provide wireframe, filled or textured surfaces. My system is not
       quite fast enough to handle anything but the wireframe surface so
       I won't be able to say much about the texturing features of the
       modeller.
             AC3D supports a number of import file formats, including DXF
       and Lightwave files. It can export POV, RIB, VRML and a couple of
       other formats. Since the modeller is a based on vertices (as
       opposed to primitives like spheres or boxes) it is quite easy to
       manipulate basic shapes into more complex ones. This can be a
       disadvantage to those used to the CSG aspects of SCED or users of
       POV-Ray, but it really doesn't take that long to get used to. Even
       though the modeller bases its shapes on vertices, there are still
       a collection of basic shapes provided: disk, line, box, sphere,
       and mesh are just some of these. These shapes are displayed with a
       given number of vertices. The number of vertices can be configured
       and its possible to add more vertices where necessary.
                   One of the nicest features is the ability to extrude a
       2D shape into 3 dimensions. Lets follow an example of this. First,
       select the "ellipse" drawing function from the control panel and
       create a stretched out ellipse in the XY orthographic view. AC3D
       Figure 2: An ellipse       Next, change the Edit type to "vertex"
       in the control panel and select all the vertices on the lower half
       of the ellipse (but not the ones on the end of the ellipse).
       Delete these with the "delete" function in the control panel. Then
       select the two lowest vertices and insert some new vertices (as
       shown in Figure 3). AC3D
       Figure 3: The ellipse has been halved and some new vertices added.
             This next part is a little tricky. What you want to do is
       select the vertices on each end of the object and move them, one
       at a time, until you get a slightly rounded effect. Then select 4
       or 5 of the vertices on the back end (the left side in Figure 4)
       and strecth them out a little, to flatten the wings trailing edge.
       Then get rid of the extra vertices along the bottom of the wings
       edge by selecting them and using the "delete" function in the
       control panel. The result should look something like Figure 4.
       AC3D
       Figure 4: The wing edge takes shape       This isn't bad, but a
       wing should be smoother around the top and edges, so change the
       Edit type to "Object" and select the wing. Then use the "Spline
       Surfaces" option from the Object pull-down menu. This adds a bunch
       of new vertices to the object and creates a smoother line around
       the wing. AC3D
       Figure 5: Smoothing the wing edge.       Now lets take this simple
       shape and extrude it. Make sure the Edit type is still "Object"
       and select the wing edge. We need to change to the XZ orthographic
       view window. Up to this point we've been using the XY viewport.
       Click on "Extrude" under the Mouse options in the control panel.
       Grab the object in the XZ viewport and drag up. The original
       points stay put and a new set of points is moved to where ever you
       drag to. Once you let go of the mouse button you'll see the new
       points get connected to their corresponding points on the original
       object. Notice how the connecting lines aren't quite straight.
       This would be bad for a real wing, so we'll straighten them out.
       AC3D
       Figure 6: The wing edge gets extruded.       In this next figure,
       the control panel was used to change the Edit mode to "vertices"
       and the vertices on the new side of the extruded object have been
       selected. Once selected, the "move" option under the Mouse
       features allows the selected vertices to be moved as a group. When
       these vertices are moved the lines connecting them to the opposite
       end are redrawn. You can play with this a bit in order to get the
       connecting lines to become straight. Note that its not absolutely
       necessary to correctly align the two ends of the extruded object,
       but this is one way to do so if you feel it necessary. AC3D
       Figure 7: The ends of the extruded object are aligned.       Now
       switch back to the "object" Edit mode and select the object. The
       bounding box (in green) has handles that can be grabbed to drag
       the bounding box to resize the object. Use the middle top and
       bottom handles to make the object wider in the XZ view. AC3D
       Figure 8: Stretch the object a bit.       Next, switch back to
       "vertices" Edit mode and select the vertices on one end of the
       object. Click on "Create Surface" under Functions in the control
       panel. If the surface (as viewed in the 3D view) does not appear
       solid you can select "Poly" under Surface to create a solid
       surface to close the end of the object. Repeat this process for
       the other end.
       
             Viola! You've got a solid surfaced wing, just like the one
       in Figure 9. (The grid is an option for the 3D view window and not
       part of the image.) Of course, this is a pretty simplistic
       example, but you should get the idea of how easy it is to create
       shapes using AC3D. You'll need to export the file to POV or RIB
       format and add some real textures to finish up the project, of
       course. AC3D
       Figure 9: The solid surfaced wing.
             When I first started examining modellers I got my hands on
       SCED, a nifty modeller from Stephen Chenney. One of the nice
       features of SCED is that it is constraint based - you can join
       objects using CSG and then constrain them to certain points. This
       allows you to create an arm, for example, that can bend only at
       the elbow. AC3D works similarly in that you can rotate any set of
       points around a single point within one of the orthographic views.
       For example, if I created an arm I could select "Rotate" from the
       control panel and then use the mouse to rotate the arm around a
       single point, such as the elbow, in one of the 2D view windows. If
       I need it to move in 3D I need to do this type of rotation in 2 or
       more of the 2D view windows. This process is a little different
       than SCED, which can move objects in 3 dimensions, but the result
       is the same. In fact, at times it can be a little easier to keep
       your bearings using multiple rotations in 2D.
             Since I've never used any of the modellers available for
       other systems (such as high end modellers on SGI's or any of the
       modellers available for Microsoft or Mac systems) I can't say how
       well AC3D compares to them. I do know that I found the modeller
       fairly easy to learn, but I tend to be more motivated than some
       folks. AC3D could use some online help (whats the difference
       between a "Poly" and a "Polyline", for example) and more detailed
       documentation in general. It would also be nice to be able to
       unhide selected objects instead of all hidden objects. Andy has
       told me that a new version coming soon will include the ability to
       specify the exact dimensions of a selected object or set of
       vertices. This is a very important feature in my eyes. I tend to
       like to use modellers to create individual objets and then use the
       conditional constructs of POV-Ray to position multiple copies of
       them, such as trees or rocks or houses. By constraining an object
       to a unit size it makes it easier to position and resize objects
       using POV-Ray.
             Of all the modellers I've tried AC3D is probably the easiest
       to use. Its ability to import formats like DXF gives it a step up
       on SCED, although I really like the latter too. I don't
       particularly mind that you don't get the source to AC3D since I'm
       mostly interested in just using the modeller and not in developing
       new features for it. It would be nice if there were a plug-in
       interface, but I'm not such a power user yet that I need that
       feature. Aside from a lack of detailed documentation, and a few
       keystrokes that are already used by fvwm, I find the AC3D modeller
       worth the registration price.
       
       indent
       
       
       
    more IRTC...
   
             The contest started in earnest in May/June of 1996. The
       topic then was Time and there were some stunning entries. In
       July/August we had fewer entries, but the topic - Summer - was a
       little tougher to nail down. In September/October we hit the
       jackpot with Science Fiction. Well over 200 entries were submitted
       for this round. Thats quite a difference from the 20-30 submitted
       during Matt's original contests. Fortunately much of the work for
       viewing, voting, and tabulating information has been automated.
       The contest has been great fun and has been accompanied with
       lively discussions on the associated irtc-l mailing list.
             Unfortunately, there are always those that have to try to
       ruin things for everyone else. We had some people submit images
       that were fair but not likely winners. They then submitted
       multiple votes. A vote consists of ratings of all the images with
       values between 1-20 for each in 3 categories - needless to say
       this takes awhile to accomplish. Any vote that does not include
       ratings for all images is not counted in the final tally. The
       multiple votes were done offline (which is permissable) and
       submitted from different email accounts. The artists images
       received very high marks while all the rest received very low
       (within a very small range) ratings. Then they got some of their
       friends to do the same thing. Beyond this, others have submitted
       numerous entries that they had made in the past (prior to the
       contest) that just happen to fit the category (how many 3D
       artists, for fun or profit, have *never* made a space scene?) in
       order to turn the contest into their own private gallery. The
       spirit of the competition is lost on some people, I'm afraid.
             I haven't done any of the automation nor have I worked on
       the very nice web site for the contest. But I've watched Chip and
       Bill do so. Its very frustrating knowing how much effort they put
       into this, trying very hard not to give themselves or anyone else
       unfair advantages and still make the contest fun for everyone only
       to see someone still try to cheat the system. Why? For a couple of
       CDs? Remember when the Internet was a friendly, honest place?
             Still, the contest continues and the Admin Team is working
       on ways of keeping the contest fun, open to participation, and
       fair. The guys could use a new host for their contest. Walnut
       Creek, the current host, appears to be limiting ftp connections
       and the amount of disk space required for 200+ images can get
       rather large.
             If you are into 3D rendering for the fun of it you owe it to
       yourself to take a shot at the IRTC. Its fun to see how your
       images stack up against others. Many of the voters offer comments
       on the images which can very useful in any future images you
       render. Check our the IRTC Web Site to get more details and join
       in!
       
       indent &copy 1996 by Michael J. Hammel
       
       
         _____________________________________________________________
       
       
       
       
       
More...

   
       Musings 
       
       
       
       
    History of the Portable Network Graphics (PNG) format
   by Greg Roelofs 
       
       Prehistory
             The Story of PNG actually begins way back in 1977 and 1978
       when two Israeli researchers, Jacob Ziv and Abraham Lempel, first
       published a pair of papers on a new class of lossless
       data-compression algorithms, now collectively referred to as
       ``LZ77'' and ``LZ78.'' Some years later, in 1983, Terry Welch of
       Sperry (which later merged with Burroughs to form Unisys)
       developed a very fast variant of LZ78 called LZW. Welch also filed
       for a patent on LZW, as did two IBM researchers, Victor Miller and
       Mark Wegman. The result was...you guessed it...the USPTO granted
       both patents (in December 1985 and March 1989, respectively).
             Meanwhile CompuServe--specifically, Bob Berry--was busily
       designing a new, portable, compressed image format in 1987. Its
       name was GIF, for ``Graphics Interchange Format,'' and Berry et
       al. blithely settled on LZW as the compression method. Tim Oren,
       Vice President of Future Technology at CompuServe (now with
       Electric Communities), wrote: ``The LZW algorithm was incorporated
       from an open publication, and without knowledge that Unisys was
       pursuing a patent. The patent was brought to our attention, much
       to our displeasure, after the GIF spec had been published and
       passed into wide use.'' There are claims [1] that Unisys was made
       aware of this as early as 1989 and chose to ignore the use in
       ``pure software''; the documents to substantiate this claim have
       apparently been lost. In any case, Unisys for years limited itself
       to pursuit of hardware vendors--particularly modem manufacturers
       implementing V.42bis in silicon.
             All of that changed at the end of 1994. Whether due to
       ongoing financial difficulties or as part of the industry-wide
       bonk on the head provided by the World Wide Web, Unisys in 1993
       began aggressively pursuing commercial vendors of software-only
       LZW implementations. CompuServe seems to have been its primary
       target at first, culminating in an agreement--quietly announced on
       28 December 1994, right in the middle of the Christmas
       holidays--to begin collecting royalties from authors of
       GIF-supporting software. The spit hit the fan on the Internet the
       following week; what was then the comp.graphics newsgroup went
       nuts, to use a technical term. As is the way of Usenet, much ire
       was directed at CompuServe for making the announcement, and then
       at Unisys once the details became a little clearer; but mixed in
       with the noise was the genesis of an informal Internet working
       group led by Thomas Boutell [2]. Its purpose was not only to
       design a replacement for the GIF format, but a successor to it:
       better, smaller, more extensible, and FREE.
       
       The Early Days (All Seven of 'Em)
             The very first PNG draft--then called ``PBF,'' for Portable
       Bitmap Format-- was posted by Tom to comp.graphics,
       comp.compression and comp.infosystems.www.providers on Wednesday,
       4 January 1995. It had a three-byte signature, chunk numbers
       rather than chunk names, maximum pixel depth of 8 bits and no
       specified compression method, but even at that stage it had more
       in common with today's PNG than with any other existing format.
             Within one week, most of the major features of PNG had been
       proposed, if not yet accepted: delta-filtering for improved
       compression (Scott Elliott); deflate compression (Tom Lane, the
       Info-ZIP gang and many others); 24-bit support (many folks); the
       PNG name itself (Oliver Fromme); internal CRCs (myself); gamma
       chunk (Paul Haeberli) and 48- and 64-bit support (Jonathan
       Shekter). The first proto-PNG mailing list was also set up that
       week; Tom released the second draft of the specification; and I
       posted some test results that showed a 10% improvement in
       compression if GIF's LZW method was simply replaced with the
       deflate (LZ77) algorithm. Figure 1 is a timeline listing many of
       the major events in PNG's history.
       
       indent 4 Jan 95 PBF draft 1 (Thomas Boutell) 4 Jan 95
       delta-filtering (Scott Elliott) 4 Jan 95 deflate compression (Tom
       Lane et al.) 4 Jan 95 24-bit support (many) 5 Jan 95 TeleGrafix
       LZHUF proposal (same or slightly larger) 6 Jan 95 PNG name (Oliver
       Fromme) 7 Jan 95 PBF draft 2 (Thomas Boutell) 7 Jan 95 ZIF early
       results (Greg Roelofs) 7 Jan 95 internal CRC(s) (Greg Roelofs) 8
       Jan 95 gamma chunk (Paul Haeberli) 8 Jan 95 48-, 64-bit support
       (Jonathan Shekter) 9 Jan 95 FGF proposal, implementation (Jeremy
       Wohl) 10 Jan 95 first NGF/PBF/proto-PNG mailing list (Jeremy Wohl)
       15 Jan 95 PBF draft 3 (Thomas Boutell) 16 Jan 95 CompuServe
       announces GIF24 development (Tim Oren) 16 Jan 95 spec available on
       WWW (Thomas Boutell) 16 Jan 95 PBF draft 4 (Thomas Boutell) 23 Jan
       95 PNG draft 5 (Thomas Boutell) 24 Jan 95 PNG draft 6 (Thomas
       Boutell) 26 Jan 95 final 8-byte signature (Tom Lane) 1 Feb 95 PNG
       draft 7 (Thomas Boutell) 2 Feb 95 Adam7 interlacing scheme (Adam
       Costello) 7 Feb 95 CompuServe announces PNG == GIF24 (Tim Oren) 13
       Feb 95 PNG draft 8 (Thomas Boutell) 7 Mar 95 PNG draft 9 (Thomas
       Boutell) 11 Mar 95 first working PNG viewer (Oliver Fromme) 13 Mar
       95 first valid PNG images posted (Glenn Randers-Pehrson) 1 May 95
       pnglib 0.6 released (Guy Eric Schalnat) 1 May 95 zlib 0.9 released
       (Jean-loup Gailly, Mark Adler) 5 May 95 PNG draft 10 (Thomas
       Boutell) 13 Jun 95 PNG home page (Greg Roelofs) 8 Dec 95 PNG spec
       0.92 released as W3C Working Draft 23 Feb 96 PNG spec 0.95
       released as IETF Internet Draft 28 Mar 96 deflate and zlib
       approved as Informational RFCs (IESG) 22 May 96 deflate and zlib
       released as Informational RFCs (IETF) 1 Jul 96 PNG spec 1.0
       released as W3C Proposed Recommendation 11 Jul 96 PNG spec 1.0
       approved as Informational RFC (IESG) 4 Aug 96 VRML 2.0 spec
       released with PNG as requirement (VAG) 1 Oct 96 PNG spec 1.0
       approved as W3C Recommendation 14 Oct 96 image/png approved (IANA)
       indent Figure 1: a PNG timeline
             Perhaps equally interesting are some of the proposed
       features and design suggestions that ultimately were not accepted:
       the Amiga IFF format; uncompressed bitmaps either gzip'd or stored
       inside zipfiles; thumbnail images and/or generic multi-image
       support; little-endian byte order; Unicode UTF-8 character set for
       text; YUV and other lossy image-encoding schemes; and so forth.
       Many of these topics produced an amazing amount of discussion--in
       fact, the main proponent of the zipfile idea is still making noise
       two years later.
       
       Onward, Frigidity
             One of the real strengths of the PNG group was its ability
       to weigh the pros and cons of various issues in a rational manner
       (well, most of the time, anyway), reach some sort of consensus and
       then move on to the next issue without prolonging discussion on
       ``dead'' topics indefinitely. In part this was probably due to the
       fact that the group was relatively small, yet possessed of a
       sufficiently broad range of graphics and compression expertise
       that no one felt unduly ``shut out'' when a decision went against
       him. (All of the PNG authors were male. Most of them still are.
       I'm sure there's a dissertation in there somewhere...) But equally
       important was Tom Boutell, who, as the initiating force behind the
       PNG project, held the role of benevolent dictator--much the way
       Linus Torvalds does with Linux kernel development. When consensus
       was impossible, Tom would make a decision, and that would settle
       the matter. (On one or two rare occasions he might later have been
       persuaded to reverse the decision, but this generally only
       happened if new information came to light.)
             In any case, the development model worked: by the beginning
       of February 1995, seven drafts had been produced, and the PNG
       format was settling down. (The PNG name was adopted in Draft 5.)
       The next month was mainly spent working out the details:
       chunk-naming conventions, CRC size and placement, choice of filter
       types, palette-ordering, specific flavors of transparency and
       alpha-channel support, interlace method, etc. CompuServe was
       impressed enough by the design that on the 7th of February they
       announced support for PNG as the designated successor to GIF,
       supplanting what they had initially referred to as the GIF24
       development project. [3] By the beginning of March, PNG Draft 9
       was released and the specification was officially frozen--just
       over two months from its inception. Although further drafts
       followed, they merely added clarifications, some recommended
       behaviors for encoders and decoders, and a tutorial or two.
       Indeed, Glenn Randers-Pehrson has kept some so-called ``paleo
       PNGs'' that were created at the time of Draft 9; they are still
       readable by any PNG decoder today. [4]
       
       Oy, My Head Hurts
             But specifying a format is one thing; implementing it is
       quite another. Although the original intent was to create a
       "lightweight" format--and, compared to TIFF or even JPEG, PNG is
       fairly lightweight--even a completely orthogonal feature set can
       introduce substantial complications. For example, consider
       progressive display of an image in a web browser. First comes
       straight decoding of the compressed data; no problems there. Then
       any line-filtering must be inverted to get the actual image data.
       Oops, it's an interlaced image: now pixels are appearing here and
       there within each 8x8 block, so they must be rendered
       appropriately (and possibly buffered). The image also has
       transparency and is being overlaid on a background image, adding a
       bit more complexity. So far we're not much worse off than we would
       be with an interlaced, transparent GIF; the line filters and 2D
       interlacing scheme are pretty straightforward extensions to what
       programmers have already dealt with. Even adding gamma correction
       to the foreground image isn't too much trouble.
             But wait, it's not just simple transparency; we have an
       alpha channel! And we don't want sparse display--we really like
       the replicating progressive method Netscape Navigator uses. Now
       things are tricky: each replicated pixel-block has some percentage
       of the fat foreground pixel mixed in with complementary amounts of
       the background pixels in the block. And just because the current
       fat pixel is 65% transparent (or, even worse, completely opaque)
       doesn't mean later ones in the same block will be, too: thus we
       have to remember all of the original background pixel-values until
       their final foreground pixels are composited and overlaid. Toss in
       the ability to render all of this nicely on an 8-bit, colormapped
       display, and most programmers' heads will explode.
       
       Make It So!
             Of course, some of these things are application
       (presentation or front-end) issues, not general PNG-decoding
       (back-end) issues. Nevertheless, a good PNG library should allow
       for the possibility of such applications--which is another way of
       saying that it should be general enough not to place undue
       restrictions on any programmer who wants to implement such things.
       
             Once Draft 9 was released, many people set about writing PNG
       encoders and/or decoders. The true glory is really reserved for
       three people, however: Info-ZIP's Jean-loup Gailly and Mark Adler
       (both also of gzip fame), who originally wrote Zip's deflate() and
       UnZip's inflate() routines and then, for PNG, rewrote them as a
       portable library called zlib [5]; and Guy Eric Schalnat of Group
       42, who almost single-handedly wrote the libpng reference
       implementation (originally ``pnglib'') from scratch. [6] The first
       truly usable versions of the libraries were released two months
       after Draft 9, on the first of May, 1995. Although both libraries
       were missing some features required for full implementation, they
       were sufficiently complete to be used in various freeware
       applications. (Draft 10 of the specification was released at the
       same time, with clarifications resulting from these first
       implementations.)
       
       Fast-Forward to the Present
             The pace of subsequent developments slowed at that point.
       This was partly due to the fact that, after four months of intense
       development and dozens of e-mail messages every day, everyone was
       burned out; partly because Guy controlled libpng's development and
       became busy with other things at work; and partly because of the
       perception that PNG was basically ``done.'' The latter point was
       emphasized by a CompuServe press release to that effect in
       mid-June (and one, I might add, in which their PR guys claimed
       much of the credit for PNG's development, sigh).
             Nevertheless, progress continued. In June of 1995 I set up
       the PNG home page, now grown to roughly a dozen pages [7]; Kevin
       Mitchell officially registered the ``PNGf'' Macintosh file ID with
       Apple Computer. In August Alexander Lehmann and Willem van Schaik
       released a fine pair of additions to the NetPBM image-manipulation
       suite, particularly handy under Linux: pnmtopng and pngtopnm
       version 2.0. And in December at the Fourth International World
       Wide Web Conference, the World Wide Web Consortium (W3C) released
       the PNG Specification version 0.92 as an official standards-track
       Working Draft.
             1996 saw the February release of version 0.95 as an Internet
       Draft by the Internet Engineering Task Force (IETF), followed in
       July by the Internet Engineering Steering Group's (IESG) approval
       of version 1.0 as an official Informational RFC. (However, the
       IETF secretary still hasn't issued the actual RFC number at the
       time of this writing, five months later. Sigh.) The Virtual
       Reality Modeling Language (VRML) Architecture Group in early
       August adopted PNG as one of the two required image formats for
       minimal VRML 2.0 conformance. [8] Meanwhile the W3C promoted the
       spec to Proposed Recommendation status in July and then to full
       Recommendation status on the first of October. [9] Finally, in
       mid-October the Internet Assigned Numbers Authority (IANA)
       formally approved ``image/png'' as an official Internet Media
       Type, joining image/gif and image/jpeg as non-experimental image
       formats for the Web. Much of this standardization would not have
       happened nearly as quickly without the tireless efforts of Tom
       Lane and Glenn Randers-Pehrson, who took over editing duties of
       the spec from Thomas Boutell.
       
       Current Status
             So where are we today? The future is definitely bright for
       PNG, and the present isn't looking too bad, either. I now have
       over 125 applications listed [10] with PNG support either current
       or planned (mostly current); among the ones available for Linux
       are:
          + XV (image viewer/converter)
          + ImageMagick (image viewer/converter)
          + GRAV (image viewer)
          + Zgv (image viewer)
          + xli (image viewer)
          + XPaint (image editor)
          + The GIMP (image editor)
          + Image Alchemy (image converter)
          + pnmtopng/pngtopnm (image converters)
          + XEmacs (editor/web browser/operating system/etc.)
          + gforge (fractal terrain generator)
          + Fractint (fractal generator)
          + Ghostscript (PostScript viewer/converter)
          + GNUplot (plotting program)
          + PV-WAVE (scientific visualization program)
          + POV-Ray (ray-tracer)
          + VRweb (VRML browser)
          + X Mosaic (web browser)
          + Arena (web browser)
          + Chimera (web browser)
          + Grail (web browser)
          + Amaya (web browser/editor)
          + Mapedit (image-map editor)
          + WWWis (HTML IMG sizer)
          + file(1) (Unix file-type identifier)
   
             Discerning readers will note the conspicuous absence of
       Netscape Navigator. Despite the fact that Netscape was aware of
       the PNG project from the beginning and unofficially indicated
       ``probable support''; despite the nice benefits gamma correction,
       alpha support and 2D interlacing bring to WWW applications;
       despite the fact that the WWW Consortium, of which Netscape is a
       member, released the PNG spec as its first official
       Recommendation; despite the requirement to support PNG in VRML 2.0
       viewers like Netscape's own Live3D plug-in; and despite
       considerable pestering by members of the PNG group and the
       Internet community at large, Netscape is still only
       ``considering'' future support of PNG. Until Netscape either
       supports PNG natively or gets swept away by Microsoft or someone
       else, PNG's usefulness as an image format for the Web is
       considerably diminished.
             On the other hand, our buds at Microsoft recognized the
       benefits of PNG and apparently embraced it wholeheartedly. They
       have not only made it the native image format of the Office97
       application suite but have also repeatedly promised to put it into
       Internet Explorer (theoretically by the time of the 4.0
       betas--we'll see about that). Assuming they do, Netscape is almost
       certain to follow suit. (See? Microsoft is good for something!) At
       that point PNG should enjoy a real burst of WWW interest and
       usage.
             In the meantime, PNG viewing actually is possible with Linux
       Netscape; it's just not very useful. Rasca Gmelch is working on a
       Unix plug-in with (among other things) PNG support. Although it's
       still an alpha version and requires ImageMagick's convert utility
       to function, that's not the problem; Netscape's brain-damaged
       plug-in architecture is. Plug-ins have no effect on HTML's IMG
       tag: if there's no native support for the image format and no
       helper app defined, the image is ignored regardless of whether an
       installed plug-in supports it. Instead you must use Netscape's
       EMBED extension. That means anyone who wants universally viewable
       web pages loses either way: PNG with IMG doesn't work under
       Netscape, and PNG with EMBED doesn't work under much of anything
       except Netscape and MSIE (and those only if the user has installed
       a working PNG plug-in).
             But support by five or six other Linux web browsers ain't
       bad, and even mainstream applications like Adobe's Photoshop now
       do PNG natively. More are showing up every week, too. Life is
       good.
       
       The Future
             As VRML takes off--which it almost certainly will,
       especially with the advent of truly cheap, high-performance 3D
       accelerators--PNG will go along for the ride. (JPEG, which is the
       other required VRML 2.0 image format, doesn't support
       transparency.) Graphic artists will use PNG as an intermediate
       format because of its lossless 24-bit (and up) compression and as
       a final format because of its ability to store gamma and
       chromaticity information for platform-independence. Once the
       ``big-name'' browsers support PNG natively, users will adopt it as
       well--for the 2D interlacing method, the cross-platform gamma
       correction, and the ability to make anti-aliased balls, buttons,
       text and other graphic elements that look good on *any* color
       background (no more ``ghosting,'' thanks to the alpha-channel
       support).
             Indeed, the only open issue is support for animations and
       other multi-image applications. In retrospect, the principal
       failure of the PNG group was its delay in extending PNG to MNG,
       the "Multi-image Network Graphics" format. As noted earlier,
       everyone was pretty burned out by May 1995; in fact, it was a full
       year before serious discussion of MNG resumed. As (bad) luck would
       have it, October 1995 is when the first Netscape 2.0 betas arrived
       with animation support, giving the (dying?) GIF format a huge
       resurgence in popularity.
             At the time of this writing (mid-December 1996), the MNG
       specification has undergone some 27 drafts--almost entirely
       written by Glenn Randers-Pehrson--and is close to being frozen. A
       couple of special-purpose MNG implementations have been written,
       as well. But MNG is too late for the VRML 2.0 spec, and despite
       some very compelling features, it may never be perceived as
       anything more than PNG's response to GIF animations. Time will
       tell.
       
       At Last...
             It's always difficult for an insider to render judgment on a
       project like PNG; that old forest-versus-trees thing tends to get
       in the way of objectivity. But it seems to me that the PNG story,
       like that of Linux, represents the best of the Internet:
       international cooperation, rapid development and the production of
       a Good Thing that is not only useful but also freely available for
       everyone to enjoy.
             Then again, maybe I'm just a shameless egotist (nyuk nyuk
       nyuk). You decide....
       
       Acknowledgments
             I'd like to thank Jean-loup Gailly for his excellent
       comp.compression FAQ, which was the source for much of the patent
       information given above. [11] Thanks also to Mark Adler and JPL,
       who have been the fine and generous hosts for the PNG home pages,
       zlib home pages, Info-ZIP home pages and my own, personal home
       pages. (Through no fault of Mark's, that will all come to an end
       as of the new year; oddly enough, JPL has decided that none of it
       is particularly relevant to planetary research. Go figure.)
       
       References [1] Raymond Gardner, rgardner@teal.csn.org, 8 Jan 1995
       23:11:58 GMT, comp.graphics/comp.compression, Message-ID . See
       also Michael Battilana's article discussing the legal history of
       the GIF/LZW controversy:
             http://www.cloanto.com/users/mcb/19950127giflzw.html [2]
       http://www.boutell.com/boutell/ [3]
       http://www.w3.org/pub/WWW/Graphics/PNG/CS-950214.html [4]
       http://www.rpi.edu/~randeg/paleo_pngs.html [5]
       http://quest.jpl.nasa.gov/zlib/ [6]
       ftp://swrinde.nde.swri.edu/pub/png/src/ [7]
       http://quest.jpl.nasa.gov/PNG/ (but probably moved to
       http://www.wco.com/~png/ by 1 January 1997) [8]
       http://vag.vrml.org/VRML2.0/FINAL/spec/part1/conformance.html
       [9] http://www.w3.org/pub/WWW/TR/REC-png.html [10]
       http://quest.jpl.nasa.gov/PNG/pngapps.html [11]
       http://www.cis.ohio-state.edu/hypertext/faq/usenet/compression-f
       aq/top.html indent &copy 1996 by Michael J. Hammel
       
       
         _____________________________________________________________
       
       
       
    "Linux Gazette...making Linux just a little more fun! "
   
       
       
         _____________________________________________________________
       
       
       
                           INDEXING TEXTS WITH SMART
                                       
    By Hans Paijmans paai@kub.nl
   
       
       
         _____________________________________________________________
       
       
       
1. The uses of Linux and MS-DOS

   
       
       Although my colleagues here on Tilburg University may think that I
       spend my time fiddling with Linux on a PC that could be put to
       better uses, they are wrong. The 'fiddling with Linux' I do at
       home; at my work I only do the bare minimum necessary to keep
       Linux fed and happy. As most readers of this journal know, this
       involves making the occasional backup and for the rest: nothing.
       
       When I sit in front of my PC, I work (well, mostly). Linux makes
       it possible to do my work with a minimum of fuss and a big part of
       the credit for this goes to Jacques Gelinas, the man who wrote
       Umsdos: a layer between the Unix operating system and the vanilla
       MS-DOS 8+3 FAT system. This makes it possible to access the
       DOS-partition of my hard disk from either operating system. This
       is good news, because I am totally dependent from two programs:
       SMART, an indexing and retrieval system and SPSS for Windows to
       twiddle the data I obtain form SMART. SMART only runs under Unix
       (and not all Unixes for that matter) and SPSS4Windows, obviously,
       runs under MS-Windows and whatever the virtues of this operating
       system may be, you emphatically do not want to use it in any kind
       of experimental environment.
       
       I suppose that SPSS (Statistical Package for the Social Sciences)
       will be familiar to most Linux users. If not: SPSS is just what it
       says, a statistical package but not only for the 'social sciences'
       but for about everyone who needs statistical analysis of his data.
       SMART, however, is an indexing and retrieval program for text.
       What is more: it does not just index the words, it also adds
       weights to them. It also allows the user to compare the indexed
       documents in the so-called Vector Space Model and to compute the
       distances between the documents, or between documents and queries.
       To understand why this is special we must delve a bit in the
       typical problems of Information Retrieval, i.e. the storage of
       books, articles etcetera and the retrieval of those on content.
       
1.1 Why indexing is not enough

   
       
       When at the end of the sixties automatic indexing of texts became
       a viable option many people thought that the problems of
       information retrieval were solved. Programs like STAIRS (IBM,1972)
       enabled the users to file and rapidly retrieve documents on any
       word in the text or on boolean combinations (AND, OR, NOT) of
       those words and who could ask for more? Then, in 1985 a famous
       article was published by two researchers in the field [1]. In this
       article they reported on the performance of STAIRS in real life
       and they showed that the efficiency of STAIRS and similar systems
       was, in fact, much lower than assumed. Even experienced users
       could not obtain a recall of more than 20-40% of the relevant
       documents in a database of 100,000 documents, and worse, they were
       not aware of the fact.
       
       
       The problem with all retrieval systems of this type is that human
       language is so fuzzy. There may be as much as a dozen different
       terms and words pointing to one and the same object, whereas one
       word may have widely different meanings. In Information Retrieval
       this will lead to one of two situations. Either you try to obtain
       a high precision, when almost all the retrieved documents are
       relevant (but an unknown number of other relevant documents are
       not included) or you go for high recall, but then a lot of
       irrelevant documents will be included in the result. When in a
       retrieved set of documents the proportion of irrelevant documents
       is high, the user will probably stop looking at the documents
       before he or she has found all the relevant ones: in fact his
       futility-point has been reached. In such a case the net result
       is equal to the situation in which those relevant records that
       would be presented after the user reached that futility-point were
       not retrieved. Therefore the concept of ranking, i.e. the ordering
       of retrieved documents on relevance, is very important in
       Information Retrieval.
       
2. SMART

   
       
       Modern (and not so modern) research has offered a number of
       possible solutions to this dilemma. Some of those solutions use
       the concept of weighted keywords. This means that every
       keyword-document combination has a weight attached that
       (hopefully) is an indication of the relevance of that particular
       keyword for that particular document. SMART does just that: it
       creates indexes for a database of documents and attaches weights
       to them. The way that happens may be expressed intuitively as 'the
       more a word occurs in the less documents, the higher the weight'.
       Or, if the word 'dog' occurs twenty times in a given document, but
       in no other documents, you may be relatively certain that this
       document is about dogs. Information Retrieval addicts like me talk
       about the tf.idf weight.
       
       Smart offers several options as to how that weight should be
       arrived at: I generally prefer the so-called atc-variation,
       because it adjusts for the length of the individual documents.
       
       It calculates the tf.idf in three steps. The first step creates
       the value tex2html_wrap_inline96 for the term-frequency (tf) as
       
       
       
       displaymath86
       
       
       
       where tex2html_wrap_inline100 is the term with the highest
       frequency in the document. This adjusts for the document-length
       and the number of terms. Then the weight tex2html_wrap_inline102
       is calculated as
       
       
       
       displaymath87
       
       
       
       where N is as before the number of documents and F the document
       frequency of term t (the number of documents in which term t
       occurs). Finally the cosine normalization is applied by
       
       
       
       displaymath88
       
       
       
       where T is the number of terms in the document vector. Now we have
       a number between zero and one that hopefully correlates with the
       importance of the word as a keyword for that document. For a
       detailed discussion of these and similar techniques see e.g.
       Salton and McGill ([2]). You will love it!
       
       This is not all. When SMART has constructed the index in one of
       the various ways available, it also can retrieve the documents for
       you. This is done according to something called ``the Vector Space
       Model''. This model is best explained using a three-dimensional
       example of a vector-space; you can add another few thousand
       dimensions in your own imagination.
       
       Imagine you want to index your documents according to three
       keywords 'cat', 'dog' and 'horse'; keywords that may or may not
       occur in your documents. So you draw three axes to get a normal
       three-dimensional coordinate system. One dimension can be used to
       indicate the ``cat-ness'' of every document, the other its
       ``dog-ness'' and the third the ``lion-ness''. To make things easy
       we only use binary values 0 and 1, although SMART can cope with
       floats (the 'weights' mentioned before. So if a document is about
       cats, it scores a one on the corresponding axis, otherwise it
       scores a zero. Any document may now be drawn in that space
       according to the occurrence of one or more of the keywords and now
       we have a relatively easy way to compute the difference between
       those document. Moreover a query consisting of one or more of the
       keywords can be drawn in the same space and the documents can be
       ranked according to the distance to that query. Of course a
       typical document database has thousands of keywords and
       accordingly thousands of dimensions, but the arithmetics involved
       in multi-dimensional distances do not matter much to modern
       computers, and if they bother you, you just have to smoke
       something illegal and matters will rapidly become clear. If only
       till the next morning.
       
       So SMART accepts queries, ranks the documents according to the
       ``nearness'' to that query and return them to you in that order.
       Therefore it is still one of the best retrieval systems that are
       ever written although it lacks the bells and whistles of its more
       expensive counterparts in some operating systems I could mention.
       And although it is not really optimized for speed, it runs
       typically 10-30 times faster than the fastest indexing program I
       ever saw under MS-Windows.
       
3. The DOS connection

   
       
       But I am not using SMART for bread-and-butter retrieval, but for
       the weights it computes and the indexes it creates. At this point
       I want to do some other manipulations of these data and again I
       have to offer my thanks to the developers of unix in general and
       to Linux in particular. A whole string of ever more complicated
       and sophisticated shell scripts, the standard unix tools and a few
       of My Very Own utilities suffice to process the SMART output to a
       file that is ready for importing in SPSS.
       
       Nevertheless now I have to quit Linux and boot MS-DOS, start
       MS-Windows and finally enter SPSS to do the statistics and create
       some graphs. I am a newcomer to Unix (indeed it was the fact that
       Linux offered a way to use SMART that pulled me over the line two
       years ago), but already I am wondering how people can live in the
       stifling atmosphere of MS-Windows. The fact that you can't really
       run two applications at the same time is not even the worst thing.
       But who is responsible for the idea that Icons and Popups were
       better and more efficient than the plain old command line? And
       what happened to pipes and filters? And a sensible command
       language? Be that as it may, SPSS gets the job done and when the
       output is written to disk I immediately escape back to Linux to
       write the final article, report or whatever with LaTeX.
       
       
4. The bad news

   
       
       On this point I have two messages: one is good, the other bad.
       I'll start with the good news. SMART is obtainable by anonymous
       ftp from Cornell University and may be used for free for
       scientific and experimental purposes. Better yet: it compiles
       under Linux without much tweaking and twiddling. Also there exists
       a fairly active mailing list for people who use SMART
       (smart-peoplecs.cornell.edu).
       
       
       
       The bad news: the manual. What manual? SMART is not for the faint
       of heart; after unpacking and compilation you'll find some
       extremely obscure notes and examples and that is it. Nevertheless,
       if you have more than just a few megabytes of text to manage AND
       the stamina to learn SMART, it certainly is the best solution for
       your information retrieval needs. But don't I wish somebody would
       write a comprehensive manual! In the meantime you may perhaps be
       helped by my ``tutorial for newbees'', to be found at
       http://pi0959.kub.nl:2080/Paai/Onderw/Smart/hands.html.
       
       
       
       
         _____________________________________________________________
       
       
       
  BIBLIOGRAPHY
   1
       Blair, D.C.; Maron, M.E.,An evaluation of retrieval effectiveness
       for a full-text document retrieval system,Communications of the
       ACM V28:3, 1985, pp. 289-299.
       
   2
       G. Salton and M.J. McGill,Introduction to Modern Information
       Retrieval New York [etc.] : McGraw-Hill, 1983.
       
       
         _____________________________________________________________
       
       
       
      Copyright &copy; 1997, Hans Paijmans
      Published in Issue 13 of the Linux Gazette
   
       
       
         _____________________________________________________________
       
       
       
       [ TABLE OF CONTENTS ] [ FRONT PAGE ] Back Next 
       
       
         _____________________________________________________________
       
       
       
       
       
       
         _____________________________________________________________
       
       
       
    "Linux Gazette...making Linux just a little more fun! "
   
       
       
         _____________________________________________________________
       
       
       
About Linux text editors / product announcement

    By Oleg L. Machulskiy machulsk@shade.msu.ru
   
       
       
         _____________________________________________________________
       
       
       
          + Generally about Linux text editors
          + What I'd like to have in text editor
          + Some program examples
   
       
       
         _____________________________________________________________
       
       
       
       Generally about UNIX text editors
       
       All of my friends who use Linux always told me that text editors
       is very important problem under this OS (I mean text-mode editors
       with 100K executable for writing programs). As I understand, this
       problem is not a problem of Linux itself, but it's a problem of
       every UNIX. What's more I know which reasons cause this trouble.
       There is two reasons: putc output to screen and getc input from
       keyboard. In other OS-es user (programmer) can catch Alt+<letter>
       or Shift+<letter> keystrokes and use it as a commands of editor.
       In UNIX user has only 256 ASCII-codes avialable (really, much less
       than 256) and because of it every UNIX editor uses either very
       long sequences of keystrokes as editing commands (as emacs or joe)
       or it has two editing modes (command mode and typing mode in VI
       for example). On X-s everything is better, because here we can get
       scan code (not real scan, but this code is anough for all my
       needs) of the key pressed and status of Shift-keys (Alt, Caps,
       Shift, Ctrl and mouse buttons), so we can use functional keys,
       arrow-keys and everything else You can find on Your keyboard
       (everybody knows how to do that).
       
       But even with text mode editors under Linux everything is not so
       bad: You can switch keyboard to RAW mode and do with it all You
       want (don't forget to get another console from which You will
       execute shutdown -r now command during beta-testing Your program).
       But it's very important to understand that RAW-keyboard programs
       will not work through telnet. Also is very important to set
       SIGSEGV and SIGKILL signal handlers so that they'll switch
       keyboard back to normal mode from RAW when something happens. Once
       I heard about kernel patching so that You can use ScrollLock key
       to switch between raw and normal mode, but I don't know how to
       apply this patch.
       
       
         _____________________________________________________________
       
       
       
       What I'd like to have in text editor
       
       Caution : This section is very private. Maybe someone will find
       something useful for him(here) here, but probably not. This
       section is mostly about my own text editor, so, if You got used to
       Turbo-Vision-like editors and You're satisfied, then probably You
       will find the follwing not interesting. So don't read it, don't
       waste Your time.
        
        Editor must be the same on every operating system
            (multi-platform).
            
            
        Editor must handle advanced search feature: I need not only case
            sensetive/insensetive search, but as a minimum a wildcard
            searh or regular expressions search (this type of search
            includes wildcards).
            
            
        Editor must support projects: user must be able to create a list
            of files (sources of some program) and walk through these
            files freely (enter into file, quit from file, switch to
            another file, ...). The possible solution is to assign some
            keystroke as an "enter-into-file" command, and then, when
            user invokes "enter-into-file", open a file with a name
            similar to the word under cursor (For example, you can enter
            in h-file from the text of c-program; just move cursor to the
            #include "..." statement and press the "enter-into-file"
            key).
            
            
        Editor must handle many files opened at the same time so that
            user can freely move from one text to another (very often I
            need to read declarations of functions in .h files)
            
            
        Editor must support compiling, make etc. from within text editor
            (generally: execution OS command from within editor)
            
            
        Commands must be rather simultaneous pressings of a few keys
            than sequences of keystrokes. It seems to me, it isn't
            comfortable to type (F10, 'F', 'O' , filename) every time You
            need to open a new file. Besides, with such a keyboard layout
            it's impossible to work fast. This requirement causes a
            problem: text editor cannot work through telnet, because
            telnet protocol transfers only ASCII-codes, but not
            scan-codes.
            
            
        Text editor must consider a text not as a sequence of chars but
            as a sequence of lines, where each line is a sequence of
            chars. There is a lot of text editors in which text is a
            vector (For example ME (MSDOS MultiEdit) , Turbo Editor
            (Borland Programming Environments), JOE (linux), etc.), But I
            don't know how to work with tables in these editors or how to
            set // (C++ comment) at the beginning of 10 lines of program
            on the screen.
            
            
        Editor must support macrocommands as a recordable sequences of
            keystrokes.
            
            
        If editor supports programming language, so that I can write my
            own commands, it would be fine.
            
            
        I think programs-structurizing is very useful feature. I'll
            explain: I'd like to have text of my program in pre-hypertext
            form so that I see a list of functions on the screen, I put
            cursor on the name of desired function, press "open"-key and
            now I can edit source of that function, but besides that I
            must be able to edit this file with usual text editor and I
            must be able to compile that file without errors, hence all
            additional info about hypertext structure of program must be
            placed into comments (comments are specific for each file
            type, but in most cases it depends on file extension).
            
            
        Keyboard layout must be as much tunable as possible (if my End
            key is broken, I can use F11 key instead). Besides I often
            need keyboard layout for second language (cyrillic).
            
            
        I don't like when editor wastes screen space on frames of
            windows or any other unuseful things (80 * 25 isn't very
            roomy)
            
            
        Font on the screen must be fixed (I hate proportional fonts).
   
       
       If You're interested in all that, You can try our example of such
       a text editor. I think it isn't the best editor, but I got used to
       it. May It will be useful for someone. To get it, go to
       http://shade.msu.ru/~machulsk and download 330K zip file, which
       contains sources and 5 executables for Linux console, Linux X11,
       OS/2, DOS and Win32 (95/nt). Docs are also included in HTML /
       plainTeX format.
       
       
         _____________________________________________________________
       
       
       
       Example of switching to RAW keyboard mode (C++ syntax)


   #include <stdio.h >   #include <stdlib.h >   #include <unistd.h >   #include
 <errno.h >   #include <linux/kd.h >   #include <signal.h >   #include <sys/ioc
tl.h >   /*.................*/
   void Terminate(int a) {
       if( ioctl(con_fd,KDSKBMODE,om)<0 ) {puts("Press RESET?");exit(-1);}
                  /*trying to set old keydoard mode*/
       }
   /*.................*/
  class TKeyboard{
     int om; /* old keyboard mode descriptor */
     int con_fd; /* console descriptor */
     TKeyboard(){
         signal(SIGKILL, Terminate ); /*setting SIGKILL signal handler*/
         signal(SIGQUIT, Terminate ); /*setting SIGQUIT signal handler*/
         signal(SIGSEGV, Terminate ); /*setting SIGSEGV signal handler*/
         if( 0==(con_fd=open("/dev/tty",O_RDWR)) ) {puts("error");exit(-1);}
                           /*getting console descriptor*/
         if( ioctl(con_fd,KDGKBMODE,&om)<0 ) {puts("error");exit(-1);}
                           /*getting old keydoard mode*/
         if( ioctl(con_fd,KDSKBMODE,K_RAW)<0 ) {puts("error");exit(-1);}
                           /*setting RAW keydoard mode*/
         }
     ~TKeyboard(){
         Terminate(0);
         }
     int GetScanCode(){
         int c;
         ioctl(con_fd,TIOCINQ,&cd); /*query*/
         if(cd==0) /*keyboard buffer is empty*/
         read(con_fd,&c,1); /*get next scancode from console*/
         }
     } KBD;
   /*.................*/
   void main() {
       /*.................*/
       /*................. program body */
       /*.................*/
       }
   
         _____________________________________________________________
       
       
       
       Thank You!
    My addresses: machulsk@shade.msu.ru
   homepage on(in?) Shade
         _____________________________________________________________
       
       
       
       scuze me for bad english, but my native language is Russian 
       
       
         _____________________________________________________________
       
       
       
      Copyright &copy; 1997, Oleg L. Machulskiy
      Published in Issue 13 of the Linux Gazette
   
       
       
         _____________________________________________________________
       
       
       
       [ TABLE OF CONTENTS ] [ FRONT PAGE ] Back Next 
       
       
         _____________________________________________________________
       
       
       
       
       
       
         _____________________________________________________________
       
       
       
    "Linux Gazette...making Linux just a little more fun! "
   
       
       
         _____________________________________________________________
       
       
       
                        TWO NEW X-WINDOWS MAIL CLIENTS
                                       
    by Larry Ayers
   Copyright (c) 1996
       
      Published in Issue 13 of the Linux Gazette
   
         _____________________________________________________________
       
  INTRODUCTION
   
       
       There are several full-featured text-mode mail clients available
       for Linux, and these programs (such as Pine and Elm) are probably
       the most commonly used mailers in the Linux/unix world. One reason
       for this tendency is that they run equally well in both console
       and X sessions (in an xterm). They also have a longer development
       history than their X-windows counterparts which results in the
       accretion of more features and options. There has been ample time
       for the developers to deal with bugs as well.
       
       Many of the X-windows mailers I've tried have either been too
       basic, too beta, or awkward to use. I've always returned to Pine,
       my standby. Recently two X-based mailers have been released (in
       late beta versions), both of which are stable and well-provided
       with features and options. When I say stable I mean that they have
       functioned well for me, I haven't lost any mail, and they both
       have been through several releases in which the most egregious
       bugs seem to have been ironed out.
       
       Mail programs are a rather personal sort of software. I've found
       it to be prudent to copy any existing mailbox files or directories
       to a safe location before installing any new mail client. You
       never know until you try just what a new mailer will do with your
       existing mail messages the first time it is run. As an example,
       mbox-style mail "folders" (which are just single files with
       messages concatenated) might be willy-nilly transformed into
       MH-style directories, with each message becoming an individual
       numbered file. I suppose there may exist a technique to reverse
       this metamorphosis, but I don't know what it might be, aside from
       manually using an editor.
         _____________________________________________________________
       
  TKMAIL
   
       
       Paul Raines has been working on a Tcl/Tk mail client for some time
       now. I'll let him describe its origin:


   I began the project at the beginning of '92 while a physics
  grad student at the Univ. of Penn.  I had been put in charge
  of several SGI workstations and was disappointed in the X
  window mail readers I had found. I had recently got into
  Tcl/Tk programming and played around with putting Tk
  interfaces on top of command line programs for physics
  simulation.  I figured it would be easy to do one to sit on
  top of the mailx command and did. That produced tkmail 1.x.
  Eventually I decided I was too limited by the mailx command
  and wrote a Perl backend to serve as an extensible
  equivalent. That produced tkmail 2.x.  Perl was used because
  its text processing features were much faster than Tcl but I
  wanted to keep the whole program as scripts for portability.
  This proved a lost cause as Perl proved as hard to port as C
  code.  For my update to work with Tk4.0, I decided to drop
  Perl in favor of writing my own C code as a module extension
  to Tcl. The past year was the last of my graduate career and
  mostly devoted to finishing my thesis leaving little time
  for work on tkmail. It is sort of behind in some of the
  features out there today (MIME, POP, IMAP, etc) but I hope
  to rectify that soon.

            The most important future plans are:

                   * better MIME support

                   * better key binding customization

                   * an "auto-filing" feature

                   * better search support 
   
       
       
       TkMail is very customizable; Paul Raines includes with the
       distribution an alternate Tk text-manipulation library which
       allows the use of emacs-style key-bindings in the compose window.
       This library can be used with other Tk programs as well. Colors
       and fonts can be independently selected for the folder-view and
       compose window. Much of the configuration can be done from
       menu-selections.
       
       Here is a screenshot of the main folder-view window:
       
       
       Tkmail Main Window
       
       And here is one of the composition window:
       
       
       the Composition Window
       
       TkMail, like many other Linux mailers, in effect acts as a
       front-end to sendmail. Luckily most recent Linux distributions
       come with sendmail preconfigured. If your inbox is on a POP server
       you will need to use popclient, fetchmail, or fetchpop to retrieve
       your messages and leave them in a mailbox file on your local disk,
       where mail clients can find them.
       
       Among the many features of this beta release are:
          + easy inclusion of files into message compositions with
            automatic uuencoding and compression, if desired
          + ability to access an alternate editor from the composition
            window
          + spell check compositions using an X windows interface (using
            ispell)
          + reads aliases from either standard .mailrc or elm aliases.txt
          + sorting of messages on any field and the ability to write out
            the folder physically in that order
          + simple MIME reading and composition tool
          + built in 'biff' icon for notification of new mail on multiple
            folders
          + dynamic (at startup) menus for quick access to mail folders
            for reading, copying, and moving messages
   
       
       
       TkMail is set up initially to open a small debugging window from
       which the main program can be started. Once it becomes evident
       that the program is working to your satisfaction this can be
       disabled by editing the main tkmail4 script and changing the line
       set mfp(debug) 1 to set mfp(debug) 0, or just start it with the
       -nodebug option.
       
       I have found TkMail 4.0b8 to be easy to learn and use, and its
       interface is nice-looking. With a little more work on the MIME
       abilities it will be as effective an X mail client as any
       available.
       
       Paul Raines maintains a home page for TkMail; the source for the
       4.0b8 version is available here.
         _____________________________________________________________
       
  XFMAIL
   
       
       Some months ago John Fisk wrote about the XFmail program in the
       Gazette. His account inspired me to try it out, but I had quite a
       few problems with the message editing window, so much so that when
       I tried to mail the developers a comment on their program, the
       message was corrupted and I doubt that it was legible to them. I
       gave up and deleted it soon after, making a mental note to check
       it out later when perhaps it had become more usable.
       
       Recently I did just that, and found that a new editing module had
       been contributed which really makes a difference in usage of the
       mailer. No longer is there a limit to the amount of the text in
       the editing window. This change, I believe, makes XFMail a
       credible choice as a Linux mail client.
       
       XFMail requires the XForms library. This is available from the
       XForms web-site, which will always have the latest version and
       news. If you obtain the archive be aware that the package includes
       a GUI designer as well as many samples. All you need to keep if
       you're not a programmer is the XForms shared and static libraries
       (libforms.so.81 and libforms.a) and the header file (forms.h).
       These three files will enable you to compile XForms applications,
       such as XFMail from source.
       
       In order to try the current beta (which I recommend) you'll need
       to obtain the source archive from the XFMail home FTP site. As
       long as you have the XForms library files installed it should
       compile for you, notwithstanding the warning message at the FTP
       site. If your current mailbox is in the common mailx format (a
       single file), you might want to copy the file (INBOX or whatever)
       to another location before installing XFMail. The default
       behaviour is for XFMail to transform your messages into the
       multiple-file MH format; after installation you can disable this
       and move your mailbox back. If you already store your mail in the
       MH manner the program will load your messages without moving them.
       
       
       Even though XFMail reads and stores messages in MH format, it
       doesn't require that you have the MH system installed.
       
       This mail client can handle all mail fetching and delivery needs
       for a single-user machine. The user is given the option of using
       sendmail for delivery (either on- or off-line), or using XFMail to
       directly contact the SMPT server and deliver outgoing mail.
       Fetching new mail can be done externally,(popclient et al), or via
       XFMail directly. These features could be helpful for new users who
       would rather not deal with sendmail; all functions can be handled
       by the mailer.
       
       XFMail has the recognizable XForms look, familiar to users of the
       Lyx front-end program for TeX/Latex. The XForms library gives
       programs a unique look, unlike standard X or Motif. The user
       interface is perhaps not quite as fancy as some, but it's not hard
       to become accustomed to it. There are some limitations in choice
       of colors; the selection available is greater than that of
       console-ANSI programs, but less than the amount available to
       standard X clients.
       
       Here are some screenshots of the various XFMail windows:
       
       
       The Main Window
       The Composition Window
       
       
       And here is the logging window:
       
       
       [IMAGE]
       
       
       Among the other features of this mailer are an internal address
       book, full MIME support, and support for faces and picons. Support
       is planned for compatibility with mailx-style mail-folders.
       
       XFMail is quite an ambitious programming project; if you do try
       out the beta version I'm sure the authors would appreciate hearing
       any comments you may have. There also exists an XFMail mailing
       list; send a message to: majordomo@Burka.NetVision.net.il with
       "subscribe xfmail" in the message body.
       
       Visit the XFMail homepage for the latest news; by the time you
       read this, beta 0.5 may well have been released.
       
       XFMail is being developed by Gennady B. Sorokopud and Ugen J.S.
       Antsilevich.
         _____________________________________________________________
       
    Larry Ayers<layers@vax2.rainis.net>
   Last modified: Tue Dec 17 19:05:43 CST 1996
       
       
         _____________________________________________________________
       
       
       
      Copyright &copy; 1997, Larry Ayers
      Published in Issue 13 of the Linux Gazette
   
       
       
         _____________________________________________________________
       
       
       
       [ TABLE OF CONTENTS ] [ FRONT PAGE ] Back Next 
       
       
         _____________________________________________________________
       
       
       
       
       
       
         _____________________________________________________________
       
       
       
    "Linux Gazette...making Linux just a little more fun! "
   
       
       
         _____________________________________________________________
       
       
       
                              MISCELLANEOUS NOTES
                                       
    by Larry Ayers
   Copyright (c) 1996
       
      Published in Issue 13 of the Linux Gazette
   
         _____________________________________________________________
       
  FUN WITH LITTLE SHELL-SCRIPTS
   
       
       After typing the same command or editing the same rc-file for the
       dozenth time the idea of a short executable shell-script will
       gradually rise to the surface of my mind. As an example, last year
       after much trial-and error I figured out how to start my S3
       X-server in 16-bit mode. This was great, but I found that there
       were a few programs which preferred to be run in 8-bit mode.
       Typing startx -- -bpp 16 and startx -- -bpp 8 began to become
       tiresome; then it dawned on me that I could write a shell script
       for each color-depth which would do the typing for me. One of them
       looks like this:


        #!/bin/sh
        # x16: starts x in 16-bit mode
        startx -- -bpp 16
   
       
       Just a simple little script (made executable with chmod +x x16)
       but so handy!
       
       Encouraged by this, it occurred to me that changing
       window-managers could be done in a similar way. I normally use
       fvwm2, but lately I've been fooling around with one of fvwm's
       hacked offspring, the Afterstep window-manager. Since I didn't
       have Afterstep's configuration quite as usefully customised as my
       mainstay fvwm2's, I didn't want to use it the majority of the
       time. Rather than editing ~/.xinitrc each time I wanted to switch
       to Afterstep, then again to switch back, I copied ~/.xinitrc
       twice. The first copy is .xinitrc-f and it's just my normal copy.
       The second, .xinitrc-a starts Afterstep instead. The scripts which
       control this are as follows:


        #!/bin/sh
        # xa: starts x with afterstep
        cp ~/.xinitrc-a ~/.xinitrc ; startx
   
       
       and


        #!/bin/sh
        # xf: starts x with fvwm2
        cp ~/.xinitrc-f ~/.xinitrc ; startx
   
       
       Of course, while in an X-session another window-manager can be
       easily started from a menu. I spend a fair amount of time working
       in a console session without X running, in which case the above
       scripts are useful.
       
       It just occurred to me as I write this that these tasks could be
       as easily done using aliases or functions in ~/.bashrc. The only
       difference I suppose would be that shell-functions are
       memory-resident whereas the scripts aren't.
       
       These examples may seem self-evident or trivial to the unix-gurus
       out there, but they were part of the learning process for me.
       Perhaps this piece will encourage the beginners out there to try
       some similar scripting.
         _____________________________________________________________
       
  KEYBOARDS AND RXVT
   
       
        Here's a discovery I made recently concerning rxvt, the
       memory-saving alternative to xterm. I received an email message
       recently in response to my article last month concerning S-lang
       applications, in which I opinionated about rxvt vs. xterm. The
       poster of the message wondered whether there is any way to use
       shift-page-up and shift-page-down to scroll the rxvt window,
       similar to the way console screens (and xterms) scroll. I had
       tried to get this to work without success, and some usenet
       messages had led me to believe that without patching the source
       rxvt just wouldn't scroll from the keyboard.
       
       Recently I installed the S.u.S.E. distribution, but didn't install
       the supplied rxvt package. I recompiled rxvt version 2.19 in this
       new environment, and to my surprise the above-mentioned scrolling
       keys worked! This piqued my curiosity, so I began prowling through
       the directory hierarchy searching for the difference in config
       files which made this behaviour possible. I came up with two
       differences: first, there was a new entry in the ~/.Xmodmap file.
       The lines


           keycode 64 = Meta_L
           keycode 0x6D = Multi_key
   
       
       had been added to the "keycode 22 = BackSpace" line which I had in
       my previous installation. Second, the /etc/termcap file was
       different than the ones I'd seen before; a new rxvt stanza had
       been included which looks like this:


rxvt|rxvt terminal emulator:\
        :am:km:mi:ms:xn:xo:\
        :co#80:it#8:li#65:\
        :AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:DO=\E[%dB:IC=\E[%d@:\
        :LE=\E[%dD:RI=\E[%dC:UP=\E[%dA:ae=^O:al=\E[L:as=^N:bl=^G:\
        :cd=\E[J:ce=\E[K:cl=\E[H\E[2J:cm=\E[%i%d;%dH:cr=^M:\
        :cs=\E[%i%d;%dr:ct=\E[3k:dc=\E[P:dl=\E[M:do=^J:ei=\E[4l:\
        :ho=\E[H:ic=\E[@:im=\E[4h:\
        :is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l:\
        :k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~:k5=\E[15~:\
        :k6=\E[17~:k7=\E[18~:k8=\E[19~:k9=\E[20~:kI=\E[2~:\
        :kN=\E[6~:kP=\E[5~:kb=\177:kd=\EOB:ke=\E[?1l\E>:kh=\E[H:\
        :kl=\EOD:kr=\EOC:ks=\E[?1h\E=:ku=\EOA:le=^H:md=\E[1m:\
        :me=\E[m:mr=\E[7m:nd=\E[C:rc=\E8:sc=\E7:se=\E[m:sf=^J:\
        :so=\E[7m:sr=\EM:ta=^I:te=\E[2J\E[?47l\E8:ti=\E7\E[?47h:\
        :ue=\E[m:up=\E[A:us=\E[4m:
   
       
       I have noticed, though, that if I type the command echo $TERM in
       an rxvt window the result is xterm-color, so perhaps the above
       rxvt termcap entry isn't being used at all.
       
       I'd love to know if anyone else has any luck transplanting either
       or both of these two changes into their system. The rxvt termcap
       entry can be pasted right into your /etc/termcap file; in mine it
       is right after the xterm stanzas. I don't believe the order of
       stanzas is important, though.
         _____________________________________________________________
       
  PARTITIONS AND DIRECTORIES
   
       
       After using linux for a while you tend to take for granted the
       supple flexibility inherent in the Linux manner of dealing with
       files, partitions, and mount-points. Recently I began to feel
       constrained by a relatively small /usr partition, so I thought I'd
       do some experimenting.
       
       I happened to have an unused 100 mb. partition on my disk, so I
       created an ext-2 filesystem on it and mounted it on an empty
       directory, /new, created for this purpose. Then I ran this
       command: cp -a /usr/X11R6 /new. Using cp with the -a switch is
       really handy, as it copies all subdirectories, links, and files,
       and also saves permissions.
       
       The next step was modifying the /etc/fstab file, inserting the
       following entry which causes /usr/X11R6 to be mounted on the new
       partition:


         /dev/hda11     /usr/X11R6   ext2     defaults   1   2
   
       
       Before rebooting I dropped back to a console and deleted the
       entire contents of the /usr/X11R6 directory.
       
       I was reasonably certain this would work, but I must confess I was
       surprised when (after rebooting) X started up without comment, as
       if nothing had changed.
       
       Linux doesn't really care, after all, where files are located, as
       long as there is a congruence between the partition table and the
       contents of the /etc/fstab file. One benefit of this laxity is
       that repartitioning (with all of the attendant backing up,
       restoring, etc.) should seldom be necessary.
         _____________________________________________________________
       
       
       
    Larry Ayers<layers@vax2.rainis.net>
   Last modified: Tue Dec 17 21:31:27 CST 1996
       
       
         _____________________________________________________________
       
       
       
      Copyright &copy; 1997, Larry Ayers
      Published in Issue 13 of the Linux Gazette
   
       
       
         _____________________________________________________________
       
       
       
       [ TABLE OF CONTENTS ] [ FRONT PAGE ] Back Next 
       
       
         _____________________________________________________________
       
       
       
       
       
       
         _____________________________________________________________
       
       
       
    "Linux Gazette...making Linux just a little more fun! "
   
       
       
         _____________________________________________________________
       
       
       
Petition to Cancel Filed Against Linux Trademark

   
       
       Members of the LINUX community have been up in arms during the
       past six months over the efforts of an individual named William R.
       Della Croce, Jr. from the Boston area to collect 10% royalties on
       sales from businesses marketing Linux products. He bases his
       written demands on a US trademark which he claims to hold on the
       name "LINUX" for a computer operating system. He, in fact, holds
       such a registered trademark, based on his claim made under penalty
       of perjury that he is the owner and first user of the mark for
       operating systems, and that he was not aware in 1994 or 1995 of
       any other person who might claim or be using this name and mark
       for an operating system. This claim is absurd on its face.
       
       WorkGroup Solutions, Yggdrasil Computing, Linux International,
       SSC/Linux Journal, and Linus Torvalds have retained an
       internationally known software industry attorney, G. Gervaise
       Davis III, of the Davis & Schroeder law firm in Monterey, CA to
       seek cancelation of this registration on the grounds that it is
       fraudulent and obtained under false pretenses. Mr. Davis and his
       firm are handling the case on a vastly reduced fee basis, because
       of their long standing relationship with the U.S. software
       industry. Davis was the original attorney for Gary Kildall and
       Digital Research of CP/M fame in the 1980s.
       
       A Petition to Cancel was in fact filed with the Trademark Trial
       and Appeals Board in Washington, DC. on November 27, 1996,
       detailing the improper actions of Della Croce and setting out the
       true facts with a number of exhibits and attachments. Mr. Davis
       advises us that we can expect to have further steps taken by TTAB,
       under their complex procedural rules over the next few months.
       TTAB will first notify Della Croce of the filing and permit him
       time to respond, then evidence can be collected and depositions
       taken, and then the parties can file briefs and other responses.
       Often these cases take more than a year to be resolved by a TTAB
       decision.
       
       All of our industry is fully aware that Linus Torvalds developed
       Linux and that it has become one of the world's most popular
       operating systems during the past six years. The participants in
       this proceeding expect the TTAB to cancel the registration, after
       hearing and seeing the massive evidence demonstrating that Della
       Croce had no conceivable legal basis for his claim to the mark.
       
       The petition itself is available here and on the websites of each
       of the petitioners and Mr. Davis' law firm at www.iplawyers.com.
       We urge that interested persons read it, and distribute it and
       this message to all members of the LINUX community so that they
       will be aware of what is being done about this outrageous
       trademark claim. We will try to keep everyone posted on
       developments in the case through user groups and webpages.
       
       We will continue to keep you updated on the happenings in this
       action. Check the Linux Hot News Button for the latest updates.
       
       
         _____________________________________________________________
       
       
       
       [ TABLE OF CONTENTS ] [ FRONT PAGE ] Back Next 
       
       
         _____________________________________________________________
       
       
       
       
       
       
         _____________________________________________________________
       
       
       
    "Linux Gazette...making Linux just a little more fun! "
   
       
       
         _____________________________________________________________
       
       
       
SLEW: Space Low Early Warning

    By James T. Dennis jim@starshine.org
   
       
       
         _____________________________________________________________
       
       
       
       
       
       One of the worst things you can do to your linux or other
       Unix-like system is to allow any of the filesystems to get full.
       
       System performance and stability will suffer noticeable
       degradation when you pass about 95% and programs will begin
       failing and dying at %100 percent. Processes that are run as
       'root' (like sendmail and syslog) will actually fill their
       filesystem past 100% since the kernel will allocate some of the
       reserved space for them.
       
       (Yes, you read that right -- when you format a file system a bit
       of space is reserved for root's exclusive use -- read the mke2fs,
       e2fsck, tune2fs for more on that).
       
       Considering the importance of this issue you might think that our
       sophisticated distributions would come with a pre-configured way
       to warn you long before there was a real problem.
       
       Sadly this is one of those things that is "too easy" to bother
       with. Any professional Unix developer, system administrator or
       consultant would estimate a total time for writing, installing and
       testing such an application at about 15 minutes (I took my time
       and spent an hour on it).
       
       Here's the script:


        #! /bin/bash
                ## SLEW: Space Low Early Warning
                ##      by James T. Dennis,
                ##      Starshine Technical Services
                ##
                ## Warns if any filesystem in df's output
                ## is over a certain percentage full --
                ## mails a short report -- listing just
                ## "full" filesystem.
                ## Additions can be made to specify
                ## *which* host is affected for
                ## admins that manage multiple hosts

        adminmail="root"
                ## who to mail the report to


        threshold=${1:?"Specify a numeric argument"}
                ## a percentage -- *just the digits*

        # first catch the output in a variable
        fsstat=`/bin/df`

        echo "$fsstat" \
                | gawk '$5 + 0 > '$threshold' {exit 1}'  \
           || echo "$fsstat" \
                | { echo -e "\n\n\t Warning: some of your" \
                        "filesystems are almost full \n\n" ;
                        gawk  '$5 + 0 > '${threshold}' + 0 { print $NF, $5, $4
}' } \
                | /bin/mail -s "SLEW Alert" $adminmail

        exit


   That's twelve lines of code and a mess of comments (counting each of
       the "continued" lines as a separate line).
       
       Here's my crontab entry:

        ## jtd: antares /etc/crontab
        ## SLEW: Space Low Early Warning
        ##      Warn me of any filesystems that fill past 90%
        30 1 * * * nobody /root/bin/slew 90
   
       
       Note that the only parameter is a 1 to 3 digit percentage. slew
       will silently fail (ignore without error) any parameter(s) that
       don't "look like" numbers to gawk.
       
       Here's some typical output from the 'df' command:

Filesystem         1024-blocks  Used Available Capacity Mounted on
/dev/sda5              96136   25684    65488     28%   /
/dev/sda6              32695      93    30914      0%   /tmp
/dev/sda10            485747  353709   106951     77%   /usr
/dev/sda7              48563   39150     6905     85%   /var
/dev/sda8              96152    1886    89301      2%   /var/log
/dev/sda9             254736  218333    23246     90%   /var/spool
/dev/sdb5             510443  229519   254557     47%   /usr/local
   
       
       Note that I will be getting a message from slew tomorrow if my
       news expire doesn't clean off some space on /var/spool. The rest
       of my filesystems are fine.
       
       Obviously you can set the cron job to run more or less often and
       at any time you like -- this script takes almost no time memory or
       resources.
       
       The message generated can be easily modified -- just add more
       "continuation" lines after the 'echo -e' command like:


           || echo "$fsstat" \
                | { echo -e "\n\n\t Warning: some of your" \
                        "filesystems are almost full \n\n" \
                        "You should add your custom text here.\n"\
                        "Don't forget to move the ';' semicolon "\
                        "and don't put whitespace\n" \
                        "after the backslash at the ends of these lines\n\n";

   Note how the first echo feeds into the grouping (enclosed by the
       braces) so that the contents of $fsstat are appended after the
       message. This is a trick that might not work under other shells.
       
       Also, if you plan on writing similar shell scripts, note that the
       double quotes around the variable names (like "$fsstat") preserve
       the linefeeds in their values. If you leave the quotes out your
       text will look ugly.
       
       The obvious limitation to this script is that you can only specify
       one threshold value for all of the file systems. While it would be
       possible (and probably quite easy) to do this some other way -- it
       doesn't matter to 90% of us. I suspect that almost anyone who does
       install this script will set the threshold to 85, 90 or 95 and
       forget about it.
       
       One could also extend this script to do some groping (using
       various complex find commands) to list things like:
          + Who is the biggest disk hog (which user is taking up all the
            space and what are his or her largest files)?
            
          + What are the oldest, least accessed files on that filesystem?
            
            
            This last question could be answered using something like

        
                'find -xdev -printf "%A@" | sort -n | head' --

        which reads something like "find all the links on this filesystem
            and print time that they were last access (expressed as
            seconds since 1970) and their filenames; sort that and just
            give me a few of the ones from the top of the sorted list."
            As you can see, find commands can get very complex very
            quickly.
   
       
       I chose to keep this script very simple and will develope specific
       scripts to suggest file migrations and deletions as needed.
       
       As you can see it is possible to do quite a bit in Linux/Unix
       using high level tools and very terse commands. Certainly the
       hardest part of writing a script like this is figuring out minor
       details about quoting and syntax (when to enclose blocks in braces
       or parentheses) and in determining how to massage the text that's
       flowing through your pipes.
       
       The first time I wrote slew was while standing in a bookstore a
       couple of years ago. A woman near me was perusing Unix books in my
       favorite section of the store and I asked if I could help her find
       something in particular. She described the problem as it was
       presented to her in a job interview. I suggested a 'df | grep &&
       df | mail' type of approach and later, at home, fleshed it in and
       got it working.
       
       Over the years I lost the original (which was a one-liner) and
       eventually had one of the systems I was working with hiccup. That
       made me re-write this. I've left it on all of my systems ever
       since.
       
       I'd like to encourage anyone who developes or maintains a
       distribution (Linux, FreeBSD, or whatever) to add this or
       something like it to the default configuration on your systems.
       Naturally it is free for any use (it's too trivial to copyright in
       my personal opinion; so, that there is no doubt, I hereby place
       SLEW (comments and code) into the public domain).
       
       
         _____________________________________________________________
       
       
       
      Copyright &copy; 1997, James T. Dennis, Starshine Technical Services
      Published in Issue 13 of the Linux Gazette
   
       
       
         _____________________________________________________________
       
       
       
       [ TABLE OF CONTENTS ] [ FRONT PAGE ] Back Next 
       
       
         _____________________________________________________________
       
       
       
       
       
       
         _____________________________________________________________
       
       
       
                            LINUX GAZETTE BACK PAGE
                                       
      Copyright &copy; 1997 Specialized Systems Consultants, Inc.
      For information regarding copying and distribution of this material see
      the Copying License.
   
       
       
         _____________________________________________________________
       
       
       
  CONTENTS:
          + About This Month's Authors
          + Not Linux
   
       
       
       
       
         _____________________________________________________________
       
       
       
  ABOUT THIS MONTH'S AUTHORS
   
       
       
         _____________________________________________________________
       
       
       
       
       
    Larry Ayers
   Larry Ayers lives on a small farm in northern Missouri, where he is
       currently engaged in building a timber-frame house for his family.
       He operates a portable band-saw mill, does general woodworking,
       plays the fiddle and searches for rare prairie plants, as well as
       growing shiitake mushrooms. He is also struggling with configuring
       a Usenet news server for his local ISP.
       
    James T. Dennis
   Jim Dennis is the proprietor of Starshine Technical Services. His
       professional experience includes work in the technical support,
       quality assurance, and information services (MIS) departments of
       software companies like Quarterdeck, Symantec/ Peter Norton Group,
       and McAfee Associates -- as well as positions (field service rep)
       with smaller VAR's. He's been using Linux since version 0.99p10
       and is an active participant on an ever-changing list of mailing
       lists and newsgroups. He's just started collaborating on the 2nd
       Edition for a book on Unix systems administration. Jim is an avid
       science fiction fan -- and recently got married at the World
       Science Fiction Convention in Anaheim.
       
    Bill Duncan
   Bill has worked with Unix systems since the early Version 7 days on
       PDP-11's. He worked with Xenix throughout most of the eighties and
       has also worked with many other flavors of Unix over the years,
       but his operating system of choice is now Linux. When not working
       or fiddling with his four Linux systems at home (which is rare),
       he might have some time left over for his other hobbies; his dog
       (Daisy), photography and Amateur Radio.
       
    Michael J. Hammel
   Michael J. Hammel, is a transient software engineer with a background
       in everything from data communications to GUI development to
       Interactive Cable systems--all based in Unix. His interests
       outside of computers include 5K/10K races, skiing, Thai food and
       gardening. He suggests if you have any serious interest in finding
       out more about him, you visit his home pages at
       http://www.csn.net/~mjhammel. You'll find out more there than you
       really wanted to know.
       
    Oleg Machulski
   Oleg Machulski is a student of Laboratory of Computing methods at the
       Faculty of Mechanics and Mathematics, Moscow State University.
       He has been a Linux enthusiast since Sept.1996 as well as an OS/2
       enthusiast. After receiving the source of a very unusual DOS text
       editor, where the program was structurized in a hypertext manner
       from his scientific advisor Andrey V. Astreling, he wrote and
       ported the following functions: search, macrocommands, multiple
       pages and so on. Brief history of that freeware project could be
       found at http://shade.msu.ru/~machulsk/mmm/mmm.html Also, I like
       to play guitar and listen to jazz music. Additional info can be
       found at my homepage http://shade.msu.ru/~machulsk
       
    Hans Paijmans
   
       
        Hans "Paai" Paijmans is University lecturer & researcher at
       Tilburg University and a regular contributor to several Dutch
       journals. Together with E. Maryniak he wrote the first dutch book
       on Linux--already two years ago. My, doesn't the time fly. His
       homepage is at http://pi0959.kub.nl:2080/paai.html.
       
    Greg Roelofs
   Greg Roelofs, aka Cave Newt, is best described as a phenomenon, as in,
       ``Captain, we're picking up strange readings from that unexplained
       phenomenon over there.'' Greg's job description is appropriately
       schizoid, given his interest in far too many things for his own
       good. He's a full-time researcher in
       multimedia/image-compression/WWW stuff at Philips Research at Palo
       Alto, having made the switch from Unix system administrator in
       August 1995. He likes to fancy himself a software developer; among
       other things, he has been a member of the Info-ZIP team for six
       years and the principal author of UnZip for most of that time.
       (He's also a member of the Portable Network Graphics Development
       Group and the maintainer of the PNG and zlib home pages.) As for
       recreational interests, he likes to amuse himself by cycling
       (often to work); skiing--any flavor, although snow preferred,
       especially if it means he can drive in it; scuba diving--for 18
       years now, from the shores of Lake Superior to the coast of
       Venezuela to the kelp beds of Monterey; and hiking/backpacking,
       particularly in the Sierra Nevada range; and amateur photographer.
       
       
    James Shelburne
   
       
        James Shelburne currently lives in Waco, Texas where he spends
       most of his free time working on various Linux networking
       projects. Some of his interests include Perl + CGI, Russian,
       herbal medicine and the Ramones (yes, you heard right, the
       Ramones). He is also a staunch Linux advocate and tries to convert
       every MacOS/MS Windows/AMIGA user he comes into contact with.
       Needless to say, only other Linux users can stand him. 
       
       
       
       
         _____________________________________________________________
       
       
       
  NOT LINUX
   
       
       
         _____________________________________________________________
       
       
       
       
       
       Thanks to all our authors, not just the ones above, but also those
       who wrote giving us their tips and tricks and making suggestions.
       Thanks also to our new mirror sites.
       
       I'd like to apologize for being later than usual getting LG
       posted. The weather in Seattle has been a more than a little
       bizarre lately. My neighborhood got about 20 inches of snow from
       December 26 to December 29. Since the normal yearly snowfall is
       about 4 inches, everything stopped, including the buses for the
       first time in Metro history. SSC had a portion of the roof give
       way under the weight of snow and water (the rains started December
       29 and haven't quit yet). As a result of the flooding, things are
       in quite a mess around the office. Yearly rainfall in Seattle is
       usually 31 inches; this year we had 55 inches. I thought I was
       back in Houston!
       
       Actually, I was back in Houston during my vacation week before
       Christmas. The weather wasn't great there either -- rainy and
       cold, and I was counting on sunshine. However, I still had a good
       time visiting with family and friends. My grandchildren, Sarah and
       Rebecca, are a delight to be with -- I miss them a lot.
       
       Have fun!
       
       
         _____________________________________________________________
       
       
       
       Marjorie L. Richardson
       Editor, Linux Gazette gazette@ssc.com
       
       
         _____________________________________________________________
       
       
       
       [ TABLE OF CONTENTS ] [ FRONT PAGE ] Back 
       
       
         _____________________________________________________________
       
       
       
       Linux Gazette, http://www.ssc.com/lg/
       This page written and maintained by the Editor of Linux Gazette,
       gazette@ssc.com