File: TWDT.html

package info (click to toggle)
lg-issue104 1-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,384 kB
  • ctags: 207
  • sloc: xml: 1,943; ansic: 342; makefile: 34; sh: 34
file content (9108 lines) | stat: -rw-r--r-- 344,032 bytes parent folder | download
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
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108


<html>
<head>
<link href="../lg.css" rel="stylesheet" type="text/css" media="screen, projection" />
<title>
Linux Gazette : July 2004 (#104) 
</title>

<style type="text/css" media="screen, projection">
<!--

.twdtarticle {
	width: 84%;
	/* margin:0px;
	left:0px; */
}

#twdtbody {
/*
	margin-left:0px;
	margin-right:0px;
*/
}

.twdtarticle h1 {
	font-size:19px;
	text-align:center;
}

.lgcontent {
        width: 84%;
        margin-top: 30px;
        /* left:0px; */
}

-->
</style>


</head>

<body id="twdtbody">


<img src="../gx/2003/newlogo-blank-200-gold2.jpg" alt="Linux Gazette" id="twdtlogo"/>
<p id="fun">...making Linux just a little more fun!</p>




<div class="content lgcontent">

<h2>July 2004 (#104):</h2>

<ul>


	<li><a href="#lg_mail">The Mailbag</a>

	<li><a href="#lg_tips">More 2 Cent Tips!</a>

	<li><a href="#lg_answer">The Answer Gang</a>

	<li><a href="#lg_bytes">News Bytes</a>, by <i>Michael Conry</i></li>

	<li><a href="#brown">Using Windows Keyboard Media Buttons In Linux</a>, by <i>Tom Brown</i></li>

	<li><a href="#ecol">Ecol</a>, by <i>Javier Malonda</i></li>

	<li><a href="#kapil">How To Make a StereoGram with GIMP, Blender and StereoGraph</a>, by <i>Kapil Hari Paranjape</i></li>

	<li><a href="#odonovan">Automatic Backups with rsync and Anacron</a>, by <i>Barry O'Donovan</i></li>

	<li><a href="#oregan">Songs in the Key of Tux: Audacity</a>, by <i>Jimmy O'Regan</i></li>

	<li><a href="#oregan2">Desktop Matters!: A guide to Windows technologies for Linux users</a>, by <i>Jimmy O'Regan</i></li>

	<li><a href="#oregan3">Front and Back: KPGP and GPG</a>, by <i>Jimmy O'Regan</i></li>

	<li><a href="#qubism">Qubism</a>, by <i>Jon "Sir Flakey" Harsem</i></li>

	<li><a href="#ramankutty">Inter-Process Communication - Part 1</a>, by <i>Hiran Ramankutty</i></li>

	<li><a href="#seymour">Design Awareness</a>, by <i>Mark Seymour</i></li>

	<li><a href="#youngman">Taking control of your browsing with Mozilla</a>, by <i>Neil Youngman</i></li>

	<li><a href="#lg_spam">Wonderful World of Spam</a>

	<li><a href="#lg_laundrette">The Linux Laundrette</a>

	<li><a href="#lg_foolish">The Foolish Things We Do With Our Computers</a>, by <i>Ben Okopnik</i></li>

</ul>

</div>




<br />


<div class="content lgcontent">

<a name="lg_mail"></a>
<h1>The Mailbag</h1>


</b>
</p>


<p>
<HR>
<center>
<BIG><STRONG><FONT COLOR="maroon">HELP WANTED : Article Ideas</FONT></STRONG></BIG>
<BR>
<STRONG>Submit comments about articles, or articles themselves (after reading <a href="../faq/author.html">our guidelines</a>) to <A HREF="mailto:gazette@linuxgazette.net">The Editors of <i>Linux Gazette</I></A>, and technical answers and tips about Linux to <A HREF="mailto:tag@linuxgazette.net">The Answer Gang</A>. 
</STRONG>
</center><HR>
<UL>
<!-- index_text begins -->
<li><A HREF="#wanted.1"
	><strong>2.6's constant complaining about untranslated keyboard keys</strong></a>
<li><A HREF="#wanted.2"
	><strong>getting email from an external server</strong></a>
<li><A HREF="#wanted.3"
	><strong>Scripting languages compared</strong></a>
<!-- index_text ends -->
</UL>
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="wanted.1"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">2.6's constant complaining about untranslated keyboard keys</FONT></H3>
Mon, 14 Jun 2004 13:02:11 -0700 (PDT)
<BR>Bradley Chapman (<a href="mailto:tag@linuxgazette.net?cc=kakadu_croc@yahoo.com&subject=%20Re%3A%20%5BLG%20104%5D%20help%20wanted%20%231">kakadu_croc from yahoo.com</a>)



<blockquote><pre>atkbd.c: Unknown key released (translated set 2, code 0x7a on isa0060/serio0).
atkbd.c: This is an XFree86 bug. It shouldn't access hardware directly.
atkbd.c: Unknown key released (translated set 2, code 0x7a on isa0060/serio0).
atkbd.c: This is an XFree86 bug. It shouldn't access hardware directly.
</pre></blockquote>
<P>
Does anybody get this at all on their 2.6 Linux systems? I get it all the time and have just dismissed it, but now I'm curious if anyone has bothered to figure out why it happens.
</P>
<P>
Also, I've just got ahold of a Gmail account, but I haven't been able to decide what to do with it. Does anyone else have a similar dilemma? 
<IMG SRC="../gx/dennis/smily.gif" ALT=";-)" 
		height="24" width="20" align="middle">
</P>
<P>
Brad
</P>

<!-- end 1 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="wanted.2"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">getting email from an external server</FONT></H3>
Mon, 14 Jun 2004 14:30:12 -0400
<BR>sbasurto (<a href="mailto:tag@linuxgazette.net?cc=sbasurto@playboyunderwear.com&subject=%20Re%3A%20%5BLG%20104%5D%20help%20wanted%20%232">sbasurto from playboyunderwear.com</a>)


<P>
Good afternoon,
My question is...
</P>
<P>
I setup an Internet server with debian the lastest version, I also configure a
squid proxy 2.4 estable6 with squidGuard as redirector, a dhcp, a dns, and
ipchains.
</P>
<P>
The configuration looks like:
</P>

<blockquote><pre>            190.0.0.3
Workstation|---------|--|
                        |    eth0   --------------    eth1       -----
            190.0.0.4   |-|190.0.0.1|Linux Server|192.168.0.1|---|DSL|
Workstation|---------|--|           --------------               -----
                                         x.x.x.x                   |
                                      ---------------   Internet   |
                                      | Mail Server |--------------|
                                      ---------------
</pre></blockquote>
<P>
What I am expecting - Run send/recive email messages in what ever email client
in a workstation within my lan and get the email from the external server or
send email with the external server.
</P>
<P>
What is happening - Run send/recieve email messages in Outlook with the right
configuration and it sends a "Conection Refused by the Server" or "Conection
Timeout".I understand that maybe what I am looking for is a pop3 and smtp poxy
server, nevertheless I install pop3.proxy and smtp.porxy servers in my linux
box an it does not retrieve or send the email from workstation to the external
server. I configure fetchmail too an it work but within the server, if I try to
get email from a workstation it crash.
</P>
<P>
What I already did -
</P>

<blockQuote><ol>
<LI>I already run tcpdump in the eth where the internet conection is (In my case
eth1). In this point I want to mention that in the output of tcpdump I never
saw the header for the retrive of the email message from the
client(Workstation) to the server, nevertheless the conection to Internet is
working fine.


<LI>I also stop my firewall because may be a misconfiguration of the firewall can
block my email, but even without firewall, it crash.


<LI>I installed a pop3 and smtp proxies, and get them run as an inetd service,
but without sucess. I mean the proxy run but can retrieve email from
workstation.


<LI>Finally I had this configuration working with SuSE the problem is that I do
not know exactly how I did it.
</ol></blockQuote>
<P>
At this point I hope some one of you can help me or tell me what I am doing
wrong. Or tell me whatever documentation where I can get an answer.
</P>
<P>
Regards
</P>
<P>
Sergio B.J
</P>

<!-- end 2 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="wanted.3"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">Scripting languages compared</FONT></H3>
Sun, 13 Jun 2004 08:34:47 +0100
<BR>Jimmy O'Regan (<a href="mailto:tag@linuxgazette.net?cc=jimregan@o2.ie&subject=%20Re%3A%20%5BLG%20104%5D%20help%20wanted%20%233">The <em>LG</em> Answer Gang</a>)


<BLOCKQUOTE><DL><DT>
[Jimmy O'Regan] 
<DD><A HREF="http://merd.sourceforge.net/pixel/language-study/scripting-language"
	>http://merd.sourceforge.net/pixel/language-study/scripting-language</A>
</DL></BLOCKQUOTE>
<BLOCKQUOTE><BLOCKQUOTE><CODE>
sh wins, closely followed by Perl and Ruby.
</CODE></BLOCKQUOTE></BLOCKQUOTE>

<font color="#660000"><blockquote>Read that backwards, in terms of winning order and: \o/
 -- Thomas</blockquote></font>

<blockquote><font color="#1F1F1F">Well, he's wrong about "sh" not having a debugger, particularly since
he's using Bash; "-x" certainly fits the bill. Step-by-step execution,
no, but I think that would go under "full interpreter in debugger".
</font></blockquote>
<blockquote><font color="#1F1F1F">As to his length comparisons for different programs - certainly in
regard to Perl - he had me cracking up. E.g., the Perl entry for 'env'
has his actual home directory name spelled out...
</font></blockquote>
<blockquote><font color="#1F1F1F">The rest of it, I'm afraid, demonstrates his lack of knowledge of the
several languages I can vouch for rather than being an accurate
comparison of any sort (he did mostly OK with "sh", though. 
<IMG SRC="../gx/dennis/smily.gif" ALT=":)" 
		height="24" width="20" align="middle">
 -- Ben</font></blockquote>

<blockquote><font color="#000066">Ok, it's your chance, gentle readers.  Would anyone like to take a more
thorough and in-depth view about how the languages compare?  We come not
to flame Caesar, but to praise him... code samples maybe, but a fair
treatment is called for at the very least.
 -- Heather</font></blockquote>

<!-- end 3 -->
<HR>
<center>
<BIG><STRONG><FONT COLOR="maroon">GENERAL MAIL</FONT></STRONG></BIG>
<BR>
</center><HR>
<UL>
<!-- index_text begins -->
<li><A HREF="#mailbag.1"
	><strong>Compliments to you all.</strong></a>
<li><A HREF="#mailbag.2"
	><strong>Re: Dual "Linux Gazette"?</strong></a>
<li><A HREF="#mailbag.3"
	><strong>Re: Foolish things....</strong></a>
<li><A HREF="#mailbag.4"
	><strong>Re: Linux Gazette Redux :)</strong></a>
<li><A HREF="#mailbag.5"
	><strong>Linux Gazette article in issue 103</strong></a>
<li><A HREF="#mailbag.6"
	><strong>linuxgazette.net down......</strong></a>
<!-- index_text ends -->
</UL>
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="mailbag.1"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">Compliments to you all.</FONT></H3>
Fri, 4 Jun 2004 13:15:18 +0100
<BR>Steve Brown (<a href="mailto:gazette@linuxgazette.net?subject=%20Re%3A%20%5BLG%20104%5D%20mailbag%20%231">sp_brown from hotmail.com</a>)


<P><STRONG>
Hi there,
</STRONG></P>
<P><STRONG>
I've just finished reading some of the June issue, I got the feeling that
you are all a little dejected - don't be! You all produce a fantastic read,
absolutely superb - much better than that other one (I did write and tell
them they were crap, but they didn't reply funnily enough).
</STRONG></P>

<blockquote><font color="#1F1F1F">Thanks, Steve. I don't know that I'd call it dejection - it's more of a
realization of a lot of work ahead, at least for me. Given that I enjoy
it, though, that's no bad thing.
 -- Ben</font></blockquote>
<P><STRONG>
I used to use an Amiga (still own it sans powerpack) and I spent hours and
hours learing to program in C (very very simple stuff), shell scripts and
the like. I loved the learning process and the usability of it all. I was
forced into buying a PC (following the demise of the power pack) and it came
complete with Win95, what a nightmare -I couldn't find out how any of it
worked without paying for the information one way or another. Then I came
across Mandrake 8, actually I was desperately looking for something other
than Windows, and my little world changed. All the information I could ever
want and then some.
</STRONG></P>
<P><STRONG>
One of my earliest discoveries was your good selves. My favourite Amiga mag
was Amiga Shopper - a good mix of basic newbie stuff and more advanced
information - programming, how the machine works and so on. It pandered to
my newbie needs and as I grew in knowledge so I gained even more from the
magazine.
</STRONG></P>
<P><STRONG>
Your magazine offers something similar, a good mix without pandering too
much to the total newbie. So many magazines seem to offer a three monthly
cycle of tutorials with little new material.
</STRONG></P>

<blockquote><font color="#1F1F1F">I was actually considering recycling a bit of our previous material. Jim
Dennis' "Routing 101" is an evergreen that can definitely stand to be
exposed to new minds; my own Perl and shell tutorials (it turns out that
somehow one of the articles I wrote for it never got published!), too.
Yes, people can find them in the old issues - but I suspect that many of
our readers don't go trolling through the archives but just read us once
a month.
</font></blockquote>
<blockquote><font color="#1F1F1F">(If anyone's got suggestions on a previous article that's worth dusting
off, my mailbox is always open.)
 -- Ben</font></blockquote>
<P><STRONG>
The only thing I'd like to see is how to build/design a program in for
Linux, don't care what language, just how to design, program and test it, to
give a good correct program.
</STRONG></P>

<blockquote><font color="#1F1F1F">[grin] See those very tutorials that I've mentioned. I suggest starting
with shell scripting and climbing up from there.
 -- Ben</font></blockquote>
<P><STRONG>
My Amiga programs were very simple, single user
affairs, and I really don't get OOP and multi user stuff yet. I mean how do
you prevent buffer over-runs and memory loss for example.
</STRONG></P>

<blockquote><font color="#1F1F1F">Those aren't an issue in the modern scripting languages (shell, Perl,
Python, etc.) In C, well, see my response to Tom. Unless you really know
what you're doing, C can be very dangerous indeed.
 -- Ben</font></blockquote>
<BLOCKQUOTE>
[Tom Brown] 
Tip: If you want to learn how to program in OOP, spend a little
time learning Borland's Delphi (it uses a Pascal variant). It has
nearly all the power of C++, and is easier to use than Visual Basic.
Once you get all the C++ syntax out of the way, you'll learn OOP in no
time. Then you can move on to something like C++, Java, or C#. I had
the same trouble you did, and that's what worked for me.
</BLOCKQUOTE>
<BLOCKQUOTE>
[Jimmy O'Regan] 
You mean Kylix, which is the Linux version. There's also the Lazarus IDE
(<A HREF="http://www.lazarus.freepascal.org"
	>http://www.lazarus.freepascal.org</A>) for Free Pascal
(<A HREF="http://www.freepascal.org"
	>http://www.freepascal.org</A>).
</BLOCKQUOTE>

<blockquote><font color="#000066">I've snipped a bit of replies that were a sideline about programming
details themselves - with the Gang chiming in, it might make a good
thread or an article in upcoming months.
 -- Heather</font></blockquote>
<P><STRONG>
In the meantime, I shall continue to enjoy your magazine.
</STRONG></P>
<P><STRONG>
Some other thoughts:
Get more people to link to you and advertise your site more, most people
would do it out of gratitude for all the good work you guys do.
</STRONG></P>

<blockquote><font color="#1F1F1F">Something like that is in process now; it's one of those things that I
mentioned discussing with Heather.
 -- Ben</font></blockquote>
<P><STRONG>
Find every occurence of the .com one and get a link to your site on there as
well - surfers will compare sites and you'll win hands down!
</STRONG></P>

<blockquote><font color="#1F1F1F">Thanks. A couple of our people were doing just that, right after the
separation.
 -- Ben</font></blockquote>
<P><STRONG>
Take care and all the best,
</STRONG></P>
<P><STRONG>
Steve Brown
</STRONG></P>
<P><STRONG>
Note: I had to use a Hotmail account (yeuchh) as my dog took a fancy to
copper cored wire and ate every single wire sticking out the back of my box,
he only left me with a monitor lead. Next time I'm gonna leave it switch on.
</STRONG></P>

<blockquote><font color="#1F1F1F">[laugh] If you write it up and send it to me, it'll end up in "The
Foolish Things We Do With Our Computers" column sometime soon.
 -- Ben</font></blockquote>

<blockquote><font color="#000066">...and indeed, you can see it here!  Any foolish things you've done to
your computers?  Send 'em in...
 -- Heather</font></blockquote>
<HR width="10%" align="center"><P><STRONG>
Hi Ben,
thank you for the reply.
</STRONG></P>
<P><STRONG>
I'll keep an eye out for those tutorials. I've got the O'Reilly Learning
Perl Book and I'm still getting over the stage of "it looks like garbage",
familiarity will sort all of that out no doubt. I seem to recall your
one-liner articles, I found those fascinating as they demonstrated the
problem solving methods you use, and gave a good insight in how to use
what's already there.
</STRONG></P>
<BLOCKQUOTE>
[Ben] 
Actually, I was talking about my 5-part "Learning Perl" series. Take a
look at <A HREF="http://linuxgazette.net/authors/okopnik.html"
	>http://linuxgazette.net/authors/okopnik.html</A> .
</BLOCKQUOTE>
<P><STRONG>
Aahh, I'd forgotten about these gems, thank you.
</STRONG></P>
<P><STRONG>
I'm glad to see that buffer overruns etc. are not a problem in Perl or
Python, I'll just avoid C, I'm most familiar with it as a language but it's
some time since I actually used it. Thanks for the example program, I'm
looking forward to looking at that and trying to work out why it isn't
correct.
</STRONG></P>
<BLOCKQUOTE>
[Ben] 
As Thomas has already noted (something I originally missed due to being
tired and mostly asleep), it's a buffer overflow due to strncpy not
terminating the string - a truly idiotic design decision. From libc's
info:
</BLOCKQUOTE>

<blockquote><pre> - Function: char * strncpy (char *restrict TO, const char *restrict
          FROM, size_t SIZE)
     This function is similar to `strcpy' but always copies exactly
     SIZE characters into TO.

     If the length of FROM is more than SIZE, then `strncpy' copies
     just the first SIZE characters.  Note that in this case there is
     no null terminator written into TO.
</pre></blockquote>
<BLOCKQUOTE>
<EM>no null terminator</EM> oh my.
</BLOCKQUOTE>
<BLOCKQUOTE>
At that point, as they say, the rest^H^H^H^Hsystem is history...
</BLOCKQUOTE>
<P><STRONG>
Nope, I would never have got this, I'll still run the example to see what
happens 'first hand' though.
</STRONG></P>
<BLOCKQUOTE>
[Ben] 
The actual mechanism, which can be seen by disassembling the corefile,
is a stack smash via a <TT> free()</TT> call overrun.
</BLOCKQUOTE>

<blockquote><pre>jail@Fenrir:~$ gdb -q -c core smash
Core was generated by `./smash
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
#0  0x40096acf in _int_free () from /lib/libc.so.6
(gdb) x/i $eip
0x40096acf &lt;_int_free+191&gt;:     mov    %eax,0xc(%edx)
(gdb) info reg eax edx
eax            0x34333231       875770417
edx            0x44434241       1145258561
(gdb)
</pre></blockquote>
<BLOCKQUOTE>
Joel Eriksson did a <EM>very</EM> impressive demo of getting root with the
above proglet in the vulndev forum. He used Solar Designer's shellcode,
computed the EIP, and pushed the shellcode onto the stack; <EM>voila</EM> .
This, of course, required the proglet to be SUID. Took ~20 lines of C.
</BLOCKQUOTE>
<P><STRONG>
I'm still challenged with a
modem, I've got a HCF modem that refused to work correctly when I upgraded
my motherboard, I'm going to dig it out and play with it some more [grin].
</STRONG></P>
<BLOCKQUOTE>
[Ben] 
<A HREF="http://linmodems.org"
	>http://linmodems.org</A> 
<IMG SRC="../gx/dennis/smily.gif" ALT=":)" 
		height="24" width="20" align="middle">
</BLOCKQUOTE>
<P><STRONG>
Yeah, my modem <EM>used</EM> to work, but I just upgraded from a Duron to Athlon XP
on a new board and the modem didn't work correctly, as I had a spare
external modem, although only 33.6 kbs, I used that instead, too lazy to
sort it out. Now my dog's busy digesting big chunks of the power supply I'm
forced to get HCF modem running.
</STRONG></P>
<P><STRONG>
Take care,
</STRONG></P>
<P><STRONG>
Steve Brown.
</STRONG></P>

<!-- end 1 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="mailbag.2"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">Re: Dual "Linux Gazette"?</FONT></H3>
Sun, 6 Jun 2004 13:49:40 -0400
<BR>Ben Okopnik (<a href="mailto:gazette@linuxgazette.net?subject=%20Re%3A%20%5BLG%20104%5D%20mailbag%20%232"><em>LG</em> Technical Editor</a>)
<BR>Question by God Rudy (Dpfrdtrky from netscape.net)

<P><STRONG>
Hello Linux Gazette and Editor;
</STRONG></P>
<BLOCKQUOTE>
[Ben] 
Hi, Rudy -
</BLOCKQUOTE>
<P><STRONG>
I hope that this is the correct mailbox for my "old" question.
About last december i noticed that "www.linuxgazette.com" changed
it pages drasticaly, to the bad. Through a longer search, i found
"linuxgazette.net" (the "old version").
</STRONG></P>
<P><STRONG>
What happend?
</STRONG></P>
<P><STRONG>
I was reading backissues of both versions trying to find some
answers --&gt; no much succes!
</STRONG></P>
<BLOCKQUOTE>
[Ben] 
The answer can be found in the cover article that I wrote when we separated
from SSC (the hosts of LG.com) - take a look at
<A HREF="http://linuxgazette.net/issue96/reborn.html"
	>http://linuxgazette.net/issue96/reborn.html</A> . We've actually been trying
to contact readers like yourself, trying to get the word out that the
original Gazette and the original mission are still very much in operation
and going full force; unfortunately, we have not had much success,
particularly since SSC has acted very hostile indeed throughout the entire
process and has supressed any mention of us in their pages.
</BLOCKQUOTE>
<BLOCKQUOTE>
We still have a large number of readers, mirrors, and translators, but I
wish there was a way to notify people like yourself of the change. If you
have any ideas on that score, please feel free to let me know.
</BLOCKQUOTE>
<P><STRONG>
Rudy (just another garden variety God 
<IMG SRC="../gx/dennis/smily.gif" ALT=":-)" 
		height="24" width="20" align="middle">
</STRONG></P>
<BLOCKQUOTE>
[Ben] 
Aren't we all? 
<IMG SRC="../gx/dennis/smily.gif" ALT=":)" 
		height="24" width="20" align="middle">
</BLOCKQUOTE>
<P><STRONG>
Hello Ben;
</STRONG></P>
<P><STRONG>
Thanks.
</STRONG></P>
<P><STRONG>
Found it! I was expecting something with more "flags".
I was just looking for the wrong thing 
<IMG SRC="../gx/dennis/smily.gif" ALT=":-)" 
		height="24" width="20" align="middle">
</STRONG></P>
<P><STRONG>
Rudy
</STRONG></P>

<!-- end 2 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="mailbag.3"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">Re: Foolish things....</FONT></H3>
Sun, 13 Jun 2004 10:15:00 -0400
<BR>Charlie Pearce (<a href="mailto:gazette@linuxgazette.net?subject=%20Re%3A%20%5BLG%20104%5D%20mailbag%20%233">cjp from linuxmail.org</a>)

<P><STRONG>
--- First thing I just want to say, thanks to yourself and the rest of the team
past and present for producing the great thing that LG is. I've just discovered
it and am enjoying reading through the archives
finding many a gem.
</STRONG></P>
<P>
Thanks, Charlie! I've forwarded your compliments to The Answer Gang;
they deserve to share in the glory. 
<IMG SRC="../gx/dennis/smily.gif" ALT=":)" 
		height="24" width="20" align="middle">
</P>
<P><STRONG>
Anyway here's my foolish story, feel free to add it to a future issue if you
wish:
</STRONG></P>
<P><BLOCKQuote>
[snip] Added to the upcoming issue - we've had enough responses to put
one out this month. --Ben
</BLOCKQuote></P>

<!-- end 3 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="mailbag.4"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">Re: Linux Gazette Redux :)</FONT></H3>
Wed, 26 May 2004 13:57:13 +0200
<BR>Huibert Alblas (<a href="mailto:gazette@linuxgazette.net?subject=%20Re%3A%20%5BLG%20104%5D%20mailbag%20%234">huibert_alblas from web.de</a>)


<P><STRONG>
Hello Ben (and the others)!
</STRONG></P>
<P><STRONG>
Thanks for your mail,
"das hat mich wirklich gefreut"
(sorry but I don't know how to translate this one to english,
maybe Karl Heinz can help?)
</STRONG></P>

<font color="#660000"><blockquote>Halb. Welcome home. 
<IMG SRC="../gx/dennis/smily.gif" ALT=":)" 
		height="24" width="20" align="middle">
 -- Thomas</blockquote></font>
<BLOCKQUOTE>
[Ben] 
Hey, Halb - great to see that my email has dragged you out of hiding! 
<IMG SRC="../gx/dennis/smily.gif" ALT=":)" 
		height="24" width="20" align="middle">
</BLOCKQUOTE>
<BLOCKQUOTE>
According to <A HREF="http://babelfish.altavista.com"
	>http://babelfish.altavista.com</A> it translates as "that
really made me happy" - which is a very pleasant sentiment indeed. Thank
you!
</BLOCKQUOTE>
<BLOCKQUOTE>
[Sluggo] 
That's the literal translation, and it works fine.  More colloquially
one might say, "It's a pleasure to hear from you."
</BLOCKQUOTE>
<BLOCKQUOTE>
As far as I know, wirklich means 'really' in the sense of 'truly'
(not falsely), or perhaps 'indeed'.  But in sentances like the one above,
'rally' means 'very much'.  It comes out to the same thing, but does it
in a different way. 
<IMG SRC="../gx/dennis/smily.gif" ALT=":)" 
		height="24" width="20" align="middle">
</BLOCKQUOTE>
<BLOCKQUOTE>
'gefreut' also has a sense of rejoicing and perhaps relief.  So it's
more than just 'happy' as in "You gave me a flower and I was happy".
</BLOCKQUOTE>
<P><STRONG>
Haven't heard of you and the gang for a long time either.
</STRONG></P>
<P><STRONG>
I was a little bit confused when (over a year ago, as far as I can remember)
I got a mail from (hmm, forgot his name)
claiming he was the editor of the LinuxGazette,
and that he was breaking up with TAG (or something)
</STRONG></P>
<P><STRONG>
Then I stop receiving mails from TAG,
so I thought the Project was dead.
</STRONG></P>

<font color="#660000"><blockquote>Never!
 -- Thomas</blockquote></font>

<blockquote><font color="#000066">Nope, in fact if anything that's why we split - sure looked like the CMS
was gonna kill it.
 -- Heather</font></blockquote>
<P><STRONG>
I visited the LinuxGazette site a few times,
but didn't realy like it.
</STRONG></P>
<BLOCKQUOTE>
[Ben] 
That would have been Phil Hughes. We broke away from SSC - I wrote a
nice little blurb about it here:
</BLOCKQUOTE>
<BLOCKQUOTE><BLOCKQuote>
<A HREF="http://linuxgazette.net/issue96/reborn.html"
	>http://linuxgazette.net/issue96/reborn.html</A>
</BLOCKQuote></BLOCKQUOTE>
<BLOCKQUOTE>
The old TAG list got shut down shortly after that; Phil wanted to
convert the whole site to CMS, which in my opinion would have killed LG
(and for his "version", it obviously has.)
</BLOCKQUOTE>
<BLOCKQUOTE>
Your experience, interestingly enough, represents my exact viewpoint of
what's happened with many of our readers: those who did not catch news
of the changeover - and if you, a member of TAG, missed it, what does
that say about the average reader? - simply decided that the old LG was
no more. One of the things I'd <EM>really</EM> like to do is somehow get
through to those readers wherever possible, and in general get the word
out that the Linux Gazette <EM>is</EM> alive, <EM>is</EM> publishing, and is better
than ever.
</BLOCKQUOTE>
<P><STRONG>
Since then a lot has changed in my live,
At the time of the TAG breakup I was without work,
shortly afterwards I got a job offer at the Metro Group (one of the worlds largest trading companies)
<P>
I landet in a Team of 3 people doing Java/Oracle based
Enterprise Portal and Backend Development,
very interseting stuff, but a <EM>lot</EM> of new stuff to learn.
</STRONG>
<BLOCKQUOTE>
[Ben] 
[grin] In my opinion, that's how any job should be. If there's not a lot
to learn, you're not moving forward. Nobody said that was <EM>easy</EM> - but
then nothing worthwhile in life is.
</BLOCKQUOTE>
<P><STRONG>
I starting to help getting away from usnig winNT based development
to debian.
Opensource is definetly going strong in our litle corner of the company,
Who knows where it will end.
</STRONG></P>
<P><STRONG>
I'm also getting maried next year 
<IMG SRC="../gx/dennis/smily.gif" ALT=":-)" 
		height="24" width="20" align="middle">
</STRONG></P>
<BLOCKQUOTE>
[Ben] 
Wow. Felicitations to you and your bride, then. Please be sure to give
us a URL to the photos. 
<IMG SRC="../gx/dennis/smily.gif" ALT=":)" 
		height="24" width="20" align="middle">
</BLOCKQUOTE>
<P><STRONG>
Anyways, I just visited <A HREF="http://linuxgazette.net"
	>http://linuxgazette.net</A>
and saw the the site is "back to normal"
(but looks better!)
</STRONG></P>
<BLOCKQUOTE>
[Ben] 
Thanks! A lot of credit is due to Rob Tougher who did a wonderful job of
building the CSS. It's been tweaked a bit since then, but he's the man.
</BLOCKQUOTE>
<P><STRONG>
I will subscribe to list, but only if it stays below 50 mails/day,
before my subscription was cut there was a lot of noise on the list
from people talking (mainly) to each other.
</STRONG></P>

<font color="#660000"><blockquote>Then you should be ok -- but bear in mind things fluctuate.
</blockquote>
<blockquote>Well, there is a lot of spam, but we're looking into fixing this. And as
for the chatter -- that was due to the move from SSC. There is a bit of
chatter here at the moment, most of which is <EM>not</EM> Linux related, I
should add.
 -- Thomas</blockquote></font>

<blockquote><font color="#000066">One of our threads this month actually was a technical aside to a line
of chatter that began off-topic. You never can tell with the Gang, til
it's all said and done!  But, not 50 plus a day, no.
 -- Heather</font></blockquote>
<P><STRONG>
Don't get me wrong, I have nothing against people having fun communicating,
but I won't have the time to keep track of another 50+ mails/day.
</STRONG></P>
<P><STRONG>
I will install the current Gazette on my palm to read on the way home.
</STRONG></P>
<P><STRONG>
Back on topic: Articles.
</STRONG></P>

<font color="#660000"><blockquote>Yes, we <EM>need</EM> articles. Please, put fingers to keyboard and type away!

<IMG SRC="../gx/dennis/smily.gif" ALT=":)" 
		height="24" width="20" align="middle">
 -- Thomas</blockquote></font>
<P><STRONG>
Have Fun!
</STRONG></P>
<P><STRONG>
Huibert Alblas
</STRONG></P>

<blockquote><font color="#000066">You'll be seeing Halb's article soon :D
 -- Heather</font></blockquote>
<BLOCKQUOTE>
[Ben] 
Right now, I'm actually looking for
ideas on how to get the word out and the direction in which to take LG;
having become the Editor-in-Chief, I now have to take care of the baby -
and I'm a fussy babysitter. 
<IMG SRC="../gx/dennis/smily.gif" ALT=":)" 
		height="24" width="20" align="middle"> The ideas that have been proposed so far
- making LG a bit more professional to involve the corporate crowd and
advertising in other Linux-related media, as well as a number of other
specific things to do - sound really good to me; however, I'm still open
to input.
</BLOCKQUOTE>

<blockquote><font color="#000066">You read it here. Gentlefolk, if you've ideas - let us know!
 -- Heather</font></blockquote>

<!-- end 4 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="mailbag.5"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">Linux Gazette article in issue 103</FONT></H3>
	Mon, 07 Jun 2004 12:51:10 -0400
<BR>C. Numan (<a href="mailto:gazette@linuxgazette.net?subject=%20Re%3A%20%5BLG%20104%5D%20mailbag%20%235">anonymous</a>)


<blockquote><font color="#000066">Regarding the PopupALT article.
 -- Heather</font></blockquote>
<strong>
<P>
Jimmy:
</P>
<P><BLOCKQuote>
I read your article on extensions for Mozilla. Thanks for highlighting
some! I get more and more impressed with what you can do with Mozilla /
FireFox.
</BLOCKQuote></P>
<P>
I noticed you wondered this at one point:
</P>
<P><BLOCKQuote>
PopupAlt
Popup ALT does exactly what is says on the tin: it provides a popup of
an image's ALT tag when the mouse is placed over it. This feature, which
was present in Netscape 4, was removed from Mozilla for some unknown
reason.
</BLOCKQuote></P>
<P>
I believe it was taken out since the correct HTML spec says the alt tag
is only to be displayed if the browser can not display images. It is not
supposed to be a "pop up" info. I couldn't find it, but I think there is
some tag to display a pop up when the mouse hovers.
</P>
<BLOCKQUOTE>
</strong>
[Ashwin N.] 
The "title" attribute in the "img" tag is shown as popup text by most
browsers when the mouse cursor is hovered over the image.
</BLOCKQUOTE>
<BLOCKQUOTE>
&lt;img src="your_image.jpeg" title="This should show up when you hover your
mouse over this"&gt;
</BLOCKQUOTE>
<P><STRONG>
Anyways, it is a cool extension to show the information, but Mozilla as
default is now more correctly rendering the page. In fact, the W3 says
that the alt tag should be used very carefully, and I've seen some
really long alt tags - this causes problems if your browser translates
to voice or braille, which is the purpose for the alt tag.
See: <A HREF="http://www.w3.org/TR/html401/struct/objects.html#alternate-text"
	>http://www.w3.org/TR/html401/struct/objects.html#alternate-text</A>
</STRONG></P>
<P><STRONG>
Just thought you might be interested in some of the history.
</STRONG></P>
<P><STRONG>
C.
</STRONG></P>

<!-- end 5 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="mailbag.6"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">linuxgazette.net down......</FONT></H3>
Thu, 3 Jun 2004 22:50:02 +0200
<BR>Martin Bock (<a href="mailto:gazette@linuxgazette.net?subject=%20Re%3A%20%5BLG%20104%5D%20mailbag%20%236">mbock-stade from t-online.de</a>)

<strong>
<P>
Hi folks,
</P>
<P>
you've asked for it, you'll get it: A few thoughts of my own about
missing mail to TAG.
</P>

<blockQuote><ol>
<LI>The "average" PC user today differs from the average PC user three or
five years ago. Today there are a lot of more people using computers at
work or at home. The majority of these peoples are interested in doing
stuff like writing mails and letters, surfin' the web and other
non-sophisticated stuff like this. Most of them feel no need to find
out why things work for them and how they could could customize or
improve something.


<LI>There are a lot of distributions around, which install with a few
mouse clicks a usable system. There is no need to think (and ask) about
partitions, filesystems, configuration and so on. In most cases there is
no need to edit files e.g under '/etc/ppp/' - it's all done by
${install-tool} with drop-down- and dialog-boxes.


<LI>Linux is grown up -- there are lots of information around (at? on? I
dunno) the internet. Best of it: They are only one "google" away.
</ol></blockQuote>
<P>
I appreciate the project "Linux Gazette" (hey, there are all issues from
the beginning on my workstation's <EM>and</EM> my laptop's hard disks). But: I
feel, nowadays Linux Gazette shouldn't focus on basic- and
newbie-support, but should do more stuff one ore two steps further.
</P>
<P>
BTW: The link on my site points to your (true[tm]) Linux Gazette.
</P>
<P>
Keep on rollin ...
</P>
<P>
Nice Regards
</P>
<P>
Martin Bock
</P>
</strong>

<!-- end 6 -->
<HR>
<center>
<BIG><STRONG><FONT COLOR="maroon">GAZETTE MATTERS</FONT></STRONG></BIG>
<BR>
</center><HR>
<UL>
<!-- index_text begins -->
<li><A HREF="#gaz.1"
	><strong>Asking 2c-tips of TAG</strong></a>
<li><A HREF="#gaz.2"
	><strong>Author FAQ...</strong></a>
<li><A HREF="#gaz.3"
	><strong>Licensing</strong></a>
<li><A HREF="#gaz.4"
	><strong>[LG 101] mailbag #2 - Stephen Bint</strong></a>
<!-- index_text ends -->
</UL>
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="gaz.1"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">Asking 2c-tips of TAG</FONT></H3>
Mon, 24 May 2004 20:37:26 +0100
<BR>Thomas Adam (<a href="mailto:gazette@linuxgazette.net?subject=%20Re%3A%20%5BLG%20104%5D%20gazette%20matters%20%231">thomas_adam from bonbon.net</a>)


<P><STRONG>
I am a little bit concerned the people here (especially those that are
more established) don't fully understand what constitutes a 2c-tip. A
2c-tip is just that -- something that is short and easy and can be done
in a few steps. Asking whether it is appropriate (Neil!) just causes us
more grief to wade through meta questions!
</STRONG></P>
<P><STRONG>
This might be in the form of a configuration tweak, or a minuture
program that performs a given task, etc. Often though, larger tips are
turned into TAG column entries -- and vice versa.
</STRONG></P>
<P><STRONG>
Often what would be flagged by Heather and I as a TAG entry might well
form off-shoots to 2c-tips if the quality of the thread in question is
not worthy.
</STRONG></P>
<P><STRONG>
But we will publish anything not only explicitly marked as a 2c-tip, but
also what we deem appropriate to be one. We certainly don't filter out
sent in tips -- only vary rarely. The only thing I will say to you is
that don't always expect to submit one and see it in the preceeding
release of LG. Heather and I decide which tips get published when.
</STRONG></P>
<BLOCKQUOTE>
[jra] 
If you can figure out how to publish tips in an issue of LG that's
already gone out, my hat's off to you, Thomas.
</BLOCKQUOTE>
<BLOCKQUOTE>
[Ben] 
The method is covered in Jim's "Retro" series. It's based on that
capability of Linux that Linus talked about, executing an infinite loop
in three seconds...
</BLOCKQUOTE>
<BLOCKQUOTE>
[Jason Creighton] 
Yes, it's quite a clever method. Instead of going to all the work of
updating every copy of the LG everywhere, we just insert the tips in the
past before all the mirrors pick up the issue.
</BLOCKQUOTE>
<BLOCKQUOTE>
The one problem is that executing an infinite loop in three seconds can
only place information in the future. In order to place it in the past,
we must use a Windows box, which, as everyone knows, takes an infinite
amount of time to execute a three second loop.
</BLOCKQUOTE>
<P><STRONG>
Send them in.... you know you want to.
</STRONG></P>
<P><STRONG>
-- Thomas Adam
</STRONG></P>

<!-- end 1 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="gaz.2"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">Author FAQ...</FONT></H3>
Wed, 23 Jun 2004 09:11:30 -0400
<BR>Ben Okopnik (<a href="mailto:gazette@linuxgazette.net?subject=%20Re%3A%20%5BLG%20104%5D%20gazette%20matters%20%232"><em>LG</em> Technical Editor</a>)


<P>
...is now updated:
</P>
<P><BLOCKQuote>
<A HREF="http://linuxgazette.net/faq/author.html"
	>http://linuxgazette.net/faq/author.html</A>
</BLOCKQuote></P>
<P>
Thanks to Jimmy for doing a lot of the preparatory proofreading.
<BR>Comments, corrections, and ideas welcome.
</P>

<!-- end 2 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="gaz.3"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">Licensing</FONT></H3>
Fri, 18 Jun 2004 08:47:35 -0400
<BR>Ben Okopnik (<a href="mailto:gazette@linuxgazette.net?subject=%20Re%3A%20%5BLG%20104%5D%20gazette%20matters%20%233"><em>LG</em> Technical Editor</a>)


<BLOCKQUOTE>
[Ben] 
OK, I've done my bit of research and rewrite, etc., etc., etc. - thank
you, Rick and Jimmy, for contributing to my knowledge of the topic.
</BLOCKQUOTE>

<blockquote><font color="#000066">If you readers think that discussion might be interesting to you, let us
know.  Most of the Gang here found it rather dry.
 -- Heather</font></blockquote>
<BLOCKQUOTE>
[Ben] 
I've decided that the OPL is a good license for us to stick with, as
long as the optional stuff is not asserted; consequently, I've updated
our &lt;<A HREF="http://linuxgazette.net/copying.html"
	>http://linuxgazette.net/copying.html</A>&gt; page - it was a) in the "old"
LG format and b) showed the draft version of the OPL. Both are now
fixed. Starting with the next issue, the front page will now explicitly
state
</BLOCKQUOTE>

<blockquote><pre>All content released under the Open Publication License v1.0 (options A and B not applied)
</pre></blockquote>
<BLOCKQUOTE>
and the individual articles will be tagged with
</BLOCKQUOTE>

<blockquote><pre>Copyright  2004, [author_name]. Released under the Open Publication license
</pre></blockquote>
<BLOCKQUOTE>
Comments, as always, are welcome.
</BLOCKQUOTE>

<!-- end 3 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="gaz.4"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">[LG 101] mailbag #2 - Stephen Bint</FONT></H3>
Mon, 7 Jun 2004 11:22:35 +1000
<BR>Peter Maxwell (<a href="mailto:gazette@linuxgazette.net?subject=%20Re%3A%20%5BLG%20104%5D%20gazette%20matters%20%234">peter.maxwell from anu.edu.au</a>)
<BR>Question by gfa2c (gfa2c from gmx.net)

<P>
Stephen Bint died in February.  I wouldn't have known except that back
then google turned up his sister's web log:
</P>
<P><BLOCKQuote>
<A HREF="http://www.livejournal.com/users/smaoineamh/2004/02/27"
	>http://www.livejournal.com/users/smaoineamh/2004/02/27</A>
</BLOCKQuote></P>
<P>
<A HREF="http://www.livejournal.com/users/smaoineamh/2004/03/06"
	>http://www.livejournal.com/users/smaoineamh/2004/03/06</A>
</P>
<P>
Apologies is this is old news (after all you published the question 2
months ago) but I guess it is just possible that no regular Linux
Gazette readers were able to help.
</P>
<P>
-- Peter Maxwell
</P>

<blockquote><font color="#000066">We sorrow that he's gone, but he stuck to his principles.  There's
plenty to be said for that.
 -- Heather</font></blockquote>

<!-- end 4 -->
<hr>
<CENTER><Font face="Helvetica"><STRONG>
This page edited and maintained by the Editors of <I>Linux Gazette</I><br>HTML script maintained by <A HREF="mailto:star@starshine.org">Heather Stern</a> of Starshine Technical Services, <A HREF="http://www.starshine.org/">http://www.starshine.org/</A>
</STRONG></Font></CENTER>
<hr>

</p>



<!-- *** BEGIN author bio *** -->
<!-- *** END author bio *** -->




<div id="articlefooter">




<p>
Published in Issue 104 of Linux Gazette, July 2004
</p>

</div>

</div>

<div id="navigation">

<a href="../index.html">Home</a>
<a href="../faq/index.html">FAQ</a>
<a href="../lg_index.html">Site Map</a>
<a href="../mirrors.html">Mirrors</a>
<a href="../mirrors.html">Translations</a>
<a href="../search.html">Search</a>
<a href="../archives.html">Archives</a>
<a href="../authors/index.html">Authors</a>
<a href="../contact.html">Contact Us</a>
</div>

<div id="breadcrumbs">

<a href="../index.html">Home</a> &gt;
<a href="index.html">July 2004 (#104)</a> &gt;
TWDT

</div>


<img src="../gx/2003/sit3-shine.7-2.gif" id="tux" alt="Tux"/>

<br />


<div class="content lgcontent">

<a name="lg_tips"></a>
<h1>More 2 Cent Tips!</h1>


</b>
</p>


<p>
<center><STRONG>See also: The Answer Gang's 
<a href="../tag/kb.html">Knowledge Base</a>
and the <i>LG</i> 
<a href="http://www.linuxgazette.net/search.html">Search Engine</a></STRONG>
</center><HR>
<UL>
<!-- index_text begins -->
<li><A HREF="#tips.1"
	><strong>a question about linker script</strong></a>
<li><A HREF="#tips.2"
	><strong>Launching Firefox 0.9</strong></a>
<li><A HREF="#tips.3"
	><strong>Checkinstall</strong></a>
<li><A HREF="#tips.4"
	><strong>Periodic table of the operators</strong></a>
<li><A HREF="#tips.5"
	><strong>"Remote" authentication with PHP</strong></a>
<li><A HREF="#tips.6"
	><strong>Xserver spits Xclient hosts</strong></a>
<li><A HREF="#tips.7"
	><strong>Fun game in 64 LoC</strong></a>
<li><A HREF="#tips.8"
	><strong>Grokdoc</strong></a>
<!-- index_text ends -->
</UL>
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="tips.1"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">a question about linker script</FONT></H3>
Ben Okopnik, Jimmy O'Regan, Philip O Brien (<a href="mailto:tag@linuxgazette.net?cc=helo54ljm@yahoo.com.tw&cc=tag@linuxgazette,net&subject=%20Re%3A%20%5BLG%20104%5D%202c%20Tips%20%231">The <em>LG</em> Answer Gang</a>)
<BR>Question by Liang Jun-Ming (helo54ljm from yahoo.com.tw)

<P>
Dear Mr.Okopnik
</P>
<P>
My name is Liang Jun-Ming,a student from Taiwan.
</P>
<P>
I'm suffering from a programming problem,I would very much
appreciate receving an answer from you !
I wrote a testing program named hello.s , and a linker script named
ldscript as follows:
</P>
<p align="center">See attached <tt><a href="misc/tips/liong.hello.s.asm.txt">liong.hello.s.asm.txt</a></tt></p>
<P>
after " as hello.s -o hello.o" and "ld -Tldscript hello.o -o hello"
I get an executable named hello.
</P>
<P>
My question is:
</P>
<P><BLOCKQuote>
What does "AT(0x3000000)" mean ?
</BLOCKQuote></P>
<P>
Does it mean that the loader will load this executable at
"physical address " 0x3000000 ?
</P>
<P>
I know the "virtual address" of the first byte of this executable
would be 0x1000, but in Linux , can we put data at any physical
address as we wish ? If it does, why the program still works even if the RAM
is 32M in my PC ?(0x3000000 &gt; 32M). What tool in Linux can we have to
let us "watch" the contents of memory by specifying "physical addresses"?
If it doesn't, what is the function when we write "AT(xxxx)" ?
Hope I can receive an answer when you are not busy. Thank you very much!
</P>
<BLOCKQUOTE>
[Ben] 
Hi, Jun-Ming -
</BLOCKQUOTE>
<BLOCKQUOTE>
I'm afraid your question is somewhat misdirected: I'm not an assembly
expert, under Linux or otherwise. My suggestion to you would be to start
at <A HREF="http://linuxassembly.org"
	>http://linuxassembly.org</A> and go from there - their front page
reads
</BLOCKQUOTE>

<TABLE WIDTH="95%" BORDER="1" BGCOLOR="#FFFFCC"><TR><TD>
<p align="center">...............</p>
<BLOCKQUOTE>
Welcome to the Linux Assembly!
</BLOCKQUOTE>
<BLOCKQUOTE>
If you are looking for information on assembly programming under
UNIX-like operating systems (Linux/BSD/ BeOS/etc), this is the right
place to be. Here you can find various resources, ranging from tutorials
and documentation, to actual programs written in assembly language. As
time passes, we will try to provide as much information on the subject
as possible, so stay tuned.
</BLOCKQUOTE><p align="center">...............</p>
</TD></TR></TABLE>
<BLOCKQUOTE>
That seems like the right place for your query.
</BLOCKQUOTE>
<BLOCKQUOTE>
[Jimmy O'Regan] 
The <TT> AT()</TT> keyword is for things like ROMs. I recommend you read the GNU Linker manual:
</BLOCKQUOTE>
<BLOCKQUOTE><BLOCKQuote>
<A HREF="http://www.gnu.org/software/binutils/manual/ld-2.9.1/html_chapter/ld_3.html#SEC21"
	>http://www.gnu.org/software/binutils/manual/ld-2.9.1/html_chapter/ld_3.html#SEC21</A>
</BLOCKQuote></BLOCKQUOTE>
<P><STRONG>
Dear Answer Gang:
</STRONG></P>
<P><STRONG><BLOCKQuote>
According to the GNU linker ld manual:
</BLOCKQuote></STRONG></P>
<P><STRONG>
the <TT> AT()</TT> keywod specifies the load address of a section,
and it says "this feature is designed to make it easy to build a ROM image..."
</STRONG></P>
<P><STRONG>
Query,
</STRONG></P>

<p><Strong><ol>
<LI>the address specified by AT() keyword to load is the "physical address"
of ROM ? and we can really put code in ROM in this way ?

<LI>the "ROM" the document mentioned is the actual element in board, or
just RAM of imitating the Read-Only-Memory ?
</ol></Strong></p>
<P><STRONG>
( forgive me for a Chinese student's poor English !)
</STRONG></P>
<BLOCKQUOTE>
[Jimmy] 
The <TT> AT()</TT> keyword can be used for ROMs - if you want to write a
replacement BIOS (such as Linux BIOS: <A HREF="http://www.linuxbios.org"
	>http://www.linuxbios.org</A>), you
will have to do use the <TT> AT()</TT> keyword; or if you are creating a ROM
images for later use in an emulator, or to write to a physical ROM.
</BLOCKQUOTE>
<BLOCKQUOTE>
You can also use the <TT> AT()</TT> keyword for boot loaders/kernels, which need
to be at a specific location in RAM to be executed; and in a normal
program. If the program has a specified load address, and is loaded on
an MMU-less system, or in an OS which doesn't use the MMU, then you get
access to that specific area of memory, but in an OS (such as Linux)
which makes use of the MMU, the address is transparently remapped to an
address within the space allocated to your program by the kernel.
</BLOCKQUOTE>

<blockquote><font color="#000066">Jimmy also asked a friend...
 -- Heather</font></blockquote>
<BLOCKQUOTE>
[Jimmy] 
Sorry about the format this takes; I asked a friend from college if he
could answer the linker script question, the answer is in the attached
IRC log. There's a lot of overview in there which I thought was
interesting. Philip's credentials are that he wrote an operating system
for his degree thesis, based on KeyOS (<A HREF="http://keyos.sourceforge.net"
	>http://keyos.sourceforge.net</A>),
to which he contributed code under a pseudonym (the college made some
claims about copyright...).
</BLOCKQUOTE>

<blockquote><font color="#000066">Logged from the
<a href="http://www.undernet.org/">UnderNet IRC</a>
on Jun 20.<br>
 -- Heather</font></blockquote>

<TABLE WIDTH="95%" BORDER="1" BGCOLOR="#FFFFCC"><TR><TD>
<p align="center">...............</p>

<blockquote><code><font color="#000033"><br>&lt;JimRegan&gt;	So, can you answer that question?
<br>&lt;JimRegan&gt;	Cos noone at LG can.
</font></code></blockquote>

<blockquote><em><font color="#000033"><br>&lt;Crypty&gt;	question?
</font></em></blockquote>

<blockquote><code><font color="#000033"><br>&lt;JimRegan&gt;	In the html file I sent
</font></code></blockquote>

<blockquote><em><font color="#000033"><br>&lt;Crypty&gt;	its the offset that that section is loaded at.
<br>&lt;Crypty&gt;	the offset from the loadaddr
</font></em></blockquote>

<blockquote><code><font color="#000033"><br>&lt;JimRegan&gt;	?
</font></code></blockquote>

<blockquote><em><font color="#000033"><br>&lt;Crypty&gt;	and the 0x1000 is the size of the section if i remember correctly
<br>&lt;Crypty&gt;	or at least i think thats it.
<br>&lt;Crypty&gt;	had to figure it out for writing my boot loader, which i couldnt get to work right, caused fatal exception when it switched to ring 0 to enter PMODE.....
<br>&lt;Crypty&gt;	ended up having to use Grub, but handed up my effort to the examiners, they were impressed i got it to ge tthat faer.
</font></em></blockquote>

<blockquote><code><font color="#000033"><br>&lt;JimRegan&gt;	So... in a ROM, it'd go from the beginning of memory, otherwise it's relative to where it loaded
<br>&lt;JimRegan&gt;	If the ROM is loaded at 0
</font></code></blockquote>

<blockquote><em><font color="#000033"><br>&lt;Crypty&gt;	.text is actually the code by the way, not the strings.
<br>&lt;Crypty&gt;	and yes, but all programs see their address as 0, but the OS handles their requests for memory locations and adds their offset in the memory manager
</font></em></blockquote>

<blockquote><code><font color="#000033"><br>&lt;JimRegan&gt;	The strings go in .data
</font></code></blockquote>

<blockquote><em><font color="#000033"><br>&lt;Crypty&gt;	yes
<br>&lt;Crypty&gt;	the code is put in a large offset to avoid overflows causing mistooks in the code.
</font></em></blockquote>

<blockquote><code><font color="#000033"><br>&lt;JimRegan&gt;	So it's not necessary to specify the location, unless you have some weird backwards compatibility problem, or are writing an OS?
</font></code></blockquote>

<blockquote><em><font color="#000033"><br>&lt;Crypty&gt;	but the OS can preempt this and actually fool the program by pretending it loaded the code at that offset and translating the addresses on the fly
<br>&lt;Crypty&gt;	well, it is also to specify locations in writing an OS or other "pure application"
</font></em></blockquote>

<blockquote><code><font color="#000033"><br>&lt;JimRegan&gt;	So, in short, you can't just put code wherever the heck you want in a modern OS?
</font></code></blockquote>

<blockquote><em><font color="#000033"><br>&lt;Crypty&gt;	but a decent OS will just ignore the offsets and pretend instead
<br>&lt;Crypty&gt;	no, the OS itself has to obey the offset rules, as the memory manager will not be loaded at that point.
</font></em></blockquote>

<blockquote><code><font color="#000033"><br>&lt;JimRegan&gt;	I mean if that's executed in a running OS.
</font></code></blockquote>

<blockquote><em><font color="#000033"><br>&lt;Crypty&gt;	so it cant pretent and every thing is relying on exact offsets for a form of crude task switching.
<br>&lt;Crypty&gt;	oh, yes.
</font></em></blockquote>

<blockquote><code><font color="#000033"><br>&lt;JimRegan&gt;	Like the MacOS did?
</font></code></blockquote>

<blockquote><em><font color="#000033"><br>&lt;Crypty&gt;	but even without a ld script, it should still use a default set of offsets for linking, depending on ythe executable format, coff, elf, bin etc..
</font></em></blockquote>

<blockquote><code><font color="#000033"><br>&lt;JimRegan&gt;	OK, I think that'll answer the question. Do I have your formal permission to send this for potential publication?
</font></code></blockquote>

<blockquote><em><font color="#000033"><br>&lt;Crypty&gt;	the offsets are set by default on set types of exe, so that the os can just go , heh I know this type, and not have to search for markers in the code etc.
<br>&lt;Crypty&gt;	no, hehe I better read up and make sure its right first.. its been over a year.
</font></em></blockquote>

<blockquote><code><font color="#000033"><br>&lt;JimRegan&gt;	Ah. Cool.
<br>&lt;JimRegan&gt;	Well, what you've said makes what I read in the LD manual make sense.
</font></code></blockquote>

<blockquote><em><font color="#000033"><br>&lt;Crypty&gt;	oh well in that cvase.. sure.. just dont sign my name to it, klast thing i need is people with questions :-) or worse some git flaming me for not getting it quite right.
</font></em></blockquote>

<blockquote><code><font color="#000033"><br>&lt;JimRegan&gt;	AT ( ldadr )
<br>&lt;JimRegan&gt;	    The expression ldadr that follows the AT keyword specifies the load address of the section. The default (if you do not use the AT keyword) is to make the load address the same as the relocation address. This feature is designed to make it easy to build a ROM image. For example, this SECTIONS definition creates two output sections: one called `.text', which starts at 0x1000, and one called `.mdata', w
<br>&lt;JimRegan&gt;	hich is loaded at the end of the `.text' section even though its relocation address is 0x2000. The symbol _data is defined with the value 0x2000:
</font></code></blockquote>

<blockquote><em><font color="#000033"><br>&lt;Crypty&gt;	but that said I think i got it right, been a while but I think i remember it right
<br>&lt;Crypty&gt;	oh, good I did remember it right.. yeah, go me!
</font></em></blockquote>

<blockquote><code><font color="#000033"><br>&lt;JimRegan&gt;	So, do I get a definite OK now?
</font></code></blockquote>

<blockquote><em><font color="#000033"><br>&lt;Crypty&gt;	hehe I am still one of the knigits of ye olde ASM coding :-)
<br>&lt;Crypty&gt;	yeah sure.
</font></em></blockquote>

<blockquote><code><font color="#000033"><br>&lt;JimRegan&gt;	Thanks.
</font></code></blockquote>

<blockquote><em><font color="#000033"><br>&lt;Crypty&gt;	you can tell me if some one flames you for getting it slightly skew ways,
<br>&lt;Crypty&gt;	but it is a good enough explainatin to the question i think
</font></em></blockquote>

<blockquote><code><font color="#000033"><br>&lt;JimRegan&gt;	Nah. People are generally polite in pointing out mistakes.
<br>&lt;JimRegan&gt;	God knows I've made enough of them.
</font></code></blockquote>

<blockquote><em><font color="#000033"><br>&lt;Crypty&gt;	AT()  is definitly the offset it gets loaded at and the x1000 is the size of the section, they are seperate in that one specifies properties of the process after its loaded and one specifies properties of the EXE.
</font></em></blockquote>
<p align="center">...............</p>
</TD></TR></TABLE>
<!-- end 1 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="tips.2"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Launching Firefox 0.9</FONT></H3>
Raj Shekhar (<a href="mailto:tag@linuxgazette.net?cc=rajshekhar@hotpop.com&subject=%20Re%3A%20%5BLG%20104%5D%202c%20Tips%20%232">rajshekhar from hotpop.com</a>)


<P><STRONG>
Hello
</STRONG></P>
<P><STRONG>
I had used the following script for launching Firefox (earlier named
firebird)  (See my article Mozilla Firebird - A review
(<A HREF="http://linuxgazette.net/issue97/shekhar.html"
	>http://linuxgazette.net/issue97/shekhar.html</A>) to see how you can use this).
</STRONG></P>

<pre><strong>#!/bin/sh
/usr/lib/mozilla-firebird/MozillaFirebird  -remote "openURL('$@', new-tab)" ||
exec /usr/lib/mozilla-firebird/MozillaFirebird "$@";
</strong></pre>
<P><STRONG>
However, with the 0.9 release (the latest one, which is even more slick
and fast), this stopped working. Instead of launching the new tab, the
Profile Manager UI pops up. This was reported as bug
<A HREF="http://bugzilla.mozilla.org/show_bug.cgi?id=246168"
	>http://bugzilla.mozilla.org/show_bug.cgi?id=246168</A> in the Mozilla Bugzilla.
</STRONG></P>
<P><STRONG>
The reason for this is the change in the format of calling the remote
command. The new way of doing this is:
</STRONG></P>

<pre><strong>firefox -a firefox -remote openURL(&lt;url&gt;,new-tab)
</strong></pre>
<P><STRONG>
Note that there should be no space between the the comma and the command
after the url (new-tab in this case, you can also use new-window to
start a new window) or you get a  "Error: Failed to send command: 509
internal error".
</STRONG></P>
<P><STRONG>
So the script to launch firefox becomes
</STRONG></P>

<pre><strong>#!/bin/sh
/usr/lib/firefox/firefox -a firefox  -remote "openURL("$@",new-tab)" ||
exec /usr/lib/firefox/firefox "$@";
</strong></pre>
<BLOCKQUOTE>
[Ben] 
I just had the same problem with the new Mozilla upgrade; the trouble is
in the brain-dead URL parser at the end of the wrapper script. Although
I fixed it, it very quickly became useless: I downloaded Mozilla 1.7 from
<A HREF="http://mozilla.org"
	>http://mozilla.org</A>, and its wrapper script works fine.
</BLOCKQUOTE>
<BLOCKQUOTE>
Oh, and since you brought this issue up: just yesterday, I was reading
about Mozilla's "remote" methods in order to fix the above problem - and
still forgot, completely, that there's a "native" way to test if Mozilla
is running or not.
</BLOCKQUOTE>
<BLOCKQUOTE>
Wonder if I can trade this brain in for a newer model?
</BLOCKQUOTE>

<blockquote><pre>mozilla -remote "ping()" 2&gt;/dev/null &amp;&amp; mozilla -remote "openurl($1,new-window)" || mozilla $1
</pre></blockquote>

<!-- end 2 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="tips.3"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Checkinstall</FONT></H3>
Neil Youngman (<a href="mailto:tag@linuxgazette.net?cc=neil.youngman@wirefast.com&subject=%20Re%3A%20%5BLG%20104%5D%202c%20Tips%20%233">neil.youngman from wirefast.com</a>)


<P><STRONG>
This one courtesy of LWN. You want to build a package from the latest
source, but have it managed by your favourite package manager.
Checkinstall claims to automate the process for <A HREF="http://www.debian.org/">Debian</A> (presumably any
system using dpkg?), <A HREF="http://www.slackware.org/">Slackware</A> and RPM based systems. I gotta have it

<IMG SRC="../gx/dennis/smily.gif" ALT=";-)" 
		height="24" width="20" align="middle">
</STRONG></P>
<P><STRONG>
<A HREF="http://checkinstall.izto.org"
	>http://checkinstall.izto.org</A>
</STRONG></P>
<P><STRONG>
Publication by LWN is hereby permitted
</STRONG></P>
<BLOCKQUOTE>
[Thomas] 
I have used both, and my personal preference would be the use of
<a href="http://www.gnu.org/software/stow/">stow</a>
over checkinstall. 
<IMG SRC="../gx/dennis/smily.gif" ALT=":)" 
		height="24" width="20" align="middle">
</BLOCKQUOTE>

<blockquote><font color="#000066">Typing stow as a keyword into the search box at freshmeat.net also
reveals some interesting competitors, and a front end for stow.
</font></blockquote>
<blockquote><font color="#000066">Also, Allan Peda had an article on this topic in Issue 75,
<a href="http://linuxgazette.net/issue75/peda.html">Simple Package Management With Stow</a>
 -- Heather</font></blockquote>

<!-- end 3 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="tips.4"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Periodic table of the operators</FONT></H3>
Jimmy O'Regan (<a href="mailto:tag@linuxgazette.net?cc=jimregan@o2.ie&subject=%20Re%3A%20%5BLG%20104%5D%202c%20Tips%20%234">The <em>LG</em> Answer Gang</a>)


<P><STRONG>
One for Ben: a periodic table of Perl 6's operators.
</STRONG></P>
<P><STRONG>
<A HREF="http://www.ozonehouse.com/mark/blog/code/PeriodicTable.html"
	>http://www.ozonehouse.com/mark/blog/code/PeriodicTable.html</A>
</STRONG></P>
<BLOCKQUOTE>
[Ben] 
"Today, we're going to learn about one of the varieties of serious
mental disturbance. Here, for example, is a distinctly pathological
case..." 
<IMG SRC="../gx/dennis/smily.gif" ALT=":)" 
		height="24" width="20" align="middle">
</BLOCKQUOTE>
<BLOCKQUOTE>
It's got some amount of cuteness to it, but I think you'd have to be a
bit obsessed to actually do the thing up. Reminds me of an <EM>excellent</EM>
model of the Titanic, about 8' long IIRC, built out of matchsticks - all
the way down to the deck chairs and the oars in the lifeboats - that I
saw at an exhibition of artworks done by mental patients. Much of the
work was incredible, brilliant, and unrepeatable in many cases - and the
stories (such as that of a woman who made these shockingly beautiful
patterns from threads she'd pluck out of rags... and almost all of whose
work had been thrown away because it was just "trash" made by "crazy
Nancy") would break your heart.
</BLOCKQUOTE>

<!-- end 4 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="tips.5"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">"Remote" authentication with PHP</FONT></H3>
Lew Pitcher (<a href="mailto:tag@linuxgazette.net?cc=lpitcher@sympatico.ca&subject=%20Re%3A%20%5BLG%20104%5D%202c%20Tips%20%235">lpitcher from sympatico.ca</a>)


<P><STRONG>
Hi Guys
</STRONG></P>
<P><STRONG>
Here's another contribution. Hopefully, you can publish it as a 'two cent tip'
</STRONG></P>
<HR width="10%" align="center"><P><STRONG>
As part of a PHP web app I'm playing with, I needed to authenticate the web
client user with a remote system. Unfortunately, this system is a mainframe
and setting up a web-enabled authentication product on it is somewhat
timeconsuming and requires a lot of administrivia. I wanted to avoid all
that, so I had to come up with another way to authenticate web users
remotely.
</STRONG></P>
<P><STRONG>
The one TCP/IP networked app our mainframe has available is FTP. Now, the FTP
protocol implements security processes with the 'USER' and 'PASS'word
commands, and our host security people have ensured that the host FTP server
requires these two functions. In our case, the 'USER' and 'PASS' functions on
the server interface with the ACF2 security system to validate that the given
userid and password combination are correct, and will not let an FTP
connection in if they aren't.
</STRONG></P>
<P><STRONG>
I use this little tidbit of information to let me authenticate web users of my
Linux box by forcing their web browsers to pop up the Authentication panel,
and sending their entered userid and password information to the host in an
FTP 'USER' and 'PASS'word command sequence. If the host's FTP rejects the
sequence, then the user isn't authorized, but if the host's FTP accepts the
sequence, then the user is valid to the host. In either case, I don't
actually transfer files over the FTP link; I simply close it unused. I only
need it for the authentication.
</STRONG></P>
<P><STRONG>
Neat or what?
</STRONG></P>
<P><STRONG>
Here's an example PHP script that demonstrates the process. It needs an
ftp server in order to work, and is (for demonstration purposes) set up to
talk to the ftp server at localhost...
</STRONG></P>

<pre><strong>&lt;?php

  /*
  ** LoginPrompt() sends headers and html with the intent of
  ** inducing the web-browser to display it's built-in userid/password
  ** prompt.
  ** It sends a WWW-Authenticate header to give the authentication specs,
  **          a HTTP 401 on the current page requested by the browser, and
  **          a dummy HTML page to be displayed if the user cancels the
  **            login prompt
  ** It then exits, causing php to terminate the current transaction
  ** without further output
  */
  function LoginPrompt($URL)
  {
    /* force the login popup to show up */
    Header("WWW-Authenticate: Basic realm=\"System Login\"");
    Header("HTTP/1.0 401 Unauthorized");

    /* if the user hits Cancel, send him to a place he cant hurt us from */
    echo "&lt;meta HTTP-EQUIV=\"Refresh\" CONTENT=\"0; URL=$URL\"&gt;";

    exit;
  }

  $userid = $_SERVER['PHP_AUTH_USER'];
  $passwd = $_SERVER['PHP_AUTH_PW'];

  $validuser = "no";

  if ($userid &amp;&amp; $passwd)
  {

    /* connect to FTP server, see if it accepts the given userid &amp; password */
    $conn = ftp_connect("localhost") or die("Cant connect");
    if (@ftp_login($conn,$userid,$passwd))  $validuser = "yes";
    ftp_close($conn);

    if ($validuser == "no") /* bad user - try the login again */
      LoginPrompt("http://www.php.net/manual/en/features.http-auth.php");
  }
  else /* first time into this page - force the 1st login prompt */
    LoginPrompt("http://www.php.net/manual/en/features.http-auth.php");

  phpinfo();

?&gt;
</strong></pre>

<!-- end 5 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="tips.6"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Xserver spits Xclient hosts</FONT></H3>
Chris Christensen (<a href="mailto:tag@linuxgazette.net?cc=Chris.Christensen@aspenresearch.com&subject=%20Re%3A%20%5BLG%20104%5D%202c%20Tips%20%236">Chris.Christensen from aspenresearch.com</a>)



<blockquote><font color="#990000"><em>This is in reply to:
</em></font></blockquote>
<blockquote><font color="#990000"><em><A HREF="http://linuxgazette.net/103/lg_tips.html#tips.4"
	>http://linuxgazette.net/103/lg_tips.html#tips.4</A>
 -- Thomas Adam</em></font></blockquote>
<P><STRONG>
Regarding Xserver spits multiple windows to foreign Xclient:
</STRONG></P>
<P><STRONG><BLOCKQuote>
I have no knowledge of Exceed.  I use cygwin to connect to unix/linux boxes.
You have to configure/install cygwin with X (and ssh, if you're going to use
that, and why not?).  Crucial step is to start an xwdm (blackbox I think,
whatever is available on Cygwin) first, and start linux x-apps from inside the
xwdm (start with an xterm!).  The full screen x-windows display manager is
actually running locally, while the windowed apps are in the dm.
</BLOCKQuote></STRONG></P>
<P><STRONG>
Chris C
</STRONG></P>

<!-- end 6 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="tips.7"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Fun game in 64 LoC</FONT></H3>
Ben Okopnik (<a href="mailto:tag@linuxgazette.net?cc=ben@callahans.org&subject=%20Re%3A%20%5BLG%20104%5D%202c%20Tips%20%237"><em>LG</em> Technical Editor</a>)


<P><STRONG>
Ambassador of Pain - quite entertaining for 64 lines of code. (That's in
C, mind you; if it was Perl, I'd be expecting Quake3, including the PAK
file. 
<IMG SRC="../gx/dennis/smily.gif" ALT=":)" 
		height="24" width="20" align="middle">
</STRONG></P>
<P><STRONG>
<A HREF="http://raffi.at/view/code/aop"
	>http://raffi.at/view/code/aop</A>
</STRONG></P>

<!-- end 7 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="tips.8"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Grokdoc</FONT></H3>
Jimmy O'Regan (<a href="mailto:tag@linuxgazette.net?cc=jimregan@o2.ie&subject=%20Re%3A%20%5BLG%20104%5D%202c%20Tips%20%238">The <em>LG</em> Answer Gang</a>)


<P><STRONG>
A while back, Groklaw mentioned that they wanted to have a Linux
usability test, and technical documentation written for new users.
They've started a wiki (based on the Wikipedia software) to do this:
</STRONG></P>
<P><STRONG><BLOCKQuote>
<A HREF="http://www.grokdoc.net/index.php/Main_Page"
	>http://www.grokdoc.net/index.php/Main_Page</A>
</BLOCKQuote></STRONG></P>

<!-- end 8 -->
<hr>
<CENTER><Font face="Helvetica"><STRONG>
This page edited and maintained by the Editors of <I>Linux Gazette</I><br>HTML script maintained by <A HREF="mailto:star@starshine.org">Heather Stern</a> of Starshine Technical Services, <A HREF="http://www.starshine.org/">http://www.starshine.org/</A>
</STRONG></Font></CENTER>
<hr>

</p>



<!-- *** BEGIN author bio *** -->
<!-- *** END author bio *** -->




<div id="articlefooter">




<p>
Published in Issue 104 of Linux Gazette, July 2004
</p>

</div>

</div>

<div id="navigation">

<a href="../index.html">Home</a>
<a href="../faq/index.html">FAQ</a>
<a href="../lg_index.html">Site Map</a>
<a href="../mirrors.html">Mirrors</a>
<a href="../mirrors.html">Translations</a>
<a href="../search.html">Search</a>
<a href="../archives.html">Archives</a>
<a href="../authors/index.html">Authors</a>
<a href="../contact.html">Contact Us</a>
</div>

<div id="breadcrumbs">

<a href="../index.html">Home</a> &gt;
<a href="index.html">July 2004 (#104)</a> &gt;
TWDT

</div>


<img src="../gx/2003/sit3-shine.7-2.gif" id="tux" alt="Tux"/>

<br />


<div class="content lgcontent">

<a name="lg_answer"></a>
<h1>The Answer Gang</h1>


</b>
</p>


<p>
<TABLE width="100%" BORDER><TR><TD WIDTH="200">
<A HREF="http://linuxgazette.net/">
<IMG ALT="LINUX GAZETTE" SRC="../gx/2002/lglogo_200x41.png" 
	WIDTH="200" HEIGHT="41" border="0"></A>
<BR CLEAR="all">
<SMALL>...<I>making Linux just a little more fun!</I></SMALL>
</TD><TD>
<div class="content articlecontent">
<center>
        <img src="../gx/dennis/qbubble.gif" alt="(?)"                           
	                border="0" align="left">
<A NAME="answer"><BIG><BIG><STRONG><FONT COLOR="maroon"
	>The Answer Gang</FONT></STRONG></BIG></BIG></a>
	<img src="../gx/dennis/bbubble.gif" alt="(!)"                           
	                border="0" align="right"><BR>
<STRONG>By Jim Dennis, Karl-Heinz Herrmann, Breen, Chris, and...
        (<a href="../tag/bios.html">meet the Gang</a>) ...
	        the Editors of <i>Linux Gazette</i>...
		        and 
			<a href="../tag/ask-the-gang.html">You</a>! 
</STRONG></BIG> </TD></TR>
</TABLE>
<P>

<!-- END header -->

<center><p>
<br>We have guidelines for <a href="../tag/ask-the-gang.html">asking</a> and <a
href="../tag/members-faq.html">answering</a> questions.  Linux questions only, please.
</STRONG>
<br><em><font color="#7F0000">We make <b>no guarantees</b> about answers, but you can be <b>anonymous</b> on request.</font></em>
<br>See also: The Answer Gang's 
<a href="../tag/kb.html">Knowledge Base</a>
and the <i>LG</i> 
<a href="http://linuxgazette.net/search.html">Search Engine</a>
</center>
<br></p></center>

<HR>
<!-- BEGIN message -->
<H3>Contents:</H3>
<dl>
<dt><a href="#tag/greeting"
	><strong>&para;: Greetings From Heather Stern</strong></A></dl>

<DL>
<!-- index_text begins -->
<dt><A HREF="#tag.1"
	><img src="../gx/dennis/qbub.gif" height="28" width="50"
	  alt="(?)" border="0"
	><strong>Linux says "unknown scancode" for all keys</strong></a>
<dt><A HREF="#tag.2"
	><img src="../gx/dennis/qbub.gif" height="28" width="50"
	  alt="(?)" border="0"
	><strong>Suggestions for *low* end systems?</strong></a>
<dt><A HREF="#tag.3"
	><img src="../gx/dennis/qbub.gif" height="28" width="50"
	  alt="(?)" border="0"
	><strong>software CD player does not play thru speakers (Linux RH 9, Dell Dimension 2350)</strong></a>
<dt><A HREF="#tag.4"
	><img src="../gx/dennis/qbub.gif" height="28" width="50"
	  alt="(?)" border="0"
	><strong>Mixing Fvwm with applets</strong></a>
<!-- index_text ends -->
</DL>
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<A NAME="tag/greeting"><HR WIDTH="75%" ALIGN="center"></A>
<H3 align="left"><img src="../gx/dennis/hbubble.gif" 
	height="50" width="60" alt="(&para;) " border="0"
	>Greetings from Heather Stern</H3>
<!-- begin hgreeting -->
<p>
Greetings, folks, and welcome once again to the world of The Answer Gang.
</p><p>
Statistics, hmmm... things are starting to look up... still want poeple to get the word out though.  The <em>real</em> Linux Gazette is over here at .Net. Tell your friends.
</p><p>
No real peeves with our querents this time, so we have the belly laugh of the month instead - a piece of spam telling us what a great deal we can get on free unlimited technical support.  Whee! 
</p><p>
Thomas and I have been busy, and not just onanking away on pubbing the TAG mail. We've had quite a happy time chatting with each other now that we've gotten voice over IP working.  It was a rocky road though...
</p><p>
Lesson Zero.  Get sound working on your own. If you can't hear linus torvalds talking or your favorite musical strum or a nice little MP3, don't hold your breath that you'll hear anything on the "phone" either.
</p><p>
Lesson One. Thou shalt have a working microphone.  One that you have to solder back together will not cut the mustard (but it will cut in and out even when everything else works).  He got a nice cheap deal for one finding on online special.  I got a nice echo canceling one built into my headset.
</p><p>
Lesson Two.  Thou shalt plug they speakers or headphones into the right holes on the soundcard.  Otherwise they don't make much noise.  Whoops.
</p><p>
Lesson Three. This mainly affected him; I have a static IP and correct reverse DNS to go with it - but VOIP hates network address translation.  Hates hates hateses the nasty NATses.  Rumors that kphone has figured out a way to deal with this couldn't be tested because if it does, it's specific to that one app, and while kphone likes his box fine, it hates me, crashes (should that be krashes?) in moments after launch.  Hmm.  Rumors of the ease of use of SIP applications have been exaggerated... or they don't survive NAT either.
</p><p>
Port forwarding was tried without success, because he has a windows box speaking to his cablemodem, thanks to the brain damageed code it needs to make a connection.  The Linux support for that device is starting to shape up, though.
</p><p>
Meanwhile, Gnomemeeting did the trick.  As long as I've already launched (so my client goes and registers with an LDAP database out there somewhere) and he initiates the call (little hard to reach his Linux box directly with the NAT) then it handles all the gory details.  
</p><p>
We had to mess with codec for our voices too.  I hear his voice fine when I set speex-15k.  He likes what he hears of me when he sets Alaw.  This doesn't make much sense to me, since in theory both of these are just beyond the scope of our rated bandwidth, but it works anyway.  So don't take its recommended limits for gospel - goof around, try all the codecs.

For long distance project work with a bunch of people, IRC works great.  Wikis are pretty good too (check out that <a href="http://www.wikipedia.org/">Wikipedia</a>, our Answer Guy has grown very enamored of it and is helping out on a few topics).  I'm pretty pleased with how my upgrade to my own <a href="http://www.starshine.org/Sysadmoin">SysadMoin</a> worked out.  But for working with only a person or two at a time, sometimes chatting directly can cut through confusion - "body language" carries a lot better in voice than emoticons - and give more time for brainstorming.  Or being silly, as the case may be.  We can split ginger beers and laugh about Ben leaving his dark glasses in the pretzels again.
</p><p>
I think it's a pretty good way to celebrate Independence Day - hands free and proud!  Have a happy Summer.
</p>
<!-- end hgreeting -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<A NAME="tag.1"><HR WIDTH="75%" ALIGN="center"></A>
<!-- begin 1 -->
<H3 align="left"><img src="../gx/dennis/qbubble.gif" 
	height="50" width="60" alt="(?) " border="0"
	>Linux says "unknown scancode" for all keys</H3>


<p><strong>From Justin Ekis 
</strong></p> 
<p></strong></p>

<p align="right"><strong>Answered By:  Thomas Adam, Karl-Heinz Herrmann, Benjamin A. Okopnik
</strong></p>
<P><STRONG>
Hello
I went to look at the kernel messages with dmesg today, but surprise!
All that I got was line after line of this:
</STRONG></P>

<pre><strong>keyboard: unknown scancode e0 64
</strong></pre>
<P><STRONG><CODE>
dmesg and /var/log/messages are just about useless, flooded with that.
</CODE></STRONG></P>
<P><STRONG>
It's the same scancode every time too.
the command showkey -s shows that my wireless keyboard does send an
extra scancode after each key along with the normal scancodes. This is
apparently some kind of status notification. I was surprised that the
keyboard worked at all since it required a special driver under Windows
so I almost expected something like this.
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Thomas] 
You did not tell us which distribution you are running. Not that it
really matters, but each distribution has a slightly different way of
handling console keymaps.
</blockQuote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
Oh yes, sorry. I'm running <A HREF="http://www.slackware.org/">Slackware</A> 9.1
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Thomas] 
You should ensure, regardless that:
</blockQuote>

<blockquote><pre>/etc/console/bootmap.gz
</pre></blockquote>
<blockQuote>
is correct, but I suspect it is since you were able to write us the
e-mail.
</blockQuote>
<blockQuote>
If you're running debian, it is just a case of doing:
</blockQuote>

<blockquote><pre>dpkg-reconfigure console-data
</pre></blockquote>
<blockQuote>
However, your errors are usually indicative that your keyboard mappings
are off. The only thing I would have suggested is that you used loadkeys
and dumpkeys, and if that doesn't work to define the keycodes yourself,
via keymaps and setkeycodes(
<IMG SRC="../gx/dennis/smily.gif" ALT="8)" 
		height="24" width="20" align="middle">.
</blockQuote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
Strange, there is no directory called <TT>/etc/console</TT> here. I'm sure my
keymap is good though. Other than the warning the keyboard works
flawlessly and it doesn't happen when I use a standard keyboard. I
prefer my wireless one though.
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [K.-H] 
Well -- I've no idea how to change the keymap -- but if the keyboard is
basically working and the only annoying thing is the flooded syslogs how
about dropping these messages? As what kind of syslog messages are they
logged? kernel? info level or higher? The old syslogd has restricted
options to accept or dump messages of a particular type (not content
filter).  I know that <A HREF="http://www.suse.com/">SuSE</A> 9.x offered a new improves syslogd as an
alternative -- so that might even be able to do some fancy filtering on
the message content (and dump your keycode warning). Won't help for the
boot-log but <TT>/var/log/messages</TT> won't be floded anymore.
</blockQuote>
<blockQuote>
To read the boot log <TT>/var/log/boot.msg</TT> without the garbage you can run
grep with negative filter like:
</blockQuote>

<blockquote><pre>grep -v "your keycode" /var/log/boot.msg | less
</pre></blockquote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
The keyboard works but I don't like my log being made
so huge by all that junk.
</STRONG></P>
<P><STRONG>
I went to look at the kernel messages with dmesg today, but surprise!
All that I got was line after line of this:
</STRONG></P>

<pre><strong>keyboard: unknown scancode e0 64
</strong></pre>
<P><STRONG>
dmesg and <TT>/var/log/messages</TT> are just about useless, flooded with that.
It's the same scancode every time too.
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Ben] 
I just had a similar problem, although it wasn't a flood as it is for
you; perhaps 10 of these messages every hour. Before I could get around
to fixing it, I upgraded my kernel from 2.6.3 to 2.6.5 - and the problem
went away. So, even though I can't take credit for finding the solution
(or even the exact problem), there it is.
</blockQuote>
<blockQuote>
The "scan codes", as far as I could tell, were being generated by some
kernel driver seeing a signal from a piece of hardware with which it
wasn't completely familiar and spitting out the unknown signal as a
"scan code". In my case, I'm pretty sure that it was the new Synaptics
touchpad - which definitely required a new driver.
</blockQuote>

<!-- end 1 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<A NAME="tag.2"><HR WIDTH="75%" ALIGN="center"></A>
<!-- begin 2 -->
<H3 align="left"><img src="../gx/dennis/qbubble.gif" 
	height="50" width="60" alt="(?) " border="0"
	>Suggestions for *low* end systems?</H3>


<p><strong>From tag 
</strong></p> 
<p></strong></p>

<p align="right"><strong>Answered By:  Thomas Adam, Jay R. Ashworth, Jimmy O'Regan, John Karns
</strong></p>
<P><STRONG>
In all the years of installfesting, hackery, hints, and consulting, I
get a lot more questions from ordinary folk about how to make last
years... or sometimes last decade's... hardware run half decently rather
than walk with a limp.
</STRONG></P>
<P><STRONG>
Lots of articles I see about the latest and greatest, or what K and
Gnome have improved for everyone this season, just aren't too useful
to folks buying a laptop at the local surplus shop though.  Low memory
is almost always a more painful limit than low CPU oomph, though that
too, is a factor.
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Thomas] 
Well, let's see. My P166, with 32MB RAM ran X11 (version 3 and 4) not
too badly. Granted, it wouldn't run <A HREF="http://www.kde.org/">KDE</A> or <A HREF="http://www.gnome.org/">GNOME</A>, but if you were
patient, it would run X, and you could get somne usability out of it....
</blockQuote>
<blockQuote>
What helped were a number of things:
</blockQuote>
<blockQuote><BLOCKQuote>
1. A low resolution colour-depth (8/16 bits) is always a good idea. This
frees up quite a lot of memory. Usually a high colour-pallet is only
ever needed if you're a gamer -- and that just isn't going to be the
case on the sort of hardware you're referring to. Some window managers
(fvwm is one such window manger) allow you to set this, aside from the
defaults set by the X-server.
</BLOCKQuote></blockQuote>
<blockQuote>
2. Using a window manager (hellllo, "fvwm" 
<IMG SRC="../gx/dennis/smily.gif" ALT=":)" 
		height="24" width="20" align="middle">) as opposed to a desktop
environment is preferable. This means that interal cruft such as built in file
managers are external and hence loaded only when needed. This helps
to reduce memory consumption until such application need to be invoked
which may be never. And even then, if a GUI file manager is needed I'd
recommend 'emelfm'.
</blockQuote>
<blockQuote>
3. Using an alternative to X11 pure might be an option for really
low-end specs. Such things as: TinyX, mgr (yay, I love mgr, although
sadly archived) and even Y-Windows (yes, I have named that right).
</blockQuote>

<font color="#660000"><blockquote><IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Thomas] There is also the RULE project, which is probably best just for this
scenario where low-end hardware is being used. "Run Up to date Linux
Everywhere" is excellent.
</blockquote>
<blockquote><A HREF="http://www.rule-project.org"
	>http://www.rule-project.org</A>
</blockquote></font>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Jay] 
And don't plan on running FireFox unless you're willing to compile it
yourself.  :-}
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Thomas] 
That wasn't in existence back then. I was using netscape 4 at a push. I
did help with LFS -- it took five days straight to compile XFree86 3 
<IMG SRC="../gx/dennis/smily.gif" ALT=":)" 
		height="24" width="20" align="middle">
I kid you not....
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Jimmy] 
Software designed for handhelds is probably the best bet. Aside from
kdrive/Tiny X, there's
</blockQuote>
<blockQuote>
Nano-X/Microwindows: <A HREF="http://www.microwindows.org"
	>http://www.microwindows.org</A>
Twin: <A HREF="http://linuz.sns.it/~max/twin"
	>http://linuz.sns.it/~max/twin</A>
OpenGUI: <A HREF="http://www.tutok.sk/fastgl"
	>http://www.tutok.sk/fastgl</A>
MiniGUI: <A HREF="http://www.minigui.org"
	>http://www.minigui.org</A>
PicoGUI: <A HREF="http://picogui.org"
	>http://picogui.org</A>
</blockQuote>
<blockQuote>
Nano-X is somewhat X compatible, Twin is curses based, and PicoGUI will
run on Linux on the Palm. Even OPIE will run in 10 megs of RAM.
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Heather] 
If they're in a networked environment, there's always letting a tougher
machine do some of the work (hellloooooo LTSP) but that's cheating.
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [John] 
That was my thought too.  One thing I would add is to check out the
Knoppix Cluster release <TT>/</TT> edition.  I ran into a real snag with plain LTSP
when I trying to implement a diskless cluster network, where the main app
of interest was in MM flash.  The 3.x version of LTSP didn't support any
version of Mozilla, or Netscape later than 4.x via the incorporated
busybox pkg.  I managed to resolve that issue, but was unable to resolve
the problem of having the LAN bw eaten by the flash animation, by getting
the browser to run locally in the slave memory rather than on the server.
</blockQuote>
<blockQuote>
After about 8 instances, the (100 mbps) LAN came to a crawl.  We ended up
succombing to adding hd's and running as normal hosts 
<IMG SRC="../gx/dennis/unsmily.gif" ALT=":(" 
		height="24" width="20" align="middle">.  Sometime later
I discovered that the Knoppix cfg overcomes the problem by running all
apps in the local nodes RAM.  I believe that Knoppix uses LTSP, but has it
configured to do what I couldn't get it to do.  Some day I'll take a look
to examine the LTSP cfg that Knoppix uses.
</blockQuote>

<!-- end 2 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<A NAME="tag.3"><HR WIDTH="75%" ALIGN="center"></A>
<!-- begin 3 -->
<H3 align="left"><img src="../gx/dennis/qbubble.gif" 
	height="50" width="60" alt="(?) " border="0"
	>software CD player does not play thru speakers (Linux RH 9, Dell Dimension 2350)</H3>


<p><strong>From Ted Kubaska 
</strong></p> 
<p></strong></p>

<p align="right"><strong>Answered By:  Thomas Adam, Jason Creighton
</strong></p>
<P><STRONG>
I'm having some difficulty getting my CD player to play through my
speakers.  I have a Dell Dimension 2350 running <A HREF="http://www.redhat.com/">Red Hat</A> 9. I got this
Red Hat 9 by downloading the ISOs from the Red Hat site. When I bring up
the saw CD player, the screen comes up, I can see the elapsed time tick
by, but there is no sound coming from my speakers. I can plug into the
headphone jack on the CD drive and get sound.
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Jason] 
The problem is probably the fact that there's actually two ways to play CDs.
One way is for the software to just tell the CD drive to start playing: The
sound will play in the little jack on every CD drive in existance that nobody
ever uses anyway. There's also supposed to be a cable running from the CD
drive to the soundcard inside a computer, which is how things work normally.
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Thomas] 
While this is true, this is only applicable if you're using a CD-Player
that extracts sound using analog. While most do, Windows applications
don't (Media-Player being an example). For the case of laptops, sound is
extracted using raw audio.
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Jason] 
So the sound never actually gets to the software. And in this case, the sound
never actually gets to the sound card because a connection is obviously
missing on your laptop.
</blockQuote>
<blockQuote>
The other way to play CDs is read the CD "raw" and then just send the sound to
the sound card.
</blockQuote>
<blockQuote>
Some software tries to do it one way, some the other.
</blockQuote>
<blockQuote>
Try this:
</blockQuote>

<blockquote><pre>$ play -t cdr /dev/hdc
</pre></blockquote>

<font color="#660000"><blockquote><IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Thomas] In more recent versions of play(1), if you're using ALSA, you must tell
it so.
</blockquote></font>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Jason] 
where <TT>/dev/hdc</TT> is whatever your CD-ROM drive happens to be.
</blockQuote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
Thanks. Jason's explanation of the two ways to play CDs clears up a lot
of confusion. I have succeeded in getting my CD to play thru my speakers
(with xmms, not the CD player that comes up with RED Hat -&gt; Sound &amp;
Video -&gt; CD Player).
</STRONG></P>
<P><STRONG>
I have not yet taken the skins off of my Dell Dimension 2350 (this is
not a laptop as some thought, but Dell's low end tower, a 2 GHz P4) but
will do so after the mail I got. Just to check the cable people have
referred to. From what I read so far I think my sound card is integrated
on my motherboard and not actually a separate card. The RedHat Hardware
browser says 82801DB AC'97 Audio, Mfg Intel, Driver i810_audio.
</STRONG></P>

<font color="#660000"><blockquote><IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Thomas] i810_audio is courtesy of Intel and probably at the time this was
written was still quite new. It's certainly not the best soundcard out
there (or should I say embedded chip) but it does the job quite well.
</blockquote></font>
<P><STRONG>
I issued a play -t cdr <TT>/dev/cdrom</TT> and a play -t <TT>/mnt/cdrom</TT> and got no
response at all.
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Thomas] 
This is because "<TT>/mnt/cdrom</TT>" in this context doesn't point to anything.
One does not mount audio CDs and so the actual device (<TT>/dev/cdrom</TT>) must be
used.
</blockQuote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
I was pointed to an earlier TAG discussion
</STRONG></P>
<P><STRONG>
<A HREF="../issue80/tag/4.html"
	>http://linuxgazette.net/issue80/tag/4.html</A>
</STRONG></P>
<P><STRONG>
From the information there I downloaded xmms-cdread-0.14a.tar.gz from
<A HREF="ftp://mud.stack.nl/pub/OuterSpace/willem"
	>ftp://mud.stack.nl/pub/OuterSpace/willem</A>, unzipped, untarred, built and
installed. I am now listening to CD output thru my speakers!
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Thomas] 
This method is still using audio-extraction which often makes the CD-ROM
drive spin around very fast. This can be quite noisy, especially on
laptops.
</blockQuote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
All is not perfect, however. If I put in a new CD, the default CD player
starts up automatically. This player does not work and never has. I have
clicked on preferences for this player (the knife and fork icon) in an
attempt to not have it load automatically. I specified no action on CD
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Thomas] 
You don't say what window/desktop manager you're using, but if I recall
correctly. RH9 uses <A HREF="http://www.gnome.org/">GNOME</A> as the default desktop manager. It's possible
that the settings were/are not saved until you logged out...
</blockQuote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
load; but it still comes up and tries to play when I load a new CD. I
see the elapsed time tick by and get no sound thru the speakers. I have
to kill this player and bring up xmms, click on play, and then all is
well.
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Thomas] 
This comes back to what Jason and I said earlier about how audio is
extracted. Since XMMS defaults to using Raw audio, and other players use
analog, without the use of such a cable, you just won't hear any sound.
</blockQuote>

<!-- end 3 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<A NAME="tag.4"><HR WIDTH="75%" ALIGN="center"></A>
<!-- begin 4 -->
<H3 align="left"><img src="../gx/dennis/qbubble.gif" 
	height="50" width="60" alt="(?) " border="0"
	>Mixing Fvwm with applets</H3>


<p><strong>From John Karns 
</strong></p> 
<p></strong></p>

<p align="right"><strong>Answered By:  Thomas Adam, Heather Stern
</strong></p>
<P><STRONG>
Hey, another fvwm user!  BAC, Thomas, have you experimented with running
windowmaker applets under fvwm?  I really like a lot of the applets WM
offers, (e.g., wmmount), but can't seem to get it to work inside of
the fvwmbutton module.
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Thomas] 
Yes, I have. If you're running them from within FvwmButtons, that puts a
slightly yet subtle slant on how things are done, since you'll have to
ensure that a few conditions are set.
</blockQuote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
That seems a much better way than having small 48x48 pixel windows
scattered around the root window.  One alternative might be to use the
WM docking window (if that's the right term), but I would still prefer
the fvwm buttonbar (or whatever it's called).  Might there be some
other nice(i.e., esthetic) way to gather them?
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Thomas] 
Because the WMapplets are from another Window Manager, the hints they
use are somewhat alien to Fvwm pure. Hence, the freedesktop.org people
define EWMH (extended window manager hints). These essentially allow you
to run embedded apps like WMapplets, the <A HREF="http://www.kde.org/">KDE</A> kicker, etc.
</blockQuote>
<blockQuote>
But I cannot be anymore specific than that since you don't say what is
happening. I'm not even sure if WM* apps use EWMH.
</blockQuote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
Thanks for the pointer.  I'll browse their site when I get the time.
From reading the fvwm docs, I don't really understand the concept of
hints, from what you're saying here.  My understanding was that they
are window properties containers (of sorts) which pertain to such
minor things as border shadowing.
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Thomas] 
Kind of. EWMH hints are an unofficial extension of ICCCM 2.0 which the
freedesktop.org team have developed. Essentially, this implies the use
of KDE and <A HREF="http://www.gnome.org/">GNOME</A>, and allows for their own 'embedded' features to be
used with Fvwm if needed, since Fvwm is EWMH-compliant.
</blockQuote>
<blockQuote>
But what are EWMHs? They simply allow the interaction between
window managers, applications and the utilities that form part of a
desktop environment. This was originally written to replace Gnomehints.
And as such it has been implemented in GNOME &gt;=2 and KDE &gt;=2
</blockQuote>
<blockQuote>
AFAIK, WM* apps are not. Indeed, you can check this for yourself. If you
want to know whether an application uses EWMHs then do:
</blockQuote>

<blockquote><pre>[n6tadam@station n6tadam]$ xprop | grep _NET_WM_STRUT
_NET_WM_STRUT(CARDINAL) = 0, 0, 0, 2
</pre></blockquote>
<blockQuote>
Here, the numbers indicate the screen space that the application in
question is using. Thus, you can "filter" out that area of the screen so
that an application window doesn't obscure it when maximising it. To
achieve that, one can use:
</blockQuote>
<blockQuote><BLOCKQuote>
EWMHBaseStructs 0 0 0 2
</BLOCKQuote></blockQuote>
<blockQuote>
In their ~/.fvwm2rc file. Why am I telling you this? I don't know
really, but it is just useful, since it can also be applied to
FvwmButtons.
</blockQuote>
<blockQuote>
To go back to your original question though, "hints" are just that --
properties of windows that can be configured or acted upon in some way.
</blockQuote>
<blockQuote>
Indeed, You can use a combination of things. It really depends
on <EM>how</EM> you want them gathered. You can define an IconBox for icons
minimised, with will place them in a region of the screen.
</blockQuote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
Also, since I installed <A HREF="http://www.suse.com/">SuSE</A> 9 on this laptop (fvwm2 ver 2.5.7), the
buttonbar no longer works with swallowed apps.  Have you run into any of
that?  I still haven't visited the
</STRONG></P>
<P><STRONG>
Lately I read the fvwm stuff from issue #3 and discovered a few things
that had escaped me, and a few I'd forgotten about, like the ability to
drag windows between VD's via the pager.
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Thomas] 
FvwmPager can do more than you probablu realise. As you say, you can
drag windows to other VD's and pages without even seeing the window
directly.
</blockQuote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
Also, from what I could gather by reading the fvwm man pages, it
seemed to me that they state that buttons in the buttonbar are pretty
limited in functionality, (e.g., toggled state like coolmail).  I hope
I'm simply misunderstanding the issue, and that it is possible to put
a fairly complex applet like wmmount inside of the buttonbar.
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Thomas] 
But of course! One can quite literally do <em>  anything  </em> with fvwm.
Ironically, what lets it down is the sheer volume of all the possible
things it <em>  can  </em> do.
</blockQuote>
<blockQuote>
As an example, if you wanted to have wmmount swallowed by FvwmButtons,
and then issue a command to it such that clicking on it mounted a
device, and then umounted it, you can do something like the following,
assuming you have the icon/applet swallowed:
</blockQuote>

<blockquote><pre>AddToFunc ToggleMount
+ None (Mount, CirculateHit) Exec exec xterm -T Mount -n Mount -e mount $0
+ I Iconify
+ I Next (Mount, CirculateHit) Close
+ I Exec exec umount $0
</pre></blockquote>
<blockQuote>
Then from within FvwmButtons:
</blockQuote>

<blockquote><pre>*FvwmButtons: (Action ToggleMount)
</pre></blockquote>
<blockQuote>
This might be long-winded, and indeed, the facility of wmmount might
even provide this mechanism, but it demonstrates what can be done. I
should point out that I haven't tested it, but it ought to work.
</blockQuote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
As old as it is, from my
viewpoint, there are still some aspects to fvwm that other wm's never
caught up to.  IMO, it's a good compromise between lightweight and the
heavier DT environs like KDE and Gnome.  However, the cfg process is
pretty much manual via edit of .fvwm2rc
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Thomas] 
And I hope it stays manual. There are some 500+ style options for Fvwm.
There is no way one can enumerate this for a GUI. You wouldn't be able
to convey the options to the user efficiently.
</blockQuote>
<blockQuote>
I did look, and even suggest this at one point, but I have come to the
arrangement that it really is not a viable thing to do. There is always
the dotfile generator, but this is <EM>hideously</EM> out of date, and I really
do not suggest you use it.
</blockQuote>
<blockQuote>
John, if you like, upload your ~/.fvwm2rc file (or send it to me via
e-mail) and I will have a look at it and fix it for you. I'll also
change the syntax to conform to 2.5.X should there be any discrepencies.
</blockQuote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
Thanks, I'll probably take you up on the offer.  I've spent 3 or 4
hours trying different things, without success.
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Thomas] 
Then I am more than happy to go through it. I'll even throw in some
comments and explanations en route. 
<IMG SRC="../gx/dennis/smily.gif" ALT=":)" 
		height="24" width="20" align="middle">
</blockQuote>

<font color="#660000"><blockquote><IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Thomas] Well unfortunately John never did reply. But seriously, Fvwm is not as
cumbersome as it first seems, and if you <EM>really</EM> don't like MWM (which
has been labelled as <EM>butt ugly</EM> by a certain man wearing Dark
Sunglasses.... 
<IMG SRC="../gx/dennis/smily.gif" ALT=":)" 
		height="24" width="20" align="middle"> ) then you can see what can be done with a little
effort here:
</blockquote>
<blockquote><A HREF="http://www.fvwm.org/screenshots/desktops"
	>http://www.fvwm.org/screenshots/desktops</A>
</blockquote></font>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Heather] 
Ok, I'm late to the thread, but I concur there are some very cool things
you can do with this stuff.  For a push in the right direction, I'm
including my own configuration, which Thomas helped me with, because a
lot of the tricks I was using on my own are from Ye Olden Fvwm 1.0 days,
and it needed a nice touch-up.
</blockQuote>
<blockQuote>
All of these parts go in a .fvwm directory under my home, which happens
to be <TT>/home/heather.</TT>  So you'll find yourself going into these files and
changing at least that burned in location... unless your username happens
to be heather.  The dotfile really has to be a dotfile, and take the
.txt extension off, of course.
</blockQuote>
<blockQuote>
Now for the warning label.  I have great color vision and my monitor is
<EM>really</EM> bright, so my config is very dark.  If you vision isn't as good
as mine, or your monitor isn't as vibrant, consider replacing the darker
blue with the rgb.txt named color NavyBlue or MidnightBlie.  They just
weren't Navy or Midnight enough for me 
<IMG SRC="../gx/dennis/smily.gif" ALT=":)" 
		height="24" width="20" align="middle">
</blockQuote>
<blockQuote>
I use a simple starfield
background.  I actually cooked this one up years ago, back when I still
lived fulltime on (gasp!) Windows95.  There was this great poster I
liked, and I kind of took a look at it then did a starfield of my after
the manner of it, except of course mine didn't have any things flying
around in front of it like theirs did, and mine tiled in a friendly
fashion, and for the sake of memory, didn't have that beautiful range of
gradient color.  Feel free to go get your own bit of darkness from an
astronomy site, if you prefer.
</blockQuote>
<p align="center">See attached <tt><a href="misc/tag/heather.stars16a.xpm">heather.stars16a.xpm</a></tt></p>
<blockQuote>
Everything is based around the .fvwm2rc file. In older flavors of fvwm
that was expected in your homedir, but now it's expecetd in ~/.fvwm
directory instead, to support you having a batch of extra parts.
</blockQuote>
<blockQuote>
The sneakiest thing in this is the trick to make the button which
invokes sticky status, change appearance permanently for a stuck window,
and change back if it's unstuck.  My thanks to Thomas for showing me the
events interface.
</blockQuote>
<p align="center">See attached <tt><a href="misc/tag/heather.dot.fvwm2rc.txt">heather.dot.fvwm2rc.txt</a></tt></p>
<blockQuote>
I do some seriously strange things with my buttons layout.  Seems like
every distro I ever looked at has a giant googly pair of Xeyes chasing
the cursor around, but I think they need to not be so huge.  I do like
having a load monitor, but it doesn't look good if it doesn't cover the
full height.  So some juggling is called for,
</blockQuote>
<blockQuote>
The buzzword for making "live" apps like Xeyes and xload stay involved is
a swallowed app - it doesn't need to be designed as an applet, it just has
to submit safely to having its geometry resized.
</blockQuote>
<blockQuote>
I love
icons but frankly I can find better things to do with some of my screen
estate, so maybe I want a few, but for some common tasks I use smaller
icons than others. I like a system load check but not taking too much
space, and I really abuse multiple pages, definitely preferring that
instead of multiple workspaces (though Fvwm supports those too).
</blockQuote>
<blockQuote>
Caveat for those with fancy video cards - you want workspaces (like K
desktop favors) or pages (like I do), not bigger virtual screens (controlled
in XF86Config-4).  Sliding around looking for where the <EM>real</EM>
center of the screen is and wondering where you lost your control corner
or iconbox are not the way to spend your workday.  My pages have a 2x4
layout, for 8 pages total, and this has generally been plenty for me.
</blockQuote>
<p align="center">See attached <tt><a href="misc/tag/heather.ConfigFvwmButtons.txt">heather.ConfigFvwmButtons.txt</a></tt></p>
<blockQuote>
Unless I configure that darn pager explicitly, though, it comes out
pasty white.  Agggh!  My poor vampiric eyeballs.  Again, if your color
vision likes brighter colors, or you hate purple, pick something
brighter from the named colors in rgb.txt.  I used here, the "brighter"
NavyBlue, because the pages are tiny enough I wanted better contrast.
You might want them brighter yet, and make it just plain Blue.
</blockQuote>
<blockQuote>
There's a nice app named xcolors that will show all the colors for
you, i but you have to launch it with extra window page space already
available below ypur active window, because the window is too tall
(showing <EM>every</EM> color takes some space) and it's too stupid to have
a scrollbar.  There's a gtk app that does a cleaner job of showing the
colors but I forget what it's called.
</blockQuote>
<p align="center">See attached <tt><a href="misc/tag/heather.ConfigFvwmPager.txt">heather.ConfigFvwmPager.txt</a></tt></p>
<blockQuote>
The sparkling touch of color on my active window is thanks to me using s
few tiny pixmaps instead of MWM-like vector corners.  For the inactive
window I still use the vectors - they're faster, and they don't look
bad (I do wonder if I should do something cuter for sticky, but I've
been lazy).  I got these from the fvwm95 icons kit, but for sanity and
portability, I copied them into .fvwm/icons, a directory.
</blockQuote>
<blockQuote>
Sticky means, it will "go" with me.  I like that, bad puns in a tiny
setting...
</blockQuote>
<p align="center">See attached <tt><a href="misc/tag/icons.mini-go.xpm">icons.mini-go.xpm</a></tt></p>
<blockQuote>
Ironically the icon that looks like a box, so is nice for maximize, is
named iconify.
</blockQuote>
<p align="center">See attached <tt><a href="misc/tag/icons.mini-iconify.xpm">icons.mini-iconify.xpm</a></tt></p>
<blockQuote>
If it's stuck to the window, it looks vaguely like a 4-color windows icon.
</blockQuote>
<p align="center">See attached <tt><a href="misc/tag/icons.mini-icons.xpm">icons.mini-icons.xpm</a></tt></p>
<blockQuote>
dot in box for max, dot with no box for iconify.
</blockQuote>
<p align="center">See attached <tt><a href="misc/tag/icons.mini-rball.xpm">icons.mini-rball.xpm</a></tt></p>
<blockQuote>
X for eXit works for me.
</blockQuote>
<p align="center">See attached <tt><a href="misc/tag/icons.mini-x.xpm">icons.mini-x.xpm</a></tt></p>
<blockQuote>
Of course the window controls belong to the window manager, so mentioning
that for the menu ocrner...
</blockQuote>
<p align="center">See attached <tt><a href="misc/tag/icons.mini.fvwm.xpm">icons.mini.fvwm.xpm</a></tt></p>
<blockQuote>
Last but not least, I have a couple of personal menus.  One gives me
access to a number of differently colorized Xterms; I use them so much
color helps me recall which one's which even when I forget to retitle
them.
</blockQuote>
<blockQuote>
The other makes it easy to pop up web browsers, since I like to view the
world from different angles sometimes. "Netscape" on there is the
somewhat ancient Netscape 4.77 -- Netscape 7 and Mozilla don't seem to
be good neighbors, they keep stepping on each other's config files.  I
use NS4 to spot buggy HTML code, because it has just horrid rendering when
the code's wrong  and it sticks out like a sore thumb.  Lynx I just
happen to like 'cuz it's speedy.
</blockQuote>
<p align="center">See attached <tt><a href="misc/tag/main-nenu.heather.txt">main-nenu.heather.txt</a></tt></p>
<blockQuote>
Did I miss anything?  Oh of course.  A
<a href="misc/tag/fvwm-spiffy.png">screen shot</a>
It's a bit on the large side, but I told you I had a big monitor.
That dark shot of the GIMP is also a goodie of mine, a GTK theme I
whipped up for myself which I call DarkGems, because I stole gemlike
features from a half dozen E and GTK themes.  But this is about Fvwm,
not about GTK, so I'll save that for another time.
</blockQuote>
<blockQuote>
I also applied a minor hack on fvwm to not stipple my sticky title bars.
For most folks I think it'd be more a pain to recompile fvwm just to
leave that out, and then want to keep up to date, so I'll leave that out
too.  It was in icons.c and the borders.c if you feel adventuresome.
</blockQuote>
<blockQuote>
Just making your desktop <EM>a little more fun</EM> ...
</blockQuote>

<!-- end 4 -->
<P> <hr> </p>
<div id="articlefooter">
<H5 align="center">This page edited and maintained by the Editors
        of <I>Linux Gazette</I>
<br><a href="http://linuxgazette.net/copying.html"
        >Copyright &copy;</a> its authors, 2004
<BR>Published in issue 104 of <I>Linux Gazette</I> July 2004</H5>
<H6 ALIGN="center">HTML script maintained by
        <A HREF="mailto:star@starshine.org">Heather Stern</a> of
        Starshine Technical Services,
       <A HREF="http://www.starshine.org/">http://www.starshine.org/</A>
</H6>
</div>
<!-- end: articlecontent -->
</div>

</p>



<!-- *** BEGIN author bio *** -->
<!-- *** END author bio *** -->




<div id="articlefooter">




<p>
Published in Issue 104 of Linux Gazette, July 2004
</p>

</div>

</div>

<div id="navigation">

<a href="../index.html">Home</a>
<a href="../faq/index.html">FAQ</a>
<a href="../lg_index.html">Site Map</a>
<a href="../mirrors.html">Mirrors</a>
<a href="../mirrors.html">Translations</a>
<a href="../search.html">Search</a>
<a href="../archives.html">Archives</a>
<a href="../authors/index.html">Authors</a>
<a href="../contact.html">Contact Us</a>
</div>

<div id="breadcrumbs">

<a href="../index.html">Home</a> &gt;
<a href="index.html">July 2004 (#104)</a> &gt;
TWDT

</div>


<img src="../gx/2003/sit3-shine.7-2.gif" id="tux" alt="Tux"/>

<br />


<div class="content lgcontent">

<a name="lg_bytes"></a>
<h1>News Bytes</h1>
<p id="by"><b>By <A HREF="../authors/conry.html">Michael Conry</A></b></p>


</b>
</p>


<p>
<center>
<table cellpadding="7" summary=""><tbody><tr><td>
<img src="../gx/bytes.gif" border="1" alt="News Bytes">
</td><td>
<h3>Contents:</h3>
<ul>
<li><a href="#links">Linux Links</a>
</li><li><a href="#general">News in General</a>
</li><li><a href="#distro">Distro News</a>
</li><li><a href="#commercial">Software and Product News</a>
</li></ul>
</td></tr></tbody></table>

<strong>Selected and formatted by Michael Conry &lt;<img
src="../gx/authors/email/conry.png" alt="address">&gt;</strong>
</center>


<p> Submitters, send your News Bytes items in 
<font size="+2"><strong>PLAIN TEXT</strong></font>
format.  Other formats may be rejected without reading.  You have been
warned!  A one- or two-paragraph summary plus URL gets you a better
announcement than an entire press release. Submit items to
<img src="../gx/lgmail/bytes.png" alt="address">

<BR CLEAR="all">

<div id="content" lang="en" dir="ltr">
<hr>
<a name="links"></a>
<!-- ========== -->
<center><h3><font color="green">Linux Links</font></h3></center>
<!-- ========= -->
<p>
<a href="http://www.internetnews.com/dev-news/article.php/3373651">The Father of ASCII dies</a> A tribute to Bob Bremer, one of the greats of the computer industry. 
</p>
<p>
<a href="http://www.onlamp.com/pub/a/bsd/2004/06/03/bsdhacks.html">The Making of BSD Hacks</a> describes one way to do open source revision control and document creation for book publishing. 
</p>
<p>
<a href="http://www.osnews.com/story.php?news_id=7285">relink</a>, a package management tool.
</p>
<p>
<a href="http://www.linuxdevcenter.com/pub/a/linux/2004/06/03/optimization.html">Optimization</a> complexities explored. 
</p>
<p>
<a href="http://www.linuxinsider.com/story/34266.html">Thin GNU/Linux clients</a> find application in libraries. 
</p>
<p>
<a href="http://acmqueue.com/modules.php?name=Content&amp;pa=list_pages_issues&amp;issue_id=13">ACM Queue magazine focuses on open source</a>. 
</p>
<p>
<a href="http://www.linux.com/article.pl?sid=04/06/07/2036205">Setting up encrypted partitions</a> under Linux and dm-crypt. 
</p>
<p>
<a href="http://news.zdnet.co.uk/0,39020330,39157635,00.htm">How to talk to Microsoft about Linux</a> 
</p>
<p>
<a href="http://www.itmanagersjournal.com/management/04/06/04/1634217.shtml">How to do due diligence</a> 
</p>
<p>
<a href="http://software.newsforge.com/software/04/06/07/2044240.shtml">Open Source publishing</a> 
</p>
<p>
<a href="http://www.linuxdevices.com/articles/AT4313418436.html">Embedded Processor and System-on-Chip Quick Reference Guide</a> 
</p>
<hr>
<a name="general"></a>
<!-- ========== -->
<center><h3><font color="green">News in General</font></h3></center>
<hr>
<h3><img alt=" " src="../gx/bolt.gif"> <font color="green">Sun's Looking Glass</font> </h3>
<p>
Sun have announced that they are releasing  <a href="http://wwws.sun.com/software/looking_glass/">Project Looking Glass</a>, their 3D desktop,  <a class="external" href="http://www.theregister.co.uk/2004/06/28/looking_glass_goes_gpl/">under the GPL</a>. This follows the release of JDIC (<a class="external" href="https://jdic.dev.java.net/">JDesktop Integration Components</a>) under the LGPL. JDIC allows Java developers to write desktop software, including viewer components, screen savers, and panel applets. 
</p>
<hr>
<h3><img alt=" " src="../gx/bolt.gif"> <font color="green">Real/Helix</font> </h3>
<p>
Real have anounced that  <a href="https://helixcommunity.org/forum/forum.php?forum_id=128">they are adding the GPL as a licencing option</a>
for Helix Player, making it fully open source. 
</p>
<hr>
<a name="distro"></a>
<!-- ========== -->
<center><h3><font color="green">Distro News</font></h3></center>
<hr> <h3><img alt=" " src="../gx/bolt.gif"> <font color="green">Skole</font> </h3>
<p>
<a href="http://www.skolelinux.org/">Skolelinux</a> is a distro from Norway aimed to be a counterweight to the dominance of closed-source software in education and government. 
</p>
<hr>
<h3><img alt=" " src="../gx/bolt.gif"> <font color="green">Cobind</font> </h3>
<p>
<a href="http://www.osnews.com/story.php?news_id=7355">OSNews review</a> of the Cobind distribution.  This is a Fedora-derived distribution aimed at newcomers to the GNU/Linux scene. 
</p>
<hr> <h3><img alt=" " src="../gx/bolt.gif"> <font color="green">Debian</font> </h3>
<p>
It has been reported that the AMD 64 port of Debian is now <a href="http://lists.debian.org/debian-devel-announce/2004/06/msg00002.html">ready for inclusion in unstable</a>. (<a href="http://www.debian.org/News/weekly/2004/24/">courtesy DWN</a>) 
</p>
<hr>
<a name="commercial"></a>
<!-- ========== -->
<center><h3><font color="green">Software News</font></h3></center>
<hr>
<h3><img alt=" " src="../gx/bolt.gif"> <font color="green">Snort</font> </h3>
<p>
O'Reilly has announced the publication of <a href="http://www.oreilly.com/catalog/1931836043/">Snort 2.1 Intrusion Detection, Second Edition</a>. This book provides a guide to the use of Snort, and in particular details the new features introduced in version 2.1.  A CD-ROM is included containing Snort 2.1 and related utilities. 
</p>
<hr>
<h3><img alt=" " src="../gx/bolt.gif"> <font color="green">Mozilla</font> </h3>
<p>
The Mozilla Foundation has announced the release of new versions of: 
</p>
    <ul>
    <li>
<p>
 <a href="http://mozilla.org/products/thunderbird/releases/">Thunderbird</a> 
</p>
</li>
    <li>
<p>
 <a href="http://www.mozilla.org/press/mozilla-2004-06-15.html">Firefox</a> 
</p>
</li>
    <li>
<p>
 <a href="http://mozilla.org/releases/mozilla1.7/">Mozilla</a> 
</p>
</li>
    </ul>

<hr>
<h3><img alt=" " src="../gx/bolt.gif"> <font color="green">OpenOffice.org</font> </h3>
<p>
<a href="http://www.openoffice.org">OpenOffice.org</a> has  <a class="external" href="http://lwn.net/Articles/90237/">announced the availability</a> of the new 1.1.2 version of the open source office suite, codenamed Hakone. 
</p>
</div>

<!-- end -->


</p>



<!-- *** BEGIN author bio *** -->
	<P> Mick is LG's News Bytes Editor.

<!-- *** BEGIN bio *** -->
<hr>
<P>
<IMG ALIGN="LEFT" VALIGN="top" ALT="[Picture]" SRC="../gx/2002/tagbio/conry.jpg" WIDTH="128" HEIGHT="158" class="bio">
<em>
Born some time ago in Ireland, Michael is currently working
as a lecturer in the Department of Mechanical Engineering, University
College Dublin. The topic of his PhD research was the use of Lamb
waves in nondestructive testing. GNU/Linux has been very useful in
this work, and Michael has a strong interest in applying free
software solutions to other problems in engineering.
</em>
<br CLEAR="all">
<!-- *** END bio *** -->

<!-- *** END author bio *** -->




<div id="articlefooter">



<p>
Copyright &copy; 2004, <A HREF="../authors/conry.html">Michael Conry</A>. Released under the
<a href="http://linuxgazette.net/copying.html">Open Publication license</a>
</p>



<p>
Published in Issue 104 of Linux Gazette, July 2004
</p>

</div>

</div>

<div id="navigation">

<a href="../index.html">Home</a>
<a href="../faq/index.html">FAQ</a>
<a href="../lg_index.html">Site Map</a>
<a href="../mirrors.html">Mirrors</a>
<a href="../mirrors.html">Translations</a>
<a href="../search.html">Search</a>
<a href="../archives.html">Archives</a>
<a href="../authors/index.html">Authors</a>
<a href="../contact.html">Contact Us</a>
</div>

<div id="breadcrumbs">

<a href="../index.html">Home</a> &gt;
<a href="index.html">July 2004 (#104)</a> &gt;
TWDT

</div>


<img src="../gx/2003/sit3-shine.7-2.gif" id="tux" alt="Tux"/>

<br />


<div class="content lgcontent">

<a name="brown"></a>
<h1>Using Windows Keyboard Media Buttons In Linux</h1>
<p id="by"><b>By <A HREF="../authors/brown.html">Tom Brown</A></b></p>


</b>
</p>


<p>
<p> A lot of people making the move from Windows to Linux have a Windows
keyboard with extra buttons along the top. Some of these buttons control
the browser, while others control audio/video playback. As many have
already discovered, these buttons don't work in Linux. At least, they don't
by default.

<p> The problem with these buttons is that, while they communicate with the
computer via keycodes like the regular keys, these codes aren't standard
ASCII. For example, the Microsoft Natural Keyboard Pro uses two keycodes
for each button press. The first code is a flag to indicate that the next
one will identify which button was pressed. 

<p> The process I'm going to describe is taken from KDE version 3.2.
Versions prior to that lack the interface to KHotKeys that the latest one
has.

<h2>Identify Your Keyboard to KDE</h2>

<p> The first step is to make sure your keyboard is properly identified to
KDE. Go to the KDE Control Center - you'll find it listed in the "KMenu"
(click the icon where the "start" button would be in Windows). Once the
Control Center is up and running, click the "Regional &amp; Accessibility"
(or similar - it may be called "Accessibility" in other Linux distributions 
- Mandrake, for example) icon in the left-hand panel, the contents of which 
will change. From this new list, select "Keyboard Layout". Now on the 
right-hand panel, go to the "Layout" tab, and make sure the "Enable keyboard 
layouts" check box is checked. Pull-down the "Keyboard model" combo list box, 
and select your keyboard. It may originally say something like "Generic 
101-key PC". You'll find a lot of keyboards listed, from a lot of 
manufacturers, so hopefully yours will be in there. In my case, I selected 
"Microsoft Natural Keyboard Pro / Microsoft Internet Keyboard Pro".

<p> Now comes the fun part. With your keyboard properly identified, KDE will
now recognize those extra keyboard buttons when you press them. All you
have to do is tell it how to translate them into the proper action. The
technique I'm going to show you involves a KDE program called "KHotKeys".
Some people recommend that an action like changing the audio volume is more
properly done using the program "KMix" (a sound mixer). Unfortunately, this
didn't work in my case. Every time I raised and lowered the master volume
in KMix, instead of controlling the volume on my Sound Blaster Live card,
it made funky changes to the tone. YMMV. If KMix works fine for you, then use 
it for volume control. The other reason I did it my way, and ignored those 
recommendations, is that I wanted all of my changes in one place. 

<h2>KHotKeys</h2>

<p> You currently have "Keyboard Layout" selected in the KDE Control Center
list on the left-hand side of the screen. Move the mouse to "KHotKeys" at
the bottom of the list. If this isn't anywhere in the list, make sure you
are using KDE 3.2 or later (the version of KDE you're running will appear
in the right-hand panel of the Control Center when you first open it up).
Click on "KHotKeys", and the right-hand panel will contain the KHotKeys
configuration screen. 

<p> KHotKeys is a powerful program that allows you to define actions
corresponding to certain keystrokes. It also allows you to assign actions
to mouse gestures. We're interested, however, in how to assign an action to
a keypress - and, by extension, to the press of one of those media buttons.

<h2>Running a Program</h2>

<p> We'll do something simple first. Many keyboards have a button marked
"Mail". We're going to define an action for that button so that it launches
Mozilla's email module. First, click the button marked "New Action" at the
bottom of the config screen. Under "Action Name" in the "General" tab,
replace "New Action" with something easy to remember, like "Mail".
Pull-down the "Action Type" list box, and select "Keyboard Shortcut -&gt;
Command/URL (simple)". Make sure the "Disable" checkbox is empty. Enter
anything you want in the "Comment" box. Go to the "Keyboard Shortcut" tab,
and click the mouse in the tab's only button. You'll see a dialog box.
Press the "Mail" button on the keyboard, and the dialog box goes away. With
my keyboard, this results in the button displaying "XF86Mail". Go to the
"Command/URL Settings" tab. Enter the command line to be executed,
including the full path, and any arguments. To run the mail module of
Mozilla 1.6 on my machine, I used the following command: 

<pre class="code">
/opt/mozilla/run-mozilla.sh /opt/mozilla/mozilla-bin -mail
</pre>

<p> Depending on what program (or shell script) you're running, the command
could be more or less complicated than this. If I just wanted to run the
Mozilla browser (for the "Web/Home" button, for instance), I would have
used: 

<pre class="code">
/opt/mozilla/mozilla
</pre>

<h2>Using DCOP to Control a Running Program</h2>

<p> <a href="../issue97/oregan2.html">DCOP</a>, or Desktop Communications 
Protocol, is a generic way for applications to communicate with one another. 
You have seen this sort of thing in Windows, which uses a technology called 
OLE Automation (a part of "COM", or "Common Object Model"). DCOP is the method 
we will use to send commands to an already-running program. 

<p> From the "General" tab of KHotKeys, create a new action, and set the
"Action Type" to "Keyboard Shortcut -&gt; DCOP Call (simple)". From the
"Keyboard Shortcut" tab, identify the button you want to use, just as you
did with the previous example. Next, the "DCOP Call Settings" tab may seem
a bit confusing if you've never worked with DCOP before. At the bottom of
the tab is a button labeled "Run KDCOP". Kdcop is a GUI application that
allows you to browse the callable functions exposed by all running DCOP
applications in a standard tree view. Click the button to start kdcop.
Start the program you want to control, locate its name in kdcop, and click
the plus sign icon next to the name to expand it.

<p> For this example, I'm going to use Jukebox (or "Juk"), an audio player
that comes with many Linux distributions. When you expand the entry "juk"
in kdcop, you see five entries. For this example, we want the one named
"Player". Expanding this "Player" node, we see a long list of supported
function calls. Now all we have to do is find the things we want to
control. Let's say we want the button to start juk playing music. Scroll
down the list until you see "void play()". That looks like programmer
stuff, doesn't it? Don't worry, you don't have to know what it all means to
make use of it. It's easy.

<p> Copy the top tree entry (in this case, type "juk") into the "Remote
application" box. Then, copy the next node entry in the tree (in this case,
type "Player") into the "Remote object" box. Finally, copy the command,
without the "void", or the parenthesis (in this case, type "play") into the
"Called function" box. Note that all of these are case-sensitive.
 
<p> Both kdcop and the KDE Control Center support drag-and-drop, so you
could also click and drag "void play()" to the KHotKeys window, and drop it
on any of the edit boxes. This results in "dcop juk Player play " (note the
trailing space) being pasted into the edit box. This is an easy way to get
the three entries you need for the "DCOP Call Settings" tab. In this
example, type "juk" into the "Remote application" box, "Player" into the
"Remote object" box, and "play" into the "Called function" box. Now, if you
did this the way I did, and dropped everything into "Called function",
deleting everything up to the word "play", then you made the same mistake I
made as well. For some reason, the system adds a space to the end of the
text, so the system looks for a command called "play " instead of "play",
and the button won't work. Using drag-and-drop here is more trouble than
it's worth, in my opinion. It would be nice if you could just drop the
entry onto the tab, and have it populate all the fields for you, but that's
not how it works right now. 

<h2>Translating a Button into a Standard Keypress</h2>

<p> If the application you're trying to control doesn't support DCOP, then
you have to simulate the pressing of a specific key combination on a button
press. For example, if you're using Mozilla 1.6, you can't use the DCOP
method to control the browser. Fortunately, you can convert a button into a
standard keypress that Mozilla understands. Once you have created a New
Action for KHotKeys, select an "Action Type" of "Keyboard Shortcut -&gt;
Keyboard Input (simple)" from the pull-down list box in the "General" tab.
From the "Keyboard Shortcut" tab, identify the button you want to use, just
as you did with the examples above. On the "Keyboard Input Settings" tab,
enter the keystrokes you want the button translated to. Special keys have
to be spelled out. For example, to display your Home Page in Mozilla 1.6,
you hold down the "Alt" key, while pressing the "Home" key. You type this
into the "Keyboard input" field as (without the quotation marks, and
without any spaces): "Alt+Home". Warning: this button-to-key translation
doesn't care what application you're in. Think about what you're doing
before you assign the keyboard input to avoid unexpected results. Note that
this isn't limited to one keystroke. You could use "Hello World" if you
wanted to. 


</p>



<!-- *** BEGIN author bio *** -->
	<!-- *** BEGIN bio *** -->
<hr>
<P>
<img ALIGN="LEFT" ALT="[BIO]" SRC="../gx/2002/note.png" class="bio">
<em>
Tom has been a software developer since the early days of the Commodore 64,
with such commercial classics as Prototerm-64 and Colorez-128, and has seen
lots of operating systems come and go. Every one he's liked is either
discontinued (OS/2) or out of business (Commodore Amiga). He currently likes
Red Hat Linux, which won't be supported after April '04. As a result, we've
been trying to get him to fall in love with Windows, but so far no luck.
</em>
<br CLEAR="all">
<!-- *** END bio *** -->

<!-- *** END author bio *** -->




<div id="articlefooter">



<p>
Copyright &copy; 2004, <A HREF="../authors/brown.html">Tom Brown</A>. Released under the
<a href="http://linuxgazette.net/copying.html">Open Publication license</a>
</p>



<p>
Published in Issue 104 of Linux Gazette, July 2004
</p>

</div>

</div>

<div id="navigation">

<a href="../index.html">Home</a>
<a href="../faq/index.html">FAQ</a>
<a href="../lg_index.html">Site Map</a>
<a href="../mirrors.html">Mirrors</a>
<a href="../mirrors.html">Translations</a>
<a href="../search.html">Search</a>
<a href="../archives.html">Archives</a>
<a href="../authors/index.html">Authors</a>
<a href="../contact.html">Contact Us</a>
</div>

<div id="breadcrumbs">

<a href="../index.html">Home</a> &gt;
<a href="index.html">July 2004 (#104)</a> &gt;
TWDT

</div>


<img src="../gx/2003/sit3-shine.7-2.gif" id="tux" alt="Tux"/>

<br />


<div class="content lgcontent">

<a name="ecol"></a>
<h1>Ecol</h1>
<p id="by"><b>By <A HREF="../authors/malonda.html">Javier Malonda</A></b></p>


</b>
</p>


<p>
The Ecol comic strip is written for <A
HREF="http://escomposlinux.org">escomposlinux.org</A> (ECOL), the web site that
supports es.comp.os.linux, the Spanish USENET newsgroup for Linux.  The
strips are drawn in Spanish and then translated to English by the author.
<P>
<EM>These images are scaled down to minimize horizontal scrolling.
	To see a panel in all its clarity, click on it.</EM>


<P>

<A HREF="misc/ecol/ecol-159-e.png">
<IMG ALT="[cartoon]" SRC="misc/ecol/ecol-159-e.png" 
	WIDTH="640" HEIGHT="240"></A>
<BR CLEAR="all">

<A HREF="misc/ecol/ecol-161-e.png">
<IMG ALT="[cartoon]" SRC="misc/ecol/ecol-161-e.png" 
	WIDTH="640" HEIGHT="240"></A>
<BR CLEAR="all">

<A HREF="misc/ecol/ecol-163-e.png">
<IMG ALT="[cartoon]" SRC="misc/ecol/ecol-163-e.png" 
	WIDTH="640" HEIGHT="240"></A>
<BR CLEAR="all">






<P>

All Ecol cartoons are at
<A HREF="http://tira.escomposlinux.org/">tira.escomposlinux.org</A> (Spanish),
<A HREF="http://comic.escomposlinux.org/">comic.escomposlinux.org</A> (English) 
and
<A HREF="http://tira.puntbarra.com/">http://tira.puntbarra.com/</A> (Catalan).
The Catalan version is translated by the people who run the site; only a few
episodes are currently available.

<P> <SMALL>These cartoons are copyright Javier Malonda.  They may be copied,
linked or distributed by any means.  However, you may not distribute
modifications.  If you link to a cartoon, please <A
HREF="mailto:jmr@escomposlinux.org">notify</A> Javier, who would appreciate
hearing from you.
</SMALL>

</p>



<!-- *** BEGIN author bio *** -->
	<!-- *** BEGIN bio *** -->
<hr>
<!-- P>
<img ALIGN="LEFT" ALT="[BIO]" SRC="../gx/2002/note.png" class="bio">
<em>
</em>
<br CLEAR="all" -->
<!-- *** END bio *** -->

<!-- *** END author bio *** -->




<div id="articlefooter">



<p>
Copyright &copy; 2004, <A HREF="../authors/malonda.html">Javier Malonda</A>. Released under the
<a href="http://linuxgazette.net/copying.html">Open Publication license</a>
</p>



<p>
Published in Issue 104 of Linux Gazette, July 2004
</p>

</div>

</div>

<div id="navigation">

<a href="../index.html">Home</a>
<a href="../faq/index.html">FAQ</a>
<a href="../lg_index.html">Site Map</a>
<a href="../mirrors.html">Mirrors</a>
<a href="../mirrors.html">Translations</a>
<a href="../search.html">Search</a>
<a href="../archives.html">Archives</a>
<a href="../authors/index.html">Authors</a>
<a href="../contact.html">Contact Us</a>
</div>

<div id="breadcrumbs">

<a href="../index.html">Home</a> &gt;
<a href="index.html">July 2004 (#104)</a> &gt;
TWDT

</div>


<img src="../gx/2003/sit3-shine.7-2.gif" id="tux" alt="Tux"/>

<br />


<div class="content lgcontent">

<a name="kapil"></a>
<h1>How To Make a StereoGram with GIMP, Blender and StereoGraph</h1>
<p id="by"><b>By <A HREF="../authors/kapil.html">Kapil Hari Paranjape</A></b></p>


</b>
</p>


<p>
<a id="x1-10001"></a>
<h3>1. Introduction</h3>
<center><img src="misc/kapil/stereo2.png" alt="PIC" width=480 height=360>
<br>
<em>Do you see what I see?</em></center>

<p>Single Image Stereograms (SIS) are two-dimensional images that seem to be
three-dimensional; these 3-d images appear to "pop up" (or "pop down") out of 
the printed paper. The amount of training the typical human nervous system 
requires to see such images seems to vary from person to person; it seems to 
help if you are old and myopic! This tutorial is not about <em>that</em>
however; it is about <em>creating</em> the images that will invoke the 3-d 
image in the eye a trained beholder. I will explain how I created such a 
stereogram of (what is to me) a beautiful mathematical entity called <a 
href="http://www.liv.ac.uk/~spmr02/rings/">"Borromean Rings"</a>. The 
techniques described are sufficiently general that readers should be able to 
create their own images. In particular, the reader may want to construct 
<em>a depth map</em> for something else like <a 
href="http://www.cut-the-knot.org/do_you_know/knots.html">a trefoil knot</a> 
or a fish.

<p>The history of how I got interested in stereograms is at the end (see 
section <a href="#x1-70006">6</a>) of this document.

<a id="x1-20001.1"></a>
<p>
<b>1.1 Software Required.</b> If you have a basic <a 
href="http://www.debian.org">Debian</a> setup (with <a 
href="http://www.xfree86.org">XFree86</a>) that is connected to the Internet, 
then all you need to do is execute the following command as <tt>root</tt>:
<pre class="code">apt-get install gimp blender stereograph</pre>

<p>In other words, you need to install the software packages: <em><a 
href="http://www.gimp.org">gimp</a></em>, <em><a 
href="http://www.blender.org">blender</a></em>, and <em><a 
href="http://stereograph.sf.net">stereograph</a></em>, in addition to a basic 
Graphical Desktop (XFree86) installation.

<center><em>All that you want is...</em><br>
<img src="misc/kapil/logos.jpeg" alt="PIC" width=563 height=190>
</center>

<p> You need to start the GUI and then start <em>gimp</em> or <em>blender</em>
running as applications within the GUI. This is usually as simple as starting 
a terminal and typing <tt>gimp</tt> or <tt>blender</tt> as the case may be. 
Depending upon the sophistication of your interface you can probably also get 
them under the "Graphics Applications" menu.

<a id="x1-30002"></a>
<h3>2. Creating the Rings</h3>

<p>The 3-d modelling program <em>Blender</em> is an excellent contribution 
from the NaN Company and the Blender Foundation to the community. It is 
capable of far more than the construction of depth maps as described in this 
document. Excellent tutorials are available on-line, or as downloadable 
documentation. Start at <a href="http://www.blender.org/">the Blender 
community site</a> for more...

<p>We first start <em>blender</em> and create an empty scene in it. This is 
done by typing <tt>Ctrl-X</tt> in blender and accepting the offer to erase 
<em>all</em> objects. This creates a scene with a cube (selected), a camera, 
and a lamp. You can further type <tt>a</tt> twice to select all objects, then 
type <tt>x</tt> to delete all selected objects. Finally, accept the offer to 
erase the cube, lamp, and camera. As a result we become bold adventurers who 
are traveling light without a lamp or camera!

<center> 
<img src="misc/kapil/blank_blender.png" alt="PIC" width=512 height=384> 
<br>
<em>Traveling Light-less</em></center>

<p>We will now (approximately) follow the tutorial given in the section on <a 
href="http://www.blender.org//modules/documentation/htmlI/x9547.html">"DupliFrames"</a>
in <a href="http://www.blender.org//modules/documentation/htmlI/">the 
blender manual</a> to create the "rings".

<p>First press <tt>space</tt> to activate the menu to add objects. Select a 
"Curve" of type "Nurbs circle" and press the <tt>enter</tt> key. Unless you 
have moved the "3-d cursor" in <em>blender</em>,<a href="#footnote1" 
id="footnote1back"><sup>1</sup></a> this should be inserted with its center at 
the origin of the co-ordinate system. Now we scale it by a factor of 2 in the 
<em>y</em> direction by typing <tt>s</tt>, <tt>y</tt>, <tt>2</tt> and entering.
This is the central "path" of the ring.

<center>
<img src="misc/kapil/two_circles_blender.png" alt="PIC" width=512 height=384>
<br>
<em>Follow the circular instruction</em></center>

<p>Next we add the curve that is the "contour" of the surface. Go to the 
object mode by hitting <tt>Tab</tt>. As before, press <tt>space</tt> to  
get the object addition menu, and select another "Curve" of type "Nurbs 
circle". Scale this surface to a reasonable size by typing <tt>s</tt>, 
<tt>0.25</tt>. Finally, to avoid confusion, rename this curve to "contour" by
typing <tt>n</tt>, and then edit the name by selecting it with a left mouse 
button click.

<p>Now we return to object mode with a tab and select the original 
<em>y</em>-stretched circle. Get to the edit menu by typing <tt>F9</tt>. Under 
the menu "Curve and Surface" there is an entry called "BevOb". Select it and 
enter the name of the other curve, i.e. "contour" if you followed the last 
step of the previous paragraph. The <em>y</em>-stretched circle will now be
used as a "path", and the contour will be "extruded" along it making a ring. 
To finish things off, select the "contour" with the right mouse button, grab 
it by typing <tt>g</tt>, and shift it 10 steps to the right and "out of sight" 
of the camera by typing <tt>x</tt> followed by entering <tt>10</tt>.

<center><img src="misc/kapil/ring_blender.png" alt="PIC" width=512 height=384>
<br>
<em>Give me a ring</em></center>

<p>To create the two other copies of the ring we go as follows. First select 
it with the right mouse button and make a linked duplicate by typing 
<tt>Alt-d</tt>. Then rotate it by 90 degrees by typing <tt>r</tt> and entering 
<tt>90</tt>. Shift to the "side view" by typing the <tt>3/PgDn</tt> key on 
the Number-Pad. Again rotate by 90 degrees by typing <tt>r</tt> and entering 
<tt>90</tt>. Now shift to the "front view" by typing <tt>1/End</tt> on the
Number-Pad. Make another copy by typing <tt>Alt-d</tt> and rotate it by 90 
degrees by typing <tt>r</tt> and entering <tt>90</tt>. Go back to the "top 
view" by typing <tt>7/Home</tt> on the Number-Pad and then rotate again by 
90 degrees by typing <tt>r</tt> and entering <tt>90</tt>.

<p>To get a better view of the rings we first place the 3-d cursor at the 
origin. Then type <tt>.</tt> (period or dot) to get the rotations to be about 
the 3-d cursor (which is at the origin). Select all the rings one by one as 
follows: select the first with a right mouse button click and select each of 
the others with a right mouse button click with <tt>Shift</tt> pressed. Now
rotate by 45 degrees around the <em>z</em>-axis by typing <tt>r</tt> followed 
by entering <tt>45</tt>. Then shift to the front view by typing <tt>1/End</tt>
on the Number-Pad; again rotate by 45 degrees, this time around the 
<em>y</em>-axis, by typing <tt>r</tt> and entering <tt>45</tt>. Go back to the 
top view by typing <tt>7/Home</tt> on the Number-Pad and switch to the "solid" 
view by typing <tt>z</tt>.

<center>
<img src="misc/kapil/3rings_blender.png" alt="PIC" width=512 height=384>
<br>
<em>Borromean Rings at last</em></center>

<a id="x1-40003"></a>
<h3>3. Rendering the depth map</h3>

<p>The brain does create a 3-d "feeling" out of the image rendered above but 
it is not really a "pop-up" 3-d image. For that we have to create a depth map 
version of the image. In <em>blender</em> this is done using a texture. A 
texture is attached to a material so we must add material first. 

<p>Type <tt>F5</tt> to obtain the Materials and Textures menu. The select the 
default Material by clicking the button next to the button marked "ADD NEW" 
under the "Material" menu. You may also select a new "Material" with "ADD NEW".
Now, the last menu on the right is the "Textures" menu. If the Default texture 
is already added then there will be a small "tick" mark next to a button that 
says "Tex". Otherwise select the default "Tex" texture with the button next to 
the "ADD NEW" button in <em>this</em> menu; alternatively add a new texture if 
there is none. Now select the leopard-skin" like button that has a 
helper-pop-up which says "Texture buttons". A new set of menus appears. In the 
"Texture" menu in <em>this</em> panel select the "Blend" texture.

<center>
<img src="misc/kapil/texture_blender.png" alt="PIC" width=742 height=194>
<br>
<em>Let it flow...</em></center>

<p>Go back to the "Material" menus and buttons by selecting the red "sphere" 
that has a helper-pop-up which says "Material buttons". Select the "Map 
Input Menu". This menu allows us to select the input data that is used to 
determine the variation in material that forms the texture. Select the "Glob" 
button that makes the "Global" co-ordinates the input data for the texture. 
Further select the first "Z" button (next to the "sizeX" slider). Select the 
blank buttons next to the "sizeY" and "sizeZ" sliders. This says that the 
texture maps the <em>z</em> co-ordinate of the object to the <em>x</em> 
co-ordinate of a linear "blend".

<center>
<img src="misc/kapil/map_input_blender.png" alt="PIC" width=245 height=171>
<br>
<em>If what goes in is right...</em></center>

<p>Now we select what this linear blend is output as. Go to the "Map to" menu 
at the extreme right. Deselect "Col" (for Colour) and select "Emit" in order 
to make the texture emit light in proportion to its <em>z</em> co-ordinate 
(which is the co-ordinate that measures the distance from the camera). We also 
click the "No RGB" button (which sometimes shows up as "No RG" due to lack of 
screen space) so that the blending is just a grayscale from black to white.

<center>
<img src="misc/kapil/material_blender.png" alt="PIC" width=763 height=195>
<br>
<em>The relevant material</em></center>

<p>We still do not have a camera to view this! We should be in the top view, 
if not then shift to it by typing <tt>7/Home</tt> on the Number-Pad. Place the 
3-d cursor at the origin (make sure it <em>is</em> the origin in all views!). 
Now add a camera with <tt>space</tt> and then select "Camera" in the menu that 
appears. Go the front view and raise the camera 10 steps in the <em>z</em> 
direction by typing <tt>g</tt> followed by <tt>z</tt> and then entering 
<tt>10</tt>. We need to set the background to a uniform dark gray. You will 
notice a new set of menus. Click the numbers next to "HoR", "HoG" and "HoB" in 
the "World" menu and set these to "0.1" by entering <tt>0.1</tt>. If you type 
<tt>F12</tt> now you will see a depth map which we need to tweak just a little
more.

<p>First of all we improve the rendering. Type <tt>F10</tt> to bring the 
"Render" menu. In this menu deselect the "Shado(w)", "EnvMa(p)" and "Gamma" 
buttons. Select the rendering to at least "75%" in order to see things more 
clearly. Most importantly click the "OSA" (for the over-sampling/anti-aliasing)
which will cause the rings to be smoother. Finally select the output format in 
the "Format" menu to be "Targa Raw" instead of "Jpeg" (the default). Also 
click the "BW" button since we know the output is a grayscale.

<center>
<img src="misc/kapil/render_blender.png" alt="PIC" width=754 height=193>
<br>
<em>Render it with a Blender</em></center>

<p>This will give a reasonable depth map. However, you may wish to improve it 
a bit more. I felt the "black" in the rings was too dark and so I made the 
material emit a little more light by increasing the "Emit" slider in the 
"Shaders" menu up to <em>0.2</em>. Further, the "ofsX" slider was brought up 
to <em>0.3</em> and the "sizeX" slider was taken down to <em>0.7</em>.

<center><img src="misc/kapil/base.png" alt="PIC" width=480 height=360>
<br>
<em>All rings are gray at night</em></center>

<p>When you are satisfied with the rendering, go to the "File" near the top 
left corner of the <em>blender</em> window and "Save Image". You may want to 
"Save" the <tt>.blend</tt> file as well. I will assume below that you have 
saved the image as <tt>borromean.tga</tt>; moreover, I will assume that the 
image is of size 640x480 which is the default size.

<a id="x1-50004"></a>
<h3>4. Creating the background texture</h3>

<p>The GNU Image manipulation program is an absolutely marvelous program. I can
(and have) played with it for hours! We will put this very versatile program to
the limited use of creating a nice background texture for the stereographic
image.

<p>We open <em>gimp</em>. With the "File" menu or by typing <tt>Ctrl-n</tt> we 
create a canvas of size 640x480. One way to quickly create a texture of the 
type we need is to select the "Fill" tool from the "Tools" menu or by typing 
<tt>B</tt>. Then choose a nice <em>flat</em> pattern like "Leopard", "Rain" or 
"Sky". From the "Tool Options" dialog we then select "Pattern Fill" and fill 
the canvas with this pattern.

<center><img src="misc/kapil/texture_gimp.png" alt="PIC" width=512 height=331>
<br>
<em>A leopard-skin pill-box</em></center>

<p>Now save the pattern as <tt>texture.png</tt> using the "File" menu or using
<tt>Ctrl-S</tt>.

<a id="x1-60005"></a>
<h3>5. Using stereograph</h3>

<p>The <tt>stereograph</tt> command line program can generate a number of 
different types of stereograms. Even transparent ones that contain two images 
in one! We will create a rather simple stereogram with the command:
<pre class="code">
stereograph -R -a -t texture.png -b borromean.tga -o stereo.png</pre>

<p>A brief explanation of these options is in order. The <tt>-t</tt> option 
clearly indicates the file that contains the texture while the <tt>-b</tt> 
option indicates the file that contains the depth map; finally the <tt>-o</tt>
options indicates where the output should go. The <tt>-a</tt> options tells
<em>stereograph</em> to enable <a 
href="http://en.wikipedia.org/wiki/Anti-aliasing">"anti-aliasing"</a> and the 
<tt>-R</tt> option is an experimental one to get rid of "artefacts".

<center><img src="misc/kapil/stereo.png" alt="PIC" width=480 height=360>
<br>
<em>A three ring circus, perhaps</em></center>

<p> If you find it difficult to "see" stereograms you can add the option 
<tt>-A</tt> which will put two triangles in the image that will assist the 
viewing. That's it! The file 
<a href=misc/kapil/stereo.png><tt>stereo.png</tt></a> is a stereogram image 
file. You can view it with your favourite image viewing software or you
can even open it in <tt>gimp</tt> to view it.

<a id="x1-70006"></a>
<h3>6. Afterword</h3>

<p>I first learnt about Single Image Stereograms (SIS--which are also known 
commercially as MagicEye(TM) images) because of the gift to me by my sibling of
a MagicEye book. Initially I appreciated the beautiful textures that were on 
the glossy pages of this book, but could not verify the claim of the creators 
that there were three-dimensional images that would "pop out" of the page. One 
day my aged ancestor chanced to see the cover of the book and said something 
like "What a strange elephant!" It is only then that I tried to see the images 
and was successful (Thom's <em>morphogenesis</em> sometimes acts extremely
locally).

<p>There are <a href="http://en.wikipedia.org/wiki/Stereogram">numerous 
sources</a> of information (especially on the World Wide Web) on how these 
images "work". On reading these and attempting to create some on my own it
became clear to me that the GNU Image Manipulation Program <tt><a 
href="http://www.gimp.org">GIMP</a></tt> is an excellent program to create 
the textures. For a while there was also a <tt>GIMP</tt> plugin which would
create the SIS images from a texture and a depth map. This was replaced quite 
soon with the excellent <tt><a 
href="http://stereograph.sf.net">stereograph</a></tt> program. However, for a 
long while I could find no reasonable way to create the depth maps short of 
writing a program for each such map or some other form of "hacking". Whenever, 
I looked at 3-d scene creating software the mention of "raytracing", 
"textures", "lighting" and "rendering" would confuse me terribly--I'm a 
mathematician and not a physicist after all! Another barrier was the fact 
that the most popular such software <tt><a 
href="http://www.povray.org">povray</a></tt> was considered "non-free" by 
Debian. I had no wish to invest time and effort learning to use a program that 
could perhaps become unavailable to me at some point in the future.

<p>Sometime last year I chanced upon <a 
href="http://www.blender.org"><tt>blender</tt></a>, <a 
href="http://www.blender.org/modules/documentation">its excellent manual</a>, 
and more than a few <a 
href="http://www.blender3d.org/cms/Tutorials.243.0.html">tutorials</a> for it. 
Thanks to the documentation, the terms above acquired a "real"
mathematical meaning. Indeed it became clear to me that <tt>blender</tt> could 
become for 3-d drawing what <tt><a href="http://www.xfig.org">xfig</a></tt> 
already was for 2-d. Since the latter was already on my list of great graphics 
tools I decided to learn <tt>blender</tt> at the next available opportunity. 
This opportunity was the decision of our Institute (IMSc) to create a logo for 
itself through a "contest". While the logo "material"-ised quite nicely with 
(and without!) <tt>blender</tt> I still could not get the depth maps that I 
was looking for. It was only by repeatedly reading the <tt>blender</tt> manual 
for explanations on "lighting", "material", "texture" and "rendering" that I 
finally chanced upon the method that is described here.

<p>The end result has been this tutorial on creating a 3-d SIS image of the 
Borromean Rings. Since writing this I have learnt from the <a 
href="http://www.linuxartist.org/3d.php">"Linux Artist"</a> site that there 
are many more 3-d drawing tools like <tt>blender</tt>.

<p>As a teacher who comes from a family of teachers I cannot prevent myself 
from giving a few exercises:

<dl>
<dt><b>Beyond the Event Horizon:</b>
<dd>Make your own stereogram of something else using some other Open Source 
tools. There's More Than One Way To Do It!
<dt><br><b>Non-Mathematical:</b>
<dd>Find all the references to artists of the 70's, 80's and 90's in this 
text.
<dt><br><b>Mathematical:</b>
<dd>Find out more about Borromean rings, trefoil knots, Nurbs and other 
mathematical entities mentioned in the text.
</dl>
   
<hr>
Footnote:
<p>
<a href="#footnote1back" id="footnote1">1.</a> In other words, don't even
<em>touch</em> your mouse unless you really need to go somewhere!


</p>



<!-- *** BEGIN author bio *** -->
	<!-- *** BEGIN bio *** -->
<hr>
<p>
<img align="left" alt="[BIO]" src="../gx/authors/kapil.jpg" class="bio">
<em>

Kapil Hari Paranjape has been a ``hack''-er since his punch-card days.
Specifically, this means that he has never written a ``real'' program.
He has merely tinkered with programs written by others. After playing
with Minix in 1990-91 he thought of writing his first program---a
``genuine'' *nix kernel for the x86 class of machines. Luckily for him a
certain L. Torvalds got there first---thereby saving him the trouble
(once again) of actually writing code. In eternal gratitude he has spent
a lot of time tinkering with and promoting Linux and GNU since those
days---much to the dismay of many around him who think he should
concentrate on mathematical research---which is his paying job. The
interplay between actual running programs, what can be computed in
principle and what can be shown to exist continues to fascinate him.

</em>
<br clear="all">
<!-- *** END bio *** -->

<!-- *** END author bio *** -->




<div id="articlefooter">



<p>
Copyright &copy; 2004, <A HREF="../authors/kapil.html">Kapil Hari Paranjape</A>. Released under the
<a href="http://linuxgazette.net/copying.html">Open Publication license</a>
</p>



<p>
Published in Issue 104 of Linux Gazette, July 2004
</p>

</div>

</div>

<div id="navigation">

<a href="../index.html">Home</a>
<a href="../faq/index.html">FAQ</a>
<a href="../lg_index.html">Site Map</a>
<a href="../mirrors.html">Mirrors</a>
<a href="../mirrors.html">Translations</a>
<a href="../search.html">Search</a>
<a href="../archives.html">Archives</a>
<a href="../authors/index.html">Authors</a>
<a href="../contact.html">Contact Us</a>
</div>

<div id="breadcrumbs">

<a href="../index.html">Home</a> &gt;
<a href="index.html">July 2004 (#104)</a> &gt;
TWDT

</div>


<img src="../gx/2003/sit3-shine.7-2.gif" id="tux" alt="Tux"/>

<br />


<div class="content lgcontent">

<a name="odonovan"></a>
<h1>Automatic Backups with rsync and Anacron</h1>
<p id="by"><b>By <A HREF="../authors/odonovan.html">Barry O'Donovan</A></b></p>


</b>
</p>


<p>
<h3>1. Introduction</h3>

<p>
The thing about backups is that they can just be a pain. Everyone 
<em>knows</em> just how important they are, but very few people actually take 
the time to perform proper backups. Even after they have felt the pain of 
losing all those important files. 

<p>
In this article I am going to show you how to quickly set up your computer for 
simple, hassle-free, and transparent backups using only rsync and cron (or 
Anacron). The premise is simple: every night your computer will make an 
automatic mirror of all the files you wish to backup, and at chosen intervals 
these mirrors will be archived and kept for a specified period of time.

<p>
Before you get our hands dirty on actual implementation you need to design 
your own backup policy. In section 3 I discuss what a backup policy should and 
should not be. I will then introduce the necessary background information on 
rsync and cron separately. Finally, I will put it all together leaving you with 
a simple but effective backup regime.

<h3>2. Intended Audience</h3>

<p>
This article and the presented backup procedure is intended for anyone wishing 
to keep an effective backup of their important data. It is definitely not 
intended for large organisations or businesses with mission critical data. I 
would imagine the ideal candidates would include: home users, home office/small
office users, students/postgraduates, and researchers.

<h3>3. Backup Policies</h3>

<p>
A common misconception among many people is that a good backup policy is as
simple as making a regular copy of your data ("mirroring your data"),
always overwriting the previous copy. This, although more effort than most
might make, is almost as bad as doing nothing. 

<p>
Consider, for example, if one of your files becomes corrupt over time. It takes
you a week or two before you use it again. In that time, you have made two
"backups". You open your file to find your data destroyed. "But", you think to 
yourself, "that's alright, I'll just turn to my backup". You open your backup 
to find the exact same corrupted file. You realise only too late how useless 
your backup policy was.

<p>
Most of us have hundreds, if not thousands, of important files in our home
directories; address books, e-mails, letters, work related data, programs we
have been working on, etc. Some of these files we might use every week, while
others might not be looked at for months or even years. 
	
<p>
A good backup policy is one which takes "snapshots" of your data and
keeps them for a specified period of time. It is up to each individual to
decide just how many snapshots to keep and at what intervals. Often this will
be decided for you by storage limitations. Where possible, data that changes
regularly will benefit from snapshots of smaller intervals, while data that
rarely changes requires fewer intervals. The following table demonstrates my
own backup procedure:

<p>

<table border="1" summary="Sample backup policy">
<thead>
  <tr>
    <th>Data</th>
    <th>Change Freq.</th>
    <th>Size</th>
    <th>Daily Mirror</th>
    <th colspan="3">Weekly Snapshots</th>
    <th colspan="6">Monthly Snapshots</th>
    <th>Space Required</th>
  </tr>
  <tr>
    <td colspan="4"></td>
    <th>1</th>
    <th>2</th>
    <th>3</th>
    <th>1</th>
    <th>2</th>
    <th>3</th>
    <th>4</th>
    <th>6</th>
    <th>12</th>
    <td></td>
  </tr>
</thead>
<tbody>
  <tr>
    <th>E-mails</th>
    <td align="center">Daily</td>
    <td align="center">100Mb</td>
    <td align="center">Y</td>
    <td align="center">Y</td>
    <td align="center">Y</td>
    <td align="center">Y</td>
    <td align="center">Y</td>
    <td align="center">N</td>
    <td align="center">Y</td>
    <td align="center">N</td>
    <td align="center">Y</td>
    <td align="center">Y</td>
    <td align="center">500Mb</td>
  </tr>
  <tr>
    <th>MySQL Data</th>
    <td align="center">Daily</td>
    <td align="center">30Mb</td>
    <td align="center">Y</td>
    <td align="center">Y</td>
    <td align="center">N</td>
    <td align="center">N</td>
    <td align="center">Y</td>
    <td align="center">N</td>
    <td align="center">Y</td>
    <td align="center">N</td>
    <td align="center">Y</td>
    <td align="center">N</td>
    <td align="center">70Mb</td>
  </tr>
  <tr>
    <th>Website</th>
    <td align="center">Monthly</td>
    <td align="center">900Mb</td>
    <td align="center">Y</td>
    <td align="center">Y</td>
    <td align="center">N</td>
    <td align="center">N</td>
    <td align="center">Y</td>
    <td align="center">N</td>
    <td align="center">N</td>
    <td align="center">Y</td>
    <td align="center">N</td>
    <td align="center">N</td>
    <td align="center">3,200Mb</td>
  </tr>
  <tr>
    <th><code>/etc</code></th>
    <td align="center">2-3 Weeks</td>
    <td align="center">28Mb</td>
    <td align="center">Y</td>
    <td align="center">Y</td>
    <td align="center">Y</td>
    <td align="center">Y</td>
    <td align="center">Y</td>
    <td align="center">Y</td>
    <td align="center">Y</td>
    <td align="center">Y</td>
    <td align="center">Y</td>
    <td align="center">Y</td>
    <td align="center">200Mb</td>
  </tr>
  <tr>
    <th>Thesis</th>
    <td align="center">Daily</td>
    <td align="center">25Mb</td>
    <td align="center">Y</td>
    <td align="center">Y</td>
    <td align="center">Y</td>
    <td align="center">Y</td>
    <td align="center">Y</td>
    <td align="center">Y</td>
    <td align="center">Y</td>
    <td align="center">Y</td>
    <td align="center">Y</td>
    <td align="center">N</td>
    <td align="center">190Mb</td>
  </tr>
  <tr>
    <th>Research Code</th>
    <td align="center">Rarely</td>
    <td align="center">60Mb</td>
    <td align="center">Y</td>
    <td align="center">Y</td>
    <td align="center">N</td>
    <td align="center">N</td>
    <td align="center">Y</td>
    <td align="center">N</td>
    <td align="center">Y</td>
    <td align="center">N</td>
    <td align="center">Y</td>
    <td align="center">Y</td>
    <td align="center">200Mb</td>
  </tr>
  <tr>
    <td colspan="13" align="right">Total space required:</td>
    <td align="center">4,360Mb</td>
  </tr>
</tbody>
</table>

<p>
Each of the snapshots is compressed to reduce space. The largest data in my 
policy is the website. This rarely changes so I keep only a few snapshots. My 
systems <code>/etc</code> directory also changes rarely, but as it is only 28Mb 
I have chosen to keep all possible snapshots. You should now make a similar 
table and decide which data you want to backup and how often.

<p>
The next consideration is where to store your backups. Again, this is your own 
choice. Some locations simply won't be available to you while others might just 
seem like overkill. The following list gives the various options listed from 
the best to the worst:

<dl>
<dt><b>1</b>. On a networked computer in a remote location (such as backing up 
from home to your office computer or vice-versa)</dt>
<dd>This is clearly the ideal situation. Your data will be protected from fire, 
theft, electrical outages, power surges, water/sprinkler damage, etc.</dd>
<p>
<dt><b>2</b>. On a networked computer in another room of you home or office</dt>
<dd>Not as good as (1) above as both original and backup computers could be 
caught by fire, power surges, etc.</dd>
<p>
<dt><b>3</b>. On a second disk drive in your computer</dt>
<dd>Far better than having no backups at all, and you will be protected if one 
of the hard drives fails, but you will still be vulnerable to fire, theft, etc. 
I would certainly recommend a power surge protector if your PSU (power supply 
unit) doesn't have one built in.</dd>
<p>
<dt><b>4</b>. On a separate partition on the same disk drive</dt>
<p>
<dt><b>5</b>. On the same partition on the same disk drive</dt>
<dd>The last two on my list are by far the worst. This couldn't really be 
considered a backup policy of merit. Any hard drive problems, a virus, an 
accidental mistake, etc could ruin you. You are really only insuring yourself 
against accidental deletion or similar operation on the original files.</dd>
</dl>

<p>
If you do not have access to a remote computer yourself, then consider joining 
up with a friend; each of you backing up to the others computer. Security 
concerns can be addressed by encrypting the data before/during transfer and 
only placing the encrypted versions on the remote computer.

<h3>4. rsync - The Fast, Flexible File Transfer Utility</h3>

<p>
rsync is a very fast and flexible file transfer utility. It uses its own 
"remote update" protocol to transfer just the differences between two sets of 
files. It can operate locally or across a network link using rcp, ssh or its 
own daemon. rsync is included with most standard Linux distributions by 
default, or it can be downloaded from its website (<a 
href="http://rsync.samba.org">http://rsync.samba.org</a>).

<p>
We are going to use rsync to mirror our files every night. rsync is the ideal 
choice as it will <em>only</em> transfer new files, the differences between 
existing files that have changed, and remove old files, minimising the 
bandwidth usage for dial-up/broadband customers. 

<p>
The mirrors are easiest to implement when we take entire directories and its 
sub-directories. Let's take the case where you are mirroring all your e-mail 
files from your home computer to your office computer. We would use rsync as 
follows:
<p>

<pre class="code">
rsync -r -e ssh --delete /home/username/mail username@mycomputer.mycompany.com:/backups/mail
</pre><p>
where:
<blockquote>
<dl>
<dt><code>-r</code></dt>
<dd>Instructs rsync to copy directories recursively.</dd>
<dt><code>-e ssh</code></dt>
<dd>Tells rsync to use the ssh remote shell. More about this below.</dd>
<dt><code>--delete</code></dt>
<dd>Instructs rsync to delete files on the receiving side which do not exist 
on the sending side.</dd>
<dt><code>/home/username/mail</code></dt>
<dd>The directory we are mirroring.</dd>
<dt><code>username@mycomputer.mycompany.com:/backups/mail</code></dt>
<dd>Log in as user <code>username</code> on 
<code>mycomputer.mycompany.com</code> and create/update the mirror in 
<code>/backups/mail</code> </dd>
</dl> 
</blockquote>

<p>
This will create a mirror of <code>/home/username/mail</code> on 
<code>mycomputer.mycompany.com</code> under the directory 
<code>/backups/mail/mail</code>. This is what we want. If you wanted the 
reverse (backing-up from <code>mycomputer.mycompany.com</code> to your home 
computer) you would simply switch the source and destination:
<br><br>
<code>rsync -r -e ssh --delete username@mycomputer.mycompany.com:/home/username/mail /backups/mail</code><br><br>
	
<p>
I recommend that you use the ssh protocol to ensure the secrecy of your data 
while it is being transferred. If you are performing this backup on a closed 
network, feel free to use the older rsh protocol or rsync's own daemon. Using 
networked backups creates one more problem: we want this to be automatic, with 
no user interaction, but using rsh or ssh generally requires a password to be 
entered. We will overcome this by using public/private keys 
<strong>without pass-phrases</strong> to achieve this.

<h4>4.1 Setting up password-less authentication for ssh</h4>

<p>
This article is not intended as a tutorial on ssh so I will only provide a 
brief instruction on setting up private/public key authentication using ssh. 
Please refer to the ssh documentation for a more thorough discussion.

<p>
The following two commands will set up password-less authentication from your 
computer to <code>mycomputer.mycompany.com</code>:

<blockquote>
<code>$ ssh-keygen -b 1024 -t rsa -f /home/username/.ssh/id_rsa</code><br>
<em>(do not enter a pass-phrase - leave it blank)</em><br>
<code>$ scp /home/username/.ssh/id_rsa.pub username@mycomputer.mycompany.com:/home/username/.ssh/authorized_keys</code><br>
</blockquote>

<p>
Usually any problems encountered are down to the permissions of the various 
key files. Use ssh in verbose mode (<code>ssh -v</code>) and check the ssh 
daemon logs on both machines (usually <code>/var/log/secure</code>).

<p>
In using this method it is important for you to be aware of the security 
concerns that arise. The <code>ssh-keygen</code> command produced two files:
<ul>
<li><code>/home/username/.ssh/id_rsa</code>: the private key
<li><code>/home/username/.ssh/id_rsa.pub</code>: the public key
</ul>
You should ensure the permissions of the private key are 
<code>-rw-------</code> (i.e., only readable by the owner). This file is the 
equivalent of having a text file containing your login password to your account 
at <code>mycomputer.mycompany.com</code>; <strong>anyone who gets their hands 
on this file will be able to log into that account without knowing your 
password</strong>. However, any potential hacker must first gain access to your 
home computer in order to get at this file. 
	 
<p>
If you use this method you should also consider the following security measures:
<ul>
<li>ensure both machines have an effective firewall configured (see my article 
in last month's edition <a href="../103/odonovan.html">here</a>). You can
use some of the features of iptables such as specifying the exact IPs
that are allowed access to the system.</li>
<li>set-up a new user account on the backup machine and use that account for 
backups only.</li>
</ul>

<h3>5. cron - Daemon to Execute Scheduled Commands</h3>

<p>
cron is an integral part of most Linux distributions. It is used to execute 
commands at specific times according to a schedule you set. We will use it to 
set-up a nightly mirror of all the files we wish to backup, and to create the 
snapshots at the intervals we determined in section 3.

<p>
Each user on a Linux system has their own cron table ("crontab") which 
contains the schedule of commands. This can be listed using 
'<code>crontab -l</code>', removed with '<code>crontab -r</code>' and edited 
with '<code>crontab -e</code>'. Let's add the daily mirror command so that
it occurs at 2am every day by placing the following in our crontab:

<p>
<pre class="code">
00 02 * * * rsync -r -e ssh --delete /home/username/mail username@mycomputer.mycompany.com:/backups/mail
</pre>

<p>
where the five fields (<code>0 2 * * *</code>) are (respectively):
<p>
<blockquote>
<table border="1" summary="">
<thead>
<tr>		
    <td align="center">Field</td><td align="center">Allowed Values</td>
</tr>
</thead>
<tr>
    <td align="center">
	minute<br>
	hour<br>
	day of month<br>
	month<br>
	day of week
    </td>
    <td align="center">
	0-59<br>
	0-23<br>
	1-31<br>
	1-12<br>
	0-7<sup>*</sup>
    </td>
</tr>
</table>
( <sup>*</sup>0 or 7 is Sunday)
</blockquote>
	
<p>
So, in our case, we will mirror the contents of 
<code>/home/username/mail</code> at 02:00 on every day of every month. We can 
place similar entries for all other directories you wish to mirror. 
Alternatively, we could create a script containing all the entries and use cron 
to execute that script.

<p>
There are two useful environment variables you can also set when editing the 
crontab to override the defaults:<br>
<code>
SHELL=/bin/sh<br>
MAILTO=username</code>
	
<p>
The <code>MAILTO</code> is important as all error messages will only be sent 
by e-mail and so you will notified if your backups are failing. Refer to the 
crontab man page for more information and examples.

<h3>6. Putting It All Together</h3>

<p>
Now that we have the basics of rsync and cron, all we have left to do is to put 
them all together to create our backup policy. Let's continue with the example 
where your home computer is sending its daily mirror to your office computer. 
You office computer will now be responsible for the remainder of the backup 
policy: the snapshots at the predefined intervals. We will use another crontab 
on the office machine to accomplish this and I will demonstrate using the 
schedule for my thesis from section 3.

<p>
The method is quite simple. For example, every Sunday we will move the 3 week 
old snapshot to 1 month old snapshot, the 2 week old to the 3 week old, the 1 
week old to the 2 week old and archive the mirror to the 1 week old. So, 
depending on the time of the week, the 3 week old snapshot could be as young 
as 2 weeks or as old as 3 weeks.

<p>
My schedule requires snapshots that are 1, 2, and 3 weeks old and 1, 2, 3, 4, and 6 
months old. We will work from the oldest down (as otherwise we would only be 
propagating the new snapshot):

<pre class="code">
# Back up mail files with snapshots of 6, 4, 3, 2, 1 months and 3, 2, 1 weeks
# Order 4m-&gt;6m, 3m-&gt;4m, 2m-&gt;3m, 1m-&gt;2m, 3w-&gt;1m, 2w-&gt;3w, 1w-&gt;2w, mirror-&gt;1w

# At 3am on the 1st of Jan,Mar,May,Jul,Sep,Nov copy the 4m to the 6m
00 03 1 1,3,5,7,9,11 * cp -f /backups/thesis/backup/4month.tar.gz /backups/thesis/backup/6month.tar.gz

# At 3.02am on the 1st of every month move the 3m to the 4m (and continue for other months)
02 03 1 * * cp -f /backups/thesis/backup/3month.tar.gz /backups/thesis/backup/4month.tar.gz
04 03 1 * * cp -f /backups/thesis/backup/2month.tar.gz /backups/thesis/backup/3month.tar.gz
06 03 1 * * cp -f /backups/thesis/backup/1month.tar.gz /backups/thesis/backup/2month.tar.gz
08 03 1 * * cp -f /backups/thesis/backup/3week.tar.gz  /backups/thesis/backup/1month.tar.gz

# And then every Sunday take care of the weekly snapshots and the archiving of the mirror
10 03 * * 0 cp -f /backups/thesis/backup/2week.tar.gz  /backups/thesis/backup/3week.tar.gz
12 03 * * 0 cp -f /backups/thesis/backup/1week.tar.gz  /backups/thesis/backup/2week.tar.gz
14 03 * * 0 rm -f /backups/thesis/backup/1week.tar.gz
16 03 * * 0 tar zcf /backups/thesis/backup/1week.tar.gz /backups/thesis/thesis/*
</pre>

<p>
And that my friends is your automatic, hassle-free, and effective backup system.

<p>
A few points on the above:
<ul>
<li>I have placed each command 2 minutes apart to allow the previous one to 
complete. Adjust this depending on your own file sizes, system load, hard disk 
speed, etc.
<li>In the example in section 5 for the automatic mirroring I set the mirror 
time to 2 a.m. Ensure, as I have done here, that the snapshots get created after 
the mirror (i.e., allow enough time for the mirroring to complete)
<li>Before the first run you should ensure all directories are created, 
archive the existing mirror, and copy it to all the required files (copy 
<code>1week.tar.gz</code> to <code>2week.tar.gz</code>, 
<code>3week.tar.gz</code>, etc) to prevent unnecessary error messages
</ul>

<h3>7. Anacron vs. cron</h3> 

<p>
Anacron is a periodic command scheduler similar to some uses of cron, but it 
does not assume that the system is running continuously. It can therefore be 
used for our backup policy on systems that don't run 24 hours a day. Just like 
rsync and cron, Anacron is now part of most standard Linux distributions.

<p>
Every time Anacron is run, it reads a configuration file that specifies the 
jobs Anacron controls, and their periods in days. If a job wasn't executed in 
the last n days, where n is the period of that job, Anacron executes it. The 
configuration file is usually <code>/etc/anacrontab</code>.

<p>
For the daily mirroring we could add a line to this configuration file such as:
<p>
<pre class="code">
1   20  mirror  rsync -r -e ssh --delete /home/username/thesis username@mycomputer.mycompany.com:/backups/thesis
</pre>
<p>
where the fields mean:
<dl>
<dt><code>1</code></dt>
<dd>the period in days indicating how often this command should be executed</dd>
<dt><code>20</code></dt>
<dd>the delay in minutes after Anacron begins before it should execute this 
command</dd>
<dt><code>mirror</code></dt>
<dd>a unique identifier for this job so Anacron can keep track of when it was 
last executed</dd>
<dt><code>rsync...</code></dt>
<dd>the command to execute</dd>
</dl>

<p>
And similarly on the backup machine we would place the following in the Anacron configuration file:
<pre class="code">
# Back up mail files with snapshots of 6,4,3,2,1 months and 3,2,1 weeks
# Order 4m-&gt;6m, 3m-&gt;4m, 2m-&gt;3m, 1m-&gt;2m, 3w-&gt;1m, 2w-&gt;3w, 1w-&gt;2w, mirror-&gt;1w

# Every 60 days (2 months)
60 20 bup1 cp -f /backups/thesis/backup/4month.tar.gz /backups/thesis/backup/6month.tar.gz

# every 30 days (1 month)
30 22 bup2 cp -f /backups/thesis/backup/3month.tar.gz /backups/thesis/backup/4month.tar.gz
30 24 bup3 cp -f /backups/thesis/backup/2month.tar.gz /backups/thesis/backup/3month.tar.gz
30 26 bup4 cp -f /backups/thesis/backup/1month.tar.gz /backups/thesis/backup/2month.tar.gz
30 28 bup5 cp -f /backups/thesis/backup/3week.tar.gz  /backups/thesis/backup/1month.tar.gz

# And every 7 days
7 30 bup5 cp -f /backups/thesis/backup/2week.tar.gz  /backups/thesis/backup/3week.tar.gz
7 32 bup7 cp -f /backups/thesis/backup/1week.tar.gz  /backups/thesis/backup/2week.tar.gz7 
7 34 bup8 rm -f /backups/thesis/backup/1week.tar.gz
7 36 bup9 tar zcf /backups/thesis/backup/1week.tar.gz /backups/thesis/thesis/*
</pre>

A few notes on this:
<ul>
<li>You really need to plan well if using Anacron. What if the office machine 
is regularly off while the home machine is trying to rsync? Anacron can work 
best in this situation if it is the <em>source</em> machine that is not always running; 
it can perform the rsync and then take care of the snapshots.
<li>Ensure you make proper use of the delay time to ensure one job has 
finished before the other starts
<li>Anacron is also ideal for laptop users 
</ul>

<h3>8. Resources</h3> 

<p>
For a more professional backup solution:
<ul>
<li>Amanda, The Advanced Maryland Automatic Network Disk Archiver, <a 
href="http://www.amanda.org/">http://www.amanda.org/</a>
</ul>

<p>
Get advance notification before your hard disk fails:
<ul>
<li>smartmontools Home Page - <a 
href="http://smartmontools.sourceforge.net/">http://smartmontools.sourceforge.net/</a>
</ul>


</p>



<!-- *** BEGIN author bio *** -->
	<!-- *** BEGIN bio *** -->
<hr>
<p>
<! -- REPLACE THE FOLLOWING WITH AUTHOR'S ~200x200 PIC. -->
<img align="left" alt="[BIO]" src="../gx/authors/odonovan.jpg" class="bio">
<em>

<! -- BIO GOES HERE -->

Barry O'Donovan graduated from the National University of Ireland, Galway
with a B.Sc. (Hons) in computer science and mathematics. He is currently
completing a Ph.D. in computer science with the <a
href="http://www.ihl.ucd.ie/">Information Hiding Laboratory</a>, University
College Dublin, Ireland in the area of audio watermarking.

<p> Barry has been using Linux since 1997 and his current flavor of choice
is Fedora Core. He is a member of the <a href="http://www.linux.ie/">Irish
Linux Users Group</a>. Whenever he's not doing his Ph.D. he can usually be
found in the local pub or running in the local park.
</em>
<br clear="all">
<!-- *** END bio *** -->


<!-- *** END author bio *** -->




<div id="articlefooter">



<p>
Copyright &copy; 2004, <A HREF="../authors/odonovan.html">Barry O'Donovan</A>. Released under the
<a href="http://linuxgazette.net/copying.html">Open Publication license</a>
</p>



<p>
Published in Issue 104 of Linux Gazette, July 2004
</p>

</div>

</div>

<div id="navigation">

<a href="../index.html">Home</a>
<a href="../faq/index.html">FAQ</a>
<a href="../lg_index.html">Site Map</a>
<a href="../mirrors.html">Mirrors</a>
<a href="../mirrors.html">Translations</a>
<a href="../search.html">Search</a>
<a href="../archives.html">Archives</a>
<a href="../authors/index.html">Authors</a>
<a href="../contact.html">Contact Us</a>
</div>

<div id="breadcrumbs">

<a href="../index.html">Home</a> &gt;
<a href="index.html">July 2004 (#104)</a> &gt;
TWDT

</div>


<img src="../gx/2003/sit3-shine.7-2.gif" id="tux" alt="Tux"/>

<br />


<div class="content lgcontent">

<a name="oregan"></a>
<h1>Songs in the Key of Tux: Audacity</h1>
<p id="by"><b>By <A HREF="../authors/oregan.html">Jimmy O'Regan</A></b></p>


</b>
</p>


<p>
<img align="right" src="../gx/WeeMan.png" alt="Musician">
<p>As noted in last month's <a href="../103/lg_mail.html#gaz.1">Mailbag</a>, 
I was unable to write "Songs in the Key of Tux" last month. My intention
was to take a look at Linux-based recording software, but I was
disheartened by some work-related RSI in my left arm - which is pretty
important to a right-handed guitarist - and by an accident which befell
Dan, my drummer.

<p>The beat, as any self-respecting musician will know, is central to any 
form of music; and any attempt to record without a beat as a guide will be 
pretty disastrous - especially if, like me, you tend to use a lot of tempo 
changes. My efforts at creating my own drum tracks in Songwrite haven't 
been very impressive, so I was relying on Dan to provide this essential
piece.

<p>Dan is recovering nicely after a car crash which left him with a cracked
vertebra. He even managed to fulfill the "Spinal Tap" drummer requirements
by dying (clinically) not just once, but twice! While he is itching to get
back on to a drum stool, or even to use a drum machine, I'm not going to
trouble him for another few months - luckily I managed to find another
way of covering recording software. 

<p>I was initially approaching the idea of covering recording software as a 
means of fulfilling my ambition to record some of my own music, and was 
about to jump in at the deep end, and start using Ardour. Ardour is a 
complicated piece of software, which can more or less match ProTools in 
terms of features. (For those who don't know, ProTools is the equivalent of 
a full recording studio in software. Most albums produced since the late 
90s have used ProTools at some stage of the recording process). 

<h3>Audacity</h3>

<img src="misc/oregan/audacity.png" alt="Audacity screenshot">

<p>Ardour is overkill for most projects. There are, however, several pieces 
of software for less ambitious projects. Audacity is a cross-platform audio 
editor with multi-track capabilities. It is capable of meeting the needs of 
a musician new to the recording process, but it is also suitable for 
"everyone else". 

<p>Most people find themselves in need of good audio editing software on 
occasion, and Audacity can meet most, if not all, of these needs. For 
common tasks such as adding a simple voice-over to a video, while keeping 
the original soundtrack, to removing the needle hiss from vinyl recordings, 
Audacity has built in features for most audio editing tasks.

<p>I'm going to cover a few simple examples this month. I came across a few 
files my brother, Joe, dumped from his portable studio, a Zoom PS-02, and 
got plenty of opportunities to demonstrate some simple audio editing tasks.

<p>The Zoom PS-02 is a pocket sized digital 3-track recorder. It stores its 
data on Smart Media cards, and Zoom provide a Windows-based executable to 
convert the tracks to wav files. As far as I recall, it runs fairly well 
under Wine; but I didn't have to trouble myself with trying it out, as Joe
provided me with converted files.

<p>I have found LGPLed source for a <a 
href="http://www.integrand.com/zoom">WinAmp plugin</a> to play these files, 
courtesy of Randy Gordon. I even attempted to make it into an XMMS plugin, 
but I no longer have any sample files. I've <a 
href="misc/oregan/aud_xmms.c.txt">included it</a>, in case anyone wants to give 
it a try, but bear in mind that I'm not a C programmer, and that the code 
is probably infested with bugs.

<h3>Basic editing</h3>

<p>The first step in editing an audio file is to import the track. Go to 
"Project-&gt;Import Audio", or type <tt>Ctrl-I</tt>, and select the file 
you wish to work on. Each imported file is given its own track, or pair of 
tracks in the case of stereo files. As is customary with audio editing 
software, each track has a set of controls to the left of the screen. Here 
you will find the volume and panning controls, underneath the track name. 
On the left of the track name is an icon to close the track, on the right 
is an arrow. Clicking on this arrow gives a menu of operations which may be 
performed on the file. If you wish to edit stereo tracks individually, you 
can choose "Split Stereo Track" from this menu.

<p>If you just want to combine the tracks recorded using another recorder, 
such as the PS-02, you can simply import each track, set the panning and 
volume, and enjoy the result. If you're not going to do too much editing on 
a track, I recommend you don't save the project - Audacity's projects can 
get very large, very quickly. I also recommend you don't export directly to 
<tt>.ogg</tt> or <tt>.mp3</tt> - these files are only exported as mono. 
Instead, export to <tt>.wav</tt>, and use <tt>oggenc</tt> to encode it. I 
learned this the hard way, creating the file pictured in the screenshot 
above!

<h3>Editing Tools</h3>

<img align="right" src="misc/oregan/audacity-palette.png" alt="Audacity's 
palette" vspace="10" hspace="20">
<p>The first tool you may find useful when editing is the "Selection Tool". 
In the tool palette, pictured to the right, this is on the top left, and is 
selected by default. With this tool, you can click on an area of song to 
hear playback from that point, or select an area to play back that area 
only, or to apply an effect, or to use one of the other tools. The 
selection is highlighted in grey, and you may increase or decrease its size 
by placing the mouse pointed at either side, along the vertical. The mouse 
pointer changes to an arrow, pointing towards the outside of the selection. 

<p>For this article, I have been performing some basic tasks on a recording 
of my band jamming, which Joe made around two years ago. The track is 
improvised, so I wanted to cut out each distinct part - we're not likely to 
use anything from it, but, it's better to have the parts rather than having 
to site through all 15 minutes of it, should we change our minds. <a 
href="misc/oregan/improv1.ogg">This</a> is a recording of a simple 
selection.

<img align="right" src="misc/oregan/audacity-time.png" alt="Audacity's 
timeline" vspace="10" hspace="20">

<p>As well as this, you can use selections to remove parts of the sound you 
don't want. If you don't want the part you've selected, choose 
"Edit-&gt;Silence" (<tt>Ctrl-L</tt>); to remove the rest of the sound, 
apart from what you've selected, choose "Edit-&gt;Trim" (<tt>Ctrl-T</tt>)

<p>For this situation, where several of the parts are similar, it's best to 
cut out the repetition of parts, and join together separate pieces. The 
best method I found is to copy each part containing similarities to a new 
window ("File-&gt;New", as you might expect), select an example, and 
duplicate that part of the track - "Edit-&gt;Duplicate", or 
<tt>Ctrl-D</tt>. Once I have my parts, I can remove the original portion, 
and use the "Time Shift Tool" (bottom centre in the palette) to move each 
part closer to each other - otherwise I would be left with silence. You can 
<a href="misc/oregan/improv2.ogg">click here</a> to hear what that sounds 
like (though I wasn't very careful in my editing).

<p>Having separate pieces blend into each other like that obviously isn't 
the best approach, so next I turned to the "Envelope Tool" (top centre). 
Although there are plug-ins which can fade in out out selected areas, the 
Envelope Tool allows you to draw volume increases or decreases with much 
greater control. Again, you can <a href="misc/oregan/improv3.ogg">click</a> 
to hear how this sounds. Still rough around the edges, but a definite 
improvement, in my opinion.

<img align="right" src="misc/oregan/audacity-envelope.png" alt="Audacity's
timeline" vspace="10" hspace="20">

<p>So, we've covered three of the tools available, but that leaves three 
remaining. Of these, the "Multi Tool" (bottom right) will probably become 
the most useful as you gain experience with Audacity, as it combines the 
functions of the other tools, followed by the "Zoom Tool" (bottom left). 
The Zoom Tool allows you to get a closer look at the samples - useful for 
getting better selection. With the Zoom Tool selected, the left mouse 
button zooms in, right zooms out, and middle returns to normal view; though 
it's worth noting that zooming can be done from the keyboard 
(<tt>Ctrl-1</tt>, <tt>Ctrl-3</tt> and <tt>Ctrl-2</tt>, respectively).

<p>The one tool I don't see myself having any use for, however, is the 
"Draw Tool". This, at an appropriate zoom level, lets you alter individual 
sound samples. I can see how this could be useful, for fixing the pitch of 
notes, etc., but I don't see myself using it, somehow.

<h3>Closing words</h3>

<p>Here ends my quick tour of editing with Audacity. Next month, I'll go 
over the basics of recording. Audacity has a built in metronome, so if I 
stick to something simple, I should be set. I'm chomping at the bit to 
start recording, especially since Joe bought a Washburn Dime333 - one of 
the nicest guitars I've ever held.

<p>If anyone has any feedback, feel free to mail it to me, though if you 
have any tips to offer, it would be better if you sent it to <a 
href="../tag/ask-the-gang.html">The Answer Gang</a>. 

<p>After my last article, I received mail from Bob van der Poel, author of 
<a href="http://mypage.uniserve.com/~bvdp/music.html#cbeat">CountBeats</a> 
and <a href="http://mypage.uniserve.com/~bvdp/mma/mma.html">MMA - Musical 
MIDI Accompaniment</a>, asking if I'd take a look at his software. I'd seen 
MMA before, but lost the address. MMA generates a MIDI file from a text 
file, which a musician can use as accompaniment in the absence of another 
musician. Input specifies the tempo, metre, and the chord progressions, and 
MMA generates music from it. Having seen music generators before, I was 
slightly wary, but MMA's generated music is very, for want of a better 
word, musical.

<p>I was equally impressed with CountBeats, which is a useful tool for the 
music theory illiterate such as myself. Tap on your keyboard, and it tells 
you what tempo you're using. A simple idea, and one that really shouldn't
be necessary, but I've had to avoid making tablature for a couple of songs
because I simply couldn't get the tempos right.

<p>I also received mail from Cameron Horsburgh, who wrote to inform me 
about a capability of Lilypond which I'd overlooked:

<blockquote>
I was also interested in your comment about using Songwrite to write
articles via Lilypond and LaTex. I don't know if you're aware of the
lilypond-book feature in Lilypond. This is a great feature. You can put
a block of Lilypond code in a LaTex or html file, run lilypond-book over
it and end up with music fragments in your piece of work.
</blockquote>

<blockquote>
So instead of writing articles inside Songwrite, I would export the
Lilypond code, place it in a block in a LaTex file, and run pdflatex (or
whatever). And of course, it works the same for web pages too!
</blockquote>

<p> Something else that I noticed is that, because Songwrite is written in
Python, the file handling code is able to accept URLs (though this only 
works on the command line). So if you type <code>songwrite 
http://somehost/somefile</code>, Songwrite will fetch it from the Internet
for you and open it.

<p> Here are some files to try this out with:
<a href="misc/oregan/11Apr04.sw.xml">11Apr04.sw.xml</a>,
<a href="misc/oregan/17Jun04.sw.xml">17Jun04.sw.xml</a>,
<a href="misc/oregan/18Jun04.sw.xml">18Jun04.sw.xml</a>,
<a href="misc/oregan/29March.sw.xml">29March.sw.xml</a>,
<a href="misc/oregan/3April04.sw.xml">3April04.sw.xml</a>,
<a href="misc/oregan/4April04.sw.xml">4April04.sw.xml</a>,
<a href="misc/oregan/8Apr04.sw.xml">8Apr04.sw.xml</a>

<p> As a final note, anyone wishing to learn music theory or the guitar, or 
anyone who feels they can teach something about them, should bookmark the 
free textbooks on <a href="http://wikibooks.org/wiki/Music">music 
theory</a> and <a href="http://wikibooks.org/wiki/Guitar">guitar</a> being 
written at <a href="http://wikibooks.org/wiki/Main_Page">Wikibooks</a>. 
They're works in progress, but are showing some promise.

<p> I'd also like to plug <a 
href="http://www.magnatune.com/artists/utopia_banished">Utopia Banished</a>,
my favourite Magnatune band; and having found some of the Irish songs of my
teens on the net, would like to <a href="misc/oregan/sounds.html">point to
them</a>. 'Til next month!

</p>



<!-- *** BEGIN author bio *** -->
	<!-- *** BEGIN bio *** -->
<hr>
<P>
<img ALIGN="LEFT" ALT="[BIO]" SRC="../gx/authors/oregan.jpg" class="bio">
<em>
Jimmy has been using computers from the tender age of seven, when his father 
inherited an Amstrad PCW8256. After a few brief flirtations with an Atari ST
and numerous versions of DOS and Windows, Jimmy was introduced to Linux in 1998
and hasn't looked back.

<P> Jimmy is a father of one, a techno-savvy seven year-old called Mark. In
the spare time he enjoys outside of his personal circle of Hell, working in a
factory, Jimmy likes to play guitar and edit Wikipedia.
</em>
<br CLEAR="all">
<!-- *** END bio *** -->

<!-- *** END author bio *** -->




<div id="articlefooter">



<p>
Copyright &copy; 2004, <A HREF="../authors/oregan.html">Jimmy O'Regan</A>. Released under the
<a href="http://linuxgazette.net/copying.html">Open Publication license</a>
</p>



<p>
Published in Issue 104 of Linux Gazette, July 2004
</p>

</div>

</div>

<div id="navigation">

<a href="../index.html">Home</a>
<a href="../faq/index.html">FAQ</a>
<a href="../lg_index.html">Site Map</a>
<a href="../mirrors.html">Mirrors</a>
<a href="../mirrors.html">Translations</a>
<a href="../search.html">Search</a>
<a href="../archives.html">Archives</a>
<a href="../authors/index.html">Authors</a>
<a href="../contact.html">Contact Us</a>
</div>

<div id="breadcrumbs">

<a href="../index.html">Home</a> &gt;
<a href="index.html">July 2004 (#104)</a> &gt;
TWDT

</div>


<img src="../gx/2003/sit3-shine.7-2.gif" id="tux" alt="Tux"/>

<br />


<div class="content lgcontent">

<a name="oregan2"></a>
<h1>Desktop Matters!: A guide to Windows technologies for Linux users</h1>
<p id="by"><b>By <A HREF="../authors/oregan.html">Jimmy O'Regan</A></b></p>


</b>
</p>


<p>
<p> A reasonable question, and one which will not go unasked (no matter how 
well I explain this!), is: "Why should Linux users read about Windows 
technologies?"

<p> The main answer is: because so much development on Linux is influenced 
by Windows. Windows is the most common platform at the moment; most new
users coming to Linux are coming from Windows, but more importantly, so are
a lot of new developers. 

<p> Now, I don't mean to suggest that the technologies presented here 
originated in Windows, or that the equivalents available on Linux are
limited to merely following the Windows version. In many cases, especially
in the desktop, Linux technologies are arguably better, though in other
cases, arguably worse. 

<p> The main motivation behind writing this is to have a document to point
to when writing about desktop topics. I have already <a 
href="../issue97/oregan2.html">compared DCOP to OLE Automation</a>; Tom Brown 
has <a href="brown.html">also made this comparison</a>. As many articles on
desktop topics are written with the intention of introducing former Windows
users to Linux, I feel it is helpful to have a glossary of sorts to point 
them to.

<p> I also feel there would be no harm in introducing long-time Linux users
to the concepts of Windows, to better aid those who would attempt to aid
these new users, and to help them to understand why some software is
designed the way it is. For example, most Linux types dismiss Visual Basic,
without understanding <em>why</em> Visual Basic is useful to Windows
developers.

<h2>A note about Wine</h2>

<p> Most people know about <a href="http://www.winehq.com">Wine</a>, even
if only vaguely. Wine is an implementation of the Windows API, with a
loader for Windows binaries. Using Wine, many Windows applications can be
run on Linux; and several open source projects for Windows can be compiled
using Winelib.

<p> One problem with Wine is that it can't be used as a regular Unix
library, because it has to be binary compatible with Windows to work.
Because of this, you can't link to Wine to get an easy DLL loader. Work is
being done in this area: Mono is using Wine to develop its implementation
of .Net's Windows Forms, and Ardour.

<p> Another, larger problem, is that the Windows API contains several
hacks to support backwards compatibility. After I started writing this, 
Slashdot posted <a 
href="http://www.joelonsoftware.com/articles/APIWar.html">this article</a>, 
which provides me with a way of explaining why Wine has such a hard task in 
implementing the Windows API:

<blockquote>
I first heard about this from one of the developers of the hit game
SimCity, who told me that there was a critical bug in his application: it
used memory right after freeing it, a major no-no that <em>happened</em> to
work OK on DOS but would not work under Windows where memory that is freed
is likely to be snatched up by another running application right away. The
testers on the Windows team were going through various popular 
applications, testing them to make sure they worked OK, but SimCity kept
crashing. They reported this to the Windows developers, who disassembled
SimCity, stepped through it in a debugger, found the bug, and <em>added
special code</em> that checked if SimCity was running, and if it did,
<em>ran the memory allocator in a special mode in which you could still use
memory after freeing it</em>.
</blockquote>

<p> Yet another problem is that much of Windows is undocumented. From the
article quoted above, I was lead to <a 
href="http://weblogs.asp.net/oldnewthing/">the weblog of Raymond Chen</a>,
one of the developers of Windows, where I found <a
href="http://weblogs.asp.net/oldnewthing/archive/2003/12/23/45481.aspx#45741">this
quote</a> from another Windows developer, which explains why: "The reason
we can't publish the structures is that it precludes our changing them
FOREVER. I mean FOREVER." (<a 
href="http://weblogs.asp.net/oldnewthing/archive/2003/12/19/44644.aspx">This
page</a> has more comments on this, though the main story is pretty
amusing, considering that many people could be forgiven for thinking that 
this is what Microsoft does).

<h2>Language integration</h2>

<p> One of the reasons behind the design of Windows is the goal of language
integration. Most of the technologies in Windows seem to have been written
for Visual Basic, but were made part of the operating system so that other
languages could take advantage of them. This places an extra burden on
language developers, but makes life easier for the developers who use these
languages.

<p> On Windows, a developer can access a COM object just as easily from
Python as they can from C++ or Visual Basic. On Linux, they have several
hoops to jump through first. A Perl or Python programmer who wants to use a
C library must find a wrapper for their language first; if one is not
available, they must write one of their own. A C programmer wishing to
access a C++ library must write a wrapper library in C++, which exposes
functions which may be called from C. 

<p> There are equivalents available; Perl's Inline modules allow Perl 
programmers to embed other languages inside Perl code. This allows the reuse 
of libraries, no matter what language they are written in; but it
also requires you to be able to write enough of another language to access
the functions you want.

<p> <a href="http://www.gnome.org">GNOME</a>'s use of CORBA allows for
language integration on a similar level to that present on Windows,
especially with the <a 
href="http://search.cpan.org/~hrogers/CORBA-ORBit-0.4.7/">Perl</a> and <a 
href="http://sourceforge.net/projects/orbit-python/">Python</a> bindings, but
unfortunately these came too late. As it is, it is possible to fully access
any CORBA object in GNOME, and to write CORBA servers, in both Perl and Python, 
but CORBA has all but been discarded from GNOME as a mechanism for
calling functions. Ximian have focused their attention on Mono as a means
of getting this integration, while other GNOME developers are looking at <a 
href="http://www.freedesktop.org/Software/dbus">D-BUS</a>.

<p> OpenOffice.org and Mozilla <em>have</em> got the sort of framework which
allows the same level of language integration as Windows. This is not
surprising though, as both UNO and XPCOM have designs based on COM's.

<h2>Compatibility</h2>

<p> Of much more importance is the compatibility between the various aspects
of Windows. In Linux, though there are equivalents available for every 
individual part of Windows, these come from different projects, and several
of these parts are incompatible.

<p> There are three main collections of office software for Linux; OpenOffice,
KOffice, and GNOME Office. Because components are incompatible, if I use KWord,
I can't use Gnumeric for my embedded sales figures. I have to use KSpread. If
I use OOCalc, I can't have an embedded Dia drawing.

<p> As I mentioned, KDE, GNOME, OpenOffice, and Mozilla each have different
component systems. Now, the situation isn't as bad as it could have been, 
as the nice people at Sun have written software to allow OpenOffice to be 
used as a Bonobo component, as a Netscape plugin, and to access XPCOM
components, which they use for various purposes; and KDE have a technology
called XParts which allows non-KDE components to be embedded as KParts
(though not without a little hacking - only Mozilla is supported, though
there is also the <a
href="http://kde.openoffice.org/cuckooo/index.html">Cuckooo</a> project to
use OOo as a KPart), as well as <a
href="http://dot.kde.org/1073668213/">QtGtk</a>, which allows Gtk
apps to use Qt dialogues - software using this library could, for example, 
display the KDE file dialogue, which allows KDE's IOSlaves to work within the 
GNOME app (Ars Technica has an <a 
href="http://arstechnica.com/reviews/004/software/kde-3.2/kde-3.2-01.html">overview</a> 
of KDE's technologies). There is also a <a 
href="http://www.nongnu.org/moz-bonobo/">Bonobo plugin</a> for Mozilla. 

<p> Other compatibility problems exist; but these are being tackled, mainly 
due to the work of <a href="http://www.freedesktop.org">freedesktop.org</a>. 
<a href="http://www.freedesktop.org/Software/gtk-qt">Gtk-Qt</a> is an example
of this in action; it unifies the themes of Gtk and Qt, so users can have a
common look on their desktop. 

<h2>Visual Basic</h2>

<p> Now, when I say Visual Basic, I mean the component-oriented type of 
programming which VB allows, which can easily apply to Delphi, or any other
programming language available for Windows. But VB is the most popular
language on Windows, so I use it for the purposes of this article.

<p> There are several reasons behind the popularity of Visual Basic: Graphical
GUI design, simple syntax, easy access to COM objects, and easy access to DLLs
written in C. GUI designers are available for Linux: there's Glade for GNOME,
QtDesigner for KDE, etc. Simple syntax is also not a problem: Python has at
least the same level of simplicity. 

<p> That leaves access to components, and to libraries. Access to libraries 
isn't much of a problem, as for most common libraries, it's only a matter of 
time before someone writes a wrapper. Access to components, as mentioned 
earlier, is possible, but your choice is limited.

<p> For a VB programmer, it's a common task to use Internet Explorer to grab 
some figures from a web site, use Excel to perform calculations on
them, insert them into an Access database, mail them with Outlook etc. It's
just as easy to grab those figures from Mozilla, to use Lotus 123 for
calculations etc. (Though I should note that in reality, most people won't
<em>want</em> to use components from other desktops/office suites).

<p> On the plus side, there are technologies such as <a
href="http://oss.software.ibm.com/developerworks/opensource/sashxb/">Sash
XB</a> out there!

<h2>.Net</h2>

<p> .Net is Microsoft's newest baby. .Net languages target the CLR, or Common 
Language Runtime, which is like the Java runtime, but with
extensions to support several languages. Programs written in one .Net
language can access libraries written in another through the CLR. 

<p> .Net, especially when considered with C#, is seen by many as Microsoft's 
reaction to losing the lawsuit Sun brought against them after
they made incompatible changes to Java. .Net, however, is also an
extension to the COM + VB programming environment which Microsoft already
had. It provides a class library with all of the different facilities of
the Windows/COM API, which the <a href="http://www.go-mono.com">Mono</a>
team are making great effort at implementing.

<p> There are two important things about .Net from a Linux point of view;
firstly, that there are <em>two</em> projects which aim to implement it:
Mono and DotGNU <a 
href="http://www.southern-storm.com.au/portable_net.html">Portable .Net</a>; 
secondly, that Microsoft is designing a completely new API for it, so that
these projects have less catching up to do than the Wine project does. 

<p> Plus, if you want to have an embeddable virtual machine which supports
several languages, and will most likely have a large and varied class 
library, you can always follow the progress of <a 
href="http://www.parrotcode.org/">Parrot</a>, which is still being
designed, but will host Perl 6 and (a version of) Python by the time it's 
finished.

<h2>The technologies</h2>

<a name="dde"></a>
<h3>DDE</h3>

<p> DDE, or Dynamic Data Exchange, is a protocol which allows Windows 
applications to exchange data. Data is exchanged in the form of short
messages, which contain either a short item of data, or a pointer to a 
location in memory where this data is available.

<p> DDE is deprecated.

<a name="ole"></a>
<h3>OLE</h3>

<p> OLE stands for Object Linking and Embedding. OLE was originally intended to
complement DDE, and to provide a simple method of linking files, so that. for 
example a spreadsheet linked from a word processor would have the latest 
figures; and embedding the application, so that the user would be able to edit
the spreadsheet without exiting the word processor.

<p> On Linux, KDE has KParts, while GNOME has Bonobo. Bonobo is quite similar
to the Windows design, as it uses CORBA interfaces which are very much like the
interfaces used in Windows. KParts however, is a much simpler technology. A
KPart is a shared library written in C++ which implements an interface. This
library is accompanied by an XML file which describes the menu items the
KPart provides. This allows for similar embedding, with a much less 
complicated framework. KParts use DCOP to communicate with each other.

<a name="vbx"></a>
<h3>VBX</h3>

<p>VBX, or Visual Basic eXtensions, also called "custom controls", were 
introduced as a way of extending Visual Basic. Built on the embedding of OLE,
custom controls were intended as a way of allowing component reuse. Controls
could be added to the form (the "canvas" of VB's GUI designer) of a program,
where they provided customised GUI elements, with their own properties and
methods. For example, a VB programmer wishing to display an image would include
an image control, setting the appropriate property to provide the location of
the image. 

<p>VBX is an obsolete technology.

<a name="oleaut"></a>
<h3>OLE Automation</h3>

<p>OLE Automation is a set of COM interfaces used to present functions in an
<a href="#ocx">ActiveX</a> object, or other program, in a standard way.
Automation also provides a system like Java's reflection. This is used in
VB to provide code completion, for example.

<p> Despite Eric Raymond's <a
href="http://www.catb.org/~esr/writings/taoup/html/ch03s02.html#nt_contrast">assertion</a>
that "Most programs cannot be scripted at all. Programs rely on complex,
fragile remote procedure call (RPC) methods to communicate with each other",
most large programs <em>do</em> provide OLE interfaces. (See <a
href="#com">DCOM</a> to find out about the RPC part.

<a name="ocx"></a>
<h3>OCX/ActiveX</h3>

<p> OCX, or OLE Control eXtensions, were an extended version of VBX designed
for 32-bit versions of Windows. VBX was a popular idea, and Borland's Delphi 
was able to use them. This, perhaps, convinced Microsoft that the idea would 
prove useful in their other languages, so they made OCXs a part of Windows.

<p> OCX was later rebranded ActiveX, though this term was later used to refer
to COM and other related technologies, when Microsoft extended Internet 
Explorer to act as an OCX container, as a reaction to Java applets and
Netscape plugins. ActiveX components could be run on demand, like applets,
but could also be installed, like plugins. Microsoft didn't pay as much 
attention to security as Sun did, though, and after the bad publicity ActiveX's
security received, few use them as anything other than plugins.

<p> <a 
href="http://webcvs.kde.org/cgi-bin/cvsweb.cgi/kdenonbeta/reaktivate/">Reaktivate</a>
is a KDE extension which uses Wine to allow ActiveX controls in Konqueror. 
There is a <a href="http://www.iol.ie/~locka/mozilla/plugin.htm">Mozilla 
ActiveX plugin</a>, but as this is a Windows plugin, you'll either need to
have the Crossover plugin (and note that this is no longer sold separately from
Crossover Office), or install the Windows version of Mozilla using Wine. (The
Wine project eventually wish to use the Mozilla code, but as the current code
is written using ATL, this would involve a large rewrite).

<p> For equivalents, see <a href="#ole">OLE</a>, though it's worth noting 
that with Mozilla, it's now possible to write ActiveX-like components in Java.

<a name="axscript"></a>
<h3>Active Script</h3>

<p> Active Script is an OLE technology which allows scripting languages to be 
used in any "host" application. This was (probably) a result of the work being 
done to add Javascript to Internet Explorer in addition to ASP. Active Script
languages can access any function exposed through <a href="#oleaut">Automation</a>.

<p> The result is, for example, Perl in ASP and Python in web pages. 

<p> OpenOffice.org has a similar technology. Mono and Parrot will probably add
this on a widespread basis.

<a name="com"></a>
<h3>COM/DCOM</h3>

<p> COM, or Component Object Model, is an extension to OLE which also took in
OCX, based on a modified version of DCE/RPC. Previously, object interfaces
were specified using ODL (Object Description Language); with COM, these
were specified using DCE IDL, with an extended syntax. DCOM stands for 
"Distributed COM". The only real difference here is that when an object is
accessed on the same machine, it is accessed in the same way as a C++ class is,
but if the object is on another machine, the RPC mechanism is used.

<p> In Linux land, Samba implements quite a lot of DCOM. They are currently
working on making it easier to write programs which use the Samba 
infrastructure to access DCOM objects. There is a lot of work going on in Wine
at the moment which is aimed at getting RPC working.

<p> DCOP is based on X's libICE, and Bonobo is based on CORBA, so both KDE and
GNOME are as network transparent as Windows when it comes to accessing remote
objects.

<a name="asp"></a>
<h3>ASP</h3>

<p> ASP, Active Server Pages, is an <a href="#axscript">Active Script</a>
based way of generating web pages. 

<p> There have been several attempts to clone ASP for Linux. <a 
href="http://wwws.sun.com/software/chilisoft/">Sun Java System Active 
Server Pages</a> (formerly SunONE ASP, formerly Chilisoft ASP) is possibly the 
best known, though it is a proprietary product. 

<p> Of open source attempts, there are <a 
href="http://www.tripi.com/arrowhead/">Arrowhead ASP</a>, a Java 
implementation, which requires all objects to be reimplemented in Java (though
if Wine becomes usable as a library, <a 
href="http://jawinproject.sourceforge.net/">Jawin</a> could remove this 
requirement); <a href="http://asp2php.naken.cc/">ASP2PHP</a>, which converts
ASP (VBscript) to PHP; and ASP.NET in Mono.

<a name="ado"></a>
<h3>ADO</h3>

<p> ADO, Active Data Objects, is an Automation based interface to databases,
similar to Perl's DBI. ADO is based on OLE DB, an earlier framework aimed at
systems programmers. OLE DB is little used, as it is a very complicated, low 
level API, though programmers who wish to provide access to a new database 
must first write an "OLE DB Provider" (to continue with the Perl comparison, 
this is similar to a DBD module) before ADO programmers can use the database. 

<p> GNOME's <a href="http://www.gnome-db.org/">GNOME DB</a> is an ADO 
influenced library, which is similar enough that Mono used it to implement 
their version of ADO.NET. KDE, through the Qt library it's based on, also has 
a set of libraries for accessing databases.

<a name="jdirect"></a>
<h3>J/Direct</h3>

<p> Worth a brief mention, J/Direct is the extension to Java that Sun sued
Microsoft over. J/Direct provided extra syntax for Javadoc comments which
specified how a DLL function or COM object was to be accessed, as well as a 
set of attributes for compiled Java classes.

<p> This technology is obsolete now, but lives on in Microsoft's J# for .Net.
Portable .Net provides a Java compiler, though it doesn't accept either 
J/Direct or J# extensions; neither does <a 
href="http://weblog.ikvm.net/">IKVM</a>, a Java VM for .Net which comes with
Mono.

</p>



<!-- *** BEGIN author bio *** -->
	<!-- *** BEGIN bio *** -->
<hr>
<P>
<img ALIGN="LEFT" ALT="[BIO]" SRC="../gx/authors/oregan.jpg" class="bio">
<em>
Jimmy has been using computers from the tender age of seven, when his father 
inherited an Amstrad PCW8256. After a few brief flirtations with an Atari ST
and numerous versions of DOS and Windows, Jimmy was introduced to Linux in 1998
and hasn't looked back.

<P> Jimmy is a father of one, a techno-savvy seven year-old called Mark. In
the spare time he enjoys outside of his personal circle of Hell, working in a
factory, Jimmy likes to play guitar and edit Wikipedia.
</em>
<br CLEAR="all">
<!-- *** END bio *** -->

<!-- *** END author bio *** -->




<div id="articlefooter">



<p>
Copyright &copy; 2004, <A HREF="../authors/oregan.html">Jimmy O'Regan</A>. Released under the
<a href="http://linuxgazette.net/copying.html">Open Publication license</a>
</p>



<p>
Published in Issue 104 of Linux Gazette, July 2004
</p>

</div>

</div>

<div id="navigation">

<a href="../index.html">Home</a>
<a href="../faq/index.html">FAQ</a>
<a href="../lg_index.html">Site Map</a>
<a href="../mirrors.html">Mirrors</a>
<a href="../mirrors.html">Translations</a>
<a href="../search.html">Search</a>
<a href="../archives.html">Archives</a>
<a href="../authors/index.html">Authors</a>
<a href="../contact.html">Contact Us</a>
</div>

<div id="breadcrumbs">

<a href="../index.html">Home</a> &gt;
<a href="index.html">July 2004 (#104)</a> &gt;
TWDT

</div>


<img src="../gx/2003/sit3-shine.7-2.gif" id="tux" alt="Tux"/>

<br />


<div class="content lgcontent">

<a name="oregan3"></a>
<h1>Front and Back: KPGP and GPG</h1>
<p id="by"><b>By <A HREF="../authors/oregan.html">Jimmy O'Regan</A></b></p>


</b>
</p>


<p>
<P> One of the virtues of Linux is that its Unix heritage has given it a 
powerful command line. Using the command line can be difficult though, and
many people prefer to use GNOME or KDE to do their work. Fortunately, many
developers choose to embrace Larry Wall's virtue of "laziness", and instead of
choosing to reinvent the wheel, they create user friendly front-ends to common
CLI apps.

<P> This is the first article of an occasional series which intends to look
at some of these front-ends, show the new user how to use them, and, most
importantly, provide the corresponding commands for the "back-end" command for
future reference - you never know when you might need to do something over an
SSH connection, after all!

<h2>KGPG and GPG</h2>

<p> KGPG is a front-end to GPG, the GNU Privacy Guard. GPG was created to 
replace PGP, the popular encryption program. GPG is a common component in a
Linux system - almost all package utilities use it for verification, for 
example.

<P> GPG is an implementation of OpenPGP (<a 
href="http://www.faqs.org/rfcs/rfc2440.html">RFC 2440</a>), a standard created
around the workings of PGP, to provide security for, among other things, e-mail.
PGP/GPG is best known as an implementation of <a 
href="http://en.wikipedia.org/wiki/Public-key_cryptography">public-key 
cryptography</a> - each user has two keys, a public key, and a private key.
If I want to send encrypted e-mail to Mark, I encrypt it using my private key
and his public key; Mark is then able to decrypt it using his private key and
my public key.

<P> The most common use of GPG, however, is as a way of digitally signing 
something - normally e-mail, or as mentioned earlier, software packages - so
the recipient can verify that the item came from the person who claims to
have sent it. 

<h2>Starting KGPG</h2>

<img src="misc/oregan/kgpg-start.png" alt="KGPG Wizard">

<P> When you start KGPG for the first time, it presents a Wizard which helps
you to set up GPG. It's OK to follow the defaults. The final step, and the
one we're interested in, is the key generation dialogue.

<P><img src="misc/oregan/kgpg-genkey.png" alt="Generate a key">

<P> KGPG's key generation dialogue contains the common defaults, all you need
to do is enter your name and e-mail address in the appropriate areas, and click
OK. Note that "Expert Mode" provides you with a shell, and runs GPG for you.

<P><img src="misc/oregan/kgpg-generated.png" alt="After generation"> 

<P> KGPG then presents you with a dialogue containing your signature's Key ID
and Fingerprint. It also offers to create a Revocation Certificate. You should
use this option - the best option is to chose "Save as", move the file 
somewhere safe, and delete it from your computer. This is an option I wish I
had taken advantage of - there are two old keys belonging to me floating around
that I wish I could get rid of!

<P> If you want to generate a Revocation Certificate at any later stage, simply
right click on the key in KGPG's Key Management window, and select "Revoke Key".

<h2>Starting with GPG</h2>

<P> Generating a key pair in GPG is just as easy: using the command <tt>gpg 
--keygen</tt> you are offered the same defaults as in KGPG, simply press the
'Enter' key to accept them and type 'y' followed by 'Enter' when asked "Is this
correct". When asked, enter your name and e-mail address..

<P> Here is a sample key generation session:

<pre class="code">
[foo@dhcppc0 foo]$ gpg --gen-key
gpg (GnuPG) 1.2.4; Copyright (C) 2003 Free Software Foundation, Inc.
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions. See the file COPYING for details.

Please select what kind of key you want:
   (1) DSA and ElGamal (default)
   (2) DSA (sign only)
   (4) RSA (sign only)
Your selection?
DSA keypair will have 1024 bits.
About to generate a new ELG-E keypair.
              minimum keysize is  768 bits
              default keysize is 1024 bits
    highest suggested keysize is 2048 bits
What keysize do you want? (1024)
Requested keysize is 1024 bits
Please specify how long the key should be valid.
         0 = key does not expire
      <n>  = key expires in n days
      <n>w = key expires in n weeks
      <n>m = key expires in n months
      <n>y = key expires in n years
Key is valid for? (0)
Key does not expire at all
Is this correct (y/n)? y

You need a User-ID to identify your key; the software constructs the user id
from Real Name, Comment and Email Address in this form:
    "Heinrich Heine (Der Dichter) <heinrichh@duesseldorf.de>"

Real name: Foo McBar
Email address: foo@bar.com
Comment:
You selected this USER-ID:
    "Foo McBar &lt;foo@bar.com&gt;"

Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? o
You need a Passphrase to protect your secret key.

We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
+++++.++++++++++.+++++++++++++++++++++++++.++++++++++++++++++++++++++++++..+++++
+++++.+++++++++++++++..+++++.+++++..+++++.+++++++++++++++.+++++&gt;+++++.+++++&gt;
+++++......&lt;++++++++++
public and secret key created and signed.
key marked as ultimately trusted.
</pre>

<p> To generate a revocation certificate, you can use <tt>gpg --gen-revoke</tt>.
You need to give GPG some way of identifying which key you wish to create a 
certificate for - GPG can make use of several key pairs, which is useful if you
want to keep separate identities for work and private use, or if you use a 
pseudonym for whatever reason.

<pre class="code">
[foo@dhcppc0 foo]$ gpg --gen-revoke "Foo McBar"

sec  1024D/EA4A9540 2004-06-28   Foo McBar &lt;foo@bar.com&gt;

Create a revocation certificate for this key? y
Please select the reason for the revocation:
  0 = No reason specified
  1 = Key has been compromised
  2 = Key is superseded
  3 = Key is no longer used
  Q = Cancel
(Probably you want to select 1 here)
Your decision? 3
Enter an optional description; end it with an empty line:
&gt;
Reason for revocation: Key is no longer used
(No description given)
Is this okay? y

You need a passphrase to unlock the secret key for
user: "Foo McBar <foo@bar.com>"
1024-bit DSA key, ID EA4A9540, created 2004-06-28

ASCII armored output forced.
Revocation certificate created.

Please move it to a medium which you can hide away; if Mallory gets
access to this certificate he can use it to make your key unusable.
It is smart to print this certificate and store it away, just in case
your media become unreadable.  But have some caution:  The print system of
your machine might store the data and make it available to others!
</pre>

<h2>Importing Keys</h2>

<img src="misc/oregan/kgpg-findkey.png" alt="Find a key">

<p> To find a key with KGPG, choose "File-&gt;Key Server Dialogue". In the
dialogue, enter the name, e-mail address or Key ID of the key you wish to 
import. If there are multiple matches, you are presented with a dialogue from
which you can choose the correct key.

<P><img src="misc/oregan/kgpg-selectkey.png" alt="Select a key">

<p> To do this in GPG, use <tt>gpg --search-key "Something to find"</tt>, where
"Something to find" is a name, e-mail address or Key ID. If there are multiple
matches, GPG also prompts you to make a selection:

<pre class="code">
[foo@dhcppc0 foo]$ gpg --search-keys "Jimmy O'Regan"
gpg: searching for "Jimmy O'Regan" from HKP server subkeys.pgp.net
Keys 1-3 of 3 for "Jimmy O'Regan"
(1)     Jimmy O'Regan &lt;jimregan@o2.ie&gt;
          1024 bit DSA key 773730F8, created 2004-06-19
(2)     Jimmy O'Regan &lt;jimregan@o2.ie&gt;
          1024 bit DSA key DA974449, created 2004-06-05
(3)     Jimmy O'Regan &lt;jimregan@lit.compsoc.com&gt;
          1024 bit DSA key FF5D8291, created 2000-08-22
Enter number(s), N)ext, or Q)uit &gt; 1
gpg: key 773730F8: "Jimmy O'Regan &lt;jimregan@o2.ie&gt;" imported
gpg: Total number processed: 1
gpg:               imported: 1
</pre>

<p> Note that if you don't have a keyserver set up in <tt>~/.gnupg/gpg.conf</tt>
you can add the option <tt>--keyserver [keyserver]</tt>. For example:

<pre class="code">
gpg --keyserver subkeys.pgp.net --search-keys "Jimmy O'Regan"
</pre>

<p> If you already have a public key in a file, you can import it into KGPG
using "Keys-&gt;Import Key", where you can either enter the file name, or
browse to it. This dialogue also gives the option to import from the clipboard -
I found this useful when I needed to contact Linux Gazette's sys admin, Kayos,
who keeps his key on his <a href="http://genetikayos.com/contact.html">contacts 
page</a>.

<p> In GPG, to import from a file, use <tt>gpg --import filename</tt>. Note
that this accepts standard pipes, so there are ways of emulating KGPG's
clipboard input. The way most likely to work everywhere is to use a "here
document":

<pre class="code">
[foo@dhcppc0 jimmy]$ gpg --import &lt;&lt;EOF
&gt; <em>(paste public key)</em>
&gt;EOF
</pre>

<p> Getting the contents of X's clipboard came up recently on <a 
href="../tag/ask-the-gang.html">The Answer Gang</a>, where Ben pointed to his
<a href="http://linuxgazette.net/issue78/lg_tips.html#tips/2">xclip tip</a>
from Issue 78. To use this with GPG, you could try:
<pre class="code">xclip -o|gpg --import</pre>

<p>Alternatively, if you use KDE, but don't use KGPG, you could try:
<pre class="code">dcop klipper klipper getClipboardContents|gpg --import</pre>

<h2>Viewing keys</h2>

<img src="misc/oregan/kgpg-main.png" alt="KGPG Key Management">
<p> There are no special steps to take in KGPG to view keys or signatures -
the Key Management window displays all of the keys in your keyring. You can
click on the '+' beside each key name to see alternate UIDs, signatures,
photo IDs etc. If you wish, you can have photo IDs appear in the main window
by selecting one of the options in "View-&gt;Photo IDs".

<p> In GPG, you can use one of several options, depending on what you want to
view. If you wish to view public keys, use <tt>--list-keys</tt>; if you wish
to view secret keys, use <tt>--list-secret-keys</tt>; and if you wish to view
public keys and their signatures, use <tt>--list-sigs</tt>. With all of these
options, if you specify a name, GPG will print only the details for that name.

<h2>Exporting Keys</h2>

<p> To export your public key in KGPG, choose "Keys-&gt;Export Public Keys", or
type <tt>Ctrl-C</tt>. This offers to export the key in an e-mail, to the 
clipboard, to the default keyserver, or to a file - <tt>$HOME/$USER.asc</tt> by
default.

<p> In GPG, to export a key, use <tt>gpg --export -a [key id]</tt>. The 
<tt>-a</tt> option is important if you want to use the key in e-mail, as it
encodes the key in ASCII "armor". If you don't specify the Key ID, the default
behaviour is to export <em>all</em> keys, which is probably not what you want.

<h2>Alternate IDs</h2>

<p> If you have multiple e-mail addresses, and wish to use the same key for
each of them, you may wish to add an extra User ID. In KGPG, simple right
click on the file and select "Add User ID". This presents you with a 
dialogue which asks for a name, e-mail address and optional comment. 

<p> In GPG, use <tt>gpg --edit-key [key id]</tt>. This gives you a prompt
saying <tt>Command&gt;</tt>. At this prompt, type <tt>adduid</tt>, and enter
the name, e-mail, and optional comment as prompted.

<p> To add a photo ID in KGPG, right click on the name you wish to add a photo
for, choose "Add Photo", and browse to the location of the file. In GPG, you
must again use <tt>gpg --edit-key</tt>. This time, from the <tt>Command&gt;</tt>
prompt, type <tt>addphoto</tt>. When prompted, type the path to the photo.

<p> It's important to point out that KGPG, or at least KGPG 1.1, as shipped 
with Mandrake 10.0, sets a new UID as the primary UID, rather than as an 
alternate, as GPG does. To change the primary UID, you must use GPG's edit
mode. Select the number of the UID, following the steps above, and use the
<tt>primary</tt> command.

<h2>Deleting</h2>

<p> In KGPG, this is very simple. Select the key or signature you wish to 
delete, and press the 'Delete' key. It's not possible to delete all signatures
from KGPG, however - signatures on an alternate UID or Photo ID must be 
deleted from the command line. You can quickly gain access to GPG from
"Keys-&gt;Edit in Terminal", or by pressing <tt>Alt-Enter</tt>.

<p> In GPG, to delete a public key, use <tt>gpg --delete-keys [key id]</tt>;
to delete a secret key, use <tt>gpg --delete-secret-keys [key id]</tt>.
To delete a signature, you must again use the edit mode. GPG enumerates the
UIDs of the key for you. To work on an UID, type its number. GPG will then
list each UID again, with an asterisk beside each selected key. Use the
<tt>delsig</tt> command to delete a signature. GPG will prompt you with each
signature in turn; type 'y', 'n', or 'q' followed by 'Enter' to delete, skip a
signature, or leave the delsig mode, respectively. Simply hitting 'Enter'
chooses the default action, which is to skip the signature.

<h2>Key Signing</h2>

<p> To sign a key, first import it. In KGPG, choose "Keys-&gt;Sign Key(s)";
in GPG, use <tt>gpg --sign-key [key id]</tt>. Both will prompt you to confirm
this, and both will ask how well you have verified the identity of the owner
of the key. In GPG this appears as:

<pre class="code">
   (0) I will not answer. (default)
   (1) I have not checked at all.
   (2) I have done casual checking.
   (3) I have done very careful checking.
</pre>

<p> If you cannot say that you have done very careful checking, it is 
recommended that you don't sign the key at all. Once you have signed the key,
you should export it, so the owner can import your signature. For more 
information on key signing, see the <a 
href="http://www.cryptnet.net/fdp/crypto/gpg-party.html">GPG Keysigning Party 
HOWTO</a> or <a href="http://www.debian.org/events/keysigning">Debian's 
Keysigning guide</a>.

<h2>Encrypting, decrypting and signing</h2>

<p> With KGPG installed, you can encrypt any file you wish from Konqueror by
right clicking, and selecting "Actions-&gt;Encrypt File"; or by dropping it
onto the KGPG icon in the System Tray. Select the person you wish to receive
the file, and KGPG will create an ASCII encoded version of the encrypted file.
To decrypt, you similarly drag the file onto the System Tray.

<P> In GPG, use <tt>gpg -e [filename]</tt>, and enter the Key ID when prompted.
You can then use <tt>gpg --enarmor [filename]</tt> to ASCII encode it. Use
<tt>gpg --decrypt [filename]</tt> to decrypt.

<P> To sign files in KGPG, you must first change the settings to allow it.
Go to "Settings-&gt;Configure KGpg"; in the "User Interface" pane, set "Event on 
unencrypted file drop" to "Ask" (or "Sign" if you have no intention of using
encryption). This allows you to drop files onto the System Tray for signing.

<p> In GPG, to sign a file use <tt>gpg --sign [filename]</tt>. You may ASCII
encode this, as for encryption, if you wish to email the file.

<h2>Conclusion</h2>

<p> I hope someone out there finds this useful - if even one KGPG user finds a
corresponding GPG command using this, I'll be happy. If anyone found it useful 
as an introduction to either KGPG or GPG, feel free to send me encrypted e-mail
- my public key is available <a href="misc/oregan/jimregan.asc">here</a>. Until 
next time, take care!

<h2>P.S.</h2>

I'd like to take a moment to correct an error in <a
href="../103/oregan.html">last month's article on Mozilla extensions</a>, and 
to thank those who pointed it out.

<p> Mentioning PopUpALT, I said "This feature, which was present in Netscape
4, was removed from Mozilla for some unknown reason." What I <em>meant</em> to
say was "for some reason I haven't discovered".

<p> Marcin Gil was the first to write, saying "The PopupALT was probably
removed from Mozilla because (as my memory recalls correctly) the ALT
attribute is for screen readers, text browsers etc. Such a use is recommended
by W3C in XHTML specs (I think Jeffrey Zeldman writes it in his book). TITLE
attribute is for popping up texts.."

<p> Crystle clarified this: "In fact, the W3 says that the alt tag should be
used very carefully, and I've seen some really long alt tags - this causes
problems if your browser translates to voice or braille, which is the purpose
for the alt tag. <br>
See: <a
href="http://www.w3.org/TR/html401/struct/objects.html#alternate-text">http://www.w3.org/TR/html401/struct/objects.html#alternate-text</a>

<p> To which Josh Ockert added: "The correct behavior is to display the
<b>*entire*</b> value of an alt attribute if the image is not loaded."


</p>



<!-- *** BEGIN author bio *** -->
	<!-- *** BEGIN bio *** -->
<hr>
<P>
<img ALIGN="LEFT" ALT="[BIO]" SRC="../gx/authors/oregan.jpg" class="bio">
<em>
Jimmy has been using computers from the tender age of seven, when his father 
inherited an Amstrad PCW8256. After a few brief flirtations with an Atari ST
and numerous versions of DOS and Windows, Jimmy was introduced to Linux in 1998
and hasn't looked back.

<P> Jimmy is a father of one, a techno-savvy seven year-old called Mark. In
the spare time he enjoys outside of his personal circle of Hell, working in a
factory, Jimmy likes to play guitar and edit Wikipedia.
</em>
<br CLEAR="all">
<!-- *** END bio *** -->

<!-- *** END author bio *** -->




<div id="articlefooter">



<p>
Copyright &copy; 2004, <A HREF="../authors/oregan.html">Jimmy O'Regan</A>. Released under the
<a href="http://linuxgazette.net/copying.html">Open Publication license</a>
</p>



<p>
Published in Issue 104 of Linux Gazette, July 2004
</p>

</div>

</div>

<div id="navigation">

<a href="../index.html">Home</a>
<a href="../faq/index.html">FAQ</a>
<a href="../lg_index.html">Site Map</a>
<a href="../mirrors.html">Mirrors</a>
<a href="../mirrors.html">Translations</a>
<a href="../search.html">Search</a>
<a href="../archives.html">Archives</a>
<a href="../authors/index.html">Authors</a>
<a href="../contact.html">Contact Us</a>
</div>

<div id="breadcrumbs">

<a href="../index.html">Home</a> &gt;
<a href="index.html">July 2004 (#104)</a> &gt;
TWDT

</div>


<img src="../gx/2003/sit3-shine.7-2.gif" id="tux" alt="Tux"/>

<br />


<div class="content lgcontent">

<a name="qubism"></a>
<h1>Qubism</h1>
<p id="by"><b>By <A HREF="../authors/harsem.html">Jon "Sir Flakey" Harsem</A></b></p>


</b>
</p>


<p>
<P>
<EM>These images are scaled down to minimize horizontal scrolling.
	To see a panel in all its clarity, click on it.</EM>


<P>

<A HREF="misc/qubism/qb-connected.jpg">
<IMG ALT="[cartoon]" SRC="misc/qubism/qb-connected.jpg" 
	WIDTH="640" HEIGHT="240"></A>
<BR CLEAR="all">






<P>

All Qubism cartoons are
<A HREF="http://www.core.org.au/index.php?cat=9">here</A>
at the CORE web site.

</p>



<!-- *** BEGIN author bio *** -->
	<!-- *** BEGIN bio *** -->
<hr>
<P>
<img ALIGN="LEFT" ALT="[BIO]" SRC="../gx/2002/note.png" class="bio">
<em>
Jon is the creator of the Qubism cartoon strip and current
Editor-in-Chief of the 
<A HREF="http://www.core.org.au/">CORE</A> News Site.  
Somewhere along the early stages of
his life he picked up a pencil and started drawing on the wallpaper.  Now
his cartoons appear 5 days a week on-line, go figure. He confesses to
owning a Mac but swears it is for "personal use".
</em>
<br CLEAR="all">
<!-- *** END bio *** -->

<!-- *** END author bio *** -->




<div id="articlefooter">



<p>
Copyright &copy; 2004, <A HREF="../authors/harsem.html">Jon "Sir Flakey" Harsem</A>. Released under the
<a href="http://linuxgazette.net/copying.html">Open Publication license</a>
</p>



<p>
Published in Issue 104 of Linux Gazette, July 2004
</p>

</div>

</div>

<div id="navigation">

<a href="../index.html">Home</a>
<a href="../faq/index.html">FAQ</a>
<a href="../lg_index.html">Site Map</a>
<a href="../mirrors.html">Mirrors</a>
<a href="../mirrors.html">Translations</a>
<a href="../search.html">Search</a>
<a href="../archives.html">Archives</a>
<a href="../authors/index.html">Authors</a>
<a href="../contact.html">Contact Us</a>
</div>

<div id="breadcrumbs">

<a href="../index.html">Home</a> &gt;
<a href="index.html">July 2004 (#104)</a> &gt;
TWDT

</div>


<img src="../gx/2003/sit3-shine.7-2.gif" id="tux" alt="Tux"/>

<br />


<div class="content lgcontent">

<a name="ramankutty"></a>
<h1>Inter-Process Communication - Part 1</h1>
<p id="by"><b>By <A HREF="../authors/ramankutty.html">Hiran Ramankutty</A></b></p>


</b>
</p>


<p>
<h2>Scope</h2>

<p>
The purpose of this article is to get the readers familiar with the different 
mechanisms that are available for communicating between two or more processes. 
This may also serve as a tutorial for the novice programmer. There might be 
several good tutorials on this subject, but here I will try to communicate my 
explorations of this subject. This article may not be technically perfect. 
Please send your suggestions and queries to <img src="../gx/authors/email/ramankutty.png">.
</p>

<h2>Introduction</h2>

<p>
Inter-Process Communication, which in short is known as IPC, deals mainly with 
the techniques and mechanisms that facilitate communication between 
processes. Now, why do we need special separate mechanisms or techniques for 
communicating between processes? Why isn't it possible to have information 
shared between two processes without using such special mechanisms?
</p>

<p>
Let us start from something primitive. Imagine you have two glasses completely 
filled with water. One glass contains hot water and the other contains cold 
water. What can you do to make the temperature of water in both the glasses 
equal? The simplest answer will be to mix the water from both the glasses 
in a glass with much bigger capacity. Once water is mixed, the temperature 
becomes equal after some time. If one can remember, this will be framed as a 
problem with some numerical data in a High-School Physics examination. If we go 
by principles, then the phenomenon here is conduction. If we go by our topic of 
IPC, then we can say that since the two glasses were full, we had to use another 
glass with a larger capacity to mix the contents in order to balance their heat energy.
</p>
<p>
Have you ever wondered about the communication medium used in telephones? What 
about the blood transporting system in the human body which communicates 
blood to different parts of the body? What about my fingers which are
typing this document? My brain is doing so many things at a time. How is it
directing one of my fingers to hit one key and some other finger to hit
another key? How is it synchronizing the typing work that is done by both
my hands? How is it also directing me to type the letters of a word that
are actually coming to my mind?
</p>

<p>
Don't worry. I am not going to give a class in Biology. But it would be good if 
one can imagine a few more situations where we are using inter-process 
communication, though not necessarily in the human body or in a computer 
program. 
</p>

<p>
So, where are we now? We know that some medium or other is required for 
communication between different processes. Similarly, when it comes to computer 
programs, we need some mechanism or medium for communication. Primarily, 
processes can use the available memory to communicate with each other. But 
then, the memory is completely managed by the operating system. A process will 
be allotted some part of the available memory for execution. Then each process 
will have its own unique user space. In no way will the memory allotted for
one process overlap with the memory allotted for another process. Imagine
what would happen otherwise!
</p>

<p>
So, now the question - how do different processes with unique address space 
communicate with each other? The operating system's kernel, which has access to 
all the memory available, will act as the communication channel. Similar to
our earlier example, where the glass with hot water is one process address
space, the glass with cold water is another, and the glass with the larger
capacity is the kernel address space, so that we pour both hot water and
cold water into the glass with larger capacity.
</p>

<p>
What next? There are different IPC mechanisms which come into use based on the
different requirements. In terms of our water glasses, we can determine the
specifics of both pouring the water into the larger glass and how it will
be used after beign poured.
</p>

<h2>Basic IPC</h2>

<p>
OK, enough of glasses and water. The IPC mechanisms can be 
classified into the following categories as given below:
</p>
<ol type="a">
<li>pipes 
<li>fifos
<li>shared memory
<li>mapped memory
<li>message queues
<li>sockets
</ol>

<h2>Pipes</h2>

<p>
Pipes were evolved in the most primitive forms of the Unix operating system. 
They provide unidirectional flow of communication between processes within the same 
system. In other words, they are half-duplex, that is, data flows in only one 
direction. A pipe is created by invoking the <tt>pipe</tt> system call,
which creates a pair of file descriptors. These descriptors 
point to a pipe inode and the file descriptors are returned through the 
<tt>filedes</tt> argument. In the file descriptor pair, <tt>filedes[0]</tt> is 
used for reading whereas <tt>filedes[1]</tt> is used for writing. 
</p>
<p>
Let me explain a scenario where we can use the <tt>pipe</tt> system call: 
consider a keyboard-reader program which simply exits after any alpha-numeric 
character is pressed on the keyboard. We will create two processes; one of 
them will read characters from the keyboard, and the other will
continuously check for alpha-numeric characters.  Let us see how the
<tt>filedes</tt> returned by <tt>pipe</tt> can be of use in this scenario:
(Text version: <a href="misc/ramankutty/kbdread-pipe.c.txt">kbdread-pipe.c.txt</a>)
</p>

<pre class="code">
/***** KEYBOARD HIT PROGRAM *****/
#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;sys/types.h&gt;
#include &lt;unistd.h&gt;
#include &lt;pthread.h&gt;
#include &lt;ctype.h&gt;

int filedes[2];

void *read_char()
{
	char c;
	printf("Entering routine to read character.........\n");
	while(1) {
		/* Get a character in 'c' except '\n'. */
		c = getchar();
		if(c == '\n')
			c = getchar();
		write(filedes[1], &amp;c, 1);
		if(isalnum(c)) {
			sleep(2);
			exit(1);
		}
	}
}

void *check_hit()
{
	char c;
	printf("Entering routine to check hit.........\n");
	while(1) {
		read(filedes[0], &amp;c, 1);
		if(isalnum(c)) {
			printf("The key hit is %c\n", c);
			exit(1);
		} else {
			printf("key hit is %c\n", c);
		}
	}
}
		
int main()
{
	int i;
	pthread_t tid1, tid2;
	pipe(filedes);
	/* Create thread for reading characters. */
	i = pthread_create(&amp;tid1, NULL, read_char, NULL);
	/* Create thread for checking hitting of any keyboard key. */
	i = pthread_create(&amp;tid2, NULL, check_hit, NULL);
	if(i == 0) while(1);
	return 0;
}
</pre>
<p>
Save and compile the program as <tt>cc filename.c -lpthread</tt>. Run the 
program and check the results. Try hitting a different key every time.
</p>
<p>
The <tt>read_char</tt> function simply reads a character other than '\n' from 
the keyboard and writes it to <tt>filedes[1]</tt>. We have the thread 
<tt>check_hit</tt>, which continuously checks for the character in 
<tt>filedes[0]</tt>. If the character in <tt>filedes[0]</tt> is an 
alpha-numeric character, then the character is printed and the program 
terminates. 
</p>

<p>
One major feature of <b>pipe</b> is that the data flowing through the 
communication medium is transient, that is, data once read from the read 
descriptor cannot be read again. Also, if we write data continuously into the 
write descriptor, then we will be able to read the data only in the order in 
which the data was written. One can experiment with that by doing successive 
<tt>write</tt>s or <tt>read</tt>s to the respective descriptors.
</p>

<p>
So, what happens when the <tt>pipe</tt> system call is invoked? A good look at 
the manual entry for <tt>pipe</tt> suggests that it creates a pair of file
descriptors. This suggests that the kernel implements <tt>pipe</tt> within
the file system. However, <tt>pipe</tt> does not actually exist as such -
so when the call is made, the kernel allocates free inodes and creates a
pair of file descriptors as well as the corresponding entries in the file
table which the kernel uses. Hence, the kernel enables the user to use the
normal file operations like <tt>read, write</tt>, etc., which the user does
through the file descriptors. The kernel makes sure that one of the
descriptors is for reading and another one if for writing.
</p>

<p>
I am not going to go into the details of the <tt>pipe</tt> implementation on the 
kernel side. For further reading, one can refer the books mentioned at the end 
of this article.
</p>

<h2>FIFOs</h2>

<p>
<b>FIFOs</b> (first in, first out) are similar to the working of <b>pipes</b>. 
<b>FIFOs</b> also provide half-duplex flow of data just like <b>pipes</b>. The 
difference between <b>fifos</b> and <b>pipes</b> is that the former is 
identified in the file system with a name, while the latter is not. That is, 
<b>fifos</b> are named pipes. <b>Fifos</b> are identified by an access 
point which is a file within the file system, whereas <b>pipes</b> are 
identified by an access point which is simply an allotted inode. Another 
major difference between <b>fifos</b> and <b>pipes</b> is that <b>fifos</b> 
last throughout the life-cycle of the system, while <b>pipes</b> last only 
during the life-cycle of the process in which they were created. To make it 
more clear, <b>fifos</b> exist beyond the life of the process. Since they are 
identified by the file system, they remain in the hierarchy until explicitly 
removed using <tt>unlink</tt>, but <b>pipes</b> are inherited only by related 
processes, that is, processes which are descendants of a single process. 
</p>

<p>
Let us see how a <tt>fifo</tt> can be used to detect a keypress, just as we
did with pipes. The same program where we previously used a <tt>pipe</tt>
can be modified and implemented using a <tt>fifo</tt>.
</p>

<p>
(Text version: <a
href="misc/ramankutty/write-fifo.c.txt">write-fifo.c.txt</a>)
</p>
<pre class="code">
/***** PROGRAM THAT READS ANY KEY HIT OF THE KEYBOARD*****/
#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;sys/types.h&gt;
#include &lt;unistd.h&gt;
#include &lt;pthread.h&gt;
#include &lt;ctype.h&gt;
#include &lt;sys/stat.h&gt;
#include &lt;fcntl.h&gt;
#include &lt;errno.h&gt;

extern int errno;

void *read_char()
{
	char c;
	int fd;
	printf("Entering routine to read character.........\n");
	while(1) {
		c = getchar();
		fd = open("fifo", O_WRONLY);
		if(c == '\n')
			c = getchar();
		write(fd, &amp;c, 1);
		if(isalnum(c)) {
			exit(1);
		}
		close(fd);
	}
}

int main()
{
	int i;
	pthread_t tid1;
	i = mkfifo("fifo", 0666);
	if(i &lt; 0) {
		printf("Problems creating the fifo\n");
		if(errno == EEXIST) {
			printf("fifo already exists\n");
		}
		printf("errno is set as %d\n", errno);
	}
	i = pthread_create(&amp;tid1, NULL, read_char, NULL);
	if(i == 0) while(1);
	return 0;
}
</pre>
<p>
Compile this program using <tt>cc -o write_fifo filename.c</tt>. This program 
reads characters (keypresses), and writes them into the special file 
<b>fifo</b>. First the program creates a <b>fifo</b> with read-write 
permissions using the function <tt>mkfifo</tt>. See the manual page for the 
same. If the <b>fifo</b> exists, then <tt>mkfifo</tt> will return the 
corresponding error, which is set in <tt>errno</tt>. The thread 
<tt>read_char</tt> continuously tries to read characters from the keyboard. 
</p>
<cite>Note that the fifo is opened with the <tt>O_WRONLY</tt> (write only) flag
</cite>.
<p>
Once it reads a character other than '\n', it writes the same into the write 
end of the <b>fifo</b>. The program that detects it is given below: (text 
version <a 
href="misc/ramankutty/detect_hit.c.txt">detect_hit.c.txt</a>):
</p>
<pre class="code">
/***** KEYBOARD HIT PROGRAM *****/
#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;sys/types.h&gt;
#include &lt;unistd.h&gt;
#include &lt;pthread.h&gt;
#include &lt;ctype.h&gt;
#include &lt;errno.h&gt;
#include &lt;fcntl.h&gt;
#include &lt;sys/stat.h&gt;

extern int errno;

void *check_hit()
{
	char c;
	int fd;
	int i;
	printf("Entering routine to check hit.........\n");
	while(1) {
		fd = open("fifo", O_RDONLY);
		if(fd &lt; 0) {
			printf("Error opening in fifo\n");
			printf("errno is %d\n", errno);
			continue;
		}
		i = read(fd, &amp;c, 1);
		if(i &lt; 0) {
			printf("Error reading fifo\n");
			printf("errno is %d\n", errno);
		}
		if(isalnum(c)) {
			printf("The key hit is %c\n", c);
			exit(1);
		} else {
			printf("key hit is %c\n", c);
		}
	}
}
		
int main()
{
	int i;
	i = mkfifo("fifo", 0666);
	if(i &lt; 0) {
		printf("Problems creating the fifo\n");
		if(errno == EEXIST) {
			printf("fifo already exists\n");
		}
		printf("errno is set as %d\n", errno);
	}
	pthread_t tid2;
	i = pthread_create(&amp;tid2, NULL, check_hit, NULL);
	if(i == 0) while(1);
	return 0;
}
</pre>
<p>
Here, again, it first tries to create a <b>fifo</b> which is created if it does 
not exist. We then have the thread <tt>check_hit</tt> which tries to read 
characters from the <b>fifo</b>. If the read character is alphanumeric, 
the program terminates; otherwise the thread continues reading 
characters from the <b>fifo</b>.
</p>
<cite>Here, the <b>fifo</b> is opened with the flag <tt>O_RDONLY</tt></cite>.

<p>
Compile this program with <tt>cc -o detect_hit filename.c</tt>. Now run the two 
executables in separate terminals, but in the same working directory. 
Irrespective of the order in which you run, look for the message <b>fifo 
already exists</b> on the console. The first program (either of the two) that 
you run will not give any error message for creation of the <b>fifo</b>. The 
second program that you run will definitely give you the error for creation of 
the <b>fifo</b>. In the terminal where you run <tt>write_fifo</tt>, give input 
to standard output from your keyboard. You will get the message regarding the 
key hit on the keyboard on the terminal running the executable 
<tt>detect_hit</tt>. Analyze the working of the two programs by hitting several 
keys.
</p>

<p>
I have used two different programs for exhibiting the usage of <b>fifos</b>. 
This can be done within a single program by forking the routines which are 
called in the two program as threads. But I did this to show that unlike 
<b>pipes</b>, <b>fifos</b> can be used for communication between unrelated 
processes.
</p>

<p>
Now try running the program again. You will get the message that the 
<b>fifo</b> already exists even when you first run either of the two programs. 
This shows that <b>fifos</b> are persistent as long as the system lives. That 
is, the <b>fifos</b> will have to be removed manually - otherwise they will be 
permanently recognized by the file system. This is unlike <b>pipes</b> which 
are inherited as long as the process that created the <b>pipe</b> is running. 
Once this process dies, the kernel also removes the identifiers (file 
descriptors) for the <b>pipe</b> from the the file tables.
</p>

<p>
The usage is rather simple and the main advantage is that there is no need for 
any synchronization mechanism for accesses to the <b>fifo</b>. There are 
certain disadvantages: they can only be used for communication between 
processes running on the same host machine. Let us explore other IPC mechanisms 
to see what have they in store.
</p>

<h2>Shared Memory</h2>

<p>
Shared Memory is one of the three kinds of System V IPC mechanism which enables 
different processes to communicate with each other as if these processes 
shared the virtual address space; hence, any process sharing the memory 
region can read or write to it. One can imagine some part of memory 
being set aside for use by different processes.
</p>

<p>
The System V IPC describes the use of the shared memory mechanism as
consisting of four steps. Taken in order, they are:
</p>
<ul>
<li>Fetching an identifier for the shared memory area - <tt>shmget</tt> (shared 
memory get)
<li>Using the identifier to get the shared memory address - <tt>shmat</tt> 
(shared memory attach),
<li>Detaching the shared memory area after use - <tt>shmdt</tt> (shared 
memory detach) and 
<li>Finally using the address to control accesses, permissions, receive 
information and destroy the shared memory area - <tt>shmctl</tt> (shared 
memory control).
</ul>

<p>
Let us examine the workings of the above system calls. Recall the keyboard
hit program; we shall, once again, see another version of it, this time
using the system calls associated with the shared memory mechanism.
</p>

<p>
The code given below creates a shared memory area and stores the
information of any key hit on the keyboard. Let us see the code first:
(text version: <a 
href="misc/ramankutty/write-shm.c.txt">write-shm.c.txt</a>)
</p>
<pre class="code">
#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;sys/types.h&gt;
#include &lt;sys/ipc.h&gt;
#include &lt;sys/shm.h&gt;
#include &lt;errno.h&gt;
#include &lt;string.h&gt;
#include &lt;ctype.h&gt;

extern int errno;

#define SIZE	1

char *read_key;
int shmid;

int shared_init()
{
	if((shmid = shmget(9999, SIZE, IPC_CREAT | 0666)) &lt; 0) {
		printf("Error in shmget. errno is: %d\n", errno);
		return -1;
	}
	if((read_key = shmat(shmid, NULL, 0)) &lt; 0) {
		printf("Error in shm attach. errno is: %d\n", errno);
		return -1;
	}
	return 0;
}

void read_char()
{
	char c;
	while(1) {
		c = getchar();
		if(c == '\n') {
			c = getchar();
		}
		strncpy(read_key, &amp;c, SIZE);
		printf("read_key now is %s\n", read_key);
		if(isalnum(*read_key)) {
			shmdt(read_key);
			shmctl(shmid, IPC_RMID, NULL);
			exit(1);
		}
	}
}

int main()
{
	if(shared_init() &lt; 0) {
		printf("Problems with shared memory\n");
		exit(1);
	}
	read_char();
	return 0;
}
</pre>

<p>
Here we have a shared memory variable named <tt>read_key</tt>. The program 
first initializes the shared memory area <tt>read_key</tt>. This is done by 
generating a shared memory identifier <tt>shmid</tt> using the system call 
<tt>shmget</tt>. In the context of the program, the first parameter for 
<tt>shmget</tt> is <b>9999</b>, which is the key. This key is used to allocate 
a shared memory segment. The second parameter, <tt>SIZE</tt> (defined as a 
macro with the value 1), suggests that the shared memory segment will hold only 
one of the type of the shared memory variable, that is, only 1 character. The 
<tt>IPC_CREAT</tt> flag (third parameter) suggests that a new shared memory 
segment has to be created, with read-write permissions (<tt>IPC_CREAT</tt> 
logically OR ed with <b>0666</b>). This will return a valid shared memory 
segment identifier on successful allocation. The identifier will be stored in 
<tt>shmid</tt>. If shared memory segment allocation fails, then -1 is returned 
and the <tt>errno</tt> is set appropriately. 
</p>
<cite>The key which is used to get a shared memory segment can be generated 
randomly using the built-in function <tt>ftok</tt> to get a unique key. Refer 
to the manual page for the usage.
</cite>

<p>
Once the segment identifier is obtained, we have to attach the shared memory 
segment to some address. This is done with the <tt>shmat</tt> system call. 
This uses the segment identifier <tt>shmid</tt> as the first parameter. The 
second parameter is the address of the shared memory segment; when this is 
given as <tt>NULL</tt> (as in this program), the kernel will choose a
suitable address. The third parameter is the flag specification which can
be set if required or left as zero (see man page of <tt>shmdt</tt> for
details). On success the shared memory segment is attached to
<tt>read_key</tt>, otherwise -1 is returned along with the appropriate
setting of the <tt>errno</tt>.
</p>

<p>
If either <tt>shmget</tt> or <tt>shmat</tt> fails, the process terminates. On 
success from both system calls, we proceed by invoking the
<tt>read_char</tt> function, which reads keyboard inputs other than '\n'
("Enter" key) and copies them to <tt>read_key</tt> in the shared
memory. If the keyboard input is an alphanumeric character, the
program stops reading inputs from the keyboard and the process
terminates.
</p>

<p>
We have another program running separately (it does not have to be in the
same working directory) in the local system, which tries to read the data
written in the shared memory area. The code is given below: (text version:
<a href="misc/ramankutty/read-shm.c.txt">read-shm.c.txt</a>)
</p>
<pre class="code">
#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;sys/types.h&gt;
#include &lt;sys/ipc.h&gt;
#include &lt;sys/shm.h&gt;
#include &lt;errno.h&gt;
#include &lt;string.h&gt;
#include &lt;ctype.h&gt;

extern int errno;

#define SIZE	1

char *detect_key;
int shmid;

int shared_init()
{
	if((shmid = shmget(9999, SIZE, 0444)) &lt; 0) {
		printf("Error in shmget. errno is: %d\n", errno);
		return -1;
	}
	if((detect_key = shmat(shmid, NULL, SHM_RDONLY)) &lt; 0) {
		printf("Error in shm attach. errno is: %d\n", errno);
		return -1;
	}
//	detect_key = NULL;
	return 0;
}

void detect_hit()
{
	char c;
	c = *detect_key;
	while(1) {
		if(c != *detect_key) {
			if(isalnum(detect_key[0])) {
				printf("detect_key is %s\n", detect_key);
				shmdt(detect_key);
				shmctl(shmid, IPC_RMID, NULL);
				exit(1);
			} else {
				printf("detect_key is %s\n", detect_key);
			}
			c = *detect_key;
		}
	}
}

int main()
{
	if(shared_init() &lt; 0) {
		printf("Problems with shared memory\n");
		exit(1);
	}
	detect_hit();
	return 0;
}
</pre>

<p>
Here, again, we have a shared memory initialization routine, which in fact does 
not create a new shared memory segment, but rather tries to get access to 
the existing shared memory segment. Compared to the previous program, the 
absence of <tt>IPC_CREAT</tt> flag suggests that we do not have to create a new 
shared memory segment. Instead, we simply have to get the corresponding 
segment identifier which can be used to attach the existing shared memory 
segment to some address. The mode <b>0444</b> restricts access to 
the shared memory segment to 'read only'. If no shared memory segment 
with key <b>9999</b> exists, we will get an error, which will be returned
in <b>errno</b>. Once we get a valid identifier, we attach the 
shared memory segment to an address. While attaching, we use the flag 
<tt>SHM_RDONLY</tt> which specifies that the shared memory segment will
be available only for reading.
</p>

<p>
Next, we have the function <b>detect_hit</b>, which checks whether the
pressed key was an alphanumeric character. The first program obviously has
to run first; otherwise, the second program will show errors during the shared
memory initialization, since it would be trying to get the identifier for a
non-existent shared memory segment.
</p>

<p>
The example shown here doesn't require any synchronization of access to the
shared memory segment. That is because only one program writes into the
shared memory and only one program reads from the shared memory area.  But
again, there is a problem here. What if the detection program (second one)
is started long after some user has started hitting the keys (running the
first program)? We will not be able to track the previously hit keys.
The solution for this is left as an exercise to the readers. 
</p>

<cite>The entry in <tt>/proc/sysvipc/shm</tt> gives a list of shared mermory in 
use. Readers can compare the entries before running, during running and after 
running the programs. Try to interpret the entry in <tt>/proc/sysvipc/shm</tt>.
</cite>

<p>
Once the two programs identify an alphanumeric character, they will
terminate. As part of that process, the shared memory area is detached by
using the system call <tt>shmdt</tt>. In fact, upon exiting the detaching
is done automatically. But the shared memory segment is not destroyed. This
has to be done by invoking the system call <tt>shmctl</tt>, which takes
the identifier for the shared memory area as an argument, as well as the command
<tt>IPC_RMID</tt>, which marks the shared memory segment as destroyed. This
has to be done, otherwise the shared memory segment will persist in memory
or in the swap space.
</p>
<cite>At this point, observation of the entries in
<tt>/proc/sysvipc/shm</tt> can be very useful.  If the shared memory
segment is not destroyed, the entries will reflect this. Try this by
running the program without <tt>shmctl</tt>.
</cite>

<p>
This is the fastest IPC mechanism in the System V IPC services. However,
the System V shared memory mechanism does not have any kind of scheme to
ensure that one sees consistent data in the shared memory region.  That is,
a process can read a shared memory area at the same time another process is
writing to it. The programmer can then come across inconsistent data while
executing the programs. This suggests that accesses to the shared memory
region have to be mutually exclusive; this is achieved via the use of the
semaphore mechanism. We can make the semaphore access the memory region to
lock it and then release the semaphore when done.
</p>

<p>
The shared memory mechanism can be used when the processes access the shared 
memory areas at different times. One may wonder why we can't make the
first process store the data in some file and make another process read the
data from the file. But, reading data from a file involves things like:
</p>
<ul>
<li>execution of system calls like <tt>open, read</tt> and <tt>close</tt>.
<li>accessing the secondary storage device (generally hard disk) which involves 
I/O operations.
</ul>

<p>
These things are not significant if we have a small amount of data to be
read. But when we have large amounts of data stored in a file, 
then the load of the two activities mentioned above increases 
significantly and there is a considerable amount of reduction in the 
performance of the "reading program". This, again, has a solution, which is the 
use of memory mapping - something I'll discuss at another time. 
</p>


<h2>Conclusion</h2>
<p>
We have seen the use of the primary IPC mechanisms, and also one of the System 
V IPC mechanisms. We have seen some simple uses for <b>pipes, fifos</b>, and the
<b>shared memory</b> mechanism. But one may come across some very complex 
programs where these mechanisms will have to be used in a very strict and
precise manner.  Otherwise, the program along with the programmer, will be
dumped to <tt>/dev/null</tt>. There are still more things to be learned,
not only for you but also for me. I shall come up with more in the next
part, in which we will explore <b>semaphores</b>, <b>message queues</b>,
<b>memory mapping</b> and <b>sockets</b>, and probably try to solve a few
practical problems.
</p>


</p>



<!-- *** BEGIN author bio *** -->
	<!-- *** BEGIN bio *** -->
<hr>
<P>
<img ALIGN="LEFT" ALT="[BIO]" SRC="../gx/2002/note.png" class="bio">
<em>
Working since 5 months at Naturesoft Pvt. Ltd. Chennai, India.  I wanted to
become a Physicist, but playing with linux gives me immense pleasure.
</em>
<br CLEAR="all">
<!-- *** END bio *** -->

<!-- *** END author bio *** -->




<div id="articlefooter">



<p>
Copyright &copy; 2004, <A HREF="../authors/ramankutty.html">Hiran Ramankutty</A>. Released under the
<a href="http://linuxgazette.net/copying.html">Open Publication license</a>
</p>



<p>
Published in Issue 104 of Linux Gazette, July 2004
</p>

</div>

</div>

<div id="navigation">

<a href="../index.html">Home</a>
<a href="../faq/index.html">FAQ</a>
<a href="../lg_index.html">Site Map</a>
<a href="../mirrors.html">Mirrors</a>
<a href="../mirrors.html">Translations</a>
<a href="../search.html">Search</a>
<a href="../archives.html">Archives</a>
<a href="../authors/index.html">Authors</a>
<a href="../contact.html">Contact Us</a>
</div>

<div id="breadcrumbs">

<a href="../index.html">Home</a> &gt;
<a href="index.html">July 2004 (#104)</a> &gt;
TWDT

</div>


<img src="../gx/2003/sit3-shine.7-2.gif" id="tux" alt="Tux"/>

<br />


<div class="content lgcontent">

<a name="seymour"></a>
<h1>Design Awareness</h1>
<p id="by"><b>By <A HREF="../authors/seymour.html">Mark Seymour</A></b></p>


</b>
</p>


<p>
<p> <h3>Not Just Sizzle</h3>

<p> In musing on what might be the most basic design concept, thus determining 
where to begin this column, I realized that I first need to discuss something 
even more fundamental than design: content. 

<p> As a designer, your job is to recast <em>data</em> into <em>information
structures</em> that tantalize, entice, excite, and visually please, as
well as actually inform. The classic bad example of this might be the
annual report, where pages of snappy color photography in the front are
often intended to distract from the pages of dreary numbers in the back.
Yet, occasionally, you find a designer who can make both sing, where the
data isn't merely presented (usually as acres of tiny and barely
differentiated type) but honed and arranged such that the reader can not
only find the pertinent information but easily decipher it and even, in
rare cases, enjoy the process of understanding it. 

<p> The web, more so than print, has become differentiated into areas of 
information and areas of style. Traditionally, the cost of full-color 
printing has prevented self-indulgent design, except for the occasional 
self-promotion piece. By contrast, the threshold cost of publishing on the 
Internet is laughably low, and it is all too easy for design to show up 
with little if any content attached to it. Unfortunately, some of the 
latter has been created for companies who, if they had to pay to deliver 
the same information in printed form, would never agree to such simplistic 
and often <i>anti</i>-informational work. 

<p> There are sites, of course, which provide more than enough content to make 
irrelevant their design, or lack of it: 

<p>
<a href="http://www.google.com">http://www.google.com</a><br>
<a href="http://www.irs.gov">http://www.irs.gov</a><br>
 
<p> There are also sites we will go to, no matter their level of design or
even usability. Having been unemployed recently, I found this site
functional, though painful graphically and informationally. While the
server occasionally goes down (during, of course, those exact hours when
you want to use it), you go back later because you must: 

<p>
<a href="http://www.dli.state.pa.us">http://www.dli.state.pa.us</a><br>
 
<p> There are also sites which may not be very well designed (to my eye, at 
least), but provide enough genuine content to make ignoring their faults 
worthwhile: 

<p>
<a href="http://www.weather.com">http://www.weather.com</a><br>
<a href="http://www.smithsonian.org">http://www.smithsonian.org</a><br>
<a href="http://www.chemie.fu-berlin.de/chemistry/general/units_en.html">http://www.chemie.fu-berlin.de/chemistry/general/units_en.html</a><br>
<a href="http://www.mapquest.com/">http://www.mapquest.com/</a><br>
 
<p> Conversely, there are designers who create sites where the lack of
content is almost irrelevant. These approach that line where design segues
into art, a line both diffuse and ill-defined; whether you like their
styles or not, you must admire their skill: 

<p>
<a href="http://www.tokyoplastic.com">http://www.tokyoplastic.com</a><br>
<a href="http://2advancedstudios.com">http://2advancedstudios.com</a><br>
<a href="http://pixelranger.com">http://pixelranger.com</a><br>
<a href="http://e-sh.ru">http://e-sh.ru</a><br>
 
<p> Sometimes, of course, making an incredible image in Flash may be just what 
is required. In most cases, however, the central requirement is an 
efficient transfer of information, which can be formulated as

<pre>data x structure = information</pre>

<p> As the designer, and thus the person responsible for the structure, how
can you maximize the efectiveness of the data in this equation? If you are
the owner and/or originator of the material, you will have already made
critical decisions about its purpose: is this to be a showcase for artistic
talent (whether yours or someone else's), or a method of educating the
reader? Asking these questions is the very beginning of the design process.

<p> If a company or an organization or some other group is running the
show, you will need to take them through the analytical processes that form
the basis for any design: What is the target audience? What needs to be
communicated to them (things like assembly instructions, event schedules,
on-going news, political advocacy, historical facts, product warnings, and
plain old funny stuff)? Does this connect with other information that your
readers will either instinctively want to know or be shocked or persuaded
into wanting to know based on the initial material? Are there archival
structures, whether simple link lists (e.g., the Linux Gazette <a
href="http://linuxgazette.net/archives.html">archives</a>) or more complex
systems (like the Smithsonian site above) that provide useful material for
further study? Is there raw data (statistics, maps, reports, photographs,
charts, video) that needs to be readily available, yet not directly
incorporated into the design? Is there other information that is required
by law, suggested by industry practice, or just worthwhile offering to your
readers as a public service?

<p class="editorial">[ <strong>Editor's note</strong>: if you're a Web site designer, you
need to be aware of WCAG and Section 508 accessibility requirements; these
are becoming mandatory in many situations. For more info and a free
compliance validator, see <a
href="http://www.cynthiasays.com/">http://www.cynthiasays.com/</a>. ]

<p> Answering these questions will immediately add data to your equation. 
Properly designed, too much data is rarely a problem. If your material is 
going to be published electronically, whether on the internet or on CD or 
DVD, it's now become so cheap to add information to your publication 
directly, or provide links to it elsewhere, that not doing so creates 
unnecessary customer dissatisfaction. While printed material doesn't 
produce the same expectation among consumers, adding a URL to a site that 
does provide it is always a plus.

<p> What should you do if there just isn't enough data? If it's your own site, 
you have either decided it is purely for entertainment purposes, or you 
need to redefine your intentions and go back through the question list 
above. If it's a corporate site, you may need to approach someone higher 
up the food chain and get them involved in the process; the people you've 
been working with may not understand the complexities of the situation, or 
the dangers of getting a review like the one voiced by Strother Martin in 
<i>Cool Hand Luke</i>: "What we have here is a failure to communicate."

<p> Now that you have the data, and hopefully more than enough of it, it's
time to do all the prep work that data requires before you begin to apply
any design to it. Has the data been checked, by someone who actually knows,
for completeness and correctness? This includes criteria like: Is it up to
date? Is it legally acceptable (most companies have review staffs of
lawyers and regulatory experts who must sign off on anything before it's
published)? Does it meet accounting or other professional standards
(especially in the case of an annual report or other financial documents,
but it equally applies to other industries like architecture and
engineering)? Then you will need to have it looked at by someone literate
in the language(s) you're working in, for those niggling issues of proper
usage (nomenclature, trademarks, acronyms, and the like) as well as grammar
and spelling.

<p> You <em>did</em> determine if the site needed to be partially or
completely translated into the languages of your expected audiences, didn't
you? If not, now's the time. Obviously, non-English readers could use
Babelfish <a
href="http://www.babelfish.altavista.com">http://www.babelfish.altavista.com</a>,
though it's no substitute for someone fluent in the target language;
however, relying on your customers to go through the process instead of
just finding a site with better service would be poor reasoning, and a
false economy. You might consider providing a Babelfish translation of your
main pages somewhere on your site as a nod in that direction, a modicum of
user-friendly translation for readers in other language areas. (Why not
"other countries"? Because there are places in every country where they
speak a language other than the obvious one; Spanish and Navajo are
examples of secondary languages with large user groups in this country.
There are also French speakers in Canada and Japanese speakers in Brazil
and English speakers in Guatemala and people for whom English is not their
first language in every major city in the United States. Depending on whom
you're trying to reach, you may need to provide resources in Chinese and
Russian and Arabic, even for US-only audiences.)

<p> If you are using images, were they all legally obtained, and do you
have written copyright and model releases for each one? In these litigious
times, using someone else's image without proper permission can be a costly
mistake. What trademarks do you reference, and to whom do they belong?
Proper trademark usage is an art all its own; you can find some guidance at
<a href="http://www.inta.org">http://www.inta.org</a>, and there are plenty
of printed and on-line sources for advice.

<p> Do not think that these are trivial or unnecessary steps. Going back and 
doing it later is always more time-consuming (and expensive), and nothing 
makes you look more stupid, both to your audience and your superiors, than 
some "how <i>could</i> you have missed that" mistake. Once the data is 
checked, and rechecked (because someone always sees the typographic error 
the last person missed), break it out into easily found and easily 
deciphered files. If you go looking for an important piece of legal 
gibberish that must appear on every other page, and what you're looking 
for is titled <i>9arg411foo.lgl04.pdf</i>, and it's on a floppy disk in 
the desk drawer of someone who's on vacation, it might take a while to 
find.

<p> Next time we will delve into what structure means to a designer, and how 
you thus turn all that data into information. (If there are relevant sites 
you particularly admire, including your own, please send the URLs along.) 
In the meantime, when next you sit down to design, consider the goal: is 
it merely to show off the latest software trick, or to communicate matters 
of importance to the viewer? (The Linux Gazette site is itself modeled on 
information, not glitz; we will analyze its design in later columns.) 
Given the lack of real information in this world or, worse yet, the excess 
of bad information, it is a noble endeavor, and the mark of a true 
designer, to aspire to create it.


</p>



<!-- *** BEGIN author bio *** -->
	<!-- *** BEGIN bio *** -->
<hr>
<p>
<img align="left" alt="[BIO]" src="../gx/authors/seymour.jpg" width="200" height="200" class="bio">

<em>
<p> I started doing graphic design in junior high school, when it was still
the Dark Ages of technology. Bill Gates and Steve Jobs were both eleven
years old, and the state of the art was typing copy on Gestetner masters.
I've worked on every new technology since, but I still own an X-acto knife
and know how to use it.

<p> I've been a freelancer, and worked in advertising agencies, printing
companies, publishing houses, and marketing organizations in major
corporations. I also did a dozen years [1985-1997] at Apple Computer; my
first Macintosh was a Lisa with an astounding 1MB of memory, and my current
one is a Cube with a flat screen.

<p> I've had a website up since 1997, and created my latest one in 2004. I'm
still, painfully, learning how web design is different from, but not
necessarily better than, print.

</em>
<br clear="all">
<!-- *** END bio *** -->


<!-- *** END author bio *** -->




<div id="articlefooter">



<p>
Copyright &copy; 2004, <A HREF="../authors/seymour.html">Mark Seymour</A>. Released under the
<a href="http://linuxgazette.net/copying.html">Open Publication license</a>
</p>



<p>
Published in Issue 104 of Linux Gazette, July 2004
</p>

</div>

</div>

<div id="navigation">

<a href="../index.html">Home</a>
<a href="../faq/index.html">FAQ</a>
<a href="../lg_index.html">Site Map</a>
<a href="../mirrors.html">Mirrors</a>
<a href="../mirrors.html">Translations</a>
<a href="../search.html">Search</a>
<a href="../archives.html">Archives</a>
<a href="../authors/index.html">Authors</a>
<a href="../contact.html">Contact Us</a>
</div>

<div id="breadcrumbs">

<a href="../index.html">Home</a> &gt;
<a href="index.html">July 2004 (#104)</a> &gt;
TWDT

</div>


<img src="../gx/2003/sit3-shine.7-2.gif" id="tux" alt="Tux"/>

<br />


<div class="content lgcontent">

<a name="youngman"></a>
<h1>Taking control of your browsing with Mozilla</h1>
<p id="by"><b>By <A HREF="../authors/youngman.html">Neil Youngman</A></b></p>


</b>
</p>


<p>
<p>
Web surfing has more than its fair share of annoyances. I'm thinking
of popups, pop unders, flash and other intrusive ads. Sometimes you
can spend ages waiting for a site to load, when the delay isn't on the
site itself: it's waiting for an ad server to serve up another
irrelevant, bandwidth wasting graphical annoyance.

<p>
Fortunately Mozilla, Free Software's most popular browser, has the
solutions. The most effective option is the Adblock plugin, which can
be combined with the built-in popup blocker to block practically all
unwanted ads. Mozilla also has an option to block images from specific 
sites.

<p>
NOTE: If you're not yet a card carrying Penguinista, there is nothing in this 
article that is Linux specific. All the options described here should work as 
described under all operating systems supported by Mozilla. It should
also work with recent versions of Netscape.

<h3>The Adblock plugin</h3>

<p>
The Adblock plugin is probably the most comprehensive solution to annoying ads 
in Mozilla. Due to its power and flexibility it takes a little more work 
than some of the other options to set up, but it's really not that difficult. 
If you do find it too complicated, then start with the other options 
described below.

<p>
To install Adblock go to <a 
href="http://adblock.mozdev.org/installation.html">the installation page</a>
and follow the links from there. At the time of writing there are only 
development builds available. Following the link to "Dev. Builds", you should 
find a link that's called something like "Adblock 0.5 d2 nightly 35". If you 
click on this, it should prompt you to ask whether to install the plugin. 

<p>
If you accept the installation, the next prompt asks if you want to
install to your profile. Clicking 'Cancel' attempts to install to the
system wide chrome directory, for which you need to have the necessary
privileges. If you do not, it offers to attempt to force the
installation.

<p>
If the software installation doesn't activate when the link is
clicked, it may be disabled in your configuration. To fix this, go to
"Edit-&gt;Preferences-&gt;Advanced-&gt;Software installation", check "Enable
software installation", and click OK. You should now be able to go
back and complete the installation.

<p>
Once the plugin is installed Mozilla must be restarted to activate it.

<p>
You should now see "Adblock" underlined in the bottom right hand corner of 
your browser, and the tools menu should have an Adblock submenu. If that's all 
there you are ready to start using Adblock.

<p>
The principle behind the Adblock plugin is that you can tell it block
URLs (web addresses) matching a certain pattern. So for example, if
you enter the pattern /adserver/, then
http://example.com/adserver/annoying_flash.swf will be blocked. An
asterisk will match any texts, so the pattern *://*annoyingads.com/
will block anything in the domains annoyingads.com and
veryannoyingads.com.

<p>
The question now is, how do you select which patterns to block?

<p>
I suggest starting by picking a site that you like, but which suffers from 
having too many ads. Once the page has loaded, clicking on the "Adblock" text 
in the bottom right hand corner will popup a list of blockable items in the 
current page. The ads are usually very obvious. The addresses will contain 
names related to advertising. Click on one of these and edit it down to a 
suitable pattern, then select another page from the site and see if it's 
blocked the right things. 

<p>
Some care must be taken in your choice of patterns to block. Simply selecting 
"ads" as a pattern will block http://example.com/downloads/ as well as 
http://toomanypopups.com/ads/, whereas the pattern "/ads/" will only block 
directories called ads.

<p>
Don't spend a lot of time setting this up initially. Just web surf as normal 
and setup a few more filters whenever a site takes too long to download or 
you are annoyed by popups and other ads.

<h3>Popup Blocking</h3>

<p>
The simplest option provided by Mozilla is popup blocking. The Adblock
plugin isn't 100% effective at blocking popup ads, so you may find
this option a useful addition. Popup blocking can also be used on its
own and it is highly effective at blocking popups, but it will not
block ads in the main window. 

<p>
The main downside to popup blocking is that some sites rely on popups
for their operation. When a function on a site isn't working, it is
important to remember that you have blocked popups and to see if
unblocking popups for that site solves the problem.

<p>
To enable popup blocking, go to "Edit-&gt;Preferences-&gt;Privacy And
Security-&gt;Popup Windows", check "Block Unrequested Popup Windows", 
and click OK. You can unblock popups for specific sites by selecting 
"Tools-&gt;Popup Manager-&gt;Allow Popups From This Site". You don't 
have to unblock all popups to get one site working.

<p>
There are also options to have Mozilla play a sound or display an icon when it 
blocks a popup, which may help to remind you that popups are blocked when a 
site isn't working as expected. 

<h3>Blocking images from a specific server</h3>

<p>
It is also possible to block some ads by clicking the right mouse button on an 
image and selecting "Block images from this server". This option will not 
always be available, e.g. the shockwave plugin replaces this menu, so this 
can't be used with Flash movies.

<p>
I would recommend using the Adblock plugin, rather than this option.

<h3>Alternate solutions</h3>

<p>
If you want a solution for other browsers, or you just want to check
out the alternatives, take a look at privoxy, which can be found at
<a href="http://www.privoxy.org/">http://www.privoxy.org/</a>.


</p>



<!-- *** BEGIN author bio *** -->
	<!-- *** BEGIN bio *** -->
<hr>
<p>
<img align="left" alt="[BIO]" src="../gx/authors/youngman.jpg" class="bio">

<em>

<p> Neil is a programmer, specialising in C++ on Unix and Linux. He has
degrees in Computer science and Next Generation Computing.

<p> Neil has worked on a wide range of systems from the control system for
the British Gas national grid to video servers for the Home Choice video on
demand service. He first programmed computers in 1980 with his school
General Studies class, which was allowed access to a mainframe at The
National Institute of Oceanography, programmed in Fortran on punch cards.

<p> A computer science degree followed at Queen Mary College, London, then
Neil worked for Logica for 3 years before taking an MSc in New Generation
Computing at Exeter University.

<p> The next 5 years saw Neil researching parallel simulation algorithms at
the Royal Signals and Radar Establishment, initially on transputers and
subsequently on SPARC based parallel systems. Since leaving RSRE, Neil has
mostly worked freelance and has worked on financial data feeds, video
servers and virus scanning proxies.

<p> Neil first used Unix at college in 1982 and started working on Linux in
1996.

<p> As of May 2004, Neil is working for a small messaging company in
London.

<p> Outside of computing, Neil is into motor sport, particularly Formula 1,
the World Rally Championship and the British Touring Car Championship. He
doesn't race himself. If you've seen Neil's driving, you'll understand why.

</em>
<br clear="all">
<!-- *** END bio *** -->



<!-- *** END author bio *** -->




<div id="articlefooter">



<p>
Copyright &copy; 2004, <A HREF="../authors/youngman.html">Neil Youngman</A>. Released under the
<a href="http://linuxgazette.net/copying.html">Open Publication license</a>
</p>



<p>
Published in Issue 104 of Linux Gazette, July 2004
</p>

</div>

</div>

<div id="navigation">

<a href="../index.html">Home</a>
<a href="../faq/index.html">FAQ</a>
<a href="../lg_index.html">Site Map</a>
<a href="../mirrors.html">Mirrors</a>
<a href="../mirrors.html">Translations</a>
<a href="../search.html">Search</a>
<a href="../archives.html">Archives</a>
<a href="../authors/index.html">Authors</a>
<a href="../contact.html">Contact Us</a>
</div>

<div id="breadcrumbs">

<a href="../index.html">Home</a> &gt;
<a href="index.html">July 2004 (#104)</a> &gt;
TWDT

</div>


<img src="../gx/2003/sit3-shine.7-2.gif" id="tux" alt="Tux"/>

<br />


<div class="content lgcontent">

<a name="lg_spam"></a>
<h1>Wonderful World of Spam</h1>


</b>
</p>


<p>
<UL>
<LI><A HREF="#Vi-Agra">Vi-Agra</A></LI>
<LI><A HREF="#Cure">A Cure for Windows Viruses</A></LI>
<LI><A HREF="#Python">Python Tools</A></LI>
<LI><A HREF="#Domains">New Domains for New Countries</A></LI>
</UL>

<cite>(Readers of this might enjoy reading <a 
href="http://rejo.zenger.nl/abuse/1085493870.php">the Confessions of a 
Spammer</a>).</cite>

<HR WIDTH="80%" NOSHADE><!-- ***************************************** -->

<A NAME="Vi-Agra"></A>
<H3>Vi-Agra</H3>

<PRE>
From: "Ingrown K. Overweight" &lt;Brederveld@crewstart.com&gt;
Subject: Mso i demand an apology

Hey Mso

I have thhe beest neews... this montth i discoovered a place on thhe neet whhere i can geet heaps of dirty cheap vi ag ra its unreal i tell ya.
ohh well ive talked enough already ive put in the link bleow. ejnoy mate this one is on me ;)

http://www.plus66.com/mm/?Mso
</PRE>

<P>
Finally, <A HREF="http://linuxgazette.net/issue55/collinge.html">Vi-Agra</A> gets the recognition it deserves!!!

<HR WIDTH="80%" NOSHADE><!-- ***************************************** -->

<A NAME="Cure"></A>
<H3>A Cure for Windows Viruses</H3>

Converted to Linux, for your c|n&gt;k pleasure.

<PRE>
----- Forwarded message from 
Network Security Department &lt;fggopcwv@technet.com&gt; -----
</PRE> 

Fine, Go Get Our Punishment - Catch Windows Virus.

<PRE>
SUBJECT: Last Network Security Upgrade
</PRE>

&lt;accent voice=bullwinkle&gt;This time for sure!&lt;/accent&gt;

<PRE>
Date: Thu, 13 Nov 2003 15:51:11 +0000

Microsoft Customer
</PRE> 

We noticed that you X11 users still buy mice.

<PRE>
this is the latest version of security update, the
"November 2003, Cumulative Patch" update which resolves
all known security vulnerabilities affecting
MS Internet Explorer, MS Outlook and MS Outlook Express
as well as three newly discovered vulnerabilities.
</PRE>

<P> Vulnerabilities for Linux users running IE include extra memory usage
for WINE or VMware, spurious attempts to run activeX widgets, and much
pointing and laughter by your peers.

<P> Vulnerabilities for Linux users seeking to run Outlook include WINE not
liking the latest version much, too.  Maybe you'd enjoy balsa or sylpheed.
The most dangerous vulnerability is being possibly saddled with Exchange...

<P> Newly discovered vulnerabilities include a potential for contracting the
gullibility virus.  That is, being gullible enough to think someone dumb
enough to send executable attachments in the modern era has any IDEA
what you should install on your computer.

<PRE>
Install now to protect your computer
from these vulnerabilities, the most serious of which could
allow an attacker to run code on your computer.
</PRE>

<P> Take all these antihistamines! (but I'm not allergic to anything right
now) You have to!  Right nowwwwww!  (Did you know that having too many
*anti* histamines gives most people reactions resembling flu?  Thus the
admonitions about heavy vehicle use and so on.  What if it gives you the
"my bones ache and I feel queasy" edition of "flu" - then you're stuck - sick.)

<P> Piss-Off-Curious-Newbie-So-They-Will-Never-Run-Linux-HOWTO:
Install Linux right nowwwww.  Don't even ask how to partition it or
anything.  Just do it!

<P> Folks, if you dunno what you want, why the heck would you think somebody
who can't use a normal and legitimate address for some important announcement
would have any idea what's good or bad for your computer?  Do you let
complete strangers off the street tune your car too?

<PRE>
This update includes the functionality of all previously released patches.
</PRE> 

<P> This virus contains the hubris of all previously released worm trojan
thingies, since those lunks at the antivirus companies haven't caught me yet.
 
<PRE>
Microsoft Product Support Services and Knowledge Base articles can be found on the Microsoft Technical Support web site.
http://support.microsoft.com/
</PRE>

<P> True, for what it's worth.  Most of their entries regarding linux are
chock full of FUD ranting.  But also for the record, so can all of their
*real* updates be found, on the site that they really control.

<P> Think, folks.  If MS really was going to bother the world with their
updates, would they:<BR>
	1. flood the world with heavy spam (attachments)<BR>
	2. flood the world with light spam (mention a URL for download)<BR>
	3. install "Update Me" software in their latest OS releases?

<P> Golly gosh.  You think that (3) was there for a reason?

<PRE>
	Greetings Microsoft Customers.
	We wish you to be happy and safe this season.
	Please download the security updates promptly at
http://www.microsoft.com/security/
</PRE>

<P> Even if you don't decide to solve it by installing something else that's
less vulnerable.  FreeBSD maybe, if you don't like Linux.

<PRE>
Thank you for using Microsoft products.
</PRE>
 
<P> It makes my virus campaign so much easier when people leave
"Administrator" group privileges on because it's such a pain to turn
them off. (Win2K, WinNT.  Maybe WinXP tho I wouldn't know.  Never touch
the XP stuff, even worse EULA than the other ones, and the "break when
you upgrade your hardware too much" feature is beyond even viral
programming talent.  Stands for Xtremely Painful.)

<P> Or better yet if all users have the same powers, basically to control
anything on the system. (Win9x)

<P>
So all you Linux people, if you could run wine as root, then install my
uber bug, I'm kinda hoping for some test sites for a distributed denial 
okay?  thx suXXerZ!

<PRE>
Please do not reply to this message.
</PRE>

<P>
Please do not track down the sysadmin whose open relay allowed me to
bother you nor help him to fix it.

<PRE>
It was sent from an unmonitored e-mail address
</PRE>

<P>
Yeah, I'll bet.

<PRE>
and we are unable to respond to any replies.
</PRE>
 
<P>
"we"  the predatory insects of the world, in solidarity with the bugs of 
our fellow software products... 

<P>
Any insects out there using Linux, please feel free to protest this
slight to your chitinous cousins <IMG ALT=":)" SRC="../gx/dennis/smily.gif" WIDTH="20" HEIGHT="24">

<PRE>
----------------------------------------------
The names of the actual companies and products mentioned herein are the
trademarks of their respective owners.
Copyright 2003 Microsoft Corporation.
</PRE>

<P>
PS. Microsoft, please don't get mad enough to send a corporate squad of
hitmen out to clobber this poor lowly worm writer.  Respect intellectual 
property, we do.  Yessssss my preciousssss.... 

<HR WIDTH="80%" NOSHADE><!-- ***************************************** -->

<A NAME="Python"></A>
<H3>Python</H3>

<P>
<em>Je ne le crois pas.</em>

<P>
Shut up, Ben.  It could've happened to Perl too. --Mike Orr

<PRE>
Python Tools

$2200 In Damage Repairs
That's What An Electrician Had To Pay To Replace The Tile He Broke While In=
stalling An Outlet In A Bathroom
Finally There's A Tool That Will Keep This From Happening To You.

-- The Python Perfect Cutter Is Like An Insurance Policy --
Here's the tool that will change the way you cut holes forever. The Perfect=
 Cutter not only lets you cut perfect electrical holes, it eliminates the c=
hance of breaking a tile or scratching a wall or any other mistake that cou=
ld cost you as much or more than $2,200. The Perfect Cutter uses a patented=
 template system to guide a high-speed router as you make your cut in drywa=
ll, lathe and plaster, paneling, ceramic tile, Corian?, Formica?, whatever!=
 Your hands or the tool never touch your customer's walls and it even sucks=
 up the drywall dust as it cuts, so no more cleaning up.

-- Customers Love It --
As a professional craftsman you can use the Perfect Cutter to improve produ=
ctivity, increase your customer's satisfaction and generate referral busine=
ss. The holes are straighter, stronger, have a better fit saving energy and=
 improving fire safety. And the best part is it does all this and reduces w=
ear and tear on your body, as well as making the most difficult cuts into q=
uick, clean moneymaking ones.

"We've been using the Perfect Cutter for only about a month now and can alr=
eady see how it has helped save us time. And saved time means more revenue.=
"
        --- George Bavolak=20
             Owner of Bavolak Electric

-- Do You Do Residential Service Work? --
Watch &amp; learn how you can put an easy $12,000 or more in your pocket every =
12 months. Without doing anything more than you're doing now!

Python Tools

Contact us at:
1-800-860-8709
info@pythontools.com

For more information, go to www.pythontools.com or copy and paste http://ww=
w.pythontools.com?area_5=3Dcounters/newsletter1 in your web browser.

If you no longer wish to receive these types of messages, please contact in=
fo@start-thinking.com
</PRE>

<HR WIDTH="80%" NOSHADE><!-- ***************************************** -->

<A NAME="Domains"></A>
<H3>New Domains for New Countries</H3>

<P> By <A HREF="/authors/stern.html">Heather Stern</A>

<PRE>
----- Forwarded message from Cherry Nolan &lt;f468mmhn@myexcel.com&gt; -----

From: "Cherry Nolan" &lt;f468mmhn@myexcel.com&gt;
To: iwp@oz.net
Subject: Your .EU Domain is for sale vz s yqa 
Date: Sun, 14 Dec 03 18:55:44 GMT

--------------
Domain Name News
December 2003
--------------

New domains are being release for
the European Union. The launch of
eu domain names has been approved
and they are expected to go live
in early 2004.
</PRE>

<P>
New countries are being created every day!  Prussian princes everywhere
will want their very own .eu domain.

<PRE>
Protect your business name by
buying your .eu domain before they
are available for purchase at public
registrars where anyone can buy them.
</PRE>

<P>
Become a wealthy Merchant Prince and the talk of the town.  Spamtown,
that is.

<PRE>
We are now accepting orders for the
new .eu domains.

http://www.registereu.com/?ref=gold
</PRE>

<P> ref=I_am_a_sucker_sell_my_name_for_gold

<PRE>
See our web site for contact information.

Yours faithfully,

Sales Co-Ordinator
EU Registry Services
http://www.registereu.com/?ref=gold
</PRE>

<P>
Glad to meet you Sales.  My warlord Procmail would like to get to know
you better.  He can put you in a waiting room with a complete harem from
exotic places.  Exotic enough to have open relays, at least.

<PRE>
--------------

You are receiving this email because you
have purchased or manage a domain from
us or one of our partners. 
</PRE>

<P>
We have sent you this mail because we believe you or one of your
penguins have sufficient conquering experience to take over one or more
domains.

<PRE>
If you do not
wish to receive offers from us in the
future, you may optout at
http://www.registereu.com/remove.htm
</PRE>

<P>
If you wish to be put on our easily_conquered_nations list, please apply
at the URL above.

<PRE>
jqayon uliefzjtpz voszhgbe quoeawzy uok cpzuq
</PRE>

<P> klaatu barada neko-chan chew on kitty toy.

<HR WIDTH="80%" NOSHADE><!-- ***************************************** -->

<A NAME="Honest"></A>
<H3>Honest Spam? Not Quite</H3>

<p> 
<strong>[Jimmy]</strong>
I received this spam, and thought "Oh, how refreshingly honest. It told me
where my address was harvested from".

<pre>
Date: Fri, 18 Jun 2004 04:24:45 -0400
From: Making Money 24/7 
Subject: money for you this year!!!

Hi JimmyO'Regan!

Just so you know I saw your name in the
newsgroup alt.fan.pratchett. So I emailed you.
</pre>

<p> Of course, it was still obviously spam. Maybe trying to go back to the 
traditional style of spam, where you have actual English instead of <tt>V I A 
G R A</tt> might fool someone, but when you're sending to addresses harvested
from a newsgroup, there's always a chance someone might <a 
href="http://groups.google.com/groups?threadm=2jfnd7F10n8d5U1%40uni-berlin.de&rnum=1">start
a thread</a>. Of course, anyone who might have been taken in would be
undeceived by the second spam I received from this crowd:

<pre>
Date: Fri, 18 Jun 2004 06:27:16 -0400
From: Jaye P 
Subject: hey, still trying to live day by day?

Hi %Name%!
 
Just so you know I saw your name in the
newsgroup %Newsgroup%. So I emailed you.
 
What would you do if you had extra money?
A nice steady flow of income that is
residual month after month? What would
you do if you had a great product to
promote? We show you exactly how it's all
done! We invite you to join our free
mailing list subscription. You will
receive mailings about out products,
business opportunities, ways to make your
profits go through the ROOF, and so much
MORE! All you have to do is send an email
to makeityourday@hotpop.com with the subject
'Please Subscribe Me'.
 
We look forward to hearing from you soon!
</pre>

<!--
<p>Strangeness points for spam has to go to the one which includes the entire
article <a href="http://theoryandscience.icaap.org/content/vol004.002/13_letter_gong.html">The Uncertainty Principle is Untenable</a>
-->

<hr width="80%" noshade="noshade"><!-- ************************************* -->

<em>This edition of "The Wonderful World of Spam" has been brought to you by:
<a href="../authors/orr.html">Sluggo</a>, <a href="../authors/stern.html">Heather</a>, 
and <a href="../authors/oregan.html">Jimmy</a>; courtesy of spammers everywhere.</em>

</p>



<!-- *** BEGIN author bio *** -->
<!-- *** END author bio *** -->




<div id="articlefooter">




<p>
Published in Issue 104 of Linux Gazette, July 2004
</p>

</div>

</div>

<div id="navigation">

<a href="../index.html">Home</a>
<a href="../faq/index.html">FAQ</a>
<a href="../lg_index.html">Site Map</a>
<a href="../mirrors.html">Mirrors</a>
<a href="../mirrors.html">Translations</a>
<a href="../search.html">Search</a>
<a href="../archives.html">Archives</a>
<a href="../authors/index.html">Authors</a>
<a href="../contact.html">Contact Us</a>
</div>

<div id="breadcrumbs">

<a href="../index.html">Home</a> &gt;
<a href="index.html">July 2004 (#104)</a> &gt;
TWDT

</div>


<img src="../gx/2003/sit3-shine.7-2.gif" id="tux" alt="Tux"/>

<br />


<div class="content lgcontent">

<a name="lg_laundrette"></a>
<h1>The Linux Laundrette</h1>


</b>
</p>


<p>
<UL>
<LI><A HREF="#intro">Introduction</A></LI>
<LI><A HREF="#benefits">The benefits of being in The Answer Gang</A></LI>
<LI><A HREF="#great_minds">Great minds...</A></LI>
<LI><A HREF="#rhubarb">Rhubarb</A></LI>
<LI><A HREF="#quoting">Quoting Thomas</A></LI>
<LI><A HREF="#testing">Testing</A></LI>
<LI><A HREF="#letter_r">The letter R</A></LI>
<LI><A HREF="#klutz">Klutz</A></LI>
<LI><A HREF="#pedant">Pedant</A></LI>
<LI><A HREF="#corrupt">Ben and corruption</A></LI>
<LI><A HREF="#unwritten">Unwritten rule</A></LI>
<LI><A HREF="#alarm">Big red alarm button</A></LI>
<LI><A HREF="#harsh">A little too harsh?</A></LI>
<LI><A HREF="#discipline">How TAG keeps discipline</A></LI>
<LI><A HREF="#proto">New protocols</A></LI>
<LI><A HREF="#mailer">Rick's mailer</A></LI>
<LI><A HREF="#spy">Ben's career as a spy</A></LI>
<LI><A HREF="#leak">A leak in Ben's boat</A></LI>
<LI><A HREF="#stoned">Stoned</A></LI>
<LI><A HREF="#seclusion">Thomas in seclusion</A></LI>
<LI><A HREF="#oi">Oi!</A></LI>
<LI><A HREF="#l33t">d000dZ!!! Hou d0 u hAcK????</A></LI>
<LI><A HREF="#bogomips">What's a "bogomips"?</A></LI>
<LI><A HREF="#nature">Ben vs. Nature</A></LI>
<LI><A HREF="#self-flagellation">Self-flagellation</A></LI>
<LI><A HREF="#vbeer">Virtual Beer</A></LI>
<LI><A HREF="#iBoFH">No Slack</A></LI>
<LI><A HREF="#notserious">Not So Serious...</A></LI>
<LI><A HREF="#kbdwear">Keyboard Wearout</A></LI>
</UL>

<A NAME="intro"></A>
<H3>Introduction</H3>

<P> Welcome to the Linux Laundrette. Make sure you remember to separate your
whites and colours, and to take care to wash cottons at low temperatures.

<P> Regular readers might recognise this as the "Not the Answer Gang" section
that Mike occasionally published in the "Back Page" - in fact, most of this is 
material that Mike had collected. Well, since Ben has taken over as editor, 
we've decided to split this and <a href="lg_spam.html">The Wonderful World of 
Spam</a> into their own articles, so that Ben can have free reign over his own 
Back Page. There's also a <a href="misc/laundrette/notlinux.html">Not Linux</a> 
section; I've added this as a supplement, as this material will be part of
the Linux Laundrette in future issues, but there's too much to include in this
month's edition.

<P> "Making Linux More Fun" is more than just a motto; it's our guiding 
principle. If The Answer Gang can't make Linux fun for themselves, they won't
have much success making it more fun for others. That's why off-topic posts
aren't shot down in flames, as in other lists. The reason we collect comments
here? Well, see for yourself: they're just damn funny.

<P> So, when we say "send us your tips", feel free to count that as meaning
"send us anything that made you laugh". We prefer Linux related items, but
have a look through some of the older Back Pages to get any idea of whether or
not something unrelated will get a chuckle. Mike's <a 
href="../102/lg_backpage.html">last Back Page</a> is a great example, and gives 
pointers to several of the older Back Pages.

<P> Those who read about the <A href="../103/oregan2.html">Alexis de Tocqueville 
Institute</a> in last month's issue might be interested in reading <a 
href="http://www.groklaw.net/article.php?story=20040607153801202">this</a>, and
may be interested in reading about the <a 
href="http://searchenterpriselinux.techtarget.com/columnItem/0,294698,sid39_gci969455,00.html">real</a>
<a href="http://searchenterpriselinux.techtarget.com/originalContent/0,289142,sid39_gci970955,00.html">history</a> of
<a href="http://searchenterpriselinux.techtarget.com/originalContent/0,289142,sid39_gci990148,00.html">Linux</a>.


<P> Not Linux related, but with great nerd appeal, is the <a 
href="http://www.xenocorp.net/H_bardCorner/MPFotR.htm">Monty Python Fellowship
of the Ring</a> and <a href="http://www.xenocorp.net/H_bardCorner/MPTTT.htm">The
Two Towers</a>, and anyone who wants to show a new user how to find information
might find <a href="http://fuckinggoogleit.com/">this page</a> useful, or if
you're feeling nice, you could tell them to <a 
href="misc/laundrette/rtfm.7.pdf">RTFM</a> (which you can also view as a <a 
href="misc/laundrette/rtfm.7.txt">man page</a> - type <tt>man man</tt> at the
command-line if you don't know what a man page is).

<HR WIDTH="80%" NOSHADE><!-- ***************************************** -->
<A NAME="benefits"></A>
<H3>The benefits of being in The Answer Gang</H3>

<P>
<STRONG>[Rob Tougher]</STRONG> 
Has anyone seen the latest author FAQ at LG.com?
 They're giving away t-shirts and caricatures to new authors. ;)

<P>
<STRONG>[Ben]</STRONG> 
Do you folks ever get the feeling that _we_ are the people responsible
for most of the hits at the Linux Ghoulzette site???

<P>
<STRONG>[Thomas]</STRONG> 
So, umm, when do I get *my* free prize? What's that Ben? Oh, so you
mean that I don't get *any* incentives whatsoever for helping out with LG?
Pah, what a con.... 

<P>
<STRONG>[Jason]</STRONG> 
LG.net gives out free t-shirts. You simply go to one of the many custom
t-shirt shops, tell them what you want on it, pay they money, and there
you go! One free (as in speech) t-shirt!

<HR WIDTH="80%" NOSHADE><!-- ***************************************** -->
<A NAME="great_minds"></A>
<H3>Great minds...</H3>
<p>
<strong>[Thomas]</strong>
This is uncanny, Ben. I too, disabled depmod -a for just that reason... I
suppose great minds think alike. <IMG ALT=":)" SRC="../gx/dennis/smily.gif" WIDTH="20" HEIGHT="24">
 
</p><p>
<strong>[Jason]</strong>
...so do poor minds. <IMG ALT=":-)" SRC="../gx/dennis/smily.gif" WIDTH="20" HEIGHT="24"> 

</p><p>
<strong>[Ben]</strong>
I wouldn't think so. The ratio of correct answers to wrong ones is very
high; this is _why_ great minds (seem to) think alike. <IMG ALT=":)" SRC="../gx/dennis/smily.gif" WIDTH="20" HEIGHT="24">

</p><p>
<strong>[Jason]</strong>
But poor minds *do* think alike. There is simply no other way to explain
football. :-)

</p><p>
<strong>[Sluggo]</strong>
Was it _Anna Karenena_ that said, "Happy families are all exactly alike.
But sad families are sad each in a different way."
</p>

<HR WIDTH="80%" NOSHADE><!-- ***************************************** -->

<p>
<strong>[Sluggo]</strong>
Ssshhh, Ben, don't let them think we agree on anything.

</p><p>
<strong>[Ben]</strong>
Oh yeah. Hate your guts, you capitalist lackey.

<HR WIDTH="80%" NOSHADE><!-- ***************************************** -->
<A NAME="rhubarb"></A>
<H3>Rhubarb</H3>

<STRONG>
i don't have/use linux at present. i've always been (well for the last 5 years
anyway) interested in linux and i'd rather use it instead of this microsoft
stuff. i am a chef, so i can deal with the rhubarb if you need advice in
return...  what is a good system to use when one has little computer knowledge
but is interested in linux rather than that other stuff.  i have  machine that
works a treat, called a Toshiba Tecra. if this helps your answers at all.  it's
the crumble that really lifts the more humble rhubarb recipe.  many thanks.
arthur graves
</STRONG>

<BLOCKQUOTE><EM>
    [This hearkens back to <A HREF="../issue67/lg_backpage.html">the great rhubarb thread</A>.  - Mike.]
</EM></BLOCKQUOTE>


<P>
<STRONG>[Ben]</STRONG> 
[laugh] So the rhubarb comes back to haunt us. Never had rhubarb do that
before: a greasy pizza eaten too late at night, yes; rhubarb, never.

<P>
<STRONG>[Rick]</STRONG> 
Ben, bubeleh, you don't know what you've been missing!  Come out to the
Bay Area post haste, and I'll treat you to some of my rhubarb pie.
(Well, wait for summer, for rhubarb to be in season.)

<P>
<STRONG>[Thomas]</STRONG> 
I don't suppose you could put the recipie for it on your site, could you?
I am a huge fan of rhubarb.  Mmmm, rubarb crumble.

Anyhow, happy Shrove Tuesday, all.
I'm off to make pancakes aplenty now

<P>
<STRONG>[Rick]</STRONG> 
Enjoy them, Thomas. (What do you put on yours?)

<P>
<STRONG>[Thomas]</STRONG> 
Well, the tradition is for sugar (white or brown) with lemon. However, I
managed to serve up something of a pancake "dinner", which had savoury
pancakes (sausage, cheese, peppers), followed by the sweet variety (to
which we not only had the sugar/lemon combination, but I also like various
jams).

<HR WIDTH="80%" NOSHADE><!-- ***************************************** -->
<A NAME="quoting"></A>
<H3>Quoting Thomas</H3>
<pre>
Quoting Thomas Adam:

&gt;  
&gt;  
&gt; 
&gt; 
&gt; 	
&gt; 	
&gt; 		
</pre>

<p>
Well, that's easy for _you_ to say!
</p>

<HR WIDTH="80%" NOSHADE><!-- ***************************************** -->

<A NAME="testing"></A>
<H3>Testing</H3>

<pre>
From: Faber Fedor 
Subject: [Lgang] testing

Did I pass?
</pre>

<P>
<STRONG>[Thomas]</STRONG> 
&lt;dpkg&gt; No, Faber, you're not online any more.

</P><P>
<STRONG>[Jason]</STRONG> 
Nope: You forgot the "please ignore" bit in the subject line. :-)

<HR WIDTH="80%" NOSHADE><!-- ***************************************** -->

<p>
<strong>[Ben]</strong>
(Is this my month to pick on Jimmy, or what? <IMG ALT=":)" SRC="../gx/dennis/smily.gif" WIDTH="20" HEIGHT="24">

</p><p>
<strong>[Jimmy]</strong>
I have been missing for six months; just collecting arrears <IMG ALT=":)" SRC="../gx/dennis/smily.gif" WIDTH="20" HEIGHT="24">
</p>

<HR WIDTH="80%" NOSHADE><!-- ***************************************** -->
<A NAME="letter_r"></A>
<H3>The letter R</H3>

<P>
<STRONG>[Ben]</STRONG> Let's not forget the southward migration of 'r's, either
- whereas people in Boston go pahking theah cahs in the Hahvihd Yahd, Texans
drink soder and pour earl into their engines...

<P>
<STRONG>[Sluggo]</STRONG><BR>
- Excuse me, where is the library at?<BR>
- Here at Hahvahd, we never end a sentence with a preposition.<BR>
- OK, excuse me.  Where is the library at, asshole?

<P>
That reminds me of my friend from Boston who lived in Seattle for a few years.
He was questioned by somebody who wanted to trip him up on his dropped R's.

<P>
- Would you say, 'I parked the car in Harvard Square'?<BR>
- I parked the car in Harvard Square.  What are you, retahted?

<P>
<STRONG>[Ben]</STRONG> A man, visiting Boston for the first time, is eager to
try some of the famous local fish. He jumps into a taxi and tells the driver,
"take me to a place where I can get scrod!" As they drive along, the driver
keeps peering at him in the mirror; when asked for the reason, he replies "I
been drivin' a hack fah twenny-five yeahs, and this is the fahst time I evah
heahd anybody use the past plupehfect tense ah that!"

<HR WIDTH="80%" NOSHADE><!-- ***************************************** -->

<P>
<STRONG>[Jason]</STRONG> 
Kewl, I'm "in". Do I get cool sunglasses like Ben? <IMG ALT=":)" SRC="../gx/dennis/smily.gif" WIDTH="20" HEIGHT="24">
<HR WIDTH="80%" NOSHADE><!-- ***************************************** -->
<A NAME="klutz"></A>
<H3>Klutz</H3>

<P>
<STRONG>[Ben]</STRONG> 
Yep. It's why my first cut at any possibly destructive operation will
usually use "echo" instead of "rm" or "mv". I've come to recognize and
embrace my inner klutz.
<HR WIDTH="80%" NOSHADE><!-- ***************************************** -->
<A NAME="pedant"></A>
<H3>Pedant</H3>

<P>
<STRONG>[Ben]</STRONG> 
By the way - Heather or Adam - do you guys need this stuff
HTML-escaped, or do you do that yourselves?

<P>
<STRONG>[Thomas]</STRONG> 
Who's Adam, by the way?

<P>
<STRONG>[Ben]</STRONG> 
&lt;blink&gt; The result of a momentary brain-fart. Sorry. I meant "Thomas",
of course.

<P>
<STRONG>[Thomas]</STRONG> 
No problem, Okopnik, I was just being a pedant.

<P>
<STRONG>[Ben]</STRONG> 
Oh - is _that_ the British spelling of "pain-in-the-ass"?

<P>
<STRONG>[Sluggo]</STRONG> 
Okey dokey, Okie.
<P>
[Readying my defenses...]
<HR WIDTH="80%" NOSHADE><!-- ***************************************** -->
<H3>Wittiness</H3>

<P>
<STRONG>[Ben]</STRONG> 
(Move along, move along. Nothing witty to see here. That's being
reserved for when it's unexpected and devastating.)

<HR WIDTH="80%" NOSHADE><!-- ***************************************** -->
<A NAME="corrupt"></A>
<H3>Ben and corruption</H3>

<P>
<STRONG>[Thomas]</STRONG>
I know how John feels. I got roped into doing this all those years ago by
typing in 'Lost Souls' into the (then) new AltaVista search engine.....
 
<P>
<STRONG>[Ben]</STRONG> 
...and the only thing you could do after that, of course, is join us.
Logical. However, most of us didn't really _lose_ ours; I got a very
good price for mine, for example. Lots of people wonder how I could
afford to take that 7-year cruise in the Caribbean...

<P>
<STRONG>[Thomas]</STRONG> 
Ah, so those reports of 'Blackbeard Ben' are true! Pirate ya vast, yarrr

<HR WIDTH="80%" NOSHADE><!-- ***************************************** -->
<A NAME="unwritten"></A>
<H3>Unwritten rule</H3>

<P>
<STRONG>[Bradley Chapman]</STRONG>
P.S: If I've broken some unwritten rule, sorry in advance :(

</P><P>
<STRONG>[Thomas]</STRONG>
I'd just finished writing it actually, it said:

<HR WIDTH="80%" NOSHADE><!-- ***************************************** -->
<A NAME="alarm"></A>
<H3>Big red alarm button</H3>

<P>
<STRONG>[Ben Okopnik]</STRONG> 
&lt;chuckle&gt; Thanks for saying that, Joerg. That was my original prediction
and the reason for pressing the Big Red Alarm Button, back when we were
talking about leaving SSC's hosting. Our goal is preserve and improve
the Linux Gazette, and keep bringing our usual monthly content to the
folks who appreciate it that way.

<P>
<STRONG>[Jason Creighton]</STRONG> 
Doesn't anybody else think it looks *awfully* suspicious that Ben knew
what was going to happen *before* it did? And what was he doing with a
Big Red Alarm Button anyway?
 
<P>
<STRONG>[Ben]</STRONG> 
Just happened to be my turn holding it. We pass it around, you know;
kinda like the "hot potato" game.

<P>
<STRONG>[Jason]</STRONG> 
I wouldn't be surprised if it turned out that this whole "CMS" thing was
planed and executed by none other than....execuse me, there's someone at
the door....IT'S YOU!!! NO, WAIT, I CAN EXPLA

<P>
<STRONG>[Ben]</STRONG> 
&lt;virtuously&gt; *I* have an alibi. I don't know if anyone else here had the
foresight to buy one. Ooops, not exactly what I meant...

<P>
<STRONG>[Jason]</STRONG> 
You know, if your alibi is *true*, you can get it for free. Either you
got ripped off, or....

<HR WIDTH="80%" NOSHADE><!-- ***************************************** -->
<A NAME="harsh"></A>
<H3>A little too harsh?</H3>
<P>
<STRONG>[JimD]</STRONG> 
Please feel free to soften the comments if you feel it's appropriate.
I don't want to sound harsh and I don't want to discourage him.
However, I do want to see more focus and a better end product.

<P>
<STRONG>[James Roberts]</STRONG> 
Your repentance comes too late! Alas!

<P>
Farewell, cruel wor...l...d...d...'
 
<P>
/* splatting sound from 32 floors below */

<P>
No, don't hesitate to call it the way you see it. I can take it! I'm a
masochist!

<P>
Anyway, it *was* a bit wet. 

<P>
<STRONG>[Ben]</STRONG> 
What, on the pavement on the bottom? I _told_ you you'd catch a cold,
but you insisted on jumping out of that window...

<HR WIDTH="80%" NOSHADE><!-- ***************************************** -->
<A NAME="discipline"></A>
<H3>How TAG keeps discipline</H3>

<P>
<STRONG>[Ben]</STRONG> 
Welcome to TAG. If you get too annoying, we'll send our resident
logicians, Guido and Luca, to your house to elucidate a few of the finer
points. Guido even has a cousin who's a patella reattachment specialist,
and will leave his card nailed where you're *guaranteed* not to miss it.

<P>
<STRONG>[Jay R Ashworth]</STRONG> 
Which floor does Luca live on?

<P>
<STRONG>[Ben]</STRONG> 
Da basement, o'course. He's a debased individual.

<HR WIDTH="80%" NOSHADE><!-- ***************************************** -->
<A NAME="proto"></A>
<H3>New protocols</H3>

<P>
<STRONG>[Sluggo]</STRONG> 
I didn't understand all the words in Ben's answer so I missed most of
the joke, although I saw it had something to do with "ACK!" and "glug
glug".

<P>
<STRONG>[Ben]</STRONG> 
"syn/syn-ack/ack" is the TCP handshake - what happens at the TCP level
when two hosts initialize a session. The BTP (Beer Transfer Protocol)
RFC would cover the handshake and the subsequent transfer; I was just
getting the jump on it.


<HR WIDTH="80%" NOSHADE><!-- ***************************************** -->
<A NAME="mailer"></A>
<H3>Rick's mail headers</H3>

<P>
<STRONG>[Rick]</STRONG> 
<PRE>
X-Mas: Bah humbug.
</PRE>

<HR WIDTH="80%" NOSHADE><!-- ***************************************** -->
<A NAME="spy"></A>
<H3>Ben's career as a spy</H3>

<P>
<STRONG>[Sluggo]</STRONG>
Presumably your rewrite has better ideas, more clarity, or more 
anecdotes, or you wouldn't have written it.  And any articles that come
from you have exemplary spelling/grammar anyway, so (A) they're safe to
publish as-is, and (B) they don't make much work for Rick anyway
(depending on his proofreading strategy).

<P>
<STRONG>[Ben]</STRONG> 
Why, thank you, Mike! Much appreciated. You'll have to call me a Dirty
Commie just to balance that out.

<P>
<STRONG>[Sluggo]</STRONG> 
Oh, yeah, I forgot.  I've been thinking about work too much.  You're a
f***ing communist and a fascist.  

<P>
<STRONG>[Ben]</STRONG> 
Ahhh. I feel _much_ better now; the uncertainty was hard to stand... ya
stinking burgeois exploiter of the working class. 

<P>
<STRONG>[Sluggo]</STRONG> 
I bet you were a
valuable member of the Soviet Writers' Guild.  How many prizes did the
apparatchiks award you, bandit?  

<P>
<STRONG>[Ben]</STRONG> 
Just the usual luxurious country villa with plentiful livestock. Oh,
sorry, that was the literal translation; it's actually "flea-infested
dingy apartment" in English.

<P>
<STRONG>[Sluggo]</STRONG> 
To think, Russia produced writers
like Pushkin, Tolstoy, Paternak and... Okopnik.

<P>
<STRONG>[Ben]</STRONG> 
Well, you know how it is. One simply _must_ take on students to
perpetuate the fame, and I'm no exception.

<P>
<STRONG>[Sluggo]</STRONG> 
It all started with those dark sunglasses....  People with dark sunglasses
have something to hide.  Especially those that have shifty, beady eyes like
you do.  Plus we couldn't overlook your history of sneaking more than your
share of pretzels from the Answer Gang snack jar.  It didn't take long to
figure out what you're hiding. 

<HR WIDTH="80%" NOSHADE><!-- ***************************************** -->
<A NAME="leak"></A>
<H3>A leak in Ben's boat</H3>

<P>
<STRONG>[Ben]</STRONG> 
... patching a leak that my dinghy has mysteriously developed,

<P>
<STRONG>[Sluggo]</STRONG> 
Not so mysteriously, heh heh....

<P>
<STRONG>[Ben]</STRONG> 
I should have known. Wherever there's leaking, hissing, and lots of air
blowing, there you'll be...

<HR WIDTH="80%" NOSHADE><!-- ***************************************** -->
<A NAME="stoned"></A>
<H3>Stoned</H3>
<P>
<STRONG>[Ben]</STRONG> 
... should you ever find yourself accidentally stoned - it could happen, you
know! There you'll be, innocently walking down the street, and... -

<P>
<STRONG>[Sluggo]</STRONG> 
Hey, it does happen.  Not full-fledged stoned, but if you run into an 
invisible cloud of pot residue, it can be pretty unpleasant if you're as
sensitive to pot as I am.  It gets me bloody irritated, that everybody
else has to suffer so a few ppl can get stoned.

<BLOCKQUOTE>
    <P>
    <STRONG>[Ben]</STRONG> 
    Wow. There are people who would _pay_ to have your sensitivity. OTOH,
    you probably have it because you _don't_ do it, so it would be
    self-defeating.
</BLOCKQUOTE>
  
<P>
<STRONG>[Sluggo]</STRONG> 
It gets me bloody irritated, that everybody else has to suffer so a few ppl can
get stoned.

<BLOCKQUOTE><!-- begin SUFFERING POT -->
    <P>
    <STRONG>[Ben]</STRONG> 
    "suffer"? Now you've got me curious, Mike. What happens to you when you
    get "caught" that way? Whatever it is, it sounds rather unusual; I'd
    never heard of anyone likening the effect of pot to suffering.

        <P>
        <STRONG>[Sluggo]</STRONG> 
        It makes me want to sleep but I can't because these f***ing images in
        my head keep me awake.  They're different than LSD images but I can't
        explain it in words.  When it happens, all I can do is (im)patiently
        wait for it to wear off.  It's worst when it happens in the evening and
        there's something important the next morning so you can't afford to
        lose the sleep.

        <P> I assumed that's what happens to everybody and they for some
        inexplicable reason liked it, but then I talked with my roommate who
        was a pothead and he said that never happened to him.  He said it
        prob'ly doesn't agree with my metabolism and that there are three
        common reactions to pot, something like calmness, paranoia, and I
        forget the third.  I guess I have the second or third.

        <P>
        <STRONG>[Heather]</STRONG> 
        Ugh. Sounds dreadful.  I must have the 4th reaction then, because other
        than smell like pot (a small I find vaguely unpleasant, like bad ciger
        smoke only... grassier?) I get no reaction.  Sat one time in a haze
        filled room and only wanted one slice of pizza.  The cat was stoned.  I
        wasn't.
</BLOCKQUOTE><!-- end SUFFERING POT -->

<P>
<STRONG>[Kapil H Paranjape]</STRONG> 
All this discussion leeds me to suspect that TAG has gone to pot.
Or perhaps to weed...oops, I meant seed.

<P>
<STRONG>[Ben]</STRONG> 
Hey, these are rather high-level matters we're discussing. I mean, I
figure where there's smoke, there's fire... we'll hold a joint inquiry
into it and send the report back up the pipe. 

<HR WIDTH="80%" NOSHADE><!-- ***************************************** -->
<A NAME="seclusion"></A>
<H3>Thomas in seclusion</H3>

<P>
<STRONG>[Thomas]</STRONG> 
 Just to let you know that over the next two weeks, I am not going to be
 responding to any e-mails on TAG or Lgang. 

<P>
<STRONG>[Jason]</STRONG> 
Yeah, right. 

<P>
<STRONG>[Ben]</STRONG> 
Tisk, tisk, Jason. To paraphrase Mark Twain, "Never tease a man with a
monkey on his back. Sell him a quarter, instead." 

<HR WIDTH="80%" NOSHADE><!-- ***************************************** -->
<A NAME="oi"></A>
<H3>Oi!</H3>

<P>
<STRONG>[Ben]</STRONG> 
*Ugh*. You do realize, of course, that the success of a pun is in the
'Oy' of the beholder...

<P>
<STRONG>[Sluggo]</STRONG> 
Oi?

<P>
<STRONG>[Ben]</STRONG> 
Don't believe I've ever listened to the stuff. But I have heard many an
"oy".

<P>
<STRONG>[Sluggo]</STRONG> 
I thought that was ahoy.
Actually, the "oy" of "oy vey" is completely different from the "oi" in:
<UL>
<LI> (greeting) "Oi mate!"  

<LI> (asserting your rights) "Oi, this watermelon is spoiled.  I want to
exchange it."

<LI> (to stop somebody who's running away) "Oi!  Give me back my cellphone, you
thieving scoundrel!"
</UL>

(Did anybody notice the Rick Moenism in that last example?)

<P>
<STRONG>[Ben]</STRONG> 
"Oi, there 'e goes! 'eave 'arf a brick at 'im!"

<P>
<STRONG>[Kapil Hari Paranjape]</STRONG> 
Which is different from "Oye" as in Hindi. As in "Oye, raaste se hat
ja". (Hey! Get off the road). In other words, much ruder/chummier.

<P>
Or "Aiyaiyo" as in Tamil. As in "Aiyaiyo, sapaada illey". (Alas! There
is no food). In other words an expression of despair.

<P>
Kapil<BR>
God is real, unless declared integer.

<HR WIDTH="80%" NOSHADE><!-- ***************************************** -->
<A NAME="l33t"></A>
<H3>d000dZ!!! Hou d0 u hAcK????</H3>

<P>
<STRONG>[Ben]</STRONG> 
i wnAt 2lrn h0w 2 hak. cAN u tech m3 h0w eyE cn crAkc mi hi sChL cumpTr? 

<P>
(*Then* I bet I could get girls.)

<P>
<STRONG>[Jimmy]</STRONG> 
Yeah. They'll come for the haxxoring, they'll stay for the help with 
their homework.

<HR WIDTH="80%" NOSHADE><!-- ***************************************** -->
<A NAME="bogomips"></A>
<H3>What's a "bogomips"?</H3>

<P>
<STRONG>[T.R.]</STRONG> 
Uh, what's a bogomips and what's it's relationship to a regular mips?
 
<P>
<STRONG>[Ben]</STRONG> 
Well, T.R. - a "bogomip" is actually a term of Deep Hackery, known to
all True Geeks but never discussed outside the circle of The Cabal
(There Is No Cabal.) Only the first part of it is publically known and
somewhat understood - anything described by the term is highly bogus.

<P>
<STRONG>[T.R.]</STRONG> 
Also, a friend told me that running Linux is illegal. Is that true?

<P>
<STRONG>[Ben]</STRONG> 
That's actually a *very* good example of a bogomip!

<HR WIDTH="80%" NOSHADE><!-- ***************************************** -->
<A NAME="nature"></A>
<H3>Ben vs. Nature</H3>

<P>
<STRONG>[Ben]</STRONG> 
Well. That was... interesting, in the Chinese sense.

<P>
When last I spoke to Heather, she asked me how long the final processing
would take now that I had the Mailbag, etc.; I foolishly replied: "Oh,
no more than a couple of hours at most!"

<P>
Murphy heard me.

<P>
Almost immediately thereafter, St. Augustine got slammed by an
unexpected front carrying winds of up to (estimated) 70mph. Almost every
boat in the anchorage dragged; one went under the Bridge of Lyons,
breaking its mast. My boat held, despite one of the anchors letting go
(it turned out to have a 60 lb. or so fish trap tangled up in it; the
bottom here has more crap on it than any place I've ever been.)

<P>
<STRONG>[Jimmy]</STRONG> 
Wow, Ben. You make a natural disaster sound like most people's holiday 
postcards.

<P>
<STRONG>[Ben]</STRONG> 
I spent an uneasy hour or more cutting tangled lines (my boat is more
important than a damn piece of rope) and getting my anchors weighed and
reset - the main hook held fine, and I've just put out two more for the
night. 

<P>
<STRONG>[Jimmy]</STRONG> 
= "Bit of trouble at the airport".

<P>
<STRONG>[Ben]</STRONG> 
I'm wet, exhausted, muddy from head to foot, and smiling happily
because I've handled this challenge successfully despite its extra
weirdness and difficulty.

<P>
<STRONG>[Jimmy]</STRONG> 
= "All in all, having a great time".

<P>
<STRONG>[Ben]</STRONG> 
(Murphy, I don't *give a shit* if you're listening.) The LG will be
published tonight.

<P>
<STRONG>[Jimmy]</STRONG> 
= "Wish you were here".

<P>
Again, wow. You are *rock*.

<P>
<STRONG>[Ben]</STRONG> 
Thanks, Jimmy! I hope I get to keep my swimming ability, though... <IMG ALT=":)" SRC="../gx/dennis/smily.gif" WIDTH="20" HEIGHT="24">
  
<P>
<STRONG>[Jimmy]</STRONG> 
Well, I'd have said granite, but I guess you can be pumice <IMG ALT=":)" SRC="../gx/dennis/smily.gif" WIDTH="20" HEIGHT="24">

<HR WIDTH="80%" NOSHADE><!-- ***************************************** -->
<A NAME="self-flagellation"></A>
<H3>Self-flagellation</H3>

<P>
<STRONG>[Jay]</STRONG>
I'm going to go climb back into my hole now; please disregard all
earlier traffic.

<P>
<STRONG>[Ben]</STRONG>
Be sure to record the self-flagellation severity and times; we'll weigh
it against your sins, and let you know when it's sufficient.

<P>
[ 0.25 seconds later ]

<P>
...OK, that's enough. Hope that taught you a lesson, young man. <IMG ALT=":)" SRC="../gx/dennis/smily.gif" WIDTH="20" HEIGHT="24">

<HR WIDTH="80%" NOSHADE><!-- ***************************************** -->
<A NAME="vbeer"></A>
<H3>Virtual Beer</H3>

<P>
<STRONG>[Jay]</STRONG>
I'm really not an asshole.

<P>
<STRONG>[Rick]</STRONG>
No, but you do owe everyone virtual beer.  <IMG ALT=";->" SRC="../gx/dennis/smily.gif" WIDTH="20" HEIGHT="24">

<P>
Oh, what the heck; I'll personally spring for a round on the virtual
credit card, for everyone.  Enjoy!  

<P>
<STRONG>[Ben]</STRONG>
Why, Rick! How virtually generous of you! You have my virtual thanks.

<P>
<STRONG>[Rick]</STRONG>
Be gentle with those virtual
chandeliers, though.

<P>
<STRONG>[Ben]</STRONG>
"Innkeeper! I'll have what the man on the chandelier is having!"

<HR WIDTH="80%" NOSHADE><!-- ***************************************** -->
<A NAME="iBoFH"></A>
<H3>No Slack</H3>

<P>
<STRONG>[Jay]</STRONG>
I never get cut any slack when *I* use stupid tools, or use tools
stupidly; why should they?

<P>
<STRONG>[Rick]</STRONG>
That's our boy!  (Jay has gotten in touch with the BoFH within.)

<HR WIDTH="80%" NOSHADE><!-- ***************************************** -->
<A NAME="notserious"></A>
<H3>Not So Serious...</H3>

<P>
<STRONG>[Ben]</STRONG>
The easier way to do all that, instead of typing out those horrendous
names

<P>
<STRONG>[Thomas]</STRONG>
...is to proabably goto and use:
 
<P><A HREF="http://tinyurl.com">http://tinyurl.com</A>

<P>
<STRONG>[Ben]</STRONG>
Err... and exactly how would you use that, given the need to process the
actual URL in two different ways?

<P>
<STRONG>[Thomas]</STRONG>
One of these days, things'll click into place and people will learn not
to take me so seriously....


<HR WIDTH="80%" NOSHADE><!-- ***************************************** -->
<A NAME="kbdwear"></A>
<H3>Keyboard Wearout</H3>

<P>
<STRONG>[Jay]</STRONG>
Mine is called psg -- I'm even lazier than you.  

<P>
<STRONG>[Ben]</STRONG>
Hey, that's a 50% reduction in typing - nothing to sneeze at. If you
consider the amount of wear you've saved, you could probably buy
yourself a new keyboard every 50, 60 years out of the differential...

<P>
<STRONG>[Jay]</STRONG>
And note that if you do the greps in the oposite order, you move fewer
bytes.

<P>
<STRONG>[Ben]</STRONG>
Yeah, well... my "grep" wasn't doing much but sitting around anyway. I
figured I'd make it earn its salary. Although that _is_ another 50%
saving on electrons... how much is a fusion power plant going for these
days, anyway?
<HR WIDTH="80%" NOSHADE><!-- ***************************************** -->
<A NAME="BoS"></A>
<H3>Best of Slashdot</H3>

<P>(<A HREF="http://slashdot.org/article.pl?sid=04/06/21/0024208">How To Avoid 
Viruses At Windows Install Time?</a>)
<P>
<STRONG>[<a href="http://slashdot.org/~Spoticus">Spoticus</a>]: If you play a 
Microsoft CD...</STRONG><BR>
backwards, you can hear satanic messages. But even worse, if you play it 
forward, it installs their software!

<P>
<STRONG>[<a href="http://slashdot.org/~hughk">hughk</a>]: and play an *BSD CD 
forwards</STRONG><BR>
...and you find it full of daemons!!!!

<P>(<A HREF="http://slashdot.org/articles/03/11/17/2231231.shtml">Gates Comdex 
Keynote Shows Plans, Matrix Spoof</a> - <A 
HREF="http://www.tabletpctalk.com/pictures/comdex2003billg2.shtml">screenshots</A>)
<P>
<STRONG>[<A HREF="http://slashdot.org/~Frymaster">Frymaster</A>] </STRONG>
gates is smith! did you see the market share that guy had by the end of the 
series?

<P>
<STRONG>[<A HREF="http://slashdot.org/~T-Kir">T-Kir</A>]</STRONG>
Longhorn would have to be the Matrix code, constraining humanity and the 
problem is choice: which MS don't want people to have.

<P>
Plus, the Matrix is due for a critical crash, hmm the parrallels are endless...

<P>
<STRONG>[<A HREF="http://slashdot.org/~Nailer">Nailer</A>]: And starring the 
Tablet PC...</STRONG><BR>
As Switch. One of the Nebuchadnezzar crew that got killed really early on the 
first movie and was promptly forgotten about forever.

<P>
<STRONG>[<A HREF="http://slashdot.org/~FrostedWheat">FrostedWheat</A>]</STRONG>
<BR>Neo: What is the Matrix?<BR>
Morpheus: Unfortunately no one can be told what the Matrix is.<BR>
Neo: Why?<BR>
Morpheus: My tablet PC just crashed.

<P>
<STRONG>[<A HREF="http://slashdot.org/~greenskyx">greenskyx</A>] I can't 
wait...</STRONG><BR>
For the part where Agent Linux burns Bills eyes out and then he finally can see 
all the Linux everywhere...

<P>(<A HREF="http://slashdot.org/article.pl?sid=04/06/25/1418243">429,000 
Do-Not-Call Complaints</A>)

<P>
<STRONG>[<A HREF="http://slashdot.org/~Enigma_Man">Enigma_Man</A>]</STRONG>
A good friend of mine (who may read this) got a call from a marketer that went 
something like this:

<P>
TM: Hello, I'm from $phonecompany, and I'm calling to see if you want to switch 
your service <BR>
FR: I don't have a phone here. <BR>
TM: Oh, I'm sorry *hangs up*

<P>I still laugh very hard about that one.

<P>(<A HREF="http://slashdot.org/article.pl?sid=04/06/27/2016251">Cut-Rate 
Windows 'XP Starter Edition' in Thailand</A>)

<P>
<STRONG>[<A HREF="http://slashdot.org/~Gatton">Gatton</A>] At least they're 
prepared...</STRONG>
<BR> With about 95% of the country being Buddhist at least they're already 
familiar with the concept of suffering

<HR WIDTH="80%" NOSHADE><!-- ***************************************** -->
<em> This edition of "The Linux Laundrette" has been brought to you by 
<a href="../authors/orr.html">Sluggo</a>, <a href="../authors/oregan.html">Jimmy</a>, 
the weird and wonderful cast of the hit mailing list "<a 
href="../tag/ask-the-gang.html">The Answer Gang</a>", and <a href="#letter_r">the 
letter R</a>.</em>

</p>



<!-- *** BEGIN author bio *** -->
<!-- *** END author bio *** -->




<div id="articlefooter">




<p>
Published in Issue 104 of Linux Gazette, July 2004
</p>

</div>

</div>

<div id="navigation">

<a href="../index.html">Home</a>
<a href="../faq/index.html">FAQ</a>
<a href="../lg_index.html">Site Map</a>
<a href="../mirrors.html">Mirrors</a>
<a href="../mirrors.html">Translations</a>
<a href="../search.html">Search</a>
<a href="../archives.html">Archives</a>
<a href="../authors/index.html">Authors</a>
<a href="../contact.html">Contact Us</a>
</div>

<div id="breadcrumbs">

<a href="../index.html">Home</a> &gt;
<a href="index.html">July 2004 (#104)</a> &gt;
TWDT

</div>


<img src="../gx/2003/sit3-shine.7-2.gif" id="tux" alt="Tux"/>

<br />


<div class="content lgcontent">

<a name="lg_foolish"></a>
<h1>The Foolish Things We Do With Our Computers</h1>
<p id="by"><b>By <A HREF="../authors/okopnik.html">Ben Okopnik</A></b></p>


</b>
</p>


<p>
<style>
<!--
hr {
	margin-top: 20px;
	margin-bottom: 20px;
	width: 50%;
}
-->
</style>

<p>"Foolish Things" is a now-and-again compilation that we run based on our
readers' input; once we have several of them assembled in one place, we get
to share them with all of you. If you enjoy reading these cautionary tales
of woe, proud stories of triumph, and just plain weird and fun things that
happen between humans and silicon, that's great; if you have some to share
so that others may enjoy them, even better. Please send them to <img
src="../gx/lgmail/articles.png">.  <p>[ You can even tell us that it happened
to A Friend of Yours, and we'll believe you. ] 
<p>
 -- Ben
 <hr>

<h3>Do Not Fold, Spindle, or Mutilate</h3>
<p id="by"><b>[ Name withheld by request ]</b><br></p>

<p>...hold on to your chair, and put on whatever you need to survive this.
Its not funny, unless you weren't there, and I wasn't. 

<p> Back in 1990. 

<p> Seriously, seat belts required. And crash helmets. No, really. 

<p> Back in 1990 I was a computer tech guy at a small university campus. 

<p> We were switching over from all 5.25 inch drives to some machines having
only 3.5 inch drives, with a few having that old garbagey (if that's a
word) combo floppy drive. Two half-height drives, one a 5.25 and the
other 3.5, all one unit. And a few 'legacy' PCs with a 5.25 inch floppy
drive in them. Some had both sizes of floppy drives, as a separate unit.
A total of 6 computers. 

<p> It's finals week, when we don't have to provide tech support to the other
students. Why yes, we had finals too. 

<p> So, I'm walking down the hallway and one of the other computer lab guys
walks out of the computer room just as I walk past. 

<p> Know what the melting point of titanium is? I don't, but his face must
have beeen giving off that much heat. To use the phrase 'he was livid'
would be a major understatement. 

<p> He said to me, between clinched teeth, "Don't ask!" 

<p> Brrr... or high temperature frying, takes your pick. 

<p> I journey off to class, and try not to think of the horrors that he had
just gone through. 

<p> By the next day he had calmed down enough to tell me. 

<p> Due to the huge numbers of students, about 200, trying to use the 6
computers, they had to take turns printing. Some had printers at home,
and some didn't. Many still had 5.25 inch floppy drives at home, and no
printer. 

<p> One machine with a 5.25 inch floppy drive was kept available, just for
printouts. 

<p> The lab guy being there for the other students that night is the one who
should be given a medal. For not harming anyone. He repeatedly said, as
each new person walked into that room, that each person would have to
wait their turn to do their printout and take it to class. 

<p> One bright student, not wanting to wait for the one 5.25 floppy drive
computer to become available... folded their 5.25 inch floppy, and stuck
it in the 3.5 floppy drive machine that was available for use. 

<p> Yes, folded it in half! 

<p> of course, it stuck. 

<p> Billy had to get a pair of needle-nose pliers to carefully get the
floppy out and then test the read/write heads, to see if they were
broken. 

<p> There were two other people in line waiting to do their printouts on
their 5.25 floppies, for their final term papers. 

<p> After Billy spoke a few choice words about the lack of usefulness of
folding a floppy and the miscreant who folded it blamed Billy for lost
homework, the next two came to a startling conclusion. 

<p> If folding it is bad, cutting it to fit is okay. 

<p> You can stop shaking and/or laughing now. Yes, that was their next
thought. Scary, isn't it? Didn't ask Billy. They just got out a pair of
scissors and trimmed the 5.25 floppies they had. 

<p> Yes, they cut their 5.25 floppies to fit the 3.5 inch floppy drive. Cut
it to fit.... eekkkk. Sorry, I'm screaming on the inside. 

<p> All three of the miscreants blamed Billy for the loss of their homework.
Our boss told Billy later to not worry about it. 

<p> They stormed out of the computer room, and went off to class. 

<p> Backups you ask? They didn't have any, and those papers were one-fourth
or one-half of their final grade. 

<p> Just a few short minutes later, I walked by. 

<p> And the rest was history. 

<p> Oh, wanna guess what their major was? 

<p> Two of them were undergrad Applied Computer Science majors, and the
other was a grad student, working on his Master's in Applied Computer
Science. I.e., programmers. 

<p> I was appalled. That's my major! But I never did anything like that
to a poor defenseless floppy. Dropped books on them yes, but never
folded nor cut them. 

<hr>

<h3>A Doggone Chew-tastraphe</h3>
<p id="by"><b>Steve Brown</b><br></p>

<p> My wife and I decided to spend the weekend away to celebrate our wedding
anniversary, well she decided, I did as I was told. The children were packed
off to Grandma and a dog sitter was arranged, who would ensure that the
mutt (don't confuse with the useful software) was thoroughly entertained in
our absence.

<p> We had a wonderful time, collected the kids on the way back and piled
in to the house to greet our loyal and faithful hound. When we opened the
door there was no rushing 'waggy dog', as the children call him, to meet
us. He seemed very loathe to come out of his basket at all. I was busy
unloading the car when my wife called me in. "Steve", she said in tremulous
tone, "you had better sit down." "Why, what's up? Is the dog dead?" "No",
she said, "he may not have long to live though - he's chewed your
computer!".

<p> I charged in to the dining room where I kept my box, (it's an upgrade - I used
to have to sit in the cupboard under the stairs), and my jaw hit the floor.
Picture the scene if you will - one keyboard, all the keys removed,
partially chewed and placed in a neat pile next to the body (less cord) of
the mouse. Printer and modem power supplies, less leads, in a pile next to
that. Every single wire, apart from the monitor lead, had been removed from
the box and had the connectors/plugs chewed off and discarded.

<p> To add insult to injury, because it was plugged in (but not switched on) the
dog had tripped the RCD on the mains, so the freezer contents had thawed
out. Absolutely gutted.

<p> We had to take the dog to the vet, as he wasn't well shortly after this, it
turns out he had an inflamed colon (there's justice for you) for which the
dog-sitter paid the bill, but he wouldn't replace the leads for me, the
bar-steward.

<p> I've only just got all my stuff together to repair everything, my wife
wouldn't let me sell the dog to make good the damage, I've a sneaky feeling
she was quite pleased as I've been sitting with her in the evenings instead
of 'that damn computer'. Soon sort that out.

<hr>

<h3>Ooo-ooo that smell/Can't you smell that smell...</h3>
<p id="by"><b>Charlie Pearce</b> (from the deepest, darkest edges of Dartmoor, England)<br></p>

<p> A few years ago I purchased a HP8200 USB CD-rewriter as I had no spare drive
bays, and it seemed convenient at the time (though not cheap, that 4x recorder
cost ten times as much as a 52x internal one does today!).
The drive sat happily on top of that mini-tower until some time after I put the
motherboard (along with some extra memory and hard drives) into a larger case, with
plenty of spare drive bays.

<p> It struck me that from the outside, the USB CD-writer looked very much like a
normal IDE cd drive in a fancy shell.... ever the curious (and with no further
research) I took some allen keys to it and took it apart. And as I thought,
inside it was just a normal IDE drive with some USB circuitry plugged into it.

<p> So one Sunday afternoon, I unplugged it all and installed the now liberated
drive into the spare drive bay - after some fiddling with cables and screws (this
ain't a modern case) I made a cup of tea, opened my window to get some air,
crossed my fingers and switched the computer back on...

<p> At which point I noticed a strange burning smell... - panicking, I pulled
the plug and didn't go near the machine for a few days.

<p> In fact, after a couple of days I was in my back garden speaking to my 
neighboor when I noticed a small blackened area at the back of their lawn. I
enquired as to what it was, "Oh we had a little bonfire there, just to get rid
of some garden waste." - when was this I asked?

<p> "Sunday afternoon".

<p> Doh! The next day I went back to my computer, booted it, and both the
drive and the rest of machine have worked fine ever since!


</p>



<!-- *** BEGIN author bio *** -->
	<!-- *** BEGIN bio *** -->
<hr>
<P>
<IMG ALT="picture" SRC="../gx/2002/tagbio/ben-okopnik.jpg" WIDTH="199" HEIGHT="200" ALIGN="left"  HSPACE="10" VSPACE="10" class="bio">
Ben is the Editor-in-Chief for Linux Gazette and a member of The Answer Gang.

<em>
<p>
Ben was born in Moscow, Russia in 1962. He became interested in electricity
at age six, promptly demonstrated it by sticking a fork into a socket and
starting a fire, and has been falling down technological mineshafts ever
since. He has been working with computers since the Elder Days, when they
had to be built by soldering parts onto printed circuit boards and programs
had to fit into 4k of memory. He would gladly pay good money to any
psychologist who can cure him of the recurrent nightmares.

<p>His subsequent experiences include creating software in nearly a dozen
languages, network and database maintenance during the approach of a
hurricane, and writing articles for publications ranging from sailing
magazines to technological journals. After a seven-year Atlantic/Caribbean
cruise under sail and passages up and down the East coast of the US, he is
currently anchored in St. Augustine, Florida. He works as a technical
instructor for Sun Microsystems and a private Open Source consultant/Web
developer. His current set of hobbies includes flying, yoga, motorcycles,
writing, and Roman history; his Palm Pilot is crammed full of alarms, many
of which contain exclamation points.

<p>He has been working with Linux since 1997, and credits it with his complete
loss of interest in waging nuclear warfare on parts of the Pacific Northwest.
</em>
<br CLEAR="all">
<!-- *** END bio *** -->

<!-- *** END author bio *** -->




<div id="articlefooter">



<p>
Copyright &copy; 2004, <A HREF="../authors/okopnik.html">Ben Okopnik</A>. Released under the
<a href="http://linuxgazette.net/copying.html">Open Publication license</a>
</p>



<p>
Published in Issue 104 of Linux Gazette, July 2004
</p>

</div>

</div>

<div id="navigation">

<a href="../index.html">Home</a>
<a href="../faq/index.html">FAQ</a>
<a href="../lg_index.html">Site Map</a>
<a href="../mirrors.html">Mirrors</a>
<a href="../mirrors.html">Translations</a>
<a href="../search.html">Search</a>
<a href="../archives.html">Archives</a>
<a href="../authors/index.html">Authors</a>
<a href="../contact.html">Contact Us</a>
</div>

<div id="breadcrumbs">

<a href="../index.html">Home</a> &gt;
<a href="index.html">July 2004 (#104)</a> &gt;
TWDT

</div>


<img src="../gx/2003/sit3-shine.7-2.gif" id="tux" alt="Tux"/>

<br />


</body>
</html>