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
|
<html>
<head>
<link href="../lg.css" rel="stylesheet" type="text/css" media="screen, projection" />
<title>
Linux Gazette : April 2005 (#113)
</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>April 2005 (#113):</h2>
<ul>
<li><a href="#lg_cover">The Front Page</a>, by <i>Heather Stern</i></li>
<li><a href="#lg_mail">The Mailbag</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="#collinge">HelpDex</a>, by <i>Shane Collinge</i></li>
<li><a href="#engel">Free as in Freedom: Part Four: Epilog - 2000 VAIOS and a Grain of Zen</a>, by <i>Adam Engel</i></li>
<li><a href="#kapil">Roll your Desktop into a USB stick/CD</a>, by <i>Kapil Hari Paranjape</i></li>
<li><a href="#lodato">Voice recognition shorthand and the birth of Weblish</a>, by <i>Janine M. Lodato</i></li>
<li><a href="#okopnik">Introduction to Shell Scripting - Part 3</a>, by <i>Ben Okopnik</i></li>
<li><a href="#oregan">-- --- .-. ... .</a>, by <i>Jimmy O'Regan</i></li>
<li><a href="#orr">PyCon DC 2005</a>, by <i>Mike Orr (Sluggo)</i></li>
<li><a href="#seymour">Design Awareness</a>, by <i>Mark Seymour</i></li>
<li><a href="#youngman">First Impressions of Crossover Office</a>, by <i>Neil Youngman</i></li>
<li><a href="#ecol">Ecol</a>, by <i>Javier Malonda</i></li>
<li><a href="#qubism">Qubism</a>, by <i>Jon "Sir Flakey" Harsem</i></li>
</ul>
</div>
<br />
<div class="content lgcontent">
<a name="lg_cover"></a>
<h1>The Front Page</h1>
<p id="by"><b>By <A HREF="../authors/stern.html">Heather Stern</A></b></p>
</b>
</p>
<p>
<center>
<img src="misc/cover/gazette-town.jpg"
alt="Tux and his faithful steed SuSE in the Old West">
</center>
<!--
Fake bio for Tux
-->
<hr>
<img align="left" alt="[BIO]"
src="../gx/2003/sit3-shine.7-2.gif" class="bio">
<em>
<b>Tux</b> has been Linux's mascot since shortly after the release of the
2.0 kernel. He's been known to be quite the fellow for the ladypenguins,
and
<tt><a href="http://www.sjbaker.org/tux/">A Brief History Of Tux - So
Far</a></tt> will surely tell you more than you needed to know about this
dashing fellow. All too often, it's a working vacation for him, but he's
considering a <a href="http://www.levkowetz.com/2005/lbw-killin/beer">hiking
trip</a> or a <a href="http://www.geekcruises.com/">cruise</a> sometime this
Summer.
</em>
<br clear="all">
</p>
<!-- *** BEGIN author bio *** -->
<P> Heather is Linux Gazette's Technical Editor and The Answer Gang's Editor
Gal.
<!-- *** BEGIN bio *** -->
<hr>
<P>
<img ALIGN="LEFT" ALT="[BIO]" SRC="../gx/2002/note.png" class="bio">
<em>
Heather got started in computing before she quite got started learning
English. By 8 she was a happy programmer, by 15 the system administrator
for the home... Dad had finally broken down and gotten one of those personal
computers, only to find it needed regular care and feeding like any other
pet. Except it wasn't a Pet: it was one of those brands we find most
everywhere today...
<P> Heather is a hardware agnostic, but has spent more hours as a tech in
Windows related tech support than most people have spent with their computers.
(Got the pin, got the Jacket, got about a zillion T-shirts.) When she
discovered Linux in 1993, it wasn't long before the home systems ran Linux
regardless of what was in use at work.
<P> By 1995 she was training others in using Linux - and in charge of all the
"strange systems" at a (then) 90 million dollar company. Moving onwards, it's
safe to say, Linux has been an excellent companion and breadwinner... She
took over the HTML editing for "The Answer Guy" in issue 28, and has been
slowly improving the preprocessing scripts she uses ever since.
<P> Here's an autobiographical filksong she wrote called
<A HREF="../issue67/misc/tag/filksong-programmers-daughter.txt">The Programmer's Daughter</A>.
</em>
<br CLEAR="all">
<!-- *** END bio *** -->
<!-- *** END author bio *** -->
<div id="articlefooter">
<p>
Copyright © 2005, <A HREF="../authors/stern.html">Heather Stern</A>. Released under the
<a href="http://linuxgazette.net/copying.html">Open Publication license</a>
unless otherwise noted in the body of the article. Linux Gazette is not
produced, sponsored, or endorsed by its prior host, SSC, Inc.
</p>
<p>
Published in Issue 113 of Linux Gazette, April 2005
</p>
</div>
</div>
<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>What Fools We Linuxers Be</strong></a>
<li><A HREF="#wanted.2"
><strong>Articles about voice</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">What Fools We Linuxers Be</FONT></H3>
Fri, 1 Apr 2005 02:32:50 -0800
<BR>Heather Stern (<a href="mailto:tag@linuxgazette.net?cc=star@starshine.org&subject=%20Re%3A%20%5BLG%20113%5D%20help%20wanted%20%231">The Answer Gang's Editor Gal</a>)
<P>
We're thinking of a very special edition of "Foolish Things We Do With
Our Computers". If you did something foolish, or had something foolish
inflicted upon you by your otherwise favored silicon lifeform, and
you're willing to <EM>have just a little more fun</EM> with it in public, send
it along to us.
</P>
<P>
This does not have to be in article format. You can just send it to
The Answer Gang (tag, at our happy domain linuxgazette.net) with the
subject "Foolish Things With Computers" and we'll gather them all up and
roast marshmallows over them. Let us know if you want your name left
in - we'll take these anonymously too. But don't just make them up; we
want real tales that make us groan and go <EM>agh</EM> I won't do <EM>that</EM> again!
<IMG SRC="../gx/dennis/smily.gif" ALT=":)"
height="24" width="20" align="middle">
</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">Articles about voice</FONT></H3>
Thu, 24 Mar 2005 14:21:50 -0800
<BR>Heather Stern (<a href="mailto:tag@linuxgazette.net?cc=star@starshine.org&subject=%20Re%3A%20%5BLG%20113%5D%20help%20wanted%20%232">The Answer Gang's Editor Gal</a>)
<P>
In the issues numbered about 85 to 89 we had articles about the use of
voice on computers in developing areas, for hadicapped usage, and the
like.
</P>
<P>
Sound systems on Linux have improved considerably - we've had Jimmy
cover "Songs In the Key of Tux" - but we haven't come back to the topic
of ordinary voices. Voice Over IP got a mere nod in my Answer Gang
blurb last Summer.
</P>
<P>
If you are interested in writing an article on this topic, see our
<a href="../faq/author.html">article submission guidelines</a>
and then drop us a line!
</P>
<!-- end 2 -->
<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>Knight's tour</strong></a>
<li><A HREF="#mailbag.2"
><strong>RW "Quick Format"...</strong></a>
<li><A HREF="#mailbag.3"
><strong>Rob Tougher's article, issue 96</strong></a>
<li><A HREF="#mailbag.4"
><strong>Trojan files on TLDP server?</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">Knight's tour</FONT></H3>
Wed, 2 Mar 2005 23:05:44 +0100
<BR>Gunno Törnberg (<a href="mailto:gazette@linuxgazette.net?subject=%20Re%3A%20%5BLG%20113%5D%20mailbag%20%231">gunno from telia.com</a>)
<blockquote><em><font color="#000066">Sent to our author Kapil Hari Paranjape privately, printed with
permission.
-- Heather</font></em></blockquote>
<P>
Hello,
</P>
<P>
and thanks for your amusing article about the Knight's tour in
Linux Gazette. I don't understand Python, but I have some
experience of the Knight's tour problem.
Mathematicians might have annoying habits, and one could be
to end their articles with Exercises
Like:
4.There is apparently a better algorithm than Warnsdorff's for the
Hamiltonian circuit. Find it and implement it.
</P>
<P>
"apparently" ?! Enough to drive at least me crazy
<IMG SRC="../gx/dennis/smily.gif" ALT=";-)"
height="24" width="20" align="middle">
</P>
<P><DL><DT>
I have a couple of pages about the problem at:
<DD><A HREF="http://web.telia.com/~u85905224/knight/eknight.htm"
>http://web.telia.com/~u85905224/knight/eknight.htm</A>
</DL></P>
<P>
with some decently efficient Java applets and some about the research
done about the problem of how many closed tours there are.
(At least I would call that problem 'hard')
</P>
<P>
Once again, Thanks for your article
<BR>and Best regards
</P>
<P>
Gunno Törnberg
</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">RW "Quick Format"...</FONT></H3>
Sun, 6 Mar 2005 13:36:24 -0500
<BR>David Yerka (<a href="mailto:gazette@linuxgazette.net?subject=%20Re%3A%20%5BLG%20113%5D%20mailbag%20%232">leshaworks from iname.com</a>)
<P>
Here's a reply to my posting of the Packet Writing material on my own
site. I've gotten his permission to forward this into TAG as commentary
on the original, so if you want to use it... ?
</P>
<P>
best,
</P>
<P>
.brian
</P>
<HR width="10%" align="center"><P>
Hi Brian,
</P>
<P>
Actually the time for UDF formatting of a CDRW is consistant with Nero's
packet driver (InCD) under Windows. InCD used to have multiple selections of
"Format" and "Quick Format" available but only the "Format" option was
available for a BLANK CDRW disk and formatting could take up to 45min to an
hour. A previous formatted UDF disk would let you "quick format" and take
considerably less time; some times as short as 6min.
</P>
<P>
Of course, I suspect the "quick format" is really only doing a quick erase
and random verify of the file system. This would be similar to a 'quick
erase' of a CDRW disk which was written/formatted as an iso -- erase the
header and directory structure but don't bother with rest of data (i.e. lets
hope the surface, etc. is OK and we'll just overwrite for the new
compilation).
</P>
<P>
I had a Mount Ranier capable CDRW drive at one point and I noticed that it
worked a bit differently. Apparently MR drives can format and write "at the
same time" and also do formatting in the background. So, when using MR
(instead of UDF 1.5) it appeared only the disk headers and directory
structure was initially formatted. Then, as data was sent to the drive (by
"drag and drop" or whatever) it was cached and buffered, then the space
needed was formatted and written to in the background. When the disk was
ejected a significate delay occured while anything left in the cache was
written out to disk and the disk cleaned up. It appeared that only as much
of the disk was actually formatted as needed because you could "force" a
full disk format in MR and it would take about as long to complete as a
format as UDF.
</P>
<P>
Users should also be aware that UDF file systems are much, much less safe
than standard iso compilations. They are more effected by heat. Not all UDF
file systems are equal -- especially now that various revision levels are
out (UDF1.5 appears to be "standard recommended" while there were revisions
up to 2.5 last time I looked). In practice I've found that using packet
writting is tends to work only for the computer/drive you write it on and
only for relatively short term storage.
</P>
<P>
Note the fact that Windows XP's setup for CD writing uses a disk buffer and
writes only a iso. It simulates a "drag and drop" random access file system
by mapping the CDRW disk to the buffer (actually a system folder called "cd
burning") and then just burns asks to burn a standard iso. For adding to a
written disk it appear to load what is already on disk to the buffer adding
to the new files then erase the CDRW disk and re-burn it. I suspect even
good old Microsoft figured the odds of including UDF packed writing would be
adding another can of worms to XP.
</P>
<P>
David Yerka
</P>
<P>
PS: I have been testing Xandros OC 3.0.1 and I find I like it quite a bit. I
didn't find 2/2.5 really ready for an average business user but Xandros 3
looks to be a true MS desktop killer. A number of my clients are fed up with
paying through the nose for Windows "upgrades" -- some really feel MS
tugging the chain -- so they are very interested. I even have one office
where the practice management application will run under Crossover Office --
and the developers have decided to commit to a Linux version for release
next year.
</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">Rob Tougher's article, issue 96</FONT></H3>
Thu, 31 Mar 2005 11:01:19 -0500
<BR>bbruns (<a href="mailto:gazette@linuxgazette.net?subject=%20Re%3A%20%5BLG%20113%5D%20mailbag%20%233">bbruns from fitme.com</a>)
<P>
Dear editor,
</P>
<P><DL><DT>
Regarding:
<DD><A HREF="http://linuxgazette.net/issue96/tougher.html"
>http://linuxgazette.net/issue96/tougher.html</A>
</DL></P>
<P>
This was pretty good article but it seems to leave out something.
Because of that I've had hours of pain.
Perhaps a note could be added.
</P>
<P>
Here is what seems to be missing:
setting up AXIS_HOME, AXIS_LIB, and AXIS_CLASSPATH, as in
</P>
<blockquote><pre>set AXIS_HOME=c:\axis
set AXIS_LIB=%AXIS_HOME%\lib
set AXISCLASSPATH=%AXIS_LIB%\axis.jar;%AXIS_LIB%\commons-discovery.jar;
%AXIS_LIB%\commons-logging.jar;%AXIS_LIB%\jaxrpc.jar;%AXIS_LIB%\saaj.jar;
%AXIS_LIB%\log4j-1.2.8.jar;%AXIS_LIB%\xml-apis.jar;%AXIS_LIB%\xercesImpl.jar
;%AXIS_LIB%\wsdl4j.jar
</pre></blockquote>
<P><DL><DT>
I found this solution at:
<DD><A HREF="http://paul.rutgers.edu/~weiz/cs541/axis.html"
>http://paul.rutgers.edu/~weiz/cs541/axis.html</A>
</DL></P>
<P>
Regards and keep on going,
</P>
<P>
Bill Bruns
</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">Trojan files on TLDP server?</FONT></H3>
Mon, 4 Apr 2005 10:27:17 -0700
<BR>Rick Moen (<a href="mailto:gazette@linuxgazette.net?subject=%20Re%3A%20%5BLG%20113%5D%20mailbag%20%234"><em>LG</em> Contributing Editor</a>)
<blockquote><em><font color="#000066">Forwarded from a discussion on the Linux Documentation Project mailing
lists. <EM>Linux Gazette</EM> is a member of TLDP...
-- Heather</font></em></blockquote>
<HR width="10%" align="center">
<blockquote><pre>Date: Mon, 4 Apr 2005 15:02:12 +0000 (UTC)
From: Machtelt Garrels <address_elided>
</pre></blockquote>
<P>
Can somebody look into this? It never happened to me...
Please confirm if this is fake or not.
</P>
<P>
Tille.
</P>
<TABLE WIDTH="95%" BORDER="1" BGCOLOR="#FFFFCC"><TR><TD>
<p align="center">...............</p>
<blockquote><pre>Date: Mon, 28 Mar 2005 16:57:59 -0800
From: Brian Wildasinn <address_elided>
</pre></blockquote>
<P>
Hello TLDP,
</P>
<P>
URGENT NOTICE: Trojan LG TLDP archives alert!
</P>
<P>
On March 25, 2005, I download some files from TLDP. My download script shows a time stamp of 9:10PM, which downloaded the entire ftpfiles directory at linuxgazette from my home LAN at 66.218.50.80.
</P>
<P>
I have a WinXP notebook attached to a wireless access point. After downloading some Linux Gazette tarballs from <A HREF="http://linuxgazette.net/ftpfiles"
>http://linuxgazette.net/ftpfiles</A>, my security scanners show an active suspicious port open. I could telnet into port 5400 on WinXP from my <A HREF="http://www.freebsd.org/">FreeBSD</A> box over my LAN.
</P>
<P>
Using NMAP security scan on FreeBSD `nmap -sS -P0 <wireless access point w/WEP encryption/router MN-700>` showed port 5400 open, which is described as "5400/tcp excerpt Excerpt Search" or Bladerunner Trogan.
</P>
<P>
Here is the results of ClamWin from my infect notebook:
</P>
<p align="center">See attached <tt><a href="misc/mailbag/ClamWin.infection-log.txt">ClamWin.infection-log.txt</a></tt></p>
<p align="center">...............</p>
</TD></TR></TABLE><HR width="10%" align="center">
<blockquote><pre>Date: Mon, 4 Apr 2005 10:27:01 -0700
From: Rick Moen <address_elided>
</pre></blockquote>
<P>
Quoting Machtelt Garrels:
</P>
<P><STRONG><BLOCKQuote>
Can somebody look into this? It never happened to me...
Please confirm if this is fake or not.
</BLOCKQuote></STRONG></P>
<P>
What you have there is a pair of false positives. I'm not sure what in
<EM>Linux Gazette</EM> issue 86 Clamwin thought was an instance of
"Exploit.IFrame.Gen", which I gather is an MS-Outlook exploit. The
<EM>Gazette</EM> has a feature near the end of many issues where the text of
particularly hilarious spam and/or virus mail is published and mocked,
so that might well be it.
</P>
<P>
I would guess that the "HTML.Phishing.Bank-1" Clamwin thought it found,
I'd guess it was (likewise) erroneously triggering on the "Spam
Cuteness" item in Jimmy O'Regan's "Linux Launderette" column.
</P>
<P>
Brian, there's nothing wrong with paying close attention to your
anti-virus software if you're on MS-Windows, but you'll want to read the
results with at least a little skepticism: For one thing, given that
the <EM>Linux Gazette</EM> files are a magazine, and that you read the contents
rather than executing it as a program, it's unclear to me how -- even if
every issue were packed chock-a-block with MS-Windows worms, trojans,
viruses, and exploits -- those could have been anything but inert
curios.
</P>
<P>
You may indeed have an alarmingly open "port 5400" on your MS-Windows XP
box, of course -- for entirely independent reasons. Good luck with that.
</P>
<!-- sig -->
<P><DL><DT>
<EM></EM>____________________
<DD><A HREF="http://lists.tldp.org"
>http://lists.tldp.org</A>
</DL></P>
<!-- 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 113 of Linux Gazette, April 2005
</p>
</div>
</div>
<div class="content lgcontent">
<a name="lg_answer"></a>
<h1>The Answer Gang</h1>
</b>
</p>
<p>
<center>
<img src="../gx/dennis/qbubble.gif" alt="(?)"
border="0" align="left">
<img src="../gx/dennis/bbubble.gif" alt="(!)"
border="0" align="right"><BR>
<STRONG>By Jim Dennis, Jason Creighton, Chris G, Karl-Heinz, and...
(<a href="../tag/bios.html">meet the Gang</a>) ...
the Editors of <i>Linux Gazette</i>...
and
<a href="../tag/members-faq.html">You</a>!
</STRONG>
<P>
<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>
<!-- ***** the answer gang ***** -->
<H3>Contents:</H3>
<dl>
<dt><a href="#tag/greeting"
><strong>¶: Greetings From Heather Stern</strong></A></dl>
<DL>
<!-- index_text begins -->
<dt><A HREF="tag/1.html"
><img src="../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
><strong>Lifehacks</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="(¶) " border="0"
>Greetings from Heather Stern</H3>
<!-- begin hgreeting -->
<p>Hello folks, things are a bit hectic over here at Ye Olde Answer Gang. It's
been a complete madhouse - no wait, an incomplete madhouse -
</p>
<p> Just check out the Lifehacks we have this month. Hopefully, they'll
keep your life less tangled than ours. For the moment, we're saving up our
Tips and our threads; the trials and the tribulations of The Answer Gang
will be <a href="../114/lg_answer.html">back next month</a>, after we get
the backhoes rolled away, and the forklifts are gone... Sorry for the dust,
folks. </p>
<p>
There's a friend of mine who says "when tech does poorly, buy stocks
in raw materials for construction." After all, we know the backhoe is the
real enemy of the internet! I wonder if it's time to sell those puppies -
it looks like things in the tech world are pretty much looking up. Not
necessarily all at once - but certainly, there are signs of Spring. Renewal
is here, there are <tt>random()</tt> seeds everywhere. We're getting to the
<tt>/root</tt> of things (with a bit of hack and <tt>/</tt>-ing, true).
Duck season, wabbit season... allergy season.</p>
<p>Ok, enough of that, I'm hiding indoors and doing programming until
Summer. <IMG SRC="../gx/dennis/smily.gif" ALT=":)"
height="24" width="20" align="middle">
Share drinks with your friendly local bartender in the TAG lounge, and
this is what you get:
</p>
<blockquote><em>
Happiness is like water. It might come back as rain, but it's always there
if you look for it.
</em></blockquote>
<p>Diving into something new, or coming out of deep waters? Sploosh.
Remember to protect your silicate buddies from the elements.
See you next month, folks!
<IMG SRC="../gx/dennis/smily.gif" ALT=":)"
height="24" width="20" align="middle">
</p>
<p><font color="#339933">p.s. Yes, we do celebrate April Fools Day around here.
Please send us any <strong>Foolish Things You Did With Your
Computer</strong> for a special run in next month's issue.</font> <font
color="#000099"><em>Any particularly yummy Answers you have discovered, are
also welcome; by this means you, too, can join </em>The Answer Gang!</font>
Send your submissions to: <a href="mailto:tag@linuxgazette.net">tag .at.
linuxgazette.net</a> - Thanks!</p>
<p>p.p.s. <em>Yes, questions are good too, we're always eager to answer you.
Well, almost always. We don't guarantee an answer (tho stumpers are likely
to land in Help Wanted). However - <strong>please</strong> don't ask us
things you don't want published - the Gang's not a private place. But you
can be anonymous, you only need to ask that too. -- Heather</em></p>
<!-- end hgreeting -->
<!-- *** /the answer gang ***** -->
<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 ©</a> its authors, 2005
<BR>Published in issue 113 of <I>Linux Gazette</I> April 2005</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>
</p>
<!-- *** BEGIN author bio *** -->
<!-- *** END author bio *** -->
<div id="articlefooter">
<p>
Published in Issue 113 of Linux Gazette, April 2005
</p>
</div>
</div>
<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>
<p>
</p><center>
<table cellpadding="7"><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 <a href="mailto:michael.conry@softhome.net">Michael Conry</a></strong>
</center>
</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
<a href="mailto:bytes@linuxgazette.net">bytes@linuxgazette.net</a>
<BR CLEAR="all">
</p><p></p><hr><p>
<a name="links"></a>
<!-- ========== -->
</p><center><h3><font color="green">Linux Links</font></h3></center>
<!-- ========= -->
<P>
Configuring <a href="">the GIMP</a> to
<a href="http://codemills.com/blog/?p=4">
look and act a bit more like Adobe Photoshop</a>
<P>
<a href="http://thelinuxbox.org/show.php">
The Linux Box Show</a>,
recorded in glorious audio for your listening pleasure.
<P>
<a href="http://www.reallylinux.com/docs/gran3.shtml">
Linux Makes Granny Cry</a>.
<P>
Interesting Open Source perspective analysis
<a href="http://www.technetra.com/writings/open_government/Hot_Air_in_Hannover">
of CeBIT 2005</a>, and the opportunities missed.
<p>
<a href="http://www.linuxmednews.com/linuxmednews/1112317813/index_html">
Linux Medical News is 5 years old</a>.
<P>
Richard Stallman
<a href="http://www.ofb.biz/modules.php?name=News&file=article&sid=353">
interviewed on the state of GNU/Linux</a>.
<P>
<a href="http://os.newsforge.com/article.pl?sid=05/03/25/1231253&from=rss">
Waiting and Sleeping</a>
on the command line.
<p></p><hr><p>
<a name="general"></a>
<!-- ========== -->
</p><center><h3><font color="green">News in General</font></h3></center>
<!-- ========= -->
<p></p><hr><P></P><h3><img alt=" " src="../gx/bolt.gif">
<font color="green">Linux Kernel</font></h3>
<p>
The newest iteration of the stable
2.6.x series of
<a href="http://www.kernel.org/">
Linux Kernels</a> is now available:
<a href="http://kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.11.6">
Linux 2.6.11.6</a>.
<P>
Also new, is the April
<a href="http://kerneltrap.org/node/4958">
release of version 2.4.30</a>
in the previous stable series.
<P>
As always, you should download kernels and patches from your
<a href="http://www.kernel.org/mirrors/">
nearest mirror</a>.
<!-- ========= -->
<p></p><hr><P></P><h3><img alt=" " src="../gx/bolt.gif">
<font color="green">Intel License</font></h3>
<p>
Intel has tentatively proposed
<a href="http://software.newsforge.com/article.pl?sid=05/03/29/227206">
eliminating the Intel Open Source License</a>, substituting
for it the more common BSD license. This would be a small
contribution to reducing the proliferation of licenses that
has occurred in recent years.
<!-- ========= -->
<p></p><hr><P></P><h3><img alt=" " src="../gx/bolt.gif">
<font color="green">TUX Magazine</font></h3>
<p>
<a href="http://www.tuxmagazine.com/">
TUX Magazine</a> is a new Linux magazine aimed at beginners.
Coming from SSC, publishers of
<a href="http://www.linuxjournal.com/">Linux Journal</a>,
TUX will be a monthly online magazine distributed in PDF
format. NewsForge has
<a href="http://trends.newsforge.com/article.pl?sid=05/03/25/1532209&from=rss">
published a report on the new publication</a>.
</p><p></p><hr><p>
<a name="distro"></a>
<!-- ========== -->
</p><center><h3><font color="green">Distro News</font></h3></center>
<!-- ========= -->
<p></p><hr><P></P><h3><img alt=" " src="../gx/bolt.gif">
<font color="green"> Yoper </font></h3>
<p>
<a href="http://www.yoper.com/">
Yoper Linux</a>
has been profiled and
<a href="http://os.newsforge.com/article.pl?sid=05/03/25/1724232&from=rss">
reviewed at NewsForge</a>.
<p></p><hr><P></P><h3><img alt=" " src="../gx/bolt.gif">
<font color="green"> Ubuntu/UserLinux </font></h3>
<p>
LWN
<a href="http://lwn.net/Articles/129465/">
has reported on the release</a>
of experimental UserLinux metapackages for Ubuntu Hoary.
<p></p><hr><P></P><h3><img alt=" " src="../gx/bolt.gif">
<font color="green"> Puppy </font></h3>
<p>
<a href="http://www.goosee.com/puppy/">
Puppy Linux</a>
is a flexible and small-sized GNU/Linux distribution.
You can read
<a href="http://www.linuxinsider.com/story/opensource/puppy-open-source-kauler-41710.html">
a brief review at LinuxInsider.com</a>.
<!-- ========= -->
<p></p><hr><P></P><h3><img alt=" " src="../gx/bolt.gif">
<font color="green"> Arch </font></h3>
<p>
OSnews has published
<a href="http://www.osnews.com/story.php?news_id=10142">
a lengthy interview</a>
with the developers behind
<a href="http://www.archlinux.org/">
Arch Linux</a>.
<a name="commercial"></a>
<p></p><hr><p>
</p><center><h3><font color="green">Software and Product News</font></h3></center>
<!-- ========= -->
<p></p><hr><P></P><h3>
<img alt=" " src="../gx/bolt.gif">
<font color="green"> Firefox </font></h3>
<p>
<a href="http://www.mozilla.org/products/firefox/">
Firefox</a>
appears to be making measurable inroads into Microsoft
Internet Explorer's market share. The Microsoft browser
offering
<a href="http://www.computerweekly.com/articles/article.asp?liArticleID=137561&liArticleTypeID=1&liCategoryID=6&liChannelID=1&liF">
now accounts for less than 90% of the browser sector</a>.
<p></p><hr><P></P><h3>
<img alt=" " src="../gx/bolt.gif">
<font color="green"> Nero </font></h3>
<p>
Nero, the popular Windows CD/DVD burning software, has
recently been
<a href="http://www.nero.com/en/NeroLINUX.html">
released for Linux</a>.
NeroLinux is a closed source application, and is available
free of charge following registration on the Nero website.
<p></p><hr><P></P><h3>
<img alt=" " src="../gx/bolt.gif">
<font color="green"> Adobe Reader </font></h3>
<p>
<a href="http://www.adobe.com/">Adobe</a> has released a new
version of its PDF reading software,
<a href="http://www.adobe.com/products/acrobat/readermain.html">
Adobe Reader 7.0</a>,
for Linux. The software is available for
<a href="ftp://ftp.adobe.com/pub/adobe/reader/unix/7x/7.0/enu/">
free download</a>, and has been
<a href="http://www.desktoplinux.com/news/NS6420674652.html">
profiled on DesktopLinux.com</a>.
</p>
<!-- *** BEGIN author bio *** -->
<hr>
<P> Mick is LG's News Bytes Editor.
<P>
<!-- *** BEGIN bio *** -->
<IMG ALIGN="LEFT" VALIGN="top" ALT="[Picture]" SRC="../gx/2002/tagbio/conry.jpg" WIDTH="128" HEIGHT="158" class="bio">
<em>
Originally hailing from Ireland, Michael is currently living in Baden,
Switzerland. There he works with ABB Corporate Research as a
Marie-Curie fellow, developing software for the simulation and design
of electrical power-systems equipment.
<p> Before this, Michael worked as a lecturer in the Department of
Mechanical Engineering, University College Dublin; the same
institution that awarded him his PhD. The topic of this PhD research
was the use of Lamb waves in nondestructive testing. GNU/Linux has
been very useful in his past 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 © 2005, <A HREF="../authors/conry.html">Michael Conry</A>. Released under the
<a href="http://linuxgazette.net/copying.html">Open Publication license</a>
unless otherwise noted in the body of the article. Linux Gazette is not
produced, sponsored, or endorsed by its prior host, SSC, Inc.
</p>
<p>
Published in Issue 113 of Linux Gazette, April 2005
</p>
</div>
</div>
<div class="content lgcontent">
<a name="collinge"></a>
<h1>HelpDex</h1>
<p id="by"><b>By <A HREF="../authors/collinge.html">Shane Collinge</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>
<div class="cartoon">
<a href="misc/collinge/redundant.jpg">
<img alt="[cartoon]" src="misc/collinge/redundant.jpg"></a>
<a href="misc/collinge/spinninglogo.jpg">
<img alt="[cartoon]" src="misc/collinge/spinninglogo.jpg"></a>
<a href="misc/collinge/volcano.jpg">
<img alt="[cartoon]" src="misc/collinge/volcano.jpg"></a>
</div>
<p>
<p> All HelpDex cartoons are at Shane's web site,
<a href="http://www.shanecollinge.com/">www.shanecollinge.com</a>.
</p>
<!-- *** BEGIN author bio *** -->
<!-- *** BEGIN bio *** -->
<hr>
<P>
<img ALIGN="LEFT" ALT="[BIO]" SRC="../gx/2002/note.png" class="bio">
<em>
Part computer programmer, part cartoonist, part Mars Bar. At night, he runs
around in a pair of colorful tights fighting criminals. During the day... well,
he just runs around. He eats when he's hungry and sleeps when he's sleepy.
</em>
<br CLEAR="all">
<!-- *** END bio *** -->
<!-- *** END author bio *** -->
<div id="articlefooter">
<p>
Copyright © 2005, <A HREF="../authors/collinge.html">Shane Collinge</A>. Released under the
<a href="http://linuxgazette.net/copying.html">Open Publication license</a>
unless otherwise noted in the body of the article. Linux Gazette is not
produced, sponsored, or endorsed by its prior host, SSC, Inc.
</p>
<p>
Published in Issue 113 of Linux Gazette, April 2005
</p>
</div>
</div>
<div class="content lgcontent">
<a name="engel"></a>
<h1>Free as in Freedom: Part Four: Epilog - 2000 VAIOS and a Grain of Zen</h1>
<p id="by"><b>By <A HREF="../authors/engel.html">Adam Engel</A></b></p>
</b>
</p>
<p>
<p> The KDE and GNOME desktop environments make it possible for people who
have no knowledge of Unix or GNU/Linux commands to use a GNU/Linux system
as easily as they'd use Mac or Windows for web-browsing, word-processing,
email, games and the things most users spend their computer time on. It's
only going to get better, and one day many people might know GNU/Linux only
through the GUI.
<p> I asked Okopnik, "Do you think this is a 'good' thing, that people are
finding out they have an alternative, but at the same time using that
alternative almost exclusively on the GUI level, like they would use Mac
or Windows? Have you noticed more of an interest in Linux or an enhanced
readership since Linux became both market and user friendly? If so,
are these new users less interested in the "technical" aspects than in
having a stable GUI-based system to for work and email and net-surfing?"
<p> Okopnik wrote, "Actually, this is an issue that I brought up in an
involved discussion with the LG staff and the Answer Gangsters (The
Answer Gang answers Linux questions sent to us by our readers, and the
discussions and the answers become part of LG.) My viewpoint here is
that it's actually a very good thing - modulo the awareness that the
Command Line (CLI) exists. That is, people are perfectly welcome to come
to Linux and use only its GUI capabilities as long as this serves their
needs - but when the GUI proves insufficient, the capabilities of the
CLI are there, just underneath, providing the perfect security blanket.
<p> "In an article I wrote for Java Developers Journal, I related an
example of this. I had a client whose Web developer left them in the
lurch with several hundred HTML files without the ".html" extensions.
This wouldn't be too bad by itself - renaming a group of files isn't
difficult - but the thousands of HTML links within the files referred
to those extensionless names as well. With GUI-only tools, this is a
nearly-unsolvable disaster. From the CLI, it was a matter of a single
short line of code:
<pre>
perl -i -wpe 's/<a href="[^"]+/$&.html/g' *
</pre>
<p> "The readership of LG has certainly changed over time. Where we
used to get dozens of questions on fairly technical topics in The
Answer Gang, we now get only a few - and they tend to be simpler, less
technical. The email I get from our readers indicates that there has
indeed been a definite shift in the user base; the old Linuxer who would
bang on a problem for hours so that it could be reported (and quickly
fixed) is being... well, not _replaced,_ but reduced, percentage-wise,
as the mainstay of the population. The new user is often just that -
a computer user who just wants that email/web/document/spreadsheet
processor and maybe a few games on the side. There is, however, a
cultural shift that occurs even in those users after a while: you
cannot live in a society based on a given moral premise and ignore
that premise, or even stop it from penetrating into your life (even if
you try to prevent it.) The original "hacker ethic" of Linux lives on,
strong as ever in those who use the full extent of this OS, and inherent
(and growing, however slowly) in those who use it even without that full
knowledge.
<p> I wrote, "I was considering the license for Documentation -- I forgot
what it's called..."
<p> Okopnik wrote, "The Open Publication License. There has been quite an
evolution of licenses on the documentation side; the OPL is pretty much
the last product of it (there are a few others) and is by far the most
popular, simple, and comprehensive. The LG remains under it because I
did _a lot_ of applicable research."
<p> I wrote, "It almost goes without saying that this article will be
'free' but it's probably a good idea to say it because I've been
'burned' before, as have other writers I know, having articles that were
meant to be "free" stolen by publications that charge a fee to readers
-- online or off."
<p> Okopnik replied, "This would be a good reason to implement the 'no
commercial distribution without prior permission' clause."
<p>
I wrote, "Tell me about your experience with licensing and your
research. For instance, how does one particular license affect LG as
opposed to another?"
<p> Okopnik wrote, "When I took over the E-i-C/publisher slot here at
LG, I decided to revisit the decisions that had been made (and cast as
procedure) in the past with regard to as many of them as I could find;
in my opinion, this needed to be done to keep LG fresh and relevant.
One of these was the license under which we accept and publish all our
material.
<p> "I had asked Rick Moen, a member of our staff who is very knowledgeable
about the nitty-gritty of various FLOSS issues including licensing to
comment on our use of OPL; I also threw the floor open to others' input. As
a result of the discussion and familiarization with the basic issues at
stake, I did a lot of my own research, and came to focus on the OPL (which
was the license LG was using at the time) and the CC, the Creative Commons
license (see <a
href="http://creativecommons.org/">http://creativecommons.org/</a>; I
recommend the site highly, particularly their "license-choosing wizard"
which helps you pick the appropriate one for your application.) The latter
held a lot of promise and flexibility, but in the end, I had to vote
/antiquo/; the OPL, with a little clarification, supplied all our needs.
The front page of LG now states:
<p> "All content released under the Open Publication License v1.0
(options A and B not applied)
<p> "The clarification in the parentheses was the only thing added. Given
that the author of OPL himself, David Wiley, considers it dated (he
became CC's Director of Educational Licenses and shut down the Open
Content site in 2003), we may well transition to the CC at some point in
the future. For now, though, the OPL serves our purposes and creates no
restrictions on the author's rights (theirs supercede ours) that I would
find objectionable.
<p> "LG's only concern is the right to distribute freely in electronic
format. Should you wish to prohibit or restrict commercial distribution,
or want to be contacted before anyone converts it to print, we have no
objection or concern; in fact, we have no say - and this is what I,
in my capacity at LG, see as perfectly suiting our needs. A slightly
different attitude than you'll find in a commercial environment, I
grant... " wrote Okopnik
<p> I wrote, "This is a particularly interesting/different attitude for a
magazine."
<p> Okopnik wrote, "The Open Source culture often produces those. Once
money is not the primary motivator, a number of interesting results show
up. FLOSS is a social experiment gone successful -> mainstream -> wild,
a meritocracy/gift-based culture that focuses on exchanging people's
best abilities for community recognition and respect. Part of the secret
of its effectiveness is that you can't cheat people out of respect
the way you can with money - it can always be lost or withdrawn. Like
any other human system, it has its imperfections (see Cory Doctorow's
"Down and Out in the Magic Kingdom" or James P. Hogan's "Voyage into
Yesteryear", both of which describe a respect-based system as the basis
of an economy), but they're a) usually self-correcting and b) several
orders of magnitude less extreme at the edges than what we have now."
<p> I wrote, "It actually brings up the question, "what is a magazine"
(online or off)? I always thought of a commercial magazine as a
corporation using artists and authors to sell advertisements while
at the same time providing a venue for artist/authors' works. But a
zine like LG, which provides essential, often crucial information to a
specific audience -- i.e. Linux users -- has a unique responsibility as
an "education/information venue." By placing author's rights above the
rights of the magazine itself, you are serving as a mediator between
your audience and the kind of information you offer them."
<p> Okopnik wrote, "/<a
href="<http://www.netschoolbook.gr/latinmoto2.html#t>">Tetigisti acu</a>/;
well done, sir. That is precisely our function and mission. We want to
introduce people to Linux, get them to the point where they'll know enough
to ask the right questions and to find the answers. This would set off all
sorts of alarms for a commercial venture - we are, after all, training our
readers not to need us after a while - but I'll happily hang up my
editorial hat once most of the world is Linux-competent. :)"
<p> I wrote, "I see LG as a "mediator" between Linux Users and the
millions of pages of information pertaining to Linux. At some point an
'editor' is needed, otherwise a reader can just do a Google search on
various subjects without a coherent 'theme.'"
<p> Okopnik wrote, "Precisely so. Does it surprise you to learn that I'm
a teacher (seminars in programming, network security, etc. for Sun
Microsystems and others), and have been, in one form or another, for
most of my career? I suspect not."
<p> "What's FLOSS?" I asked.
<p> Okopnik wrote, "An unwieldy compromise of a name that the majority
can live with. As you've probably figured from your exchange with
Stallman, there's some disagreement about exactly what this whole
movement should be called - and Free/Libre/Open Source Software is what
we got as a result. Like dead yeast in beer, it's harmless and doesn't
even affect the flavor."
<p> I wrote, "Interestingly, or by strange coincidence, I destroyed my
wife's Windows installation on a super-powered custom-built PC she uses
to run the Maya 3D program (she teaches computer graphics and 3D at New
York University)."
<p> Okopnik wrote, "You do realize that Maya is usually run under Linux
these days, right?"
<p> I wrote, "Doesn't matter; the university's program is locked
into Windows. Anyway, she warned me not to mess up her dedicated Maya
machine by 'playing around with Linux' and of course I told her this
was an impossibility -- oops. Problem was, I switched, after a year
of smooth sailing, from GRUB to LILO and totally corrupted the Master
Boot Record (MBR). This brought up an interesting point: virtually no
one knows how Windows works. I was able to fix the LILO problem, but I
had no idea how to do anything in Windows, nor did many people I called
who actually teach courses on the Windows OS. To make matters worse,
the only boot disc available was the original installation CD, which
you can only access via a password, which we forgot. So, even though we
"owned" the system, there was no way of getting in. We had to call in an
expert, the person who built the machine and installed the software, the
President of Compusoft Computing Systems himself, Philip Keough, who is
all of sixteen years old..."
<p> Okopnik wrote, "In an information-based economy, intelligence (and
the wisdom to use it correctly) is the winning factor. The side
effects still tend to surprise the hell out of people, which makes for
interesting food for thought."
<p> I wrote, "I recognized this as an opportunity not only to save my
marriage, but to interview a certified computer whiz from the 'younger
generation' (painful, those words) who grew up with both Windows and
Linux. His high school -- I think the President of Compusoft Computing
Systems is a junior -- just provided a Sony VAIO laptop for every
student, loaded, of course, with Windows XP. The school was considering
GNU/Linux, but decided to go with the 'industry standard.' I asked him
if anyone among his hacker friends, not the 'mainstream students,' was
into GNU/Linux, which I thought would be the OS for rebellious young
geeks. His answer was exaclty 2 out of 2000 sudents, are familiar with
GNU/Linux: himself and some other kid who publicly proclaims 'give me
Linux or give me death' but secretly runs Windows 2000 as his main
installation. I asked Philip why this was so, why kids at such a young
age would want to feed into the 'industry standard' way of life. His
answer was that Windows felt more "professional" just as Adobe Photoshop
was 'more professional' than The GIMP. So much for garage-band rebellion
and the Ramones...
<p> "If what he was saying is true, and Mac is viewed as something for
graphic artists, like the old SGI, but otherwise obsolete, then there
is only one operating system on earth, and it's a damned bad one," I
wrote.
<p> Okopnik wrote, "You have to remember that the OS competitive arena
is the entire world, while what you heard was a single opinion from a
single person in a single location. Furthermore, if he had said 'Windows
can do X, Y, and Z whereas Linux can't', or 'the software that we're
mandated to use requires Windows', well and good (although I don't think
that it's possible to defend the first argument); since his entire
area of focus is on how an OS 'feels', then he's off into mysticism as
opposed to rational judgement."
<p> I wrote, "So, in reference to your LG audience: is GNU/Linux just
a toy that hackers boot on week-ends to unwind, or is it viewed as
a genuine alternative to Windows? The feeling I'm getting, or I
was getting from Philip, is that even the most dedicated GNU/Linux
enthusiasts share their hard-drives with some version of Windows for use
in the 'real world.'"
<p> Okopnik wrote, "Well, let's see. Many schools, hospitals, and
government installations in India run Linux. Same for South Africa. France
has passed a law that says "Open Source is to be implemented whenever
possible"; Brazil, which was 8% of Microsoft's business a couple of years
ago, has followed suit. Germany has been using Linux in their security
departments, and is now implementing it at every level - federal, state,
and local. China has decided that it's their official OS; Korea and Japan
have joined them in investing several billion dollars in FLOSS software
development recently. Most of South America is switching, led by Peru (Dr.
Villanueva Nunez, a Congressman, responded succinctly and brilliantly to
the fear-and-doubt tactics that Microsoft tried to sow when the decision
was made; the translation can be found in many places on the Net.) This is
just off the top of my head; there are many other countries which have
decided that FLOSS simply _works_ for them (generally by making them
competitive in the world market and removing an unnecessary barrier to
their pool of talented but poor would-be techies.)
<p> "Special effects - in e.g. Titanic, Shrek, The One, and many other
movies - are being done on Linux, simply because you _can't_ build
a real server farm for crunching serious processing under Windows
(incidentally, one of the most powerful computers in the world is a
massively-parallel rig built by students in Australia. Guess what it
runs?) The overwhelming majority of Web servers on the Net run Linux
- and many of those that don't are running Apache, a piece of FLOSS
software.
<p> "I hope these random examples begin to add up to a coherent picture.
I couldn't even start to draw an outline of just how huge and pervasive
the entire FLOSS penetration into the OS market actually is," Okopnik
wrote.
<p> Okopnik added, "Mac's gone FLOSS. Well, almost completely, anyway: the
base of Mac OS/X is another free Unix, BSD. The only part they haven't
really opened is their desktop manager (if I recall correctly, it's
called "Aqua") - but you can run plain ole' X on Mac hardware, and it's
available right from Apple's site. What's more, Apple has been edging
toward releasing the older versions of Aqua as FLOSS; their real edge
has always been as a great hardware and User Interface (UI) company
anyway, so they wouldn't lose anything.
<p> "A lot of FLOSS software, unsurprisingly, can be compiled to run on
OS/X; the instructions for doing so are, again, available on Apple's
site - and so it a lot of already compiled FLOSS. Did I mention that
we're taking over the world? :)," Okopnik wrote.
<p> I wrote, "But Mac long ago ceased to be any kind of real competitor
to Windows. Like the old Soviet Union kept the U.S. in check and vice
versa. Now the U.S. is a Monopoly run rampant -- like Microsoft. A
closed system is a closed system. The rest of the world, developing
better software on Linux, will catch up while Microsoft, who keeps its
position only through use of 'force' will wither up and die," I wrote.
<p> Okopnik wrote, "Is it as obvious to you as it is to me and many
others? I don't understand why more people can't see that basic fact -
other than simply not knowing or understanding the issues."
<p> I wrote, "I came across this quote by Stallman on the gnu.org site
(www.gnu.org/thegnuproject.html):
<p> 'The "Linux" magazines ... are filled with advertisements for
proprietary software that works with GNU/Linux. When the next Motif or
Qt appears, will these magazines warn programmers to stay away from it,
or will they run ads for it?'
<p> "Response?" I wrote.
<p> Okopnik wrote, "As it happens, LG is the one Linux publication that
does not accept advertisements, and therefore does not follow Stallman's
dictum; we prefer to remain totally unbiased (except by our own personal
prejudices, of course. :) I have to agree that commercially-driven
magazines do have their bottom line to consider; perhaps not above all,
but it is a very strong motivating factor. I'll admit to being actually
shocked for about 30 seconds when I saw a Microsoft ad in the Linux
Journal... but sober consideration prevailed. There's no reason that
they shouldn't have - the ad said nothing derogatory about Linux and was
placed in the more-or-less correct market for MS's purposes - but it did
make for an interesting contrast.
<p> "For the people who were outraged by this - and judging from the
comments on Slashdot and elsewhere, many were - I'd suggest considering
the following Buddhist koan:
<p> "'Always meditate on whatever provokes resentment.'
<p> "Very interesting questions can be found in the moment between the
emotional response and the reaction..." wrote Okopnik.
<p> I wrote, "Sometimes I wonder if I should be writing two different
articles, the GNU Story, and Everyone Else's. They're kinda picky with
their "GNU/Linux" not "Linux" and initially boycotting KDE because qt
was "proprietary" but I guess you need people like that, people who are
ready, willing and able to go 'all the way' to get a movement started.
If you don't mind me 'requoting' you from the previous section of this
article:
<p> 'We _need_ our radicals. They're ugly, scruffy, pushy, aggressive, loud,
and unfit for normal humans to associate with - but, O Ghod do we need
them! They sacrifice themselves on the altar of whatever the hell their
passion may be; they give up their right to be seen as "normal", and
make of themselves targets at which the majority of society will fling
rocks and garbage - and we, the human race, get to move ahead just
another tiny notch for each one of them. Granted, there are radicals on
either side of the fence - and lots of different fences - but the total
vector of these little steps *is* in the direction of progress; another
pragmatic belief of mine, and although I won't go into the philosophical
ramifications of it, it can be summed up as "'good' is just another way
of saying "pro-survival".' -- Ben Okopnik. That's you," I wrote.
<p> Okopnik wrote, "I might add, 'Listening to these folks, however,
_does_ require turning down the volume and intensity controls, and
keeping a supply of large grains of NaCl handy. :)'"
<p> I wrote, "I just want this article to introduce GNU/Linux to people
who aren't aware that it's a valid option -- especially now that KDE
and GNOME provide GUI 'desktop environments' that anyone can use.
Good to know know LG is sticking to the straight and narrow regarding
advertisements for proprietary software, though."
<p> Okopnik wrote, "Well, we don't have an articulated social contract the
way Debian Linux does (<a
href="http://www.debian.org/social_contract">http://www.debian.org/social_contract</a>),
but we do have our priorities. 'Making Linux a little more fun' does not
mean distorting the truth for profit - and that includes being cautious
with regard to slippery slopes."
<hr>
<p>
This work is licensed under a <a rel="license"
href="http://creativecommons.org/licenses/by-nd/2.0/">Creative Commons
License</a>. It is free to distribute, reproduce or modify with the
author's consent. Read more about licensing software, text and
documentation at <a
href="http://www.creativecommons.org">http://www.creativecommons.org</a>.
<!--
<rdf:RDF xmlns="http://web.resource.org/cc/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<Work rdf:about="">
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
<license
rdf:resource="http://creativecommons.org/licenses/by-nd/2.0/" />
</Work>
<License rdf:about="http://creativecommons.org/licenses/by-nd/2.0/">
<permits rdf:resource="http://web.resource.org/cc/Reproduction" />
<permits rdf:resource="http://web.resource.org/cc/Distribution" />
<requires rdf:resource="http://web.resource.org/cc/Notice" />
<requires rdf:resource="http://web.resource.org/cc/Attribution" />
</License>
</rdf:RDF>
-->
</p>
<!-- *** BEGIN author bio *** -->
<!-- *** BEGIN bio *** -->
<hr>
<p>
<img align="left" alt="[BIO]" src="../gx/authors/engel.jpg" class="bio">
<em>
Adam Engel has published poetry, fiction and essays in such magazines and
periodicals as Counter Punch, Dissident Voice, Online Journal,
Strike-the-Root, LewRockwell.com, The New York Art Review, The Concord
Journal, The Middlesex News, Accent, The Littleton Review, Ark, Smart
Shoes, The Beacon, Literal Latte, Artemis, The Lummox Journal, Fearless,
POESY, The Half Moon Review, Art:Mag, Chronogram, Gnome and others.
<p> Adam Engel's first book of poetry, <strong>Oil and Water</strong>, was
published by Maximum Capacity Press in 2001. His novel,
<strong>Topiary</strong>, will be published by Dandelion Books in the
Spring of 2005.
<p> He has worked as a journalist, screenwriter, executive speechwriter,
systems administrator, and editorial consultant, and has taught writing at
New York University, Touro College and the Gotham Writer's Workshop in New
York City.
</em>
<br clear="all">
<!-- *** END bio *** -->
<!-- *** END author bio *** -->
<div id="articlefooter">
<p>
Copyright © 2005, <A HREF="../authors/engel.html">Adam Engel</A>. Released under the
<a href="http://linuxgazette.net/copying.html">Open Publication license</a>
unless otherwise noted in the body of the article. Linux Gazette is not
produced, sponsored, or endorsed by its prior host, SSC, Inc.
</p>
<p>
Published in Issue 113 of Linux Gazette, April 2005
</p>
</div>
</div>
<div class="content lgcontent">
<a name="kapil"></a>
<h1>Roll your Desktop into a USB stick/CD</h1>
<p id="by"><b>By <A HREF="../authors/kapil.html">Kapil Hari Paranjape</A></b></p>
</b>
</p>
<p>
<h3>Introduction</h3>
<p> Here is a short course (with some excursions) to help you take your
existing Desktop, roll it into an ISO pipe and smoke a USB stick or CD.
This is not a task for the faint-hearted - there are no automated scripts
in here!
<p> Part of the reason for this hands-on approach is that each desktop
system will have its own quirks, so writing scripts which handle the
various conditions which might arise is painful. Secondly, there are
numerous choices possible - you must mix your own. Finally, I must confess
that I do not feel energetic enough to write the scripts at this point.
Instead, you have this article!
<p> So if you have spent a lot of time fine-tuning your configuration and want
to waste some more time putting it onto a (re)movable drive - read on.
<h3>Making a read-only root filesystem</h3>
<p> Since the chosen medium for our ``live'' portable system is a CD or
USB stick we do not want to write to it often. In fact, in the case
of a CD-R we can only write to it once. It should be obvious, however,
that a ``live'' system <em>does</em> need to write <em>something</em> if it is
to be counted as among the living!
<p> While many mechanisms have been suggested to handle this, <em>we</em>
will (essentially) follow the system chosen by <a
href="http://packages.debian.org/bootcd"><tt>bootcd</tt></a>. To do this,
we need to create a directory <code>/wraith</code>, an archive
<code>/wraith.cpio.gz</code> and a script <a
href="misc/kapil/undead.sh.txt">/etc/rcS.d/S01undead.sh</a>.
<p> The contents of the archive are rather system specific so <em>you</em>
will need to choose its contents. However, if you are <em>really,
really</em> impatient you can download the
<a href="misc/kapil/wraith.lst.txt">listing</a>
of the archive that I use and run the following:
<pre class="code">
cd /
cat wraith.lst | cpio -o -H crc | gzip -c -9 > /wraith.cpio.gz
</pre>
Did you get a lot of error messages? No? Are you <em>really</em> sure
that your system is almost identical to mine? Yes? Then you can skip
the next subsection.
<h3>Choices, choices...</h3>
<p> How does one find out what files need to be written to on a live system?
One way would be to <code>find</code> all the files that <em>have</em> been written
to on your current desktop. To do this first find out when the system was
booted - a good measure of this is when the root filesystem was last mounted.
So for example
<pre class="code">
# Use your real root device in place of /dev/root.
last_boot_time=$(dumpe2fs -h /dev/root | \
sed -n -e's/Last mount time: * //p')
</pre>
You may wish to use the log files or the <code>last</code> command instead.
You only need to know the last boot time approximately; subtract a minute
or so from it just to be on the safe side - unless you boot the system
more often than that! Now create a file with that time stamp using the
<code>touch</code> command:
<pre class="code">
touch -d "$last_boot_time" /tmp/lastboot
</pre>
You can now create the list of all files that were modified since that
last boot (for simplicity we will only bother with the directories
<code>/etc</code> and <code>/var</code>; you can add some other directories if
you so desire):
<pre class="code">
find /etc /var -newer /tmp/lastboot > /tmp/changed
# And, just for fun...
find /home -newer /tmp/lastboot > /tmp/home_changed
</pre>
Have a look at these lists but don't delete them just yet. You should notice
that there are three types of files that are written to on a running
system.
<ul>
<li> Files that are automatically written to but can be empty at the
start like log files or the <code>mozilla</code> cache directories.
<li> Files that have information which we may want
to change but rarely. Most configuration files fall into this category.
<li> Automatically generated databases of system information. Since
our system is going to be ``static'' we actually do not want the
system to update these databases. Thumb-rule: If the file is large in
size it probably belongs here!
</ul>
We will split up our list, <code>/tmp/changed</code>, according to this
classification: <code>/tmp/write</code> will consist of those files (mostly
directories) that are empty at boot time but get written to as the system
runs; <code>/tmp/links</code> will consist of the files that will be
quasi-static - we will keep a static version of these files at boot time
but we might want to change them on a running system. We will include the
third category of files in <code>/tmp/links</code> as well, since we will not
treat them differently - but ultimately you may want to change this.
<p> We first create a directory to hold the files that will be modifiable
at run-time - say <code>/wraith</code>. Mount a RAM-based file system on it
by <code>mount -t tmpfs tmpfs /wraith</code>. <strong>Big Fat
Warning</strong>: This file system is ephemeral and will be <em>lost</em>
when you halt the system. If you wish, you can use the directory as-is
(without the <code>tmpfs</code> mount) during this subsection, but don't
forget to clean up its contents once you have created the archive as
explained below.
<p> In <code>/wraith</code>, we will create the top-level directories like
<code>etc</code>, <code>var</code>, <code>tmp</code> and so on that we will
want to write to. In these directories we will create the files as per the
classification above. First, we'll do the writable but empty files:
<pre class="code">
cd /
cat /tmp/write | cpio -pdum /wraith
</pre>
We expect these files to be empty at start-up so we will ``zero''
them. Do this only to the files for which you don't want to keep the
contents. For now I assume these are all the files in the list
<code>/tmp/write</code>:
<pre class="code">
for file in $(cat /tmp/write)
do
if [ -f $file ]
then
> /wraith/$file
fi
done
</pre>
Of course, we also need an empty <code>tmp</code> directory:
<pre class="code">
mkdir /wraith/tmp
chmod 1777 /wraith/tmp
</pre>
Next, we create the links.
<pre class="code">
cd /
for i in $(cat /tmp/links)
do
dir=$(dirname $i)
top=$(echo $dir | cut -f2 -d'/')
rest=$(echo $dir | cut -f3- -d'/')
name=$(basename $i)
mkdir -p /wraith/$dir
ln -s /wraith/$top.ro/$rest/$name /wraith/$i
done
# As a safety measure to ensure that all configuration files
# have been created
mkdir -p /wraith/etc
cd /etc
for i in *
do
ln -s /wraith/etc.ro/$i /wraith/etc/$i
done
</pre>
This is more complicated and needs further explanation. The idea is to
make the ``static'' versions of the files available under the <code>.ro</code>
top-level directories. So, for example <code>/wraith/etc/hostname</code> will be
a link to <code>/wraith/etc.ro/hostname</code>.
<p> To see this at work create <code>etc.ro</code> and <code>var.ro</code> as
sub-directories in <code>/wraith</code>. For each of these directories (say <code>etc</code>)
we run a pair of commands like the following. (Warning: Be careful here. If
you haven't created all the links in <code>/wraith/etc</code> as above you may crash
your running system).
<pre class="code">
mount --bind /etc /wraith/etc.ro
mount --bind /wraith/etc /etc
</pre>
After these mounts, the file <code>/etc/hostname</code> is a link to
the original <code>hostname</code> file which is now available as
<code>/wraith/etc.ro/hostname</code>. Since the left-half of this
link is on the RAM disk we can perform replacement surgery on it:
<pre class="code">
vi /etc/hostname.new
mv /etc/hostname.new /etc/hostname
</pre>
On the other hand, if you want to change a file in a sub-directory of
<code>/etc</code>, it's a little more complicated:
<pre class="code">
mkdir /etc/X11.new
ln -s /ram/etc.ro/etc/X11/* /etc/X11.new
mv /etc/X11.new /etc/X11
</pre>
After this you can edit the files in <code>/etc/X11</code>. Yes, this is quite
twisted but (once you get the hang of it) not difficult to
manage - especially since we expect that we will edit these files
only rarely. An alternate approach is to create the directory tree under
<code>/etc</code> in its entirety only leaving links to the files.
<p> You <em>can</em> use the above mounts to test your choices of
<code>/tmp/links</code> and <code>/tmp/write</code>, but the real test will
come later. For now, undo the above mounts by a pair of commands like:
<pre class="code">
umount /etc
umount /wraith/etc.ro
</pre>
You can also remove the <code>.ro</code> directories if you like.
Finally, we create an archive of this directory:
<pre class="code">
cd /wraith
find . -xdev | cpio -o -H crc | gzip -c -9 > /wraith.cpio.gz
</pre>
The <code>cpio</code> command will tell you how many 512-byte blocks you
wrote. If the archive is really large (more than 1MB or so) then you
probably need to re-do your choices.
<h3>Bringing the wraith to life</h3>
<p> We need a mechanism to bring the <code>/wraith</code> directory into
operation at boot time. To do this, install a script like the following
one to run early at boot time. For example you could install the script as
<code>/etc/rcS.d/S01undead.sh</code>.
<pre class="code">
#
# undead.sh Mount and load up the /wraith directory for use
#
# Version: 0.3 01-Feb-2005
#
# If this has already been run then don't run it again.
# We can't handle two wraiths!
[ -f /wraith/live ] && exit 0
# Create writable space
mount -n -t tmpfs tmpfs /wraith
# Create the directory structure
cd /wraith
gzip -dc /wraith.cpio.gz | cpio -idum
cd /
# Perform the cross mounts with bind
# which is like a directory hard link.
cd /wraith
for i in *
do
mkdir $i.ro
# We use mount with the -n
# To avoid confusing the mtab
mount -n --bind /$i /wraith/$i.ro
mount -n --bind /wraith/$i /$i
done
cd /
touch /wraith/live
: exit
</pre>
Finally, you edit <code>/etc/fstab</code> so that the root filesystem is
mounted read-only at the next boot - just change <code>defaults</code> to
read <code>ro,defaults</code> in the appropriate entry.
<h3>Don't stop just yet</h3>
<p> Reboot and that's it! You have a read-only root system... or
almost. Actually, it is likely that you will find a number of places where
you didn't create the links you need or created the wrong links. Don't
worry. You can modify the <code>/wraith.cpio.gz</code> archive to your heart's content.
Make the changes you need to the ``live'' <code>/wraith</code> directory.
Now copy all the changes from <code>/wraith</code> into <code>/tmp/ghost</code>. The command
<pre class="code">
cd /wraith
find . -xdev | grep -E -v '^./((live)|([^/]*\.ro))' > /tmp/list
</pre>
will generate the newer list of files. You can unpack the older
archive and compare its list of files with <code>/tmp/list</code>.
<pre class="code">
mkdir /tmp/ghost
cd /tmp/ghost
zcat /wraith.cpio.gz | cpio -idum
find . -xdev > /tmp/oldlist
wdiff -a /tmp/list /tmp/oldlist
</pre>
Using the differences you can see what files you need to create in
<code>/tmp/ghost</code> in order to match it up with the running
<code>/wraith</code>. You can save your changes by something like
<pre class="code">
cd /tmp/ghost
find . -xdev | cpio -o -H crc | gzip -c -9 > /tmp/wraith.cpio.gz
mv /tmp/wraith.cpio.gz /wraith.cpio.gz
</pre>
The changes will become automatic at the next boot. Of course, once you
write the filesystem to a CD, you will have no chance to revise it again!
<h3>Undo</h3>
<p> All this looks too complicated and life is too short? Just remove the
script <code>/etc/rcS.d/S01undead.sh</code>, the archive <code>/wraith.cpio.gz</code>
and the directory <code>/wraith</code>. You will have your system as pristine
as before.
<h3>Making the initrd</h3>
<p> We want our system to ``run anywhere'' - in particular, we should be
able to mount our root file system whether it resides on a CD or USB
stick (or perhaps even hard disk). If we use a CD then on
most systems this will be on the device <code>/dev/hdb</code> or <code>/dev/hdc</code>.
The USB stick usually shows up as <code>/dev/sda</code> or
<code>/dev/sdb</code>. It should be relatively simple to just
create a kernel which supports IDE CD drives and USB block devices.
When we boot such a kernel (with the correct <code>root=<device></code>
parameter) the system will start up as expected on 90% of all systems
that one is likely to encounter. If this is OK with you then you
don't <em>need</em> an initrd so skip the rest of this section and read
the
<a href="http://www.digitalhermit.com/linux/Kernel-Build-HOWTO.html">HOWTO</a>
on building the kernel with IDE CD and US support - don't forget
support for the ISO 9660 (CD), ext2 and vfat (Win95) file systems.
<p> What about the remaining 10%? That will take 90% of the work as
usual. One possible solution could be to build <em>all</em> the drivers
of all possible CD drives, USB readers and the like into the kernel.
Unfortunately, automatically probing for some of these devices will
occasionally cause other devices to choke-up. It also seems like a bit
of a waste to take up such enormous amounts of kernel memory for unused
drivers. The solution provided by our intrepid kernel hackers is the
modules+initrd mechanism which allows you to write a script that chooses
which drivers to load depending on the devices found.
<h3>The steps</h3>
<p> The boot loader (see the next section) will load the kernel and the
initrd into memory. We will use a ``standard''
<a href="http://packages.debian.org/kernel-image-2.6-686">Debian kernel image</a>
which has essentially everything modularized (``essentially'' since we
must have support for at least one file-system built into the kernel
in order to load the init RAM disk - this could change if I understand
<code>initramfs</code> better).
<p> After the kernel has done its thing, it sets up the file-system with root
on the initrd and executes <code>/linuxrc</code> but doesn't quite fully let
go - when <code>/linuxrc</code> exits, the kernel executes <code>/sbin/init</code>.
We follow Debian's choices when we visualize the boot process as follows:
<dl compact><dt>
<b>linuxrc</b><dd> This script doesn't do much since we <em>want</em> the
kernel to let go and execute <code>/sbin/init</code> (still on the initrd).
<dt><b>init</b><dd> The program <code>/sbin/init</code> <em>on the initrd</em> is a script
that will run the following scripts:
<dl compact><dt>
<b>loadmodules</b><dd> This script loads the modules necessary to read
the CD and/or USB stick.
<dt><b>script</b><dd> This script will provide the subroutine <code>mount_root</code>
to recognise and mount our chosen file system on <code>/mnt</code>.
</dl>
The final steps of <code>init</code> are
<ul>
<li> Mount the root file system on <code>/mnt</code> and <code>cd</code>
to it.
<li> Execute <code>pivot_root</code> which makes the current directory the
root directory for the kernel and mounts the old root directory at
<code>/initrd</code>. After this our ``real'' root file-system <em>is</em>
mounted as root.
<li> Execute <code>chroot .</code> to change the root device of the
current process so that <code>/initrd</code> is free to be unmounted. We
must do this so that the RAM disk is free to be unmounted which frees
its space for use by other processes.
<li> Finally execute <code>/sbin/init</code> on the <em>real</em>
root file system. This is the ``real'' <code>init</code> program which will
initialise the live system.
</ul>
</dl>
Debian has already provided the package
<a href="http://packages.debian.org/initrd-tools">initrd-tools</a> which
automates the building of the initrd. This already creates the
<code>/linuxrc</code> and <code>/sbin/init</code> needed for the initrd. So we
only need to provide the scripts <code>loadmodules</code> and
<code>script</code>.
<h3>Driver loading</h3>
<p> Writing these scripts was one of the most complex steps for me as it
deals with the aspect of Linux that I usually encounter the least - at
least on a working system - booting! On the other hand, this
<em>is</em> the job for which most installers and other forms of pre-install
detection tools have been written. So we follow the ``teacher'' Tom
Lehrer's dictum:
<pre>
Plagiarize,
Let no one else's work evade your eyes,
Remember why the good Lord made your eyes,
So don't shade your eyes,
But plagiarize, plagiarize, plagiarize...
(Only be sure always to call it please, "research".)
-- Tom Lehrer, "Lobachevsky"
</pre>
<p> There is a good IDE driver detection routine that is part of the standard
Debian initrd. The Knoppix initrd gives us a safe order in which to load
all the SCSI modules. The Linux-Live initrd has a list of the necessary USB
modules to boot off a stick. So we put all these together to get routines
which I call <code>loadmodules_ide</code>, <code>loadmodules_scsi</code> and
<code>loadmodules_usb</code>. The <code>loadmodules</code> script on the initrd will then
act as a dispatcher - it will choose which routine to run depending
on what boot time parameters we give.
<p> Still, we should do <em>some</em> work. So (plagiarising from the
<a href="http://linux-hotplug.sourceforge.net/">hotplug scripts</a>)
I also wrote a procedure <code>loadmodules_pci</code>
that loads only those modules which correspond to devices
in <code>/sys/bus/pci/devices</code> which match the data found in
<code>/lib/modules/kernel-version/modules.pcimap</code>. This procedure
makes use of the <code>sysfs</code> file system that was introduced with Linux
2.6.x but something similar may be possible using <code>/proc/bus/pci</code> in
Linux version 2.4.x. The principle is that the kernel <em>does</em>
provide a list of all the PCI devices that it found; for each such
device it also provides <em>some</em> device information - the interface for
this is the <code>sysfs</code> file system or (in 2.4.x) the <code>proc</code> file system.
On the other hand, each module writer makes a list of all devices that
the driver is known/expected to work for - the kernel build process writes
these to <code>modules.pcimap</code>. By matching the two lists we should be
able to load only those modules which have a matching device. This only
works with PCI devices but most devices on PC's nowadays
(including SCSI cards and the USB controller) <em>are</em> PCI devices.
<p> <a href="misc/kapil/loadmodules.txt">Here</a> is the script
to loadmodules that resulted from the above deliberations. This
scripts depends on a <a href="misc/kapil/allmod.list.txt">list</a> of
modules that are related to block devices.
<h3>Mounting the root file-system</h3>
<p> The second <a href="misc/kapil/script.txt">script</a> we will use
provides the routine to mount the root device. Again the <code>sysfs</code>
file system provided by the 2.6.x Linux kernel comes to the rescue. Under
<code>/sys/block</code> we find a list of all the block devices on the
system. If the <code>root=</code> option is given to the kernel we can
check whether this block device is available. Otherwise we check each
available block device to find evidence that it is our root file system -
by checking for the existence of the archive, directory and script that we
created above.
<h3>Using <tt>mkinitrd</tt></h3>
<p> The Debian <a
href="http://packages.debian.org/initrd-tools">initrd-tools</a> package is
a collection of scripts and so can be installed on any GNU/linux system
(for example use the source package directly). The main script is
<code>mkinitrd</code> which will create the standard Debian initrd. We will
run this script and make some changes in order to create our ``special''
initrd. First off all create some directory say
<code>/tmp/mkinitrd.confdir</code>. In this directory we will create the
file <code>exe</code> containing the list of executables that we want in
addition to the ``standard'' ones like <code>/bin/sh</code> - in our case
we need <code>/bin/grep</code>. Next we create a list of all the additional
files that we want to include; this is mainly the list of all modules that
are in some way connected with the use of block devices; <a
href="misc/kapil/files.txt">here</a> is my list. Finally, we also need a <a
href="misc/kapil/mkinitrd.conf.txt">configuration file</a>. We are set to
use <code>mkinitrd</code> with this directory as our configuration
directory.
<pre class="code">
mkinitrd -r "" -k -d /tmp/mkinitrd.confdir -o /dev/null
</pre>
This will tell you the name of the working directory which will be
something like <code>/tmp/mkinitrd.1234</code>. Now you need to edit the
<code>/tmp/mkinitrd.1234/initrd/linuxrc.conf</code> file to reflect the
various file systems that you may use for your root file system.
Finally, you copy the scripts you created above and generate the
initrd with <code>mkcramfs</code>.
<pre class="code">
dir=/tmp/mkinitrd.1234
rm $dir/initrd/scripts/*
cp allmod.list $dir/initrd/etc
cp loadmodules $dir/initrd
cp script $dir/initrd
chmod +x $dir/initrd/loadmodules
chmod +x $dir/initrd/script
mkcramfs $dir/initrd initrd.img
</pre>
If you build a kernel with <code>ext2</code> filesystem support instead of
<code>cramfs</code>, then you need to create an <code>ext2</code> filesystem
image based on the <code>/tmp/mkinitrd.1234</code> directory instead.
<h3>Putting it all together</h3>
<p> We now combine the ideas of the previous two sections. I assume that
you have managed to make your root filesystem boot in a ``read-only''
mode and that you are currently running in that mode. I also assume
that you have created an initrd that can boot on ``any'' machine.
<p> I <em>know</em> that the latter requirement is hard to check given that you
have access to only one machine at a time. Moreover, it is difficult to
find friends who will agree if you say ``I have on this floppy an initrd
and kernel that I would like to test on your system''; those
few will <em>not</em> remain friends if your kernel+initrd manages to
fry their system.
<h3>Selecting the boot loader</h3>
<p> In order to boot off a CD or USB stick we need some software that can
do that. The nominees are <a
href="ftp://ftp.kernel.org/pub/linux/utils/boot/syslinux/syslinux-2.10.tar.gz"><tt>isolinux</tt></a>,
<a href="http://elserv.ffm.fgan.de/~lermen/"><tt>loadlin</tt></a> and <a
href="ftp://alpha.gnu.org/gnu/grub/"><tt>grub</tt></a>... and the winner,
in this case, is... <code>grub</code>.
<p> The main file for booting using <code>grub</code> is called <code>stage2</code> or
<code>stage2_eltorito</code> in the case of booting CD's. When these files
are properly installed (see below how this is done for CD's), they are
loaded and run by the booting machine. They look for a configuration
file <code>/boot/grub/menu.lst</code>. We use a <code>menu.lst</code> file that
looks like:
<pre class="code">
default 0
<p> timeout 5
<p> # Pretty colours
color cyan/blue white/blue
<p> title Debian GNU/Linux with myinitrd
root (cd)
kernel /boot/vmlinuz-2.6.8-2-686 root=auto ro quiet vga=791
initrd /boot/initrd.img
boot
</pre>
Other than the kernel and the initrd, we need <code>stage2</code> and
<code>menu.lst</code> in order to complete the list of steps given at the
beginning.
<h3>Making the CD</h3>
<p> First you need a ``pristine'' copy of the root file system.
If you used the <code>bind</code> mounts procedure to make the root
file-system read-only, then you can just do
<pre class="code">
mkdir /tmp/pristine
mount --bind / /tmp/pristine
</pre>
You then make a compressed tree of this file system:
<pre class="code">
mkzftree -x /tmp/pristine /hugeroom
</pre>
where <code>/hugeroom</code> is some place with a lot of disk space.
Remove the directories <code>/hugeroom/lost+found</code> and
<code>/hugeroom/boot</code> from under this directory. Create an empty
<code>/hugeroom/boot</code> directory to which we copy the kernel image and
initrd. Into the <code>/hugeroom/boot/grub</code> directory goes the file
<code>stage2_eltorito</code> along with <code>menu.lst</code>. These files
will not be compressed.
<p> We now create the CD image:
<pre class="code">
mkisofs -R -J -z -hide-rr-moved -cache-inodes \
-b boot/grub/stage2_eltorito -b boot/boot.cat \
-boot-info-table -boot-load-size 32 \
-no-emul-boot -o mylivecd.iso /hugeroom
</pre>
Then we blank a CD (if necessary) and write our image to it. For a
USB stick, we just create a partition and dump the entire image to
this partition using <code>dd</code>. Since I do not have a system that can
boot off a USB, I can only check the floppy based boot for such a
system. Perhaps one of the readers can enlighten me on how this is to
be handled for USB-booting BIOSes.
<h3>What else?</h3>
<p> You'll probably want to add a writable <code>/home</code> directory to
your system. You need to further customise <code>wraith.cpio.gz</code> for
that. Another thing that you probably want to do is to fix the
<code>/etc/fstab</code> file that goes onto the CD. Other config files may
also need to be customised; <code>/etc/X11/XF86config-4</code> comes to
mind - for this to work ``anywhere'' it is best to use the
<code>vesa</code> driver. Similarly, use <code>dhcp</code> to configure
ethernet rather than a hard-coded IP address in
<code>/etc/network/interfaces</code>. On most systems there <em>is</em> a
hard disk and it is shame not to use it. You can set-up a swap partition
after you boot from the CD - be careful not to trash the host machine
though!
<h3>Afterword</h3>
<p> Today one can find a number of GNU/Linux systems that work off Live
CD's. There is <a href="http://www.knoppix.net">Knoppix</a> - and then
there are its <a
href="http://www.knoppix.net/wiki/Knoppix_Customisations">Klones</a>.
There is <a href="http://www.lnx-bbc.org">LNX-BBC</a>, <a
href="http://www.toms.net/rb">tomsrtbt</a>, <a
href="http://www.ltsp.org">LTSP</a> and even one called <a
href="http://www.goosee.com/puppy">Puppy</a>! There are the CD-based
installers for the common distributions. <em>But</em>, I am still not
satisfied. Each of these make choices that I am not comfortable with. They
choose KDE, Gnome or <code>fluxbox</code>, when what <em>I</em> want is
<code>fvwm</code>; or they choose <code>xmms</code> when what I want is
<code>alsaplayer</code> (in daemon mode)... and so on.
<p> What's wrong with <a
href="http://linuxgazette.net/issue87/sunil.html">Sunil's excellent
article</a> then? - just take a minimal Knoppix-like DSL and re-master it.
I would object that Knoppix puts everything in a <code>cloop</code> image
which makes it difficult to read the ``real'' contents of the CD on a
generic system; further this also makes it difficult to master and/or
re-master.
<p> There are other approaches like that taken by
<a href="http://www.gibraltar.at/">Gibraltar</a>,
<a href="http://packages.debian.org/bootcd"><tt>bootcd</tt></a> or
<a href="http://packages.debian.org/dfsbuild"><tt>dfsbuild</tt></a> or
<a href="http://www.linux-live.org"><tt>linux-live</tt></a>.
<p> The first two keep the files in a compressed ISO file-system. That
makes it usable ``anywhere''. I did try these but for one reason or another
they didn't work for me. For example they required the installation of
additional packages on my desktop.
<p> Ultimately, it comes down to this: I'm a terribly nit-picky kind of
person, and I have spent a lot of time fine-tuning my system and <em>no
one</em> is allowed to dictate what packages I must install and how they must
be configured.
<p class="editorial">[ I <em>like</em> this Kapil guy, and the way he
thinks. :) -- Ben ]</p>
I enjoy tinkering with such things, and so I must have a system that I
understand fully. People also mentioned additional kernel features in late
2.4.x and early 2.6.x that simplify the building of a live CD. Finally,
isn't it fun to ``roll your own''?
<hr size=2>
<blockquote><em>This document was translated from the LaTeX Source by
</em><a href="http://pauillac.inria.fr/~maranget/hevea/index.html"><em>H<font size=2><sup>E</sup></font>V<font size=2><sup>E</sup></font>A</em></a><em>.
</em></blockquote>
</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 © 2005, <A HREF="../authors/kapil.html">Kapil Hari Paranjape</A>. Released under the
<a href="http://linuxgazette.net/copying.html">Open Publication license</a>
unless otherwise noted in the body of the article. Linux Gazette is not
produced, sponsored, or endorsed by its prior host, SSC, Inc.
</p>
<p>
Published in Issue 113 of Linux Gazette, April 2005
</p>
</div>
</div>
<div class="content lgcontent">
<a name="lodato"></a>
<h1>Voice recognition shorthand and the birth of Weblish</h1>
<p id="by"><b>By <A HREF="../authors/lodato.html">Janine M. Lodato</A></b></p>
</b>
</p>
<p>
<p> It must be the former high school English teacher in me that hears
the omission of the subjunctive in movies, TV ads, and TV programs.
<p> No, it is not a tense like the present, past or future tenses. No,
it is not a part of speech like an adjective, nor is it a verb form
like the infinitive. The subjunctive indicates a mood similar to the
indicative mood phrase, which indicates a situation of fact, e.g. a
phrase such as "The wind is blowing today". Subjunctive is
also similar to the interrogative mood phrase: e.g. "Did you wind
the clock today?"
<p> The subjunctive mood can also be used to suggest a situation
contrary to fact: e.g. "If I were rich I would buy a new car"
or: "I wish I had enough money to buy a new car". The flags in
English that indicate the subjunctive mood are the words "if"
and "wish".
<p> English is very simple compared to other languages such as French,
Spanish, German, Italian, etc. All have several pages in their grammar
textbooks devoted to the conjugations needed for the subjunctive mood. No
wonder English is becoming the common language, the <em>lingua franca</em>,
of the world! The basic reason, of course, is the simplicity of its
grammar. Even most scientific or technical papers are in English
(just a hundred years ago, they would have been written in Latin.)
<p> English, though, does have its idiosyncrasies which are difficult
for foreigners (as well as for voice recognition software) to cope with -
including spelling and associated pronunciation. Take, for example, the
word spelled "wind". Depending on the context of the sentence,
we can pronounce it two different ways - such as in "Was the clock
wound?" versus "Did the wind of the blowing wind wound your
ears?"
<p> There are a myriad of other words with the same dual pronunciations:
e.g. wound, refuse, compact, and contract. There is no end to them! And
then there are the irregular verbs - 300 of them - which have very complex
tense structures. My husband and care giver (I am a disabled woman in a
wheelchair), who came to this country after the Hungarian student
revolution was crushed by the Soviets, became one of the original geeks and
never really learned the irregular verb tenses. Instead, he uses the
auxiliaries, which he learned early and used in phrases such as: " I
did in fact see it" instead of "I saw it". It's no surprise
that the voice recognition systems prefer such expressions, which are much
easier to parse.
<p> I have taught "English for Foreigners" for 20 years (my
wheelchair existence did not affect that, in fact it may have even
helped) to students on all levels, from beginners to highly advanced
technical experts. My husband is my worst student, but he does act as
my voice recognition robot sometimes instead of my computer - though he
does talk back and the computer does not.
<p> I must say, I am impressed that so many foreigners speak,
understand, read, and write English even better than many Americans. I am
impressed, indeed, although I recognize they have no choice if they want
to succeed at some higher level of occupation. The Internet, the now
famous Web, has cemented this fact. Almost all websites - (addressed by
www... and ending in either dotcom (in the form of ".com") or
dotgov or dotedu or dotorg, etc.) are published on the web in English.
Even the website addresses (called URLs, Uniform Resource Locators) end
in dotde (Germany) or dotjp (Japan) or dotit (Italy), and symbols for
all the other 290-plus similar names of the countries of the world, are
published in English.
<p> Google, the most favored search engine on the Web, indicates that at
this time there are 1,900K dotcom, 105K dotgov, 370K dotorg, 158K dotedu
and 385K dotnet webpages on the Internet (K, of course, stands for kilo
which is one thousand). But, most interestingly, the German-based dotde
accounts for 2,050K webpages, and more than half of those are in English.
<p> The Web has had a profound effect on English. In place of proper
Webster-style English, a new language has evolved on the Internet:
<em>"Weblish"</em> (if I may be so bold in naming it). This new
language is now used all over the world, and it is constantly coming up
with new words most of which have an "e" or an "i" up
front. Email is, of course, a well known example, but once email was
created, there had to be a new name for the regular mail - so
<em>"snail mail"</em> came into use as a great descriptive term.
<p> Examples are all over the Web, and more are cropping up every
minute. Just look at the URLs of the website themselves, and you will see
a whole new set of descriptive names: Froogle, the name for the shopping
website of Google, is one such imaginative Weblish variation of English.
<p> One of my favorite new words is Lindows, the Linux based variation
of Windows. We all hope it will succeed.
<p> But there is another interesting development on the Web. As part of
Weblish, there are the new hieroglyphs (also known as ASCII art) which
many people now use in their emails. For example, I am a disabled woman
in a wheelchair, so I like to sign my email with the following combination
of letters and characters that looks like a wheelchair symbol <a
href="#nextpara">(click here to skip the ASCII text)</a>:
<pre>
~\__
(o)\_
</pre>
<a name="nextpara"></a>
There are many other examples of this, like :-) for happy and so on.
<p> My aging geek husband immediately suggested that we should call this
new symbology <em>eglyphy</em> or <em>webglyphy</em> or... and he went on
interminably with new words until I screamed: "Please spare me, enough
of this!"
<p> But he is right, somebody will come up with the best name - and it
will be adopted by many and become part of the new language.
<p> Then there is SMS, the new cellular phone based Short Message Service.
It uses some of the best shorthand out of necessity, since phones have only
12 keys. A good example: "<a
href="http://www.cellular.co.za/sms_shortcuts.htm">CMI L8R</a>" for
"call me later". And so on - you get the drift.
<p> But the most important development of simplified, short word-based
English is due to voice recognition. Hands-busy, eyes-busy people, as well
as those with a functional disability can benefit greatly from voice
recognition because they don't have to use a mouse and keyboard to document
their findings.
<p> Voice-activated, easily-used telephone systems will benefit people
in all walks of life. Anyone driving a car will find voice recognition a
much more effective way of manipulating a vehicle and communicating from
the vehicle. We are all hands-busy or eyes-busy at one time or another
- in the kitchen, in the garden, or giving care to children or adults
in need, etc. Personal computers have the capacity to accommodate voice
recognition systems, like IBM's ViaVoice. This is especially advantageous
to a large population segment of people with disabilities, those who are
chronically ill, and older people as well as their caregivers.
<p> Using a keyboard is next to impossible or at least difficult for
this fast-growing group of people. Caregivers and their patients would
benefit from being able to use just their voices to document the
treatments or care they provide to their patients. Additionally, voice
recognition technology would allow them a hands-free environment in
which to analyze, treat, and write about particular cases easily and
quickly.
<h3>Linux Voice Recognition Project</h3>
<p> The care-giving services market alone may justify the Linux-based
voice recognition project. Providing care to the needy is one of the
largest expenses in the Group of Ten nations, and it is the fastest
growing sector as well. Just in the USA, the segment of the population
which includes older people and people with disabilities and/or chronic
illnesses accounts for 100 million people. Add to that the 5 million
formal caregivers and 44 million informal care givers at work in
America, and we are looking at half the population!
<p> In the care-giving field, the simplicity, reliability, and low cost of
Linux for servers, tablets, embedded devices, and desktops are paramount
features. Obviously, the market for these new technologies exists. What
remains is for some courageous company with aggressive people to tap into
that market. Once those companies get the technology distributed, the needs
of many will be met, and a new mass market will open up - one that isn't
currently being filled. In fact, the field of opportunity already exists,
but it needs to be expanded to serve people with physical and functional
disabilities.
<p> Yes, voice recognition offers great promise for the future. However,
it isn't perfect and it still needs to be improved. One improvement
would use lip reading to bolster its accuracy. Still another would be
multi-tonal voice input. Another would be improvements in the design of
directional microphones. Every generation of voice recognition software
will be improved as the hardware for Linux gets bigger and stronger.
<p> IBM is, in fact, now working on a lip reading system for
installation in an automobile so that the on-board computer can
very precisely understand the spoken commands of the driver. So,
IBM, we need to get this technology into our desktops, ebook
readers, tablet computers, and PDAs as well - please? Why not
license your lip reading technology to a consortium of open source
developers, perhaps sponsored by a non-profit such as DRAIL, an
organization concerned with the needy? Or, even more effective
would be a licence for a group of such organizations, such as
Robert Wood, AARP, Elderweb, etc. who would put lip reading and
enhanced, precise voice recognition on an ebook reader, such as
<a href="http://www.ebook-gemstar.com/">www.ebook-gemstar.com</a>
or the Korean manufactured one: <a
href="http://www.ebookad.com/hiebook/">www.ebookad.com/hiebook/</a>)
or an iPOD (Apple's great music machine), or a tablet computer, or any
other PC that this segment of the population would feel comfortable
with.
<p> Virtual PCs running on a community-based server to which the end-users
could connect with simple telephones (POTS) or video telephones (e.g., <a
href="http://www.vialta.com/">www.vialta.com</a>) would be of great use. My
geek caregiver husband suggests that we should call this project
<em>Wordows</em>. "Oh no", I yell at my favorite geek,
"That is not so good: it sounds weirdo!" You need to be careful
when you create a new word in Weblish. So let us call it, if you will
permit me, "Slimdows".
<p> With all these changes, the English teacher in me comes to terms
with a changing linguistic environment. Since life itself is constant
change, English must also change.
<hr>
<p> Janine has been a user of voice recognition software for several
years and is an advocate for Open Source solutions that will benefit
people with disabilities, such as the Linux-based voice recognition
project.
</p>
<!-- *** BEGIN author bio *** -->
<!-- *** BEGIN bio *** -->
<hr>
<p>
<img align="left" alt="[BIO]" src="../gx/2002/note.png" class="bio">
<!--
If the author has sent his pic, save it to the right directory
and enable the line below.
<img align="left" alt="[BIO]" src="../gx/authors/pic.jpg" class="bio">
-->
<em>
<p> I am a registered principal investigator with NSF.
<p> I am a disabled woman, but have great experience with voice recognition
and have an advanced system with IBM Via-Voice, so my writing abilities are
not impaired at all.
<p> I have many years of personal experience using assistive technologies
(AT), and find it very helpful in SPMS (secondary progressive multiple
sclerosis). In spite of my handicap, I find it gratifying and fulfilling to
concentrate my efforts on worthwhile projects for very deserving companies.
Involvement such as this has proved to have healing power for me: I am
living proof of the power of behavioural medicine based on deep personal
involvement. The best way to use these intellectual strengths is to get
involved with collaborative teamwork and personal communications within the
disabled community and with companies who provide assistive technologies
for this community.
<p> As a handicapped woman who still has control of her mental faculties and
voice, I have something to offer by connecting the right people so that I
can integrate systems through the Internet to develop a mutually beneficial
virtual community.
<p> Personal communications and collaborative teams need assistive technologies
to further the self-esteem of the disabled. In short, involvement allows
disabled people not only a distraction from their problems, but also a
constructive way to spend their time while helping a cause they believe in.
</em>
<pre>
Janine M. Lodato
~|__
( o )\_
</pre>
<br clear="all">
<!-- *** END bio *** -->
<!-- *** END author bio *** -->
<div id="articlefooter">
<p>
Copyright © 2005, <A HREF="../authors/lodato.html">Janine M. Lodato</A>. Released under the
<a href="http://linuxgazette.net/copying.html">Open Publication license</a>
unless otherwise noted in the body of the article. Linux Gazette is not
produced, sponsored, or endorsed by its prior host, SSC, Inc.
</p>
<p>
Published in Issue 113 of Linux Gazette, April 2005
</p>
</div>
</div>
<div class="content lgcontent">
<a name="okopnik"></a>
<h1>Introduction to Shell Scripting - Part 3</h1>
<p id="by"><b>By <A HREF="../authors/okopnik.html">Ben Okopnik</A></b></p>
</b>
</p>
<p>
<img src="../gx/reprint.png" alt="A Blast from the Past!">
<strong><em>Originally published in Issue 54 of Linux Gazette, May
2000</em></strong>
<pre>
Never write it in 'C' if you can do it in 'awk';
Never do it in 'awk' if 'sed' can handle it;
Never use 'sed' when 'tr' can do the job;
Never invoke 'tr' when 'cat' is sufficient;
Avoid using 'cat' whenever possible.
-- Taylor's Laws of Programming
</pre>
<p> Last month, we looked at loops and conditional execution. This time
around, we'll look at a few of the simpler "external" tools (i.e., GNU
utilities) that are commonly used in shell scripts. Recall that shell
scripts are made up of 1) internal shell commands and structures, 2)
external tools, comprised of the standard utilities, and 3) installed
programs; the first are always going to be there, as long as you're
executing the script with the same shell (the shebang usually takes care of
that), the second will <em>usually</em> be there (but watch out for
non-portable syntax between different versions, e.g., the '-A' switch in
'cat', the various levels of regex parsing in different 'grep' versions,
etc.), and the last is essentially arbitrary since you don't know what
another person executing your script has installed (or not installed) on
their machine. If you're planning on distributing your script, you may need
to write code to test for the presence of any external programs you use and
issue warnings if they're absent.
<p> Oh, and - the reason for the above quote: the tools available to you as
a script writer, as you might have guessed from it, are arranged in a rough
sort of a "power hierarchy". It's important to remember this if you find
yourself continually being frustrated by the limitations of a specific
tool, it may not have enough "juice" to do the job. Conversely, it does not
make sense to use some heavy-duty utility that's big and slow to perform a
simple operation.
<p> Some years ago, while writing a script that processed Clipper database
files, I found myself pushed up against the wall by the limitations of
arrays in "bash"; after a day and a half of fighting it, I swore a bitter
oath, glued a "screw it" label over the original attempt, and rewrote the
entire thing in "awk".
<p> It took a total of 15 minutes.
<p> I didn't tell anyone at the time; even my good friends would
have taken a Clue-By-4 to my head to make sure that the lesson stuck...
<p> <strong>Don't</strong> be stubborn about changing tools when the
original one proves under-powered.
<h3>cat</h3>
<p> Strange as it may seem, 'cat' - which you've probably used on
innumerable occasions - can do a number of useful things beyond simple
concatenation and printing to the screen. As an example, 'cat -v file.txt'
will print the contents of "file.txt" to the screen - and will also show
you all the non-text characters that might normally be invisible (this
excludes the standard textfile characters such as `end-of-line' and `tab'),
in '^' (for Ctrl- characters) and 'M-' (for Alt- characters) notation.
This can be very useful when you've got something that is supposed to be a
text file, but various utilities keep failing to process it and give errors
like "This is a binary file!". This capability can also come in handy when
converting files from one type to another (see the section on 'tr'). If you
decide you'd like to see all the characters in the file, the `-A' switch
will fill the bill - `$' signs will show the end-of-lines (the buck stops
here?), and `^I' will show the tabs. Note that '-A' is just a shortcut for
'-vet' - something that used to be known as "taking your cat to the vet".
(Yes, Unix command usage can be quite odd. :)
<p> '-n' is another useful option. This one will number all the lines (you
can use `-b' to number only the non-blank lines) of a file - very useful
when you want to create a `line selector', i.e., whenever you want to have
a "handle" for a specific line which you would then pass to another
utility, say, 'sed' (which works well with line numbers).
<p> 'cat' can also be used for "here-doc"s - i.e., to generate multi-line,
formatted text output. The syntax is a little odd but not difficult; here
are two script "snippets" showing the differences between using 'echo' and
a here-doc:
<pre class="code">
...
echo "'guess' - a shell script that reads your mind"
echo "and runs the program you're thinking about."
echo
echo "Syntax:"
echo
echo "guess [-fnrs]"
echo
echo "-f Force mode: if no mental activity is detected,"
echo " take a Scientific Wild-Ass Guess (SWAG) and execute."
echo "-n Read your neighbor's mind; commonly used to retrieve"
echo " the URLs of really good porno sites."
echo "-r Reboot brain via TCP (Telepathic Control Protocol) - for
echo " those times when you're drawing a complete blank."
echo "-s Read the supervisor's mind; implies the '-f' option."
echo
exit
...
</pre>
<pre class="code">
...
cat <<!
'guess' - a shell script that reads your mind
and runs the program you're thinking about.
Syntax:
guess [-fnrs]
-f Force mode: if no mental activity is detected,
take a Scientific Wild-Ass Guess (SWAG) and execute.
-n Read your neighbor's mind; commonly used to retrieve
the URLs of really good porno sites.
-r Reboot brain via TCP (Telepathic Control Protocol) - for
those times when you're drawing a complete blank.
-s Read the supervisor's mind; implies the '-f' option.
!
exit
...
</pre>
Everything between the two exclamation points will be printed to 'stdout'
(the screen) as formatted. Note that the terminator ('!', in this case) is
arbitrary - you could use 'EOF' or '^+-+^' or 'This_is_the_end_my_friend' -
but '!' is traditional. The only constraints on the above are, there must
be a space between the terminator and the redirection symbol following it
(otherwise, the redirector could be seen as a part of the terminator!), and
the closing terminator must be on a line by itself, with no trailing
whitespace. This allows the terminator to be used as a part of the text
without closing the here-doc.
<p> Using the same mechanism with redirection gives you a mini-editor:
<pre class="code">
ben@Fenrir:~$ cat <<! > file.txt
> Everything entered here
> will be written to file.txt
> exactly as entered.
!
ben@Fenrir:~$ cat file.txt
Everything entered here
will be written to file.txt
exactly as entered.
</pre>
<p> I tend to think of 'cat' as an "initial processor" for text that will
be further worked on with other tools. That's not to say that it's unimportant
- in some cases, it's almost irreplaceable. Indeed, your 'cat' can do tricks
that are not only entertaining but useful... and you don't even need a
litter box.
<h3>tr</h3>
<p> When it comes to "character-by-character" processing, this utility,
despite its oddities in certain respects (e.g., characters specified by
their ASCII value have to be entered in <em>octal</em>), is one of the most
useful ones in our toolbox. Here's a script using it that replaces those
"DOS-text-to-Unix" conversion utilities:
<pre class="code">#!/bin/bash
[ -z "$1" ] && {
echo "d2u - converts DOS text to Unix."
echo "Syntax: d2u <file>"
exit
}
cat "$1"|tr -d '\015'
</pre>
<p> <grin> I guess I'd better take time to explain; I can already
hear the screams of rage from all those folks who just learned about 'if'
constructs in last month's column.
<p> <i>"What happened to that nice `if' statement you said we needed at
the beginning of the script? and what's that `&&' thing?"</i>
<p> Believe it or not, it's all still there - at least the mechanism that
makes the "right stuff" happen. Now, though, instead of using
the structure of the statement and fitting our commands into the "slots"
in the syntax, we use the <i>return value</i> of the commands,
and make the logic do the work. Let's take a look at this very
important concept.
<p> Whenever you use a command, it returns a code on exit - typically 0 for
success, and 1 for failure (exceptions are things like the 'length'
function, which returns a value). Some programs return a variety of numbers
for specific types of exits, which is why you'd normally want to test for
zero versus non-zero, rather than testing for `1' specifically. You can
implement the same mechanism in your scripts (this is a good coding
policy): if your script generates a variety of messages on different exit
conditions, use 'exit n' as the last statement, where `n' is the code to be
returned (the plain 'exit' statement will returns the value of the
operation immediately preceding it.) These codes, by the way, are invisible
- they're internal "flags"; there's nothing printed on the screen, so don't
bother looking. If you want to see what the exit code of the last command
was, try echoing '$?' - it stores the numerical value of the last exit flag.
<p> To test for them, 'bash' provides a simple mechanism - the reserved
words `&&' (logical AND) and `||' (logical OR). In the script
above, the statement basically says "if $1 has a length of zero, then the
following statements (echo... echo... exit) should be executed". If you're
not familiar with binary logic, this may be confusing, so here's a quick
rundown that will suffice for our purposes: back in the days when the
dinosaurs roamed the earth, and learning about computers meant
understanding hardware design, we had gadgets called 'AND gates' and 'OR
gates' - logic circuits - that operated like this:
<pre class="code">
AND (&&) OR (||)
truth table truth table
A B out A B out
----------- -----------
| 0 | 0 | 0 | | 0 | 0 | 0 |
| 0 | 1 | 0 | | 0 | 1 | 1 |
| 1 | 0 | 0 | | 1 | 0 | 1 |
| 1 | 1 | 1 | | 1 | 1 | 1 |
----------- -----------
If any input is 0, If any input is 1,
the output will be 0. the output will be 1.
</pre>
In other words, if we knew the value of one of the inputs, we could decide
if we needed to evaluate the other input or not (e.g., with an AND gate, if
the known input is a 0, we don't need to evaluate the other one - we know
what the output is going to be!) This is the logic we use in dealing with
the logical operators in the shell as well: if we have something that is
<em>true</em> in front of an AND operator, we obviously need to evaluate
(i.e., execute) the back part - and ditto for a <em>false</em> input for an
OR operator.
<p> As a comparison, here are two script fragments that do much the same
thing:
<pre class="code">
if [ -z $1 ]
then
echo "Enter a parameter."
else
echo "Parameter entered."
fi
</pre>
<pre class="code">
[ -z $1 ] && echo "Enter a parameter." || echo "Parameter entered."
</pre>
<p> You have to be a bit cautious about using the second version for
anything more complex than "echo" statements: if you use a command in the
part after the `&&' which returns a failure code, both it and the
statements after `||' will be executed, unless you force an explicit
successful exit! This in itself can be useful, if that's what you need -
but you have to be aware of how the mechanism works.
<p> Back to the original "d2u" script - the "active" part of the script,
<code>cat "$1"|tr -d '\015'</code>, pipes the original text into 'tr',
which deletes DOS's "CR/Carriage Return" character (0x0D), shown here in
octal (\015). That's the bit... err, <strong>byte</strong> that makes DOS
text different from Unix text - we use just the "LF/Newline" character
(0x0A), while DOS uses both (CR/LF). This is why Unix text looks like
<pre>
This is line one*This is line two*This is line three*
</pre>
in DOS, and DOS text like
<pre>
This is line one^M
This is line two^M
This is line three^M
</pre>
in Unix.
<p> "A word to the wise" applicable to any budding shell-script writer:
close study of the "tr" man page will pay off handsomely. This is a
tool that you will find yourself using again and again.
<h3>head/tail</h3>
<p> A very useful pair of tools, with mostly identical syntax. By default
they print, respectively, the first/last 10 lines of a given file; the
number and the units are easily changed via syntax. Here's a snippet that
shows how to read a specific line in a file, using its line number as a
"handle" (you may recall this from the discussion on "cat"):
<pre>
handle=5
line="$(head -$handle $1|tail -1)"
</pre>
Having defined `$handle' as `5', we use "head -$handle" to read a file
specified on the command line and print all lines from 1 to 5; we then use
"tail -1" to read only the last line of that. This can, of course, be done
with more powerful tools like "sed"... but we won't get to that for a bit -
and Taylor's law, above, is often a sensible guideline.
<p> These programs can also be used to "identify" very large files without
the necessity of reading the whole thing; if you know that
one of a number of very large databases contains a unique field name
that identifies it as the one you want, you can do something like
this:
<pre class="code">
for fname in *dbf
do
head -c10k "$fname"|grep -is "cost_in_sheckels_per_cubit"
echo $fname
done
</pre>
(Yes, I realize we haven't covered 'grep' yet. I trust those readers that
aren't familiar with it will use their "man" pages wisely... or hold their
water until we get to that part. :)
<p> So - the above case is simple enough; we take the first 10k bytes (you'd
adjust it to whatever size chunk is necessary to capture all the field
names) off the top of each database by using 'head', then use 'grep' to
look for the string. If it's found, we print the name of the file. Those
of you who have to deal with large numbers of multi-megabyte databases
can really appreciate this capability.
<p> 'tail' is interesting in its own way; one of the syntax differences
between it and 'head' is the '+' switch, which answers the question of "how
do I read everything <em>after</em> the first X characters/lines?" Believe
it or not, that can be a very important question - and a very difficult one
to answer in any other way... (<i>Also sprach</i> The Voice of Bitter
Experience.) As an example, to get the output of something like "ls -l"
<em>without</em> the 'total:' header, try<code>'ls -l|tail +2'</code>.
<h3>cut/paste</h3>
<p> In my experience, 'cut' comes in for a lot more usage than 'paste' -
it's very good at dealing with fields in formatted data, allowing you to
separate out the info you need. As an example, let's say that you have
a directory where you need to get a list of all the files that are 100k
or more in size, once a week (logfiles over a size limit, perhaps). You
can set up a "cron" job to e-mail you:
<pre class="code">
...
ls -lr --sort=size $dir|tr -s ' '|cut -d ' ' -f 5,8|grep \
-E ^'[1-9]{6,} '|mail joe@thefarm.com -s "Logfile info"
...
</pre>
<p> <code>'ls -lr --sort=size $dir'</code> gives us a listing of `$dir'
sorted by size in `reverse' order (smallest to largest). We pipe that
through "tr -s ' '" to collapse all repeated spaces to a single space, then
use "cut" with space as a delimiter (now that the spaces are singular, we
can actually use them to separate the fields) to return fields 5 and 8
(size and filename). We then use 'grep' to look at the very beginning of
the line (where the size is listed) and print every line that starts with a
digit, repeats that match 5 times, and is followed by a space. The lines
that match are piped into 'mail' and sent off to the recipient.
<p> 'paste' can be useful at times. The simplest way of describing it that
I can think of is a "vertical 'cat'" - it merges files line by line,
instead of "head to tail". If you have, e.g., two files containing,
respectively, the names of the people on your mullet-throwing team, and the
records for each one arranged in the correct order, you can simply "glue"
the two of them together with "paste". If you specify the 'names' files
first and the 'records' second, each line of the result would contain the
name followed by the record, separated by a tab or whatever delimiter you
specified with the '-d' option.
<h3>grep</h3>
<p> The "Vise-Grips" of Unix. This utility, as well as its more
specialized relatives 'fgrep' and 'egrep', is used primarily for searching
files for matching text strings, using the 'regexp' (Regular Expression)
mechanism to specify the text to match.
<p> 'grep' can be used to answer questions like <i>"Let's see now; I know
the quote that I want is in of these 400+ text files in this directory -
something about "Who hath desired the Sea". What was it, again?..."</i>
<pre>
Odin:~$ grep -iA 12 "who hath desired the sea" *
Poems.txt-Who hath desired the Sea? - the sight of salt water unbounded -
Poems.txt-The heave and the halt and the hurl and the crash of the comber
Poems.txt- wind-hounded?
Poems.txt-The sleek-barrelled swell before storm, grey, foamless, enormous,
Poems.txt- and growing -
Poems.txt-Stark calm on the lap of the Line or the crazy-eyed hurricane
Poems.txt- blowing -
Poems.txt-His Sea in no showing the same - his Sea and the same 'neath each
Poems.txt- showing:
Poems.txt- His Sea as she slackens or thrills?
Poems.txt-So and no otherwise - so and no otherwise - hillmen desire their
Poems.txt- Hills!
Odin:~$
</pre>
<i>"Ah, it's in `Poems.txt'..."</i>
<p> 'grep' has a wide variety of options (the "-A <n>" switch that I
used above determines the number of lines of context after the matched
line that will be printed; the "-i" switch means "ignore case") that allow
precise searches within a single file or a group of files, as well as specifying
the type of output when a match is found (or conversely, when no match
is found). I've used 'grep' in several of the "example" scripts so far,
and use it, on the average, about a dozen times a day, command line and
script usage together: the search for the above Kipling quote (including
my muttered comments) happened just a few minutes before I sharpened my
cursor and scribbled this paragraph.
<p> You can also use it to search binary files, by using the '-a' option;
an occasionally useful "last-ditch" procedure for those programs where the
author has hidden the help/syntax info behind some obscure switch, and
'man', 'info', and the '/usr/doc/' directory come up empty.
<p> Often, there is a requirement for performing some task the same number
of times as there are 'useful' lines in a given file, e.g., reading in each
line of a configuration file and parsing it. 'grep' helps us here, too:
<pre class="code">
...
for n in $(egrep -v '^[ ]*(#|$)' ~/.scheduler)
do
...
...
done
</pre>
<p> This is a snippet from a scheduling program I wrote some time ago;
whenever I log in, it reminds me of appointments, etc. for that day.
'egrep', in this instance, finds all the lines that are not comments or
blanks, by ignoring (via the '-v' option) all lines that either start with
a '#' or with any number of spaces or tabs preceding a '#' or an
end-of-line (represented by the '$' metacharacter.) Note that the square
brackets above, which define a <em>character class</em> or a range of
characters to match, actually contain a space and a tab - both of which are
annoyingly invisible. Incidentally, the reason I used e(xtended) grep here
is that most versions of simple 'grep' don't know how to parse the '(a|b)'
alternation construct - and a character class won't work for that, since
metacharacters lose their special meaning in character classes and are
simply treated as characters.
<p> The result of the above is that we only loop over "the beef" in the
config file, ignoring all non-programmatic input; the "working" lines are
parsed, within the body of the "for" loop (details not shown in this
snippet) into the date and text variables, and the script executes an
"alarm and display" routine if the appointment date matches today's date.
<h3>Wrapping It Up</h3>
<p> In order to produce good shell scripts, you need to be very familiar
with how all of these tools work - or, at the very least, have a good idea
what a given tool can and cannot do (you can always look up the exact
syntax via 'man'). There are many other, more complex and powerful tools
available to us - but these six programs will get you started and keep you
going for a long time, as well as giving you a broad field of possibilities
for script experimentation of your own.
<p> Until next month - Happy Linuxing!
<hr width="100%">
"Script Quote" Of The Month:
<pre>
"I used to program my IBM PC to make hideous noises to wake me up. I
also made the conscious decision to hard-code the alarm time into the
program, so as to make it more difficult for me to reset it. After I
realised that I was routinely getting up, editing the source file,
recompiling the program and rerunning it for 15 minutes extra sleep before
going back to bed, I gave up and made the alarm time a command-line
option."
-- B.M. Buck
</pre>
<h3>References</h3>
<p> The "man" pages for 'bash', 'builtins', 'cat', 'head', 'tail', 'cut',
'paste', 'grep', 'strings'
<p>
"Introduction to Shell Scripting - The Basics" by Ben Okopnik, LG #52<br>
"Introduction to Shell Scripting - Part I" by Ben Okopnik, LG #53
</p>
<!-- *** BEGIN author bio *** -->
<!-- *** BEGIN bio *** -->
<hr>
<P>
<IMG ALT="picture" SRC="../gx/authors/okopnik.jpg" 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 the tender age of 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, martial arts,
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 © 2005, <A HREF="../authors/okopnik.html">Ben Okopnik</A>. Released under the
<a href="http://linuxgazette.net/copying.html">Open Publication license</a>
unless otherwise noted in the body of the article. Linux Gazette is not
produced, sponsored, or endorsed by its prior host, SSC, Inc.
</p>
<p>
Published in Issue 113 of Linux Gazette, April 2005
</p>
</div>
</div>
<div class="content lgcontent">
<a name="oregan"></a>
<h1>-- --- .-. ... .</h1>
<p id="by"><b>By <A HREF="../authors/oregan.html">Jimmy O'Regan</A></b></p>
</b>
</p>
<p>
<p class="editorial">[ For those who have not yet learned to read Morse
code, you could just save this page and run "perl -x oregan.html" over it
to read it in boring old English (yes, there's Deep Magic here.)
Conversely, the <a href="http://ppt.perl.org/">Perl Power Tools project</a>
contains the '<a
href="http://search.cpan.org/src/SDAGUE/ppt-0.12/bin/demorse">demorse</a>'
utility, which can be used the same way. Or you can use a Morse dictionary.
Or you can just remain forever mystified. Your choice. Oh, and happy April
1st to all. :) -- Ben ]</p>
<hr>
<!--
#!/usr/bin/perl -w
# Hacked up by Ben Okopnik from "demorse" by abigail and sdague
my %t = reverse (
0 => '-----', 1 => '.----', 2 => '..---', 3 => '...--',
4 => '....-', 5 => '.....', 6 => '-....', 7 => '--...',
8 => '---..', 9 => '----.', a => '.-', b => '-...',
c => '-.-.', d => '-..', e => '.', f => '..-.',
g => '--.', h => '....', i => '..', j => '.---',
k => '-.-', l => '.-..', m => '--', n => '-.',
o => '---', p => '.--.', q => '--.-', r => '.-.',
s => '...', t => '-', u => '..-', v => '...-',
w => '.--', x => '-..-', y => '-.--', z => '--..',
'.' => '.-.-.-', ',' => '--..--', ':' => '---...', '?' => '..--..',
"'" => '.----.', '-' => '-....-', '/' => '-..-.', '(' => '-.--.-',
')' => '-.--.-', '"' => '.-..-.', ' ' => '-...-'
);
while (<DATA>) {
next if /[\w>]/;
next if /^\s*$/;
s/([-.]+) ?/exists $t{$1} ? $t{$1} : die "$1: unknown token"/ge;
print;
}
__END__
-->
- .... --- ..- --. .... .-- . .-.. .. ...- . .. -. - .. -- . ... --- ..-. .-. ... ... .- -. -.. ..-. . . -.. .-. . .- -.. . .-. ... --..-- .-- . ... .... --- ..- .-.. -.. -- .- -.- . ... ..- .-. . - --- -. . ...- . .-. ..-. --- .-. --. . - - .... . --- .-.. -.. .-- .- -.-- ... .-.-.- -- --- .-. ... . -.-. --- -.. . -- .- -.-- -... . .- ... .-.. --- .-- .-- .- -.-- --- ..-. --. . - - .. -. --. -. . .-- ... - .... . ... . -.. .- -.-- ... --..-- -... ..- - .. ..-. -.-- --- ..- ... .... --- ..- .-.. -.. ..-. .. -. -.. -.-- --- ..- .-. ... . .-.. ..-. - .-. .- .--. .--. . -.. .. -. ... --- .-.. .. - .- .-. -.-- -.-. --- -. ..-. .. -. . -- . -. - --..-- -.-- --- ..- .----. .-.. .-.. -... . --. .-.. .- -.. --- ..-. .- -.- -. --- .-- .-.. . -.. --. . --- ..-. -- --- .-. ... . -.-. --- -.. . --..-- .- ... -.-- --- ..- .- -. -.. -.-- --- ..- .-. ..-. . .-.. .-.. --- .-- .--. .-. .. ... --- -. . .-. ... - .- .--. --- ..- - -.-- --- ..- .-. .--. .-.. .- -. ... --- ..-. ..- .--. .-. .. ... .. -. --. --- -. - .... . .--. .-.. ..- -- -... .. -. --. .-.-.- ..-. --- .-. - .... --- ... . --- ..-. -.-- --- ..- .-- .... --- .- .-. . -. .----. - .. -. -.-. .-.. .. -. . -.. - --- .-.. . .- .-. -. -- --- .-. ... . -.-. --- -.. . --..-- -... ..- - .-- .... --- -.. --- .... .- ...- . .- .-.. .. -. ..- -..- .-. ..- -. -. .. -. --. -.-. --- -- .--. ..- - . .-. .- ...- .- .. .-.. .- -... .-.. . --..-- -.-- --- ..- -.-. .- -. .- .-.. .-- .- -.-- ... .. -. ... - .- .-.. .-.. - .... . -... ... -.. --. .- -- . ... .--. .- -.-. -.- .- --. . .- -. -.. ..- ... . - .... . -- --- .-. ... . .--. .-. --- --. .-. .- -- - .... --- ... . -.-. .-. .- --.. -.-- -.-. .- .-.. .. ..-. --- .-. -. .. .- -. ... ... .- .-- ..-. .. - - --- .-. . .-.. . .- ... . - --- .- -. ..- -. ... ..- ... .--. . -.-. - .. -. --. .-- --- .-. .-.. -.. .-.-.- -... -.-- -.. . ..-. .- ..- .-.. - --..-- .. - ... .--. . .-.. .-.. ... --- ..- - . .- -.-. .... -.. --- - .- -. -.. -.. .- ... .... .- ... -.. .. - .- -. -.. -.. .- .-- .-. . ... .--. . -.-. - .. ...- . .-.. -.-- .-.-.- .. ..-. -.-- --- ..- .. -. ...- --- -.- . .. - .- ... -- --- .-. ... . -....- ... --..-- -.-- --- ..- --. . - -- ..- -.-. .... -... . - - . .-. --- ..- - .--. ..- - ---... - .... . - . .-.. . --. .-. .- .--. .... ..-. .- -. ... .- -- --- -. --. -.-- --- ..- .-- .. .-.. .-.. ... ..- .-. . .-.. -.-- -... . .--. .-.. . .- ... . -.. .-.-.- .--. . .-. .-.. ..-. .- -. ... -.-. .- -. ..-. . . .-.. .... .- .--. .--. -.-- --..-- - .... .- -. -.- ... - --- - .... . .-- --- .-. -.- --- ..-. -.. .- -- .. .- -. -.-. --- -. .-- .- -.-- .-.-.- ..- ... .. -. --. .... .. ... .- -.-. -- . ---... ---... -- --- .-. ... . -- --- -.. ..- .-.. . .-- .... .. -.-. .... -.-. --- -- . ... .-- .. - .... .- -.-. -- . ---... ---... -... .-.. . .- -.-. .... -.-- --- ..- -.-. .- -. .-- .-. .. - . -.-- --- ..- .-. .--. . .-. .-.. ... -.-. .-. .. .--. - ... .. -. -- --- .-. ... . -.-. --- -.. . .-.-.- -... . --. .. -. -. . .-. ... -. . . -.. -. .----. - ..-. . .- .-. --..-- .... --- .-- . ...- . .-. ---... ... .. -- .--. .-.. -.-- .-- .-. .. - . -.-- --- ..- .-. -.-. --- -.. . .- ... ..- ... ..- .- .-.. --..-- -... ..- - .- -.. -.. .- .----. ..- ... . .- -.-. -- . ---... ---... -- --- .-. ... . .----. .-.. .. -. . - --- - .... . ... - .- .-. - --- ..-. -.-- --- ..- .-. ... -.-. .-. .. .--. - --..-- .- -. -.. .. - .----. .-.. .-.. -... . -.-. --- -. ...- . .-. - . -.. ..-. --- .-. -.-- --- ..- .-.-.-
</p>
<!-- *** BEGIN author bio *** -->
<!-- *** BEGIN bio *** -->
<hr>
<P>
<img ALIGN="LEFT" ALT="[BIO]" SRC="../gx/2004/authors/oregan.jpg" class="bio">
<em>
<!-- ../110/lg_laundrette.html#nottag.15 :) -->
Jimmy is a single father of one, who enjoys long walks... Oh, right.
<p> 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> In his spare time, Jimmy likes to play guitar and read: not at the same time,
but the picks make handy bookmarks.
</em>
<br CLEAR="all">
<!-- *** END bio *** -->
<!-- *** END author bio *** -->
<div id="articlefooter">
<p>
Copyright © 2005, <A HREF="../authors/oregan.html">Jimmy O'Regan</A>. Released under the
<a href="http://linuxgazette.net/copying.html">Open Publication license</a>
unless otherwise noted in the body of the article. Linux Gazette is not
produced, sponsored, or endorsed by its prior host, SSC, Inc.
</p>
<p>
Published in Issue 113 of Linux Gazette, April 2005
</p>
</div>
</div>
<div class="content lgcontent">
<a name="orr"></a>
<h1>PyCon DC 2005</h1>
<p id="by"><b>By <A HREF="../authors/orr.html">Mike Orr (Sluggo)</A></b></p>
</b>
</p>
<p>
<p> <a href="http://www.python.org/">Python</a>eers from around the world again
descended on George Washington University for the fourth annual <a
href="http://pycon.org/dc2005/">PyCon</a>, which was held March 23-25, 2005 in
Washington, DC. It's hard to decide what the highlight was: Guido's new beard,
the success of the Open Space sessions, the number of attendees (just shy of
450), the international scope (I saw several delegates from Germany, and a few
from Japan and Italy), the surprise sleeper hit (WSGI and integrating the web
application frameworks was the most discussed topic), the Python CPAN
(integrated with <a href="http://www.python.org/pypi/">PyPI</a>), the keynote
from Python's most prominent user (Google), David Goodger's name ("pronounced
like Badger but GOOD!"), or Guido's plans for static typing. ("Don't worry,"
he says about the latter, "it's just a bad dream.")
<h3>Keynote #1: Python on .NET</h3>
<p> Jim Hugunin, who last year presented his paper on
<a href="http://www.ironpython.com/">IronPython</a> (a version of
Python for Microsoft's .NET runtime environment), is now working for Microsoft.
("So I know if my computer crashes during this talk, I'll never hear the end of
it.") Hugunin originally started the IronPython project to prove .NET was
unsuitable for dynamically-typed languages, but discovered the opposite.
IronPython on Windows .NET 2.0 Beta 1 is 80% faster than CPython (i.e.,
"normal" Python). Why? Different bytecode, support library is C#, and MS has
put a huge number of resources into optimizing .NET and its machine-code
compiler. (IronPython on Mono "probably runs about as fast as CPython", he
said, although "this could improve with optimization". Mono is a
Linux-compatible version of .NET.) IronPython thus joins Jython (Python on
Java), Parrot (Python on Perl 6), and PyPy (Python on Python) as competitors to
CPython, meaning Python is now more a language specification than a particular
C implementation.
<h3>Keynote #2: Python at Google</h3>
<p> Greg Stein from Google talked about why Python is one of their primary
development languages (alongside C++ and Java). They found Python highly
adaptable, fast to learn, and easy to maintain. Many of the Python modules
they use are actually <a href="http://www.swig.org/">SWIG</a> wrappers around C
libraries. "We use lots of swigs."
<p> Although only a few of Google's user-visible services are currently running
on Python (<a href="http://groups.google.com/">groups.google.com</a>,
<a href="http://code.google.com/">code.google.com</a>), Python is used
extensively in their infrastructure. Google is a challenging environment to
administer because it has several servers. "OK, a <em>lot</em> of servers."
How many companies do you know with a thousand servers to feed? Their
development environment is written in Python: libraries that describe how to
build software, utilities to automatically run unittests and enforce a peer
review before code is checked in, and packaging systems. Python lets
their tools evolve easily as hardware/software is upgraded.
<p> Successfully checked-in code goes to a staging server, then to the "data
centers" which push it to the production servers. All this is done in Python.
Other Python scripts monitor the production servers: Are they running? Do they
think they're healthy? Are their hard drives and CPU temperatures OK?
<p> Google has released some Python code to the public, such as <a
href="http://sourceforge.net/projects/goog-goopy/">Goopy</a> (a "functional
programming" library). They plan to release more, but slowly and
carefully. Guido asked, "When are we going to see an open-source build
system?" Greg said that it'll be as soon as they can convince the
management.
<p> One interesting detail is that since Google always has a ton of user
queries coming in, they can test new servers/applications by simply diverting
1% of the traffic to it and seeing if they fall over. (Steve Holden, PyCon's
coordinator, called that amount of traffic "frightening".) The command-line
tool to do this is, of course, written in Python.
<h3>Keynote #3: Guido van Rossum</h3>
<p> Somebody named Guido got up and talked about Python as if he owned it.
Rather than throwing cans of spam at him, the audience listened intently. Why?
Because this was Python's creator, giving his annual address about the state of
the language. After discussing "why my keynotes suck" (because he'd rather be
talking about the intricacies of language design), "why the beard", and "who
is my new employer" (<a href="http://elementalsecurity.com/">Elemental
Security</a>, a company developing an enterprise security product they won't
talk about, who also won't let Guido develop Python 3000 on company time),
Guido plunged into the controversies <em>du jour</em>.
<p> How did the <code>@decorator</code> syntax win? "Everyone disliked it
equally, it's unambiguous, it doesn't obscure the function definition, and it's
similar to Java."
<p> If function decorators are so necessary, why not class decorators too?
Metaclasses do the job well enough. Other PyCon talks showed how metaclasses
are functions that tweak a class object after it's created; for example, to
make it keep a list of all its instances. To specify a class's metaclass, give
it a .__metaclass__ attribute or define a __metaclass__ variable in the module.
Or use a little-known feature of the <tt>type</tt> builtin to create a class on
the fly:
<pre>
type('MyClass',
(BaseClass1, BaseClass2),
{'my_attribute': 1})
</pre>
You can also subclass <code>type</code> to make a class factory, as shown in
David Mertz's <a
href="http://www.onlamp.com/pub/a/python/2003/04/17/metaclasses.html">tutorial</a> on
metaclasses.
<p> Back to Guido's talk. Python is getting more popular. The Barton Group
did a survey of what their developer readers are using, and Python was at 14%.
The Barton Group described it as the "P" languages (Python, Perl, PHP) vs. the
"C" languages, and noted that Python has fewer security vulnerabilities than
Perl or PHP. Downloads and page views at <a
href="http://python.org/">python.org</a> are both up 30% from last year.
<p> 2005 also featured Python's first security alert, against a vulnerability
in <code>SimpleXMLRPCServer.py</code>. It's fixed in Python 2.4.1 and 2.3.5;
patches for earlier versions are <a
href="http://www.python.org/security/psf-2005-001/">available</a>. The
experience showed that Python needed a Security Response Team, which is now in
place. Previously there was no place to send a security alert without posting
it on a public forum or e-mailing it to Guido. Now anybody can e-mail alerts
to <strong>security@python.org</strong>, and they will go to the entire response
team.
<p> Python has gotten burned for putting out too many new features in minor
releases, so now only bugfixes will go into minor releases (e.g., 2.4.5), and
features will have to wait until a major release (e.g., 2.5). The community
has indicated it wants a "slow growth" policy on features, with more focus on
stability and optimization.
<p> Guido's employer won't let him work on Python on company time, so Python
3000 (a.k.a. Python 3.0) will not appear anytime soon. But it now has a
<a href="http://www.python.org/peps/pep-3000.html">PEP</a> describing the
direction it will go. Python 3.0 will have backward incompatibilities as Guido
adds a few keywords, eliminates builtins he wishes he hadn't created, and
reorganizes the standard library into a deeper hierarchy. Much of the CPython
code is still useful though, so it won't be a total rewrite. Some features
will be backported to Python 2.x, sometimes accessible as "<code>from
__future__ import <feature></code>". Old-style classes will be eliminated in
3.0, as will <code>map/filter/reduce</code>. <code>lambda</code> may be
replaced by anonymous code blocks, although a syntax has not emerged.
("Statements in curly braces was just a joke, really!")
<p> Python 2.5 will have <code>any(iterable)</code> and
<code>all(iterable)</code> builtins; they both return booleans.
<code>any</code> tells whether any of the values are true, <code>all</code>
whether all the values are true.
<h3>The Bad Dream</h3>
<p> Then Guido said, "If you don't like the next part, just pretend it's all a
bad dream." Guido wants to add optional static typing to Python 3.0. Here's a
possible syntax:
<pre>
def foo(a: int, b: list[int]) -> list[str]
</pre>
This implies:
<pre>
a = __typecheck__(a, int) # Raises error if adapt(a, int) is false.
</pre>
If that horrifies you so much you want to switch to <a
href="http://www.ruby-lang.org/">Ruby</a> because "Guido is trying to turn
Python into C," don't worry. He reassured us, "Nothing is settled yet!!!"
There are a number of unresolved issues:
<ul>
<li> We can't do compile-time checking because the arguments may come from
untyped code, so the checking has to be at runtime. So he thinks <em>strong
typing</em> is a more accurate term than <em>static typing</em>.
<li> Strong types would work better with
<a href="http://www.python.org/peps/pep-0245.html">interfaces</a> and
<a href="http://www.python.org/peps/pep-0246.html">adapters</a>.
<li> <code>list[int]</code> may be shorthand for "an iterable of integer-like
objects" rather than strictly "a list of integers", since that's what most
functions mean when they ask for a list.
<li> Type checking is expensive to do on a mutable sequence, and there's no
guarantee a subroutine won't insert an incompatible type after the checking is
done. So maybe the type information will be just documentation rather than
enforced, or maybe it will just be in interfaces, or maybe types will be
inferred rather than declared.
<li> He's afraid that even though type declarations will be <em>de jure</em>
optional, they'll become <em>de facto</em> mandatory if clueless tutorials
start falsely claiming that "declarations are always better".
<li> Other syntax proposals for the arguments are "<code>int a</code>" (like
C), "<code>a int</code>" (unambiguous because there's no <code>=</code>),
"<code>a as int</code>", "<code>a as integer</code>" (to show that any
int-compatible number is allowed). Where does the default value go? After the
whole thing.
</ul>
<h3>The PyWebOff and WSGI</h3>
<p> In the beginning there was <a href="http://zope.org/">Zope</a>. Zope was a
web application framework and the basis for several Content Management Systems,
but it had some discontents who dared to call it "monolithic" and "unpythonic".
And behold, then there came <a
href="http://www.webwareforpython.org/">Webware</a>, and it was Modular and
didn't impose New Programming Languages on site developers, and there was much
rejoicing. But others rebelled at even Webware's Heavy-Handedness and arbitrary
Conventions and wanted something even Simpler, and a Ton of frameworks
appeared: <a href="http://www.mems-exchange.org/software/quixote/">Quixote</a>
(which calls itself "lightweight Zope"), <a
href="http://skunkweb.org/">SkunkWEB</a> ("Smell the power!"),
<a href="http://cherrypy.org/">CherryPy</a> ("fun to work with"), and some
<a
href="http://www.python.org/moin/webprogramming#head-a8b5de8b5a80f031b52613896de9aca91194159f">thirteen
others</a>. Meanwhile, <a href="http://twistedmatrix.com/">Twisted</a> had
released its own Whole Earth Catalog of asynchronous Internet libraries
including <a href="http://nevow.com/">Nevow</a>. Trying to find the forest
through the trees, Ian Bicking held a <a
href="http://colorstudy.com/docs/shootout.html">Shootout</a> at PyCon 2004,
comparing several frameworks against each other.
<p> This year, Michelle Levesque went a step further and said we've forgotten
about "Brian". "Brian" is the typical non-techie developer who just wants to get
a simple dynamic site up. The Python frameworks have now mushroomed to forty
[slide showing a montage of logos]. Experienced Pythoneers know that Zope is
easy <em>if</em> it does what you want out of the box, Quixote is good for
sites that are big on calculations and small on eye candy, Twisted is good for
high-demand sites, etc.; but Brian doesn't know this. Brian sees forty
apparently equal frameworks and chooses this: [slide with the word "PHP"], or
maybe this: [slide with the word "Java"]. Python is about having One Obvious
Way To Do It, but in the web framework world it's Ruby and Java that have a
unified model, not Python. Quoting Moshe Zadka, "You're not a Real
Python Programmer until you've written your own web templating toolkit." But,
Michelle said, there are a lot of Brians in the world; they form by far the
biggest potential "market".
<p> Michelle's plea to developers is, "Stop writing kewl new frameworks! Help
improve the top few frameworks so they can become a best of breed. And put
documentation on python.org telling Brian, "For heavyweight use A, for
lightweight use B, for performance use C, for XML use D, for no XML use E." Of
course, this means the Python community must come to consensus on which
<em>are</em> the top frameworks. Some might think "when hell freezes over",
but Michelle has a plan.
<p> She issued herself a <a
href="http://pyre.third-bit.com/pyweb/index.html">challenge</a> to implement a
typical Brian application (in this case, a book checkout system) in each of
seven frameworks, and compare the experiences (i.e., compare the grief). She
also blogged her thoughts along the way, making this perhaps the first PyCon talk
with its own <a href="http://pyre.third-bit.com/pywebblog/">blog</a>. Of
course this is just one person's opinion, but it serves as a starting point for
discussion.
<p> Ian Bicking followed Michelle's talk with a remarkably similar topic: "WSGI
Middleware and WSGIKit (for Webware)". He
<a href="http://blog.ianbicking.org/why-web-programming-matters-most.html">agrees</a>
with Michelle that the proliferation of incompatible web frameworks is the most
important issue preventing Python from enjoying the huge growth curve of PHP,
but he takes a different approach. Rather than just writing documentation, Ian
would like to see these frameworks become interoperable. <a
href="http://www.python.org/peps/pep-0333.html">WSGI</a> (the Web Server
Gateway Interface) is a proposed standard for Python (PEP 333). It's a
protocol for web servers to communicate with application frameworks.
Currently, each framework has to come with a whole slew of adapters (CGI,
FastCGI, mod_python, a custom module, a standalone HTTP server) to communicate
with Apache. WSGI allows each framework to need only a single virtual adapter,
and the webservers can provide "best of breed" adapters that plug into any
WSGI-compliant framework. You can also plug in single-purpose "middleware"
objects that look like an application to the webserver, and like a server to
the framework, or even chain middleware objects together. This could allow
alternate URL-parsing and Session modules to be plugged in and out, for
instance, eliminating the need for each framework to reinvent the wheel, and
allowing applications to mix and match which coding styles they prefer (e.g.,
WebwareRequestObjectMiddleware vs QuixoteRequestObjectMiddleware).
<p> Ian refactored Webware to make it WSGI compliant. Webware in this
environment turned out to be a pretty thin layer over the standard protocol.
Why use Webware at all then? One, to support existing Webware applications.
Two, because some developers prefer the Webware servlet style. WSGI isn't
meant to be used directly by application developers; its dict-function-iterable
model is inconvenient for that.
<p> Since there are two models for concurrency, applications would have to
check the 'wsgi.multithread' and 'wsgi.multiprocess' keys (boolean) and take
appropriate action depending on which style the web server is using.
<p> These two talks sparked a lively debate in Open Space sessions and at
lunch tables about whether such integration between the frameworks is (A)
necessary and (B) desirable. Dissidents argued that "everyone's going to have
their favorite no matter what you do", "common design patterns are more
important than common implementations", and "it's not that important". Several
people started collaborating to make their favorite frameworks WSGI compliant
(most notably Quixote and <a
href="http://aquarium.sourceforge.net/">Aquarium</a>). However, the discussion
also showed that people have widely differing opinions about what WSGI goals
are worth pursuing and how the proposed "middlewares" should behave. This will
be followed up on after PyCon. It's too bad that nobody thought to organize a
sprint for this. (Sprints are group hacking sessions that occur before or
after PyCon.)
<p> Donovan Preston ("the Nevow guy") followed Ian's talk and showed how Nevow
can encapsulate the Javascript needed to send little messages between the
client and server; e.g., to update widgets on a form without redrawing the
entire page.
<h3>Other Talks</h3>
<p> Michael Weigend spoke on "eXtreme Programming in the Classroom". Weigend
has been using XP and Python to teach programming to school children. (XP is
the abbreviation for eXtreme Programming; it's not related to Microsoft's
operating system of the same name.) In XP, the developers have to gather
"stories" -- use cases and usage examples -- from the user. Then they have to
choose a metaphor for their application, in this case a text editor and chat
room for nine-year-old students in Germany learning English. So it might have
pop-up lists for common responses, for instance. The developers then explore
implementation tools (e.g., GUI libraries) and make time estimates. Then they
choose a "story" to work on, a piece small enough to do just one thing, and
split into pairs to each write an implementation of the story. Then they
gather and select the best implementation. After all the stories are thus
implemented, they integrate the best implementations together. That's one
iteration, which may take a week. Then they evaluate the integrated product:
does it work right? does it really fulfill the stories? If not, iterate again
to come up with a better implementation. The beauty of this method, Weigend
says, is "the project is always a success". Even if you have to stop work on
it early, at least it does something useful, even if it doesn't fully comply
with all the stories. In contrast, with linear software engineering, if you
stop the project early you may have nothing running at all.
<p> Holger Krekel introduced
<a href="http://codespeak.net/py/current/doc/test.html">py.test</a>, a tool
I've been avidly using recently. It's like <code>unittest</code> but simpler
and more flexible. You merely write functions with assert statements, and pass
your module to the command-line tool. There are a few support functions to
handle cases like "this test should raise this exception" and "I want some
common code executed before each test". Test cases can also be iterative:
<pre>
def func(x, y):
assert ...
def test_more():
for (x, y) in [(1, 2), (1000, 2), (0, 0)]:
yield func(x, y)
</pre>
<code>test_more</code> is a test function because it begins with "test_". But
it's also a generator that calls another function with a different set of
arguments each time. This is useful for testing boundary cases in your other
function (<code>func</code>). There's an option to automatically drop to
<code>pdb</code> (the Python debugger) on any failure. There's also a sessions
feature that runs the remaining failed tests as you edit and save each
offending module.
<p> One session summarized the sprint activity this year.
<a href="http://www.osafoundation.org/">Chandler</a> fans experimented with a
plug-in API and did three projects.
<a href="http://www.gnu.org/software/mailman/">Mailman</a> fans worked on
Mailman 3, a SQL database back end, and started using
<a href="http://sqlobject.org/">SQLObject</a>.
<a href="http://www.zope.org/Wikis/ZODB/FrontPage">ZODB</a> fans added BLOB
support and an iteration API. Zope 3 developers worked on a weblog object
using Dublin Core metadata. A Python Core team worked on an AST step for the
Python compiler. And <code>distutils</code> fans did <em>phenomenal</em> work,
finally implementing the long-desired Python CPAN. They took the
<a href="http://python.org/pypi/">Python Package Index</a> and added file
upload, so that it could store the packages themselves as well as pointers to
them. By the way, the coordinator said PyPI is pronounced "pippy", not
"pie-pie". "Pie-pie" sounds identical to PyPy. But old habits die hard. I'm
used to saying "pie-pie", just like I say "line-ux" instead of "linnux" most of
the time. (I still remember when Linus spoke at LinuxExpo in 1998 and called
himself Line-us and the OS Linnix in the same sentence!)
<p> Richard Jones gave a talk about an excellent product,
<a href="http://roundup.sourceforge.net/">Roundup</a>, an issue tracker with
web, e-mail, and command-line interfaces. I'd used TkGnats a few years ago and
was happy to learn that Roundup has acquired Gnat's most important features but
with a slicker interface. Sending it an e-mail creates a new issue or attaches
the message to the existing issue. The main page shows you immediately which
issues are open, and you can set categories, priorities, and keywords, and save
custom searches. It can use several database backends and comes with a
no-hassle demo.
<p> Mike Salib didn't have the feistiness of last year's Starkiller talk, but
his "Stupidity and Laser Cat Toys: Indexing the US Patent Database with Python
and Xapian" talk had nothing to do with sophisticated cats and everything to do
with taking on the software patent cartel. His battle cry is, "The patents
will kill us all; there's more of them than there is of us. They reproduce a
lot. Sooner or later, people will die due to lack of access to patented
technology."
<p> The US patent database can be downloaded on the web, but only one patent at
a time. Downloading more than a hundred per session is forbidden, but you can
have all patents conveniently delivered to your door on tape for the low price
of $30,000. Mike didn't have $30,000 so he opted to download them a hundred at
a time in parallel from several computers at the lab of a university that shall
remain nameless. The files come to several gigabytes compressed, which Mike
was giving away on DVD to any who asked. He will soon have a website up at
<a
href="http://divmod.org/users/msalib/patents/">here</a>.
<p> Mike considered using pyLucerne but it was too slow. (However, other
projects at the conference are using pyLucerne and are happy with it.) He
chose Xapian because it works with compressed databases. There were many build
issues, but Mike has written a library that will make it easier for others.
I'm not sure if it's been released yet, though.
<p> Anna Ravenscroft spoke on "The Time of Day": how to get Python to tell you
the current time in any timezone. This was especially apt for her since she
was in the process of moving from Italy to California, and had stopped in DC
for the conference. Her poor little laptop just couldn't keep up with her
jet-set lifestyle. Getting the time in Python 2.4 or 2.3 is simple:
<pre>
$ python
Python 2.3.3 (#1, Aug 19 2004, 17:24:27)
[GCC 3.3.2 20031218 (Gentoo Linux 3.3.2-r5, propolice-3.3-7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from datetime import datetime
>>> print datetime.now()
2005-04-01 11:48:54.392067
>>>
</pre>
Formatting the time seems to fluster some people that try to use
<code>time.strftime()</code> with <code>datetime</code> objects, but that's
easy too:
<pre>
>>> print datetime.now().strftime("%B %e, %Y %l:%M%P")
April 1, 2005 11:53am
</pre>
For date calculations Anna recommends <a
href="https://moin.conectiva.com.br/dateutil">dateutil</a>, and for a database
of timezones <a href="http://pytz.sourceforge.net">pytz</a> <code>pytz</code>.
<p> Andrew Jonathan Fine described how he saved his company a million dollars
by writing a Python - DocBook SGML - OpenJade - RTF converter to extract the
text and structure from MS Word documents in diverse formats into a standard
report format that was also in Word. That saved 7 FTEs over two years to
manually format it, dwarfing the cost of researching DocBook, Word libraries,
etc.
<p> These are just a few of the <a
href="http://www.python.org/pycon/2005/schedule.html">talks</a> presented at
PyCon.
<h3>Open Space</h3>
<p> Last year's Open Space suffered from a lack of promotion. People didn't
realize it was happening, didn't look at the schedule to find sessions of
interest, and couldn't remember what Open Space was supposed to be or how it
differed from Birds of a Feather (BoF) sessions. This year Jim Fulton vowed
to make it better, and he did. BoF's were collapsed into Open Space, and half
the sessions on the first day were prescheduled so that at least some choices
would be there. One room was devoted to Open Space for the entire conference
(except keynote talks), and another room was devoted half time.
<p> So what is Open Space? To do a regular talk at PyCon you have to present a
paper to the vetting team who may or may not accept it. To do an Open Space
you simply sign up on the schedule. Open Space sessions are smaller, typically
5-15 people. They may be a presentation or a roundtable discussion.
<p> The interesting thing this year was the number and quality of Open Space
sessions. Almost every time slot was filled, and many sessions were as
content-ful and worthwhile as the main talks. In fact, some <em>were</em> main
talks last year, repeated by popular demand.
<p> Brett C. gave a particularly interesting Open Space talk on "How Python is
Developed". The python-dev team is the implementation group, with 10-12 core
developers. Eighty people have checkin rights, but many have not touched the
code in years or only work on certain modules. New modules, by BDFL
pronouncement, must first be widely adopted by the Python community before they
can get into the standard library, must adhere to the BDFL's coding
conventions, and the developer has to commit to maintaining it.
<p> There are plenty of ways to contribute to the Python Core without being a
high-level programmer. Post bug reports, run the regression test suite on
various platforms, use the beta versions. Install patches posted on
SourceForge, run the regression tests on them, check the code to make sure it
looks OK, and post the results back to the patch thread. Martin van Löwis
also has a deal for those who really want to get a certain patch into Python.
Do five reviews of other patches, say you did on the python-dev list, and
Martin will make sure to consider your favorite patch.
<h3>Lightning Talks</h3>
<p> Another highlight this year was the Lightning Talks. These were
spontaneously scheduled like Open Space, but limited to five-minute
presentations. Some of the speakers weren't as polished as the prepared talks,
but the content was nevertheless high quality. The first session had forty
talkettes; the second around ten. Somebody came up with the simplest
explanation of continuations I've seen:
<pre>
>>> def foo():
... a = 5
... def bar():
... print "The value is", a
... return bar
...
>>> f = foo()
>>> f()
The value is 5
>>>
</pre>
This is a continuation because <code>a</code> is defined in the surrounding
scope, and even though it's a local variable in the enclosing function, it
nevertheless remains alive when <code>bar</code> is called.
<p> Other talks were on the need for a <code>Money</code> type
subclassing <code>Decimal</code>, and active command line completion.
<code>rlcompleter2</code> works in the Python shell and
<a href="http://ipython.scipy.org/">ipython</a>, and shows object names,
function signatures, docstrings, and even source code.
<h3>Miscellaneous</h3>
<p> Stephen Diebel held a Q&A on the Python Software Foundation, which
holds Python's copyright, takes care of legal issues, and is a tax-deductible
fundraiser. This year they've awarded $40,000 in grants to three projects: one
to upgrade Jython's features to 2.4, another to revamp python.org to make it
easier for people to contribute news, and another I didn't catch. Much of the
money came from the proceeds of past PyCons. This will be more difficult to
sustain as PyCon grows, because bigger venues mean bigger expenses, and a dud
year could wipe out the surplus. But Diebel is pretty confident the grant fund
will grow, and maybe in the future they can pay a couple of the core developers
to work on Python full time.
<p> The PSF members introduced themselves as "Uncle Timmy", "Nephew Jeremy",
"Uncle Guido", "Just David", "Neil", "Martin", and "Steve". Somebody
complained the PSF was America-centric, but Martin van Löwis pointed out that
he is not American, and many of the grants have been going to other places.
The <a href="http://europython.org/">EuroPython</a> organizers asked for a PSF
representative to come speak, since most EuroPython attendees don't know the
PSF exists. (EuroPython will be in Göteborg, Sweden on June
27-29. Next year it will be at <a href="http://www.cern.ch/">CERN</a> in
Switzerland.)
<h3>Plans For The Future</h3>
<p> Congratulations to the honorable Steve Holden, who is retiring from PyCon
chairmanship after several years and whose final stunt was pulling off the best
conference yet. Andrew Kuchling has taken the baton for 2006, and gave an Open
Space talk about his preparations. He noted how PyCon has spontaneously
increased in size every year in spite of our pitifully lame attempts at
promotion, and at 440 we've already maxed out the capacity of GWU. Next year
we have to plan for 500-600. Since most attendees are cheapskates and won't
pay more than $70 for a hotel room, we'll likely have to move out of DC to find
an affordable venue that can accommodate future expansion for several years.
The most likely location at this point is Baltimore. It will probably be
someplace "near DC" since that's where many PyCon organizers live, and other
regions haven't gotten off their butts to follow up on local venues.
<p> The most common request on last year's feedback forms was more
tutorial-level activities. Without much conscious thought, PyCon has
positioned itself as a "research conference" where most talks are about
cutting-edge projects. That's good for advanced users but doesn't meet the
continuing need to train the new generations of users that are dabbling in
Python. Suggestions include more talks on basic topics, repeating tutorials
that people have written for their local groups, having intense (perhaps paid)
tutorials before the conference, and classifying the talks as
beginner/mid/advanced on the schedule. They're also considering a low-cost
teenager track on the last day with basic topics, which has perked the interest
of a couple local schools that use Python in class.
<p> We made one attempt to fill in the tutorial gap this year, but it fell
flat. I organized an Open Space called "Python Q&A". I was trying to
do something like <a href="../tag/ask-the-gang.html">The Answer Gang</a>
here at the Linux Gazette, where people could bring any Python-related
question, but we ended up with all answerers and no querents. We'll have
to try a different approach next year, perhaps doing it right after a
tutorial track.
<p> In the sprint reports session, Andrew gathered suggestions for next year's
sprints. Most people said four days was a good length but they should be after
the conference rather than before, so that people could sprint on what they
learned at the talks. PyCon would have to move to Monday-Wednesday to
accommodate the sprints afterward; otherwise, people from overseas would have
to take 1 1/2 weeks off work to attend them.
<p> See y'all next year.
</p>
<!-- *** BEGIN author bio *** -->
<!-- *** BEGIN bio *** -->
<hr>
<P>
<IMG ALT="picture" SRC="../gx/2003/authors/orr.jpg" WIDTH="235" HEIGHT="333" ALIGN="left" HSPACE="10" VSPACE="10" class="bio">
<em>
Mike is a Contributing Editor at <I>Linux Gazette</I>. He has been a
Linux enthusiast since 1991, a Debian user since 1995, and now Gentoo.
His favorite tool for programming is Python. Non-computer interests include
martial arts, wrestling, ska and oi! and ambient music, and the international
language Esperanto. He's been known to listen to Dvorak, Schubert,
Mendelssohn, and Khachaturian too.
</em>
<br CLEAR="all">
<!-- *** END bio *** -->
<!-- *** END author bio *** -->
<div id="articlefooter">
<p>
Copyright © 2005, <A HREF="../authors/orr.html">Mike Orr (Sluggo)</A>. Released under the
<a href="http://linuxgazette.net/copying.html">Open Publication license</a>
unless otherwise noted in the body of the article. Linux Gazette is not
produced, sponsored, or endorsed by its prior host, SSC, Inc.
</p>
<p>
Published in Issue 113 of Linux Gazette, April 2005
</p>
</div>
</div>
<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>
<h3>Another bout of logorrhea</h3>
<p>Snow is no longer falling outside my window and it's officially
Spring, so a man's thoughts naturally turn to a new pair of blue
jeans. (For the purposes of this column, anyway.) To celebrate,
we'll create one or two logos for a new blue jeans manufacturer
called <em>Pants On Fire</em>.</p>
<p>But first let's examine a common household product whose logo
has recently undergone a redesign, and analyze the change.</p>
<p>Cooking for oneself, you sometimes end up reaching for a can of
something. Here's a list of <a href=
"http://www.hormel.com/home.asp">Hormel</a> products, with their
industry classifications, some of which might be in your
cupboard:</p>
<p><b>Deli</b><br>
DI LUSSO™ Deli Products<br>
HORMEL™ Snack Size Deli Meats & Cheese<br>
HORMEL® Deli Beef<br>
HORMEL® Deli Dry Sausage<br>
HORMEL® Deli Ham<br>
HORMEL® Deli Turkey<br>
HORMEL® Party Trays<br>
<br>
<b>Ethnic</b><br>
BUFALO® Authentic Mexican Products<br>
CARAPELLI® Olive Oils<br>
CHI-CHI'S® Mexican Products<br>
DONA MARIA® Authentic Mexican Products<br>
HERDEZ® Authentic Mexican Products<br>
HOUSE OF TSANG® Asian Sauces and Oils<br>
MARRAKESH EXPRESS® Mediterranean Products<br>
PATAK'S® Indian Products<br>
PELOPONNESE® Mediterranean Products<br>
<br>
<b>Pantry</b><br>
DINTY MOORE® Products<br>
HERB-OX® Bouillon<br>
HORMEL® Bacon Toppings<br>
HORMEL® Chili<br>
HORMEL® Chunk Meats<br>
HORMEL® KID'S KITCHEN® Microwave Meals<br>
HORMEL® Microwave Meals and Soups<br>
MARY KITCHEN® Hash<br>
SPAM® Family of Products<br>
STAGG® Chili<br>
<br>
<b>Refrigerated</b><br>
CURE 81® Ham<br>
HORMEL® ALWAYS TENDER® Flavored Pork, Beef, Chicken &
Turkey<br>
HORMEL® Bacon<br>
HORMEL® Fully Cooked Entrees<br>
HORMEL® OLD SMOKEHOUSE™ Summer Sausage<br>
HORMEL® Pepperoni<br>
HORMEL® WRANGLERS® Franks<br>
JENNIE-O TURKEY STORE®<br>
LIGHT & LEAN® Premium Luncheon Meat<br>
LITTLE SIZZLERS® Pork Sausage</p>
<p>Besides showing how acquiring companies over the years may stick
you with brand names that outlive their time (though I'm sure there
are food manufacturers who would kill to own SPAM), this list also
illustrates the dilemma frequently confronted by designers and
their clients: so many logos, so little money...</p>
<p>The list of 'ethnic' foods also shows how you may have to deal
with cultural sensibilities when designing a suite of logos. For
instance, DONA MARIA loses something in the translation when it
doesn't carry the enya, that little squiggle over the 'n' in <em>Doña</em>,
which changes it from 'Donna' to 'Donya', which means something
entirely different. While Bufalo with one F means the same in
Spanish as the word does in English with two Fs, it will look odd
if the can isn't in the ethnic food aisle. And "Marrakesh Express"
obviously didn't mean the same thing to the Hormel people when they
bought or developed the brand as it did to those of us who lived
through a time when you took that train (there was even a <a href=
"http://www.oldielyrics.com/lyrics/crosby_stills_nash/marrakesh_express.html">
song</a> about it) in order to purchase large quantities of a
processed agricultural product that Hormel can't legally
sell...</p>
<p>But we're going to look at just one Hormel product line:
<i>Dinty Moore</i>. Just within this one brand, there are many
varieties, including:</p>
<p><b>Canned Products<br></b>Beef Stew<br>
Chicken & Dumplings<br>
Chicken Stew<br>
Meatball Stew<br>
Turkey Stew<br>
<br>
<b>Microwavable Products</b><br>
Beef Stew (7.5 oz cup)<br>
Beef Stew (10 oz tray)<br>
Chicken & Dumplings (7.5 oz cup)<br>
Noodles & Chicken (7.5 oz cup)<br>
Rice with Chicken (7.5 oz cup)<br>
Scalloped Potatoes & Ham (7.5 oz cup)</p>
<p>Our focus will be on the beef stew, which carries the same
logotype as all the other Dinty Moore products. The brand logo is
simple and, even in its 'new' incarnation, fairly traditional:</p>
<p><img src="misc/seymour/newDMlogo.jpg" alt="" height="147" width=
"200" border="0">
</p>
<p>The logo, while tidied up recently, is still not very exciting
nor evocative. But the use of blue as a 'food' color doesn't do
anything for my appetite; I'm not sure how they got stuck with it
originally, and not sure why they didn't modify it when the logo
was redesigned. The blue got a little lighter, and the font 'domed'
with shading, but the change was more evolutionary than
revolutionary.</p>
<p>Left unstated, even on its own webpage, is all the 'back story':
who the hell is Dinty Moore, and why should we care? The official
Hormel history page merely mentions its beginning as a brand name
in 1935. Apparently Dinty <i>was</i> a real person, even though the
<a href=
"http://www.absoluteastronomy.com/encyclopedia/B/Br/Bringing_Up_Father.htm">
story</a> is a little complicated.</p>
<table border="0" cellspacing="0" cellpadding="2" align="center">
<tr>
<td><img src="misc/seymour/DMtop1.jpg" border="0">
</td>
<td><img src="misc/seymour/DMtop2.jpg" border="0">
</td>
</tr>
<tr>
<td><img src="misc/seymour/DMside1.jpg" border="0">
</td>
<td><img src="misc/seymour/DMside2.jpg" border="0">
</td>
</tr>
<tr>
<td width="189" align="center">Original packaging</td>
<td width="235" align="center">Revised packaging</td>
</tr>
</table>
<p>But its Dinty Moore's finger that we're talking about here. It
was there the last time I bought a can, a big red fingerprint right
on the lid, but it's gone from the new one. The story behind that
print might have been interesting, but it too is not in evidence
anywhere.
<p class="editorial">[ So <strong>that's</strong> where that finger came
from! The people at <a
href="http://www.cnn.com/2005/US/03/24/chili.finger.reut/">Wendy's</a> have
been wondering... -- Ben ]
<p> As the photo shows, it was labeled as the "Dinty Moore
Mark of Product Quality" but what, if anything, that had to do with
Dinty's approval of the contents, I'm not sure. What a three-inch
fingerprint had to do with <i>anything</i>, I'm also not sure, but
the second series of photos shows that the designers couldn't
figure that out, either, and took it off. The entire color way of
the can has shifted as well, especially on the top, from red toward
blue; someone at Hormel likes blue, I guess. Maybe it tests
well...</p>
<p>For the writers among us, there were a few interesting wording
changes as well: the old can read "still made with Fresh potatoes
& carrots", while the new label has the contents just "Made
with fresh potatoes & carrots". An all-red "no preservatives"
slugline fell off the back of the old label and now appears inside
three oddly shaped trapezoids (one yellow with black letters, one
blue with white letters, and one in black with no text for no
apparent reason) on the front of the new label; some lawyer's idea,
no doubt. The shift to all caps for "BEEF STEW" and "FREE" would
get a zing from my old professor, Arnold Bank, so I'm giving one to
them in his absence; it may fit the box better, but it doesn't make
it easier to read.</p>
<p>A last little design note, one dear to my heart: where to put
the "registered trademark" symbol.</p>
<p>On the original logo, the ® was above the top curve of the
'e' at the end. On the redesigned logo, it hangs off the spur of
the 'e' on the baseline. Neither is better than the other, but it's
one of the niceties of logo design that always needs to be
addressed.</p>
<p>(<b>Meaningless but important note:</b> In the 'good things on
the Internet' category, my new favorite URL name has to be <a href=
"http://www.thesegoto11.com/">http://www.thesegoto11.com/</a> The
phrase <i>These go to eleven</i> refers to a scene in Rob Reiner's
movie <a href="http://us.imdb.com/title/tt0088258/">Spinal Tap</a>;
if you haven't seen this classic rock & roll spoof, you should.
The logo's pretty darn good, too.)</p>
<p>Now for a few logos and logotypes for our imaginary blue jeans
company, Pants On Fire, Inc. (a friend of mine became its president
when he said one thing and did another once too often...) It's a
classic childhood phrase, and I'm surprised it hasn't been snatched
up already. (If there's some little boutique jeans store in
Hollywood using the name, my apologies; you didn't show up in a
Google search.)</p>
<p>The imagery for the logo/logotypes is obvious: pants and/or
fire. We can use them by themselves (a logo), to create emphasis
for text (a logotype), or as a combination of images and text.</p>
<p>Here are several Pants On Fire logos, a narrow one and a squarer
variant:</p>
<table align="center" border="0">
<tr>
<td valign="bottom" width="189" height="82"><img src=
"misc/seymour/PoF-FlatLogo.jpg" alt="" height="144" width="76"
align="top" border="0">
</td>
<td valign="bottom" width="235" height="82"><img src=
"misc/seymour/PoF-FlatLogo2.jpg" alt="" height="145" width="157"
align="top" border="0">
</td>
</tr>
<tr>
<td colspan="2" width="428">
<div align="left">(see a larger image <a href=
"misc/seymour/PoFlarge.html">here</a>)</div>
</td>
</tr>
</table>
<div align="left">
<p>Here are a pair of logotypes (neither of which I'm really happy
with, but this column is due):</p>
</div>
<div align="center">
<table border="0" cellspacing="0" cellpadding="2">
<tr>
<td width="245">
<div align="center"><img src="misc/seymour/PoFlogotype3.jpg" alt=""
height="44" width="228" border="0">
</div>
</td>
<td width="236"><img src="misc/seymour/PoFlogotype4.jpg" alt=""
height="65" width="108" border="0">
</td>
</tr>
<tr>
<td colspan="2" width="485">
<div align="center">(see larger images <a href=
"misc/seymour/PoFlogotypeslarge.html">here</a>)</div>
</td>
</tr>
</table>
</div>
<div align="left">
<div align="left">
<p>Here are several combination logos:</p>
</div>
</div>
<div align="center">
<table border="0" cellspacing="0" cellpadding="2">
<tr>
<td width="179">
<div align="center"><img src="misc/seymour/PoF-logotype1.jpg" alt=
"" height="82" width="248" border="0">
</div>
</td>
<td valign="bottom" width="230"><img src=
"misc/seymour/PoF-logotype2.jpg" alt="" height="39" width="236"
align="bottom" border="0">
</td>
</tr>
<tr>
<td colspan="2" width="413">
<div align="center"><img src="misc/seymour/PoFlogo3.jpg" alt=""
height="160" width="239" border="0">
</div>
</td>
</tr>
<tr>
<td align="left" width="179">
<div align="center"><img src="misc/seymour/PoF-logo1.jpg" alt=""
height="274" width="140" border="0">
</div>
</td>
<td align="center" width="230"><img src=
"misc/seymour/PoF-logo2.jpg" alt="" height="282" width="140"
border="0">
</td>
</tr>
<tr>
<td colspan="2" align="left" width="488">
<div align="center">(see larger images <a href=
"misc/seymour/PoFlogoslarge.html">here</a>)</div>
</td>
</tr>
</table>
</div>
<div align="left">
<p>And here's even a rudimentary logo in 3D (courtesy of my old
friend <a href="mailto:kelley02790@charter.net">Kelley</a>, the
modeling whiz):</p>
</div>
<div align="center">
<table border="0" cellspacing="0" cellpadding="2">
<tr height="82">
<td valign="bottom" width="189" height="82"><img src=
"misc/seymour/PoF3D.jpg" alt="" height="211" width="227" border=
"0">
</td>
</tr>
<tr>
<td width="189">
<div align="left">(see a larger image <a href=
"misc/seymour/PoF3d.html">here</a>)</div>
</td>
</tr>
</table>
</div>
<div align="left">
<p>These, of course, do not begin to cover the spectrum of possible
combinations using the company name and imagery relating to the
concept and the wording and the products. Just the choice of
font(s), let alone the many variations of weight and style, would
be a long and difficult process. (I wimped out here and, in the
interest of getting done on schedule, just went with Helvetica Bold.)
Trying to design for all the possible usages of the logo (pants labels,
tags, corporate identity print, signage, trucks, on-line, television,
posters, the list is endless) would limit some of the wilder choices, but
drive others: should the logo be able to stand alone as well as with text,
how small will it be legible, how many or how few colors can it be
represented with, etc.</p>
<p>There might well be sub-brands, such as UnderPants On Fire, that
I will leave to your imagination. (If you come up with a good logo
for it, of course, send it along.)</p>
<p>Then there's the Spanish language market (<i>Pantalones en el
fuego</i>), along with the rest of the world (Dutch: <i>Broek op
Brand</i>, French: <i>Pantalon sur le feu</i>, German: <i>Hosen auf
Feuer</i>, Italian: <i>Pantaloni su fuoco</i>, and so on). Care
would have to be taken, of course, to work with native language
speakers to see if the phrase meant anything remotely similar.
Note, too, that some languages capitalize many words and some do
not; that can seriously alter if and how you translate a logo. Many
companies do not translate their brand names, and rely on the
globalization of the marketplace to compensate.</p>
</div>
<p>I hope this column has given you some more logo issues to chew
on. As ever, if there are specifics you'd like covered, let me
know.</p>
</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 © 2005, <A HREF="../authors/seymour.html">Mark Seymour</A>. Released under the
<a href="http://linuxgazette.net/copying.html">Open Publication license</a>
unless otherwise noted in the body of the article. Linux Gazette is not
produced, sponsored, or endorsed by its prior host, SSC, Inc.
</p>
<p>
Published in Issue 113 of Linux Gazette, April 2005
</p>
</div>
</div>
<div class="content lgcontent">
<a name="youngman"></a>
<h1>First Impressions of Crossover Office</h1>
<p id="by"><b>By <A HREF="../authors/youngman.html">Neil Youngman</A></b></p>
</b>
</p>
<p>
<h3>Introduction</h3>
<p>I guess most Linux Gazette readers will have heard of <a href=
"http://www.codeweavers.com/products/cxoffice/">Crossover
Office</a>, even if you haven't tried it. For those of you who
don't know about Crossover Office, it is a package that allows you
to run some Windows applications on Linux. It contains proprietary
software, plus a version of the free package WINE.</p>
<p>Crossover Office supports a number of popular Windows programs,
including various versions of Microsoft Office, Adobe Photoshop, and
Dreamweaver.</p>
<p>How many people out there won't use Linux because their favorite
package isn't supported on Linux? If Crossover Office supports that
package it could be the answer for those people.</p>
<p>I use Linux for my everyday computing tasks, but when working on
Word documents for my employer I found that none of the major Linux
word processors had sufficient compatibility with MS Word, so I
wanted to see if Crossover Office would allow me to run Word at
Home without having to reboot into Windows.</p>
<h3>Installing Crossover Office</h3>
<p>I started with a demo version of Crossover Office downloaded
from the <a href=
"http://www.codeweavers.com/products/cxoffice/">Codeweavers web
site</a>. This is installed by running a shell archive; it installs
quickly and easily and offers a slick interface.</p>
<p>I was then able to install Office 2000 and IE6 without much
difficulty. I did find that when Crossover Office says "if you are
certain that the installation is finished, click the Installation
Complete button", the Installation Complete button should be left
well alone. Crossover Office will detect when the installer exits
and clicking that button trashed my installation. I was only able
to complete the installation by removing the .cxoffice directory
and starting again from scratch.</p>
<img src="misc/youngman/DontTouch.png">
<p>Supported applications are installed from the setup menu and
when I first tried the demo everything installed smoothly, although
later I found installation could be tricky.</p>
<h3>Installing Office 2000</h3>
<p>To install a supported application like Office 2000, select
Crossover->Office Setup from the main menu. This produces the
Crossover Office setup window, in which you click the install
button.</p>
<img src="misc/youngman/SetupWindow.png">
<p>Clicking the install button pops up the install window, which
offers a list of supported applications, from which I selected
Office 2000.</p>
<img src="misc/youngman/InstallMenuO2K.png">
<p>After selecting Office 2000, you are offered a choice of
installation media. I chose to install from CDROM, after which
Crossover Office installed DCOM95, then launched the regular Office
2000 installer. I then went through a regular Office 2000
installation, which was little different from a regular
installation on Windows. The main difference was that where Windows
would have rebooted the system, Crossover Office popped up a window
with the message "Simulating Windows reboot".</p>
<img src="misc/youngman/SimulateReboot.png">
<p>Once Office had installed, I was able to run all the usual office
applications as well as the main applications I had installed - MS
Photo Editor, which ran well under Crossover Office.</p>
<p>Crossover office added a "Windows Applications" option to my
main menu from which I could select the required program or a "new
office document" or "open office document" option. It also set up
the appropriate MIME types, so that I could open MS Office
documents just by clicking on them in Konqueror. I was also able to
open attachments in kmail using MS Office.</p>
<p>I found that the performance of Office 2000 was pretty good on
my 700MHz Athlon. I haven't actually measured it, but subjectively
Word 2000 seems to start much quicker than OpenOffice Writer and
there are no obvious delays once it is up and running.</p>
<h3>Installing unsupported software</h3>
<p>Having been impressed with the installation of MS Office, I was
curious about how well Crossover Office would do with unsupported
software.</p>
<p>WordPerfect Office 2000 took a long time to even to get to a
splash screen. I thought it was having trouble reading the CD and
the cancel button was grayed out, which may have been just as well.
Similarly when I selected WPO2000 setup the setup wizard took about
10 minutes to initialize and when it finally arrived it looked a
little scrambled, with text hidden behind graphics. Transitions
between the screens where the installation setting were selected
were slow, with the old screen being slightly scrambled before the
next screen was displayed. These screens also suffered from hidden
text, making the ability to guess what the prompts said
essential.</p>
<img src="misc/youngman/wpoinstall.png">
<p>After about 50 minutes spent on the installation, the final
result was that after a simulated reboot Crossover Office produced
the message "An error appears to have occurred during the
installation" and the install was terminated without
completing.</p>
<p>After I got the upgrade to version 4.1 I tried again. Version
4.1 was quicker, but still produced substantially similar
results.</p>
<p>The next thing I tried to install was Pagis Pro. This was a lot
quicker than the WordPerfect installation, but there were still
times when I had to wait several minutes with was no real sign of
life before visible progress restarted. At one point there was a
window which obviously required some input, but was too small to
read and I couldn't expand it. This held things up for a while
until I selected the window and pressed enter after which the
install proceeded again.</p>
<p>Other annoyances included a registration screen with no visible
submit or cancel button and a splash screen which forced itself to
the front over all the Linux stuff. This was an excessive degree of
compatibility which made some other things unusable until I got
past the splash screen.</p>
<p>The install finished with Crossover Office displaying the
message "The Unsupported software installer has exited." I could
now run Pagis Pro, but it offered me an empty list of scanners, so
it was off to the Xerox web site where I downloaded the Twain
driver for my scanner. Although the driver seemed to install OK
Pagis Pro still offered an empty list of scanners, so there was no
way of making use of it.</p>
<p>When I tried to uninstall WordPerfect Office I got a message
saying that the Corel uninstaller had found no Corel Applications
on the system.</p>
<p>It seems that Crossover Office is unlikely to help with
unsupported hardware and unsupported software will be at best hit
and miss. If you want to use Crossover Office with unsupported
software I would recommend trying it with the demo version before
parting with your cash.</p>
<h3>Support</h3>
<p>I started out with the demo version of Crossover Office 4.0 and
I was sufficiently impressed to buy version 4.1.</p>
<p>When upgrading from the demo, the <a href=
"http://www.codeweavers.com/support/docs/crossover-standard/troubleshooting#UPGRADE-DEMO">
FAQ recommends</a> uninstalling everything, so I did that. I then
installed 4.1 from a .deb package as root to make Crossover Office
generally available. On reinstalling MS Office, I found that
although I could open an Office document by clicking on it in
Konqueror the Windows Applications menu entry did not appear, so I
could not just start an Office application from the menu. I opened
<a href=
"http://www.codeweavers.com/support/tickets/browse/?ticket_id=47427">
a support ticket</a> on the Codeweavers web site on the 9th of
January. The first response was on the 21st of January and the
problem was not resolved until 15th February, when they suggested
reinstalling from scratch.</p>
<p>Subsequently, when playing with an installation in a spare
partition, I found that nothing would install, with error messages
indicating that DCOM95 had failed to install.</p>
<img src="misc/youngman/DcomError.png">
<p>Instead of opening a support ticket I chose to ask for help on
the IRC channel at irc://irc.freenode.net/#crossover. They
suggested installing DCOM95 separately, instead of starting with MS
Office. This did not work on the first couple of attempts, but
eventually it succeeded after I deleted a local copy of the DCOM95
installer program. I was then able to install Office.</p>
<h3>Conclusions</h3>
<p>Although I have had a number of unexplained errors when
installing Office 2000 and Internet Explorer, they have run
flawlessly under Crossover Office once installed.</p>
<p>Office 97, 2000 and XP are supported, but Office 2003 will not
be supported until Crossover Office 5 is released.
The support I received with Crossover Office Standard was not
responsive enough for a professional environment, but Crossover Office
Professional version comes with enhanced support.
<p>Crossover Office Professional also comes with multiuser support, which
would be essential to minimize administrative work on any multiuser
machine.</p>
<p>Overall, I found that Microsoft Office 2000 and Internet Explorer
6 worked very well under Crossover Office 4. I would not claim that
I have tested more than a fraction of the features of MS Office
under Crossover Office and I would advise more comprehensive
testing before deploying it an a professional environment.</p>
<p>If you wish to run a supported application under Crossover Office, I
consider it to be a good value at $40 for Crossover Office Standard and $75
for Crossover Office Professional.</p>
<p>If you wish to run an unsupported application, or on an
unsupported distribution, I would recommend downloading the demo
version and testing it thoroughly before parting with any cash.</p>
</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 Wirefast a global messaging company.
<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 © 2005, <A HREF="../authors/youngman.html">Neil Youngman</A>. Released under the
<a href="http://linuxgazette.net/copying.html">Open Publication license</a>
unless otherwise noted in the body of the article. Linux Gazette is not
produced, sponsored, or endorsed by its prior host, SSC, Inc.
</p>
<p>
Published in Issue 113 of Linux Gazette, April 2005
</p>
</div>
</div>
<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>
<div class="cartoon">
<a href="misc/ecol/ecol-143-e.png">
<img alt="[cartoon]" src="misc/ecol/ecol-143-e.png"></a>
<a href="misc/ecol/ecol-156-e.png">
<img alt="[cartoon]" src="misc/ecol/ecol-156-e.png"></a>
<a href="misc/ecol/strip.png">
<img alt="[cartoon]" src="misc/ecol/strip.png"></a>
</div>
<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 © 2005, <A HREF="../authors/malonda.html">Javier Malonda</A>. Released under the
<a href="http://linuxgazette.net/copying.html">Open Publication license</a>
unless otherwise noted in the body of the article. Linux Gazette is not
produced, sponsored, or endorsed by its prior host, SSC, Inc.
</p>
<p>
Published in Issue 113 of Linux Gazette, April 2005
</p>
</div>
</div>
<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>
<div class="cartoon">
<a href="misc/qubism/qb-minifever.jpg">
<img alt="[cartoon]" src="misc/qubism/qb-minifever.jpg"></a>
<a href="misc/qubism/qb-mobilepower.jpg">
<img alt="[cartoon]" src="misc/qubism/qb-mobilepower.jpg"></a>
</div>
<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 © 2005, <A HREF="../authors/harsem.html">Jon "Sir Flakey" Harsem</A>. Released under the
<a href="http://linuxgazette.net/copying.html">Open Publication license</a>
unless otherwise noted in the body of the article. Linux Gazette is not
produced, sponsored, or endorsed by its prior host, SSC, Inc.
</p>
<p>
Published in Issue 113 of Linux Gazette, April 2005
</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> >
<a href="index.html">April 2005 (#113)</a> >
TWDT
</div>
<img src="../gx/2003/sit3-shine.7-2.gif" id="tux" alt="Tux"/>
<br />
</body>
</html>
|