1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422
|
<html>
<head>
<link href="../lg.css" rel="stylesheet" type="text/css" />
<title>
Linux Gazette : December 2003 (#97)
</title>
<style type="text/css">
<!--
.twdtarticle {
margin:0px;
left:0px;
}
#twdtbody {
margin-left:0px;
margin-right:0px;
}
.twdtarticle h1 {
font-size:19px;
text-align:center;
}
-->
</style>
</head>
<body id="twdtbody">
<img src="..//gx/2003/newlogo-blank-200-gold2.jpg" alt="Linux Gazette" id="twdtlogo"/>
<div class="content" id="lgissuecontents">
<h2>December 2003 (#97):</h2>
<ul>
<li><a href="lg_mail.html">The Mailbag</a>
<li><a href="lg_bytes.html">News Bytes</a>, by <i>Michael Conry</i></li>
<li><a href="defectors.html">Windows Defectors: Why Linux Is Worth Migrating To, Sometimes</a>, by <i>James Roberts</i></li>
<li><a href="defectors2.html">Windows Defectors: I Don't Think We're In Redmond Anymore, Toto</a>, by <i>Tom Brown</i></li>
<li><a href="ecol.html">Ecol</a>, by <i>Javier Malonda</i></li>
<li><a href="moen.html">Recent Events, and Trademark Actions by SSC, Inc.</a>, by <i>Rick Moen</i></li>
<li><a href="okopnik.html">Using the HTML::Template module</a>, by <i>Ben Okopnik</i></li>
<li><a href="oregan.html">Songs in the Key of Tux: Songwrite</a>, by <i>Jimmy O'Regan</i></li>
<li><a href="oregan2.html">Using DCOP from the command line</a>, by <i>Jimmy O'Regan</i></li>
<li><a href="pramode.html">A simple Pulse Width Modulation trick with Linux/RTAI</a>, by <i>Pramode C.E</i></li>
<li><a href="shuveb.html">Let There Be Music</a>, by <i>Shuveb Hussain</i></li>
<li><a href="tougher.html">A Look At Jython</a>, by <i>Rob Tougher</i></li>
<li><a href="shekhar.html">Mozilla Firebird - A review</a>, by <i>Raj Shekhar</i></li>
</ul>
<p id="twdt">
<i>or read <a href="TWDT.html">TWDT</a></i>
</p>
</div>
<br />
<div class="content twdtarticle">
<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>
<P>
James Roberts has agreed to coordinate the Windows Defectors series long
requested in this section. His first
<A HREF="defectors.html">article</A> appears in this issue. Tom Brown
and Petar Marinov have also expressed interest in writing for this series, and
Tom's first <A HREF="defectors2.html">article</A> is in this issue too.
<P> 2-Cent Tips and The Answer Gang columns will be returning next month.
<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>Clarification to TAG 93 #5</strong></a>
<li><A HREF="#mailbag.2"
><strong>[Regarding moving to .net] Thank you!</strong></a>
<li><A HREF="#mailbag.3"
><strong>Long Live LinuxGazette!</strong></a>
<li><A HREF="#mailbag.4"
><strong>Like the Phoenix</strong></a>
<li><A HREF="#mailbag.5"
><strong>CMS</strong></a>
<li><A HREF="#mailbag.7"
><strong>Thanks for the X windows resolution article</strong></a>
<li><A HREF="#mailbag.8"
><strong>Linux Gazette reborn!</strong></a>
<li><A HREF="#mailbag.9"
><strong>Play Encoded DVDs in Xine</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">Clarification to TAG 93 #5</FONT></H3>
Sun, 16 Nov 2003 23:30:24 -0600 (CST)
<BR>Robert
<P>
Hi.
</P>
<P>
Ben came up with the right fix to the "unresolved symbols in
<TT>/lib/modules/`uname</TT> -r`/foo.o" error; however, his reason is flawed.
</P>
<P>
If the distro kernel uses a module to enable foo and the rebuilt kernel
omits foo, or puts it inside the kernel, there is no place for depmod to
insert the kernel module and it'll complain about the unresolved
symbols. (If the required module is not available, the error will be
something like "Device not found". It's been several years since I
puzzled this one out, and I don't remember the specific error.) The fix,
as Ben said, is to either rename or delete <TT>/lib/modules/`uname</TT> -r`/ before
running "make modules_install". Or build a kernel of a different version,
but I don't think that's within the scope of the OP's question.
</P>
<P>
HTH
</P>
<blockquote><pre>The intended recipient of this message is the readership of the world
wide webzine "Linux Gazette". Any responses or discussion with the Answer
Gang or any LG editor may be published worldwide. Please don't reveal my last
name, email address, or company. ...This notice supersedes any and all other
attached restrictions.
Thanks!
</pre></blockquote>
<blockquote><font color="#000066">Thanks so much Robert! What with the October/November confusion as we
spin up at our new home, it's continuity like this which keeps us going
strong
<IMG SRC="../gx/dennis/smily.gif" ALT=":)"
height="24" width="20" align="middle"> Plus, it allows me to sneak in a chance to remind everyone,
you can contribute to <EM>Linux Gazette</EM> even if you're shy. We don't
mind at all.
-- Heather</font></blockquote>
<!-- 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">[Regarding moving to .net] Thank you!</FONT></H3>
Sat, 1 Nov 2003 13:33:00 -0800
<BR>Rick Moen (<a href="mailto:gazette@linuxgazette.net?subject=%20Re%3A%20%5BLG%2097%5D%20mailbag%20%232">the <em>LG</em> Answer Gang</a>)
<BR>Question by Jack Townley (jack1953 from att.net)
<P><STRONG>
Thank you for saving the Linux Gazette. What they did to
linuxgazette.com sucks!
</STRONG></P>
<P>
Thanks for writing, Jack. If you'd like to help us, at this point,
getting the word out to people would be much appreciated. For example,
submit the story to your favourite Linux news sites.
</P>
<blockquote><font color="#000066">The staff here all changed our signature blocks to mention its new home,
for instance. Note, most of the news sites who care seem to have caught
on... so I'd say the next thing is, tell everyone you know who has a
link to us to fix 'em to point at the Linux Gazette site they really want.
-- Heather</font></blockquote>
<!-- 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">Long Live LinuxGazette!</FONT></H3>
Mon, 3 Nov 2003 16:41:55 -0800 (PST)
<BR>Dave Bechtel (<a href="mailto:gazette@linuxgazette.net?subject=%20Re%3A%20%5BLG%2097%5D%20mailbag%20%233">kingneutron from yahoo.com</a>)
<P>
--Mad Propz to all of you for getting out from under the Evil
Corporate Thumb(TM).
<IMG SRC="../gx/dennis/smily.gif" ALT=":)"
height="24" width="20" align="middle"> Best wishes for the future issues, and keep
up the good work!
</P>
<P>
(Thanx for all the great stuff you've done!)
</P>
<blockquote><font color="#001F3F">I'm glad he gave us a translation.
<IMG SRC="../gx/dennis/smily.gif" ALT=":)"
height="24" width="20" align="middle">
-- Mike</font></blockquote>
<blockquote><font color="#000066">Thanks for a particularly silly sig block, though I do tend to snip them
unless one of the Gang commented to 'em. And thanks for joining us at
our new location :D
-- Heather</font></blockquote>
<!-- 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">Like the Phoenix</FONT></H3>
Tue, Nov 18, 2003 at 08:00:52AM -0500
<BR>Ben Okopnik (<a href="mailto:gazette@linuxgazette.net?subject=%20Re%3A%20%5BLG%2097%5D%20mailbag%20%234">the <em>LG</em> Answer Gang</a>)
<BR>Question by James A. Hess (jah from ipsg.com)
<P><STRONG>
Ben, et al,
</STRONG></P>
<P><STRONG>
Thank you for continuing and resurrecting the Linux Gazette. I clicked on
my old link to LG this morning and was depressed by what I saw. The format
is terrible, the "articles" were of dubious quality and my favorite
features were missing.
</STRONG></P>
<P><STRONG>
Fortunately, it wasn't too hard to find you again. Keep up the good work.
</STRONG></P>
<P>
Thanks, James! We certainly plan on it; being able to create without
censorship and interference was one of our main motivations in making
this move. Good to see that you and many other folks recognize this move
as a positive one; we certainly think it is, and look forward to
bringing the best content we can produce to our readers.
</P>
<P>
Best wishes,
Ben Okopnik
</P>
<!-- end 4 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="mailbag.5"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">CMS</FONT></H3>
Tue, 25 Nov 2003 07:35:00 -0600 (CST)
<BR>Terry Therneau (<a href="mailto:gazette@linuxgazette.net?subject=%20Re%3A%20%5BLG%2097%5D%20mailbag%20%235">therneau from mayo.edu</a>)
<P>
A small suggestion from someone who has enjoyed your magazine for some
time. In the page describing why you have moved to a new domain, not
everyone (including me) will know what "CMS" means.
</P>
<P>
Take the editorial suggestion, or not. Do accept my thanks for your
<BR>work in creating the magazine.
</P>
<P>
PS. I've been using Unix since '79 or so, including scanning most of the
source code to V6, installing Berkely 2.1 on a PDP 11/34, and thinking that
our new VAX 11/750 was a powerhouse. To me CMS means "Cambridge Monitor
System", a terminal based front end to the IBM mainframes, and the only OS
I've used on a screen that was worse than using punch cards.
</P>
<P>
Terry Therneau
</P>
<blockquote><font color="#001F3F">Good point. Sometimes we underestimate the variety of backgrounds our
readers come from.
</font></blockquote>
<blockquote><font color="#001F3F">CMS means "content management system". Generically it means any
systematized workflow for producing and maintaining documents. Every
system needs some way for the author to write the document and submit it,
and for the editorial staff to approve/deny it, make corrections, set
meta-information like the title and bio, publish it, and maintain it
after publication. In that sense, Linux Gazette has always had a content
management system of some sort or another.
</font></blockquote>
<blockquote><font color="#001F3F">However, in the context of web services, CMS means a certain kind of
software for handling the workflow, one that is web based. That's what we
mean by "linuxgazette.com has a CMS". Most CMS' in this sense handle at
least the editorial steps through the web via HTML forms. Some also expose
this interface to the authors for the initial submission. A few also allow
editing the article text through the web, although others handle this in the
traditional way (the staff puts the file directly in a certain directory
without using the web interface). Since many <EM>LG</EM> articles have images and
supplemental files, the interface has to either handle these too, or else
get out of the way so the staff can install these manually. Various CMS'
include Plone (a Zope system), PHP Nuke (Linux Journal uses a heavily
customized version of this), Drupal (used by Linux Ghoulzette, as we
affectionately call that other zine -- well, it <EM>was</EM> Halloween when
they unveiled it)
<IMG SRC="../gx/dennis/smily.gif" ALT=":)"
height="24" width="20" align="middle">
, Slashcode (used by Slashdot), wikis,
blogging tools, etc.
</font></blockquote>
<blockquote><font color="#001F3F">Many people think <EM>Linux Gazette</EM> left linuxgazette.com because of the
CMS, but that's only partially true. For me personally, the CMS was
only a minor problem - one that I feared the worst of, but that I was
willing to allow a good try. The main reason I left was the lack of editorial
oversight, which was significantly affecting the quality of LG content. Nobody
at SSC is giving the authors feedback to help them improve their content or to
generate article ideas. Many authors had stopped contributing to LG because of
this, but indicated they would return to LG if it reverted to its traditional
self.
</font></blockquote>
<blockquote><font color="#001F3F">The arguments against a web CMS are that HTML forms are cumbersome and
inconvenient, you can't use your existing favorite software tools, it
would take a lot of work to graft in the features <EM>LG</EM> already enjoys, and
why fix something that ain't broke. The "lot of work" part can be seen
at linuxgazette.com, where they are trying to integrate a text-friendly
format (for blind readers), an all-in-one-page format ("TWDT"), better author
attribution, a system for managing images, etc -- features we already
have had for years. Most off-the-shelf CMS software does not have these
features, and grafting them in often requires kludging around the program's
design.
-- Sluggo</font></blockquote>
<!-- end 5 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="mailbag.7"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">Thanks for the X windows resolution article</FONT></H3>
Sat, 15 Nov 2003 23:29:53 -0500
<BR>Jonathan S. Romero (<a href="mailto:gazette@linuxgazette.net?subject=%20Re%3A%20%5BLG%2097%5D%20mailbag%20%237">jo875452 from pegasus.cc.ucf.edu</a>)
<P>
Hello,
</P>
<P><DL><DT>
Thanks for hosting the X windows resolution change article at
<DD><A HREF="../issue52/tag/9.html"
>http://www.linuxgazette.net/issue52/tag/9.html</A>
</DL></P>
<P>
I was having problems because a game I was running kept changing the
resolution and not setting it back to the original when it was done.
</P>
<P>
I never imagined it was as easy as CTRL-ALT-+
</P>
<P>
Thanks,
</P>
<P>
Jonathan S. Romero
</P>
<!-- end 7 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="mailbag.8"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">Linux Gazette reborn!</FONT></H3>
Wed, 5 Nov 2003 16:05:44 +0000 (GMT)
<BR>Luca
<P><STRONG>
Thank you. This is great news for me.
I don't think there is a Linux place in the web I <EM>loved</EM> and <EM>love</EM>
more than (the old) Linux Gazette.
</STRONG></P>
<P><STRONG>
You made the right choice.
</STRONG></P>
<P>
Thank you, Luca. It is nice to know that there are readers out there that
appreciate the efforts that all of us at Linuxgazette.net are putting to
good use.
</P>
<P>
<IMG SRC="../gx/dennis/smily.gif" ALT=":)"
height="24" width="20" align="middle">
</P>
<P>
-- Thomas Adam
</P>
<!-- end 8 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="mailbag.9"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">Play Encoded DVDs in Xine</FONT></H3>
Sat, 8 Nov 2003 23:54:12 -0800
<BR>Thomas Adam
<P><STRONG>
Hey All,
</STRONG></P>
<P><STRONG>
This is going to seem really picky, but this article:
</STRONG></P>
<P><STRONG><BLOCKQuote>
<A HREF="http://linuxgazette.net/issue94/kolp.html"
>http://linuxgazette.net/issue94/kolp.html</A>
</BLOCKQuote></STRONG></P>
<P><STRONG>
demonstrates some rather poor techniques for compilation. Firstly, LeeAnne
suggest that one compiles their programs as 'root' -- ERRM, bad idea.
Secondly the use of "-" as a prefix for tar's options is not needed and
can even lead to some ambiguity.
</STRONG></P>
<P><STRONG>
Any chance the author can be made aware of this?
</STRONG></P>
<P>
It was published by Jeff, and he didn't put her e-mail address on her
author page. I don't know whether she asked him not to, or that was his
policy, or what. But we don't have her address. Maybe she'll see your
message in the Mailbag.
</P>
<P>
-- Mike Orr (aka. Sluggo)
</P>
<!-- end 9 -->
<HR>
<center>
<BIG><STRONG><FONT COLOR="maroon">GAZETTE MATTERS</FONT></STRONG></BIG>
<BR>
</center><HR>
<UL>
<!-- index_text begins -->
<li><A HREF="#gaz.0"
><strong>Technical changes in LG</strong></a>
<li><A HREF="#gaz.1"
><strong>Please help get the word out</strong></a>
<li><A HREF="#gaz.2"
><strong>apology (about submission policies)</strong></a>
<li><A HREF="#gaz.2a"
><strong>Is LG too strict or not strict enough?</strong></a>
<li><A HREF="#gaz.3"
><strong>LDP have the other issue 96</strong></a>
<li><A HREF="#gaz.4"
><strong>Debian</strong></a>
<li><A HREF="#gaz.5"
><strong>transition of the ml</strong></a>
<!-- index_text ends -->
</UL>
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="gaz.0"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">Technical changes in LG</FONT></H3>
Sat Dec 6 22:31:44 PST 2003
<BR>Sluggo (<a href="mailto:gazette@linuxgazette.net?subject=%20Re%3A%20%5BLG%2097%5D%20gazette%20matters%20%231"><em>LG</em> Editor</a>)
<P> As you can see, LG has a new look. Rob Tougher responded to our
longstanding request for somebody to make a stylesheet for LG, and it looks
great! He also helped me extensively to update the templates and Python
scripts that generate LG, to implement the new look.
<P> We've tried hard to make it reasonable for both graphical and text
browsers. Let us know if anything blows up or you have any suggestions.
The biggest problem we've seen is the menu being vertical instead of
horizontal in Netscape 4. If anybody is still using Netscaoe 4.
<P>
<IMG ALT="[logo image]" SRC="../gx/2003/newlogo-blank-200-gold2.jpg"
WIDTH="200" HEIGHT="85">
<P> We have a new logo, in order to get away from SSC-originated artwork and
to distinguish our site from theirs. Actually, the "new" logo is a variation
of <A HREF="../gx/newlogo.jpg">Michael Hammel's "Gandhi" logo</A>, which
long-time readers will remember. We're not sure yet whether this logo will
be temporary or permanent.
<P> The pale yellow margin was chosen to complement logo color.
<P> The TWDT version has a special style to be more printer-friendly.
The left and right yellow margins are eliminated to prevent printers from
drawing a toner-wasting large gray rectangle on each side.
<A HREF=""></A>
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="gaz.1"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">Please help get the word out</FONT></H3>
Sat, 1 Nov 2003 17:15:01 -0800
<BR>Rick Moen (<a href="mailto:gazette@linuxgazette.net?subject=%20Re%3A%20%5BLG%2097%5D%20gazette%20matters%20%231">the <em>LG</em> Answer Gang</a>)
<P>
If you're reading this then you already know that this issue can be
found at: <A HREF="http://linuxgazette.net/issue97/"
>http://linuxgazette.net/issue97/</A>
</P>
<blockquote><font color="#000066">and probably guessed that this note was really written just after 96 released.
</font></blockquote>
<blockquote><font color="#000066">Let us know if there are any news sites who don't know about the move
by now. You can let them know too, or have us send them a note.
-- Heather</font></blockquote>
<P>
The only problem is that most readers are unaware of that, not having
heard of the switchover to <A HREF="http://linuxgazette.net"
>http://linuxgazette.net</A> . Alternate
formats include (aside from TWDT.html) a new PalmDoc version, suitable
for reading on PDAs.
</P>
<P>
Also, if you know sites running Linux Gazette mirrors, please let their
admins know. We've contacted the official mirrors, but there are lots
we aren't even aware of, who are probably wondering why they aren't
getting a November issue. (They need to redirect their mirroring
scripts.)
</P>
<P>
--
Cheers,
Rick Moen
</P>
<blockquote><font color="#000066">At the time this was drafted, Phil Hughes was still swearing off the
"monthly Table of Contents" style. Their linuxgazette.com site issued
one anyway, thus many automated mirrors actually did get a November
issue, albeit a drastically different and underpowered, barely edited,
edition. If you see the old content on a site <EM>please</EM> advise their
webmaster of the existence of both sites and our move to linuxgazette.net.
If they'd like to come up to date with us, we'll gladly help with
mirroring scripts. If they want to mirror both, we're fine with that
too...
-- Heather</font></blockquote>
<!-- end 1 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="gaz.2"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">apology (about submission policies)</FONT></H3>
Mon, 3 Nov 2003 18:27:31 -0800
<BR>Heather Stern (<a href="mailto:gazette@linuxgazette.net?subject=%20Re%3A%20%5BLG%2097%5D%20gazette%20matters%20%232"><em>Linux Gazette</em> Technical Editor</a>)
<BR>Question by Tom Brown (tfbrown from ceinetworks.com)
<P><STRONG>
Sorry for jumping the gun with my previous email. I realist now that
sending you an email wasn't the right procedure.
</STRONG></P>
<P>
Oh, that's quite alright! The small handful of us who edit LG are used
to people sometimes responding directly to articles; I presume my name
was made fairly easy to pick up
<IMG SRC="../gx/dennis/smily.gif" ALT=":)"
height="24" width="20" align="middle">
</P>
<P><STRONG>
After checking out the guidelines for answering questions, however, I'm
still at a loss. Mailing lists? (Don't hit. I told you I was a Linux
n00b.).
</STRONG></P>
<P>
Ok. Here's how it works. And TIA for the chance to clarify any points
in our "FAQ" documents that really do need clearing up; after a while
it gets a little more fuzzy, and that make it hard for us to truly look
at them from a n00b's perspective. A fresh set of eyes does help.
</P>
<P>
If you've got a question in the realm of Linux, maybe "The Answer Gang"
can answer it. Even if one of them can't alone, they might be able to,
ahem, gang up on it.
</P>
<P>
Even rather new people might have tricks up their sleeve; anyone
interested in watching the ebb and flow of questions, and possibly
answering a few here and there, is invited to join the "tag" list -
effectively becoming a member of The Answer Gang, too. It's all
volunteer, so if you can't answer anything, you're welcome not to
say much, and just lurk. You might surprise yourself and answer a few
anyway. If this happens a lot you'll be offered a chance to raid the
TAG fridge for some muchies and your beverage of choice.
</P>
<P>
We pride ourselves on possibly curmudgeonly and very human replies,
because we're real people, not worrying so much about the clean white
polish of a paper-white magazine. I have, however, occasionally warned
people not to be too mean in their answers as things stray off topic.
As I said then, the mantra of the overall magazine is "Maiking Linux
Just A Little More Fun!" not "making the Borg kids cry." Various topics
are considered bad, like people sending in their homework assignments
without even poking around in some URLs and researching in search engines
a little. We've tried to provide some help for folks who are about to ask
- querents can read our "ask-the-gang" document - but generally we try to
have some fun with Linux and get people going so they can have fun here too.
</P>
<P><STRONG>
Anyway, my apologies.
Tom Brown.
</STRONG></P>
<P>
Please, take a look throughout the site, and let us know what you think
about any of it that you like. Or especially any parts that confuse and
annoy... so we can improve ourselves.
</P>
<P>
-- Heather
</P>
<!-- end 1 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="gaz.2a"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">Is LG too strict or not strict enough?</FONT></H3>
Sun, 2 Nov 2003 21:33:50 -0800
<BR>Sluggo (<a href="mailto:gazette@linuxgazette.net?subject=%20Re%3A%20%5BLG%2097%5D%20gazette%20matters%20%232"><em>Linux Gazette</em> Editor</a>)
</P>
<P>
Phil Hughes (the publisher of linuxgazette.com) claims that a main reason for
eliminating the Editor was that readers were complaining we were too
selective about what we publish, so they either felt they could not be authors
or were too intimidated to ask. I was surprised to hear that because I never
felt we were heavy-handed, but that's what he says.
</P>
<P>
For the record, I receive some three hundred articles every year, and
publish all but three or four of them. The only ones I've rejected were
advertisements disguised as articles, mindless Microsoft bashing (which
belongs in comp.os.linux.advocacy), material we've covered extensively
before, advocacy pieces that said nothing more than "Linux is good, try
it" (you're preaching to the choir), and articles whose English was so
bad that readers wouldn't understand significant points.
</P>
<P>
In every case I try to work with the author. Advertisements I send to
News Bytes, or have the marketer get some employee to write a "balanced"
article from a user's perspective. If it's an overpublished topic, I
ask the author to elaborate on certain portions -- what we're looking for
is new information -- or I notice areas in the author's expertise and
ask them if they're willing to write an article about that. That's
actually one of the fun parts of being an editor: giving article ideas
to people based on things they've said. Articles with bad English I
either proofread myself, find a translator or proofreader, or ask the
author to find a proofreader. In most cases, the article either
becomes acceptable or the author writes a different article for us.
And sometimes the author goes on to write better articles later and
becomes a regular contributor.
</P>
<P>
In addition, some articles had incorrect technical advice that, if
followed, would make newbies shoot themselves in the foot. You don't
mess around when talking about boot sectors, backups, security or
corrupting data: you make sure that at least those parts are right.
In every case I was able to tell the author myself how to fix the
article, or sent it to The Answer Gang for technical review, and the
article was published.
</P>
<P>
This all is what goes into the process of "editing", and it seems to
be what linuxgazette.com is objecting to in their attempt to have
an editorless zine. As of November 2, they added one paragraph to
the author FAQ I wrote, saying in part, "There is no editor as such and
we're relying on authors to be self-editing.... Additionaly, assume
that your article is publishable, at most we'll take a cursory glance at
it, spell-checking and grammar are the author's responsibility."
(<A HREF="http://linuxgazette.com/faq/author.html"
>http://linuxgazette.com/faq/author.html</A>, question 1, paragraph 2) My
position is the everybody needs a little help sometimes, and it's the
editor's job to be that help.
</P>
<P>
As for reader complaints that we're too strict, I have not heard that
even once from readers during my four years editing LG. Instead, in
<A HREF="http://www.slashdot.org/">Slashdot</A> comments and in other places, I
see the opposite: readers wish we were <EM>more</EM> selective. Only a very
few readers express an opinion either way, but that's the direction of all the
opinions I've heard.
</P>
<P>
If you think LG is too strict -- or not strict enough -- in its article
selection, please let us know.
</P>
<!-- end 2 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="gaz.3"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">LDP have the other issue 96</FONT></H3>
Wed, 5 Nov 2003 03:36:45 -0800
<BR>Rick Moen (<a href="mailto:gazette@linuxgazette.net?subject=%20Re%3A%20%5BLG%2097%5D%20gazette%20matters%20%233">the <em>LG</em> Answer Gang</a>)
<P>
Quoting Jimmy O'Regan (jimregan@o2.ie):
</P>
<P><STRONG><BLOCKQuote>
See: <A HREF="http://www.tldp.org/LDP/LG/current"
>http://www.tldp.org/LDP/LG/current</A>
</BLOCKQuote></STRONG></P>
<P>
I can pretty much guarantee that you're seeing, there, just the
operating of an automated mirroring script, pulling down files from the
former LG.com site without supervision. It'll get straightened out
eventually, with time. Maybe they'll decide to mirror both. ;->
</P>
<P>
Pity about the name confusion, but with luck the two periodicals
will diverge over time (if both persist).
</P>
<P>
(We at LG.net's staff had no idea the former site would produce more
issues: They'd lead us to believe they were moving entirely away
from monthly issues, and adopting entirely dynamic CMS-based content.
The staff considered that format incompatible with publishing a
magazine, and failed to reach agreement on that with Phil Hughes over
many months. That was one of the reasons we took Linux Gazette
elsewhere -- so it wouldn't cease to exist. Therefore, LG.com's
subsequent "issue #96" came as a complete surprise.)
</P>
<BLOCKQUOTE>
[Heather]
I'd like to note for the record that the actual inquiry I first made
that led to the hosting we now have, was prompted by wondering whether
SSC would continue to host us when none of our staff worked there
anymore, NOT anything about stylesheets, layout, or automation. We
didn't even know all those months ago who'd press enter on the Python
command that sets the ball rolling for release. I just asked and T.R. was
kind enough to say whatever we needed to do, he'd support.
</BLOCKQUOTE>
<BLOCKQUOTE>
When, a couple months later, SSC claimed that changing the site was
being looked into so they could reduce personnel involvement - the
word "costs" was used several time - I noted that we could reduce their
cost to zero by moving away. We asked why fix what isn't broken. The
claim was made - and I still haven't seen any real RFC822 messages to
support - that readers claimed it was hard to submit. This potential
about moving was shushed with "no, of course we'll support LG" and our
"technical advice" was solicited for the new plans. Then the evil CMS
buzzword was brought up, we debated about it ... um, vigorously. In
the spirit of actually having our opinions sought. "Evil" I say because
it had come up and either failed even basic marketing or been hoist by
its own petard a couple of times before. (See the timeline if you care.)
</BLOCKQUOTE>
<BLOCKQUOTE>
As it is I regret now (in 20/20 hindsight) taking as long to support
a move away as I did. I regret taking the flack that I did when I
simply commented - in verbose answergang fashion - on the technical
failings that cause "content managed" sites to fail to be magazines by
nature. But I don't own a TARDiS. All I can do is move forward.
</BLOCKQUOTE>
<BLOCKQUOTE>
[Mike Orr, aka Sluggo]
Yes, although these aren't the only reasons we switched. Ppl keep on
dwelling on monthly issues and CMS, but the latter played only a minor
role in my choice to participate, and the former played even less. I
came back because:
</BLOCKQUOTE>
<blockQuote><ul>
<LI>The quality of articles was going downhill drastically.
<LI>Many contributors were abandoning LG for that reason.
<LI>Who knows what worse changes might be coming after this.
</ul></blockQuote>
<BLOCKQUOTE>
[Heather]
As of release time, the staff of The Linux Documentation Project are
discussing what to do about the split project, and which to carry or
point to. This really got into discussion mid November, and they
probably want consensus; Jimmy O'Regan said they're pretty confused.
I can't blame them, since my efforts to support even a college-try at
CMS by announcing the preparation and the imbalanced opinions of it
among the <EM>LG</EM> staff far enough ahead to get readership response in
either direction were squished too.
</BLOCKQUOTE>
<BLOCKQUOTE>
[Jimmy O'Regan]
To see TDLP thread: send an empty message to <A HREF="mailto:discuss-thread.5315@en.tldp.org"
>discuss-thread.5315@en.tldp.org</A>
</BLOCKQUOTE>
<BLOCKQUOTE>
[Rick Moen]
Web access here: <A HREF="http://lists.tldp.org"
>http://lists.tldp.org</A>
</BLOCKQUOTE>
<BLOCKQUOTE>
You'll want to use the left-side hyperlink on the name of the mailing
list, in order to browse instead of search.
</BLOCKQUOTE>
<BLOCKQUOTE>
[Sluggo] The most ironic thing is, Heather had had the linuxgazette.org
domain registered for years. But when Phil promised her early this year that
he wouldn't change LG, she let it expire. Then when he did change it and we
wanted linuxgazette.org back, it was too late, a cybersquatter had snapped it
up. That's why we're linuxgazette.net instead of linuxgazette.org.
</BLOCKQUOTE>
<!-- end 3 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="gaz.4"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">Debian</FONT></H3>
Thu, 13 Nov 2003 11:05:24 +0000
<BR>Jimmy O'Regan (<a href="mailto:gazette@linuxgazette.net?subject=%20Re%3A%20%5BLG%2097%5D%20gazette%20matters%20%234">the <em>LG</em> Answer Gang</a>)
<P>
...the <A HREF="http://www.debian.org/">Debian</A> package for issue 96 went up; and it's the "right" issue.
</P>
<P>
Debian url: <A HREF="http://packages.debian.org/unstable/doc/lg-issue96.html"
>http://packages.debian.org/unstable/doc/lg-issue96.html</A>
</P>
<!-- end 4 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="gaz.5"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">transition of the ml</FONT></H3>
Sat, 15 Nov 2003 17:48:14 -0800
<P><STRONG>
I was wondering why my tag accout got so few posts lately, so I looked again
and found the new ml.
</STRONG></P>
<P>
I hope you noticed mention of the new mailing list <EM>on</EM> the old one, and
my posted suggestion to LQO subscribers that they join us over here.
</P>
<P><STRONG>
Wasn't it somehow possible to transfer the old subscribers to the new
list?
</STRONG></P>
<P>
SSC has all the mailing lists' rosters set to be accessible to the
listadmin, only. We've asked Phil Hughes for help in transitioning;
he emphatically refused.
</P>
<P><STRONG>
And maybe the list subscription page should be
a little more prominent, I only found it by chance...
</STRONG></P>
<P>
<A HREF="http://linuxgazette.net/tag/ask-the-gang.html"
>http://linuxgazette.net/tag/ask-the-gang.html</A> definitely needs something
near the top. Anywhere else?
</P>
<P>
--
Cheers, Rick Moen
</P>
<blockquote><font color="#000066">We're looking into some style improvements; tho not so drastic as going
"automatic" about it. Readers, let us know what you want. Better yet,
let us know what you <EM>need</EM> if the site's normal layout gives you trouble.
Stuff like this
<IMG SRC="../gx/dennis/smily.gif" ALT=":)"
height="24" width="20" align="middle">
-- Heather</font></blockquote>
<!-- end 5 -->
<HR>
<CENTER><FONT FACE="helvetica"><SMALL>
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>
</SMALL></FONT></CENTER>
</p>
<!-- *** BEGIN author bio *** -->
<!-- *** END author bio *** -->
<div id="articlefooter">
<p>
Published in Issue 97 of Linux Gazette, December 2003
</p>
</div>
</div>
<br />
<div class="content twdtarticle">
<h1>News Bytes</h1>
<p id="by"><b>By <A HREF="authors/conry.html">Michael Conry</A></b></p>
</b>
</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="#leg">Legislation and More Legislation</a>
</li><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>
<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">
<!-- =================================================================== -->
<a name="leg"></a>
<p><hr><p>
<!-- =================================================================== -->
<center><H3><font color="green">Legislation and More Legislation</font></H3></center>
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
<FONT COLOR="green">Jon Johansen
</FONT>
</H3>
The Register has reported on Jon Johansen's latest contribution to the
controversial arena of digital rights management. He has
<a href="http://www.theregister.co.uk/content/4/34141.html">
created an open source software utility</a> that dumps the content of a
protected Quicktime encoded music track to a more easily handled format.
Some seemed to find these actions
<a href="http://www.theregister.co.uk/content/35/34190.html">
upsetting</a>, though most Register readers seemed to be
<a href="http://www.theregister.co.uk/content/35/34218.html">
more upset by the antics of the RIAA</a>.
<P>
Johansen is likely to remain in the news as his retrial on charges
relating to his involvement in the DeCSS code has
<a href="http://www.theregister.co.uk/content/6/34295.html">just
begun</a> in Oslo. Though acquitted in a lower court, the case (which
began five years ago) has been appealed.
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
<FONT COLOR="green">Broadcast Flag
</FONT>
</H3>
<P>
The Register has also reported that
<a href="http://www.theregister.co.uk/content/54/33807.html">
the FCC in the US has approved the controversial Broadcast Flag</a>.
Though the FCC claims that the measure is necessary to prevent piracy,
<a href="http://www.eff.org/IP/Video/HDTV/20031104_eff_pr.php">
the Electronic Frontier Foundation contends</a>
that the rules will
<blockquote>
"[force] manufacturers to remove useful recording features from
television products you can buy today"
</blockquote>
The archive of EFF documents relating to the Broadcast Flag regulations
can be browsed online at
<a href="http://www.eff.org/IP/Video/HDTV/">
http://www.eff.org/IP/Video/HDTV/</a>
<P>
It appears that there may be
<a href="http://importance.typepad.com/the_importance_of/2003/11/broadcast_flag_.html">
some loopholes</a>
in the detail of the regulations relating to export of non-DRM enabled
equipment. The full implications of the rules will of course become
clearer over time.
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
<FONT COLOR="green">Diebold
</FONT>
</H3>
<P>
Two contentious issues: electronic voting and the DMCA, have been at the
centre of a recent story regarding the Diebold company.
<a href="http://www.diebold.com/">Diebold</a> specialises in ATMs,
electronic voting systems and similar products. However, their voting
products have not been without their problems, the extent of which was
starkly highlighted in emails leaked from the company.
<P>
Once the emails started to circulate on the internet,
Diebold sought to lock down this embarrassing material by invoking the
dreaded DMCA. Happily for the American electorate, the Online Policy
Group, backed by the EFF,
<a href="http://www.eff.org/Legal/ISP_liability/OPG_v_Diebold/">
brought legal action against Diebold</a>
and forced the company
<a href="http://www.theregister.co.uk/content/6/34286.html">
to back down</a>.
<P>
This is an important win, as the integrity of the voting system (and
people's ability to verify it) is fundamental to the functioning of
any democracy. As Scott Granneman has pointed out,
<a href="http://www.theregister.co.uk/content/55/34051.html">
e-voting has had a chequered history</a>, and it is imperative that it
be properly exposed to public and expert scrutiny. This is not just an
American issue, as electronic voting machines are being installed in
countries around the world. Some, such as those in Australia, use
<a href="http://www.wired.com/news/ebiz/0,1272,61045,00.html">
open-source software and operating systems</a>, but many (for example
<a href="http://www.p45blogs.net/blog_snorkeller/archives/000308.html">
the system being deployed in the Republic of Ireland</a>) leave a lot to
be desired in terms of transparency and openness.
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
<FONT COLOR="green">DMCA
</FONT>
</H3>
Three DMCA snippets from The Register
<ul>
<li>
<a href="http://www.theregister.co.uk/content/6/34024.html">
Garage door DMCA case dismissed Remote uncontrol</a>
</li>
<li>
<a href="http://www.theregister.co.uk/content/4/33668.html">
DMCA exemptions boost archivists, disabled but not much else</a>
</li>
<li>
<a href="http://www.theregister.co.uk/content/6/33687.html">
Lexmark loses round 2 in DMCA chip case</a>
</li>
</ul>
<a name="links"></a>
<p><hr><p>
<!-- =================================================================== -->
<center><H3><font color="green">Linux Links</font></H3></center>
<P>
<a href="http://linux.oreillynet.com/pub/a/linux/2003/11/20/knoppix.html">
Creating your own Knoppix CDs</a>
<P>
Basic concepts
<a href="http://linuxdevices.com/articles/AT4627965573.html">
or real-time operating systems</a> [courtesy LinuxToday].
<P>
<a href="http://www-106.ibm.com/developerworks/grid/library/gr-design.html?ca=dgr-lnxw02DesignGrid">
Design an application for GRID</a>
<P>
<a href="http://www.smartmobs.com/archives/001961.html">
Hardware for P2P Radio</a>
<P>
<a href="http://www-106.ibm.com/developerworks/linux/library/l-knopx.html">
Knoppix as a system rescue tool</a>
<P>
Linux Weekly News reports on
<a href="http://lwn.net/Articles/56377/">
the fork of Linux Gazette</a>.
<P>
Ian Murdock,
<a href="http://ianmurdock.com/archives/000068.html">
rethinking the Linux distribution business model</a> (courtesy
LinuxToday)
<P>
<a href="http://www-106.ibm.com/developerworks/linux/library/l-murray.html?ca=dgr-lnxw03LinuxNotebook">
Tips from veteran Linux programmer Spence Murray</a>
<P>
Joe Brockmeier on
<a href="http://linuxdevices.com/articles/AT8047723203.html">
how to build Debian packages</a>.
<P>
At O'Reilly-net
Joe Stump has taken readers through
<a href="http://linux.oreillynet.com/pub/a/linux/2003/09/25/advanced_mail_server.html">
start</a>
<a href="http://linux.oreillynet.com/pub/a/linux/2003/10/09/advanced_mail_server2.html">
middle</a>
and
<a href="http://linux.oreillynet.com/pub/a/linux/2003/10/23/advanced_mail_server3.html">
finish</a>
of setting up an advanced
mail server, configuring delivery, webmail, secure POP3 and IMAP,
and spam and virus checking.
<P>
<a name="general"></a>
<p><hr><p>
<!-- =================================================================== -->
<center><H3><font color="green">News in General</font></H3></center>
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
<FONT COLOR="green">Kernel Exploit
</FONT>
</H3>
<P>
As
<a href="#debreport">
mentioned below</a>, several Debian project machines were recently
compromised by an attacker who took advantage of an exploitable flaw in
the 2.4 series of kernels. Though this integer overflow in the brk
system call was not initially thought to have serious security
implications, now that an exploit is loose in the wild it is very
important that sysadmins patch their systems. The problem has been
fixed in the 2.4.23 release of the kernel.
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
<FONT COLOR="green">Kernel Backdoor Closed Before it Opened
</FONT>
</H3>
<P>
A recent attempt
<a href="http://www.newsforge.com/article.pl?sid=03/11/06/1532223">
to insert backdoor code</a>
into the Linux kernel has been thwarted by the vigilance and openness of
the open source development process.
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
<FONT COLOR="green">Linux in Libraries
</FONT>
</H3>
<P>
<a href="http://www.ohio.lib.in.us/staff/atate/lil/">
Linux In Libraries (LIL)</a>
is an electronic mailing list/user group dedicated to utilizing the
Linux operating system in academic, public and special libraries as an
alternative affordable solution for public access computing.
<a name="distro"></a>
<p><hr><p>
<!-- =================================================================== -->
<center><H3><font color="green">Distro News</font></H3></center>
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
<FONT COLOR="green">2-Disk X Window Embedded Linux
</FONT>
</H3>
<P>
<a href="http://www.angelfire.com/linux/floorzat/2diskXwin.htm">
2-Disk X window embedded Linux</a>
is a tiny net-centric Linux that aims at portable secure remote system
usage. It contains many utilities including: X Windows, vncviewer,
rdesktop, a Web browser, a file manager, a text editor, a terminal, a
window manager, a menu system, a dialog system, X scripting facilities,
and many others. It aims to work from 1 or 2 floppy disks in any remote
location.
The FAQ is
<A href="http://www.angelfire.com/linux/floorzat/faq.htm">
particularly good</a>.
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
<FONT COLOR="green">ADIOS
</FONT>
</H3>
<P> NewsForge
<a href="http://www.newsforge.com/article.pl?sid=03/11/25/1552234">
recently reported on the ADIOS boot CD</a>.
It includes some features not so common on boot CDs, such as User Mode
Linux and Security Enhanced Linux.
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
<FONT COLOR="green">Debian
</FONT>
</H3>
<P>
<a href="http://www.debian.org">
Debian GNU/Linux</a> has been updated. The new version, Debian GNU/Linux
3.0 (r2), mainly adds security updates to the stable release, along with
some corrections of serious bugs.
<P>
<hr width="20%" noshade>
<P>
<a name="debreport">
Several Debian servers were
<a href="http://www.debian.org/News/2003/20031121">
recently compromised</a> by a local kernel exploit. Fortunately, the
attacks were noticed and it has been confirmed that the archives were
not tampered with. The
<a href="http://lists.debian.org/debian-announce/debian-announce-2003/msg00003.html">
investigation report</a> makes for interesting reading.
<P>
<hr width="20%" noshade>
<P>
<a href="http://www.debian.org/News/weekly/2003/46/">
From Debian Weekly News</a>
Jonathan Oxer
<a href="http://articles.linmagau.org/modules.php?op=modload&name=Sections&file=index&req=viewarticle&artid=451">
wrote about caching Debian packages</a>
in order to save bandwidth when updating or installing
multiple Debian machines.
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
<FONT COLOR="green">Linux From Scratch
</FONT>
</H3>
<P>
<a href="http://www.linuxfromscratch.org">
The Linux From Scratch community</a>
has announced the release of
LFS-5.0. This release features a new method with strong emphasis
on building a correct compilation environment and base libraries
independent from the host system. Release 5.0 features the Linux kernel
version 2.4.22, the GNU C Library (glibc) 2.3.2, the GNU Compiler
Collection (gcc) 3.3.1 and a bootloader change from LILO to GRUB,
amongst other package upgrades. The book's explanatory texts have also
been enhanced, providing an even richer learning experience while you
build your own customised, hand-crafted Linux installation.
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
<FONT COLOR="green">Mandrake
</FONT>
</H3>
<P>
Mandrake Linux 9.2 ISOs are now
<a href="http://www.mandrakelinux.com/en/ftp.php3">
available for download</a>, including
the new LG CD-ROM fix.
<P>
<hr width="20%" noshade>
<P>
Mandrake has also released
<a href="http://www.mandrakesoft.com/products/mandrakemove/?wslang=en">
MandrakeMove</a>
"...a new product based on Mandrake Linux 9.2 that provides a complete
personal desktop operating system on a bootable CD".
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
<FONT COLOR="green">Red Hat
</FONT>
</H3>
<P>
<a href="http://www.newsforge.com/software/03/11/03/1657205.shtml?tid=150&tid=2&tid=82&tid=94">
News that Red Hat will discontinue maintenance and errata support</a>
for Red Hat Linux 9 from the end of April 2004. This also marks the end
of the Red Hat Linux product line. To some extent,
<a href="http://fedora.redhat.com/">
the Fedora Project</a>
will carry the torch from now on.
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
<FONT COLOR="green">SuSE
</FONT>
</H3>
<P>
It has
<a href="http://www.novell.com/news/press/archive/2003/11/pr03069.html">
been announced</a>
that Novell is to
<a href="http://www.suse.com/us/company/press/press_releases/archive03/novell_suse.html">
acquire</a>
<a href="http://www.suse.de/en">SuSE Linux</a>.
This is
<a href="http://www.newsforge.com/business/03/11/04/1854241.shtml">
an interesting development</a>, to say the least.
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
<FONT COLOR="green">Vector
</FONT>
</H3>
<P>
<a href="http://www.osnews.com/story.php?news_id=5009">
Vector Linux 4.0 review</a>.
<a name="commercial"></a>
<p><hr><p>
<!-- =================================================================== -->
<center><H3><font color="green">Software and Product News</font></H3></center>
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
<FONT COLOR="green">Distcc
</FONT>
</H3>
<a href="http://distcc.samba.org/">
Distcc</a> is a distributed C/C++ compiler.
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
<FONT COLOR="green">Vorbis
</FONT>
</H3>
<P>
The Ogg Vorbis CODEC project
<a href="http://newsvac.newsforge.com/article.pl?sid=03/11/21/2150251">
has released new versions for all its tools and software</a>. Libogg
1.1, vorbis-tools 1.0.1,
libvorbis 1.0.1 and OggEnc 1.0.1 are included.
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
<FONT COLOR="green">QicsTable for Qt
</FONT>
</H3>
<P>
<a href="http://www.ics.com/qt">
ICS</a>
has announced the release of QicsTable, a sophisticated grid/table
GUI object. With QicsTable, developers can present large tables of
information using a familiar spreadsheet-like user interface paradigm.
This makes their applications easier for end users to understand and
use. Built on the Qt framework from Trolltech AS, applications written
with QicsTable run without changes on Windows, MacOS, Linux, and UNIX
based systems. QicsTable is being released under both the GNU Public
License (GPL) and a commercial license that includes access to source
code.
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
<FONT COLOR="green">Apache 2.0.48 Released
</FONT>
</H3>
The
<a href="http://www.apache.org/">
Apache Software Foundation</a>
and the Apache HTTP Server Project have announced the eleventh public
release of the Apache 2.0 HTTP Server. This version of Apache is
principally a bug fix release.
<P>
Also recently released is an update to the Apache 1.3 codebase, the new
version is denoted 1.3.29.
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
<FONT COLOR="green">Linux on FPGA Design and Verification Board
</FONT>
</H3>
<P>
Semiconductor distributor The Memec Group and embedded Linux and eCos
consulting firm Mind have
<a href="http://www.newsforge.com/article.pl?sid=03/10/27/2217235">
collaborated on a port of Linux and RedBoot to Memec's Virtex-II Pro
Development Board</a>. The board is used to design and
verify applications based on the Xilinx Virtex-II Pro Field Programmable
Gate Array (FPGA) family.
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
<FONT COLOR="green">Mod_python 3.1.2 Beta
</FONT>
</H3>
<P> The Apache Software Foundation and The Apache HTTP Server Project are
pleased to announce the 3.1.2 Beta release of
<a href="http://www.modpython.org/">
mod_python</a>.
<P> Some feature highlights:
<ul>
<li> Server-side sessions with memory or dbm-based storage and
session locking support. </li>
<li> PSP - a fast flex-based scanner which allows embedding Python
code within HTML. </li>
<li> Native cookie support, including support for automatic
cryptographic cookie signing and marshalling. </li>
<li> Compatibility with Python 2.3, as well as many other
enhancements.</li>
</ul>
Also available is the stable version 3.0.4.
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
<FONT COLOR="green">EduWave
</FONT>
</H3>
<P>
The Middle East's e-learning platform, EduWave, is
<a href="http://www.newsforge.com/article.pl?sid=03/10/27/0417214">
to be made available</a>
on the Linux platform following a deal between IBM
and Jordanian IT company Integrated Technology Group(ITG).
</p>
<!-- *** BEGIN author bio *** -->
<P> Mick is LG's News Bytes Editor.
<!-- *** BEGIN bio *** -->
<P>
<IMG ALIGN="LEFT" VALIGN="top" ALT="[Picture]" SRC="../gx/2002/tagbio/conry.jpg"
WIDTH="128" HEIGHT="158">
<em>Born some time ago in Ireland, Michael is currently working on
a PhD thesis in the Department of Mechanical Engineering, University
College Dublin. The topic of this work is the use of Lamb waves in
nondestructive testing. GNU/Linux has been very useful in this work, and
Michael has a strong interest in applying free software solutions to
other problems in engineering. When his thesis is completed, Michael
plans to take a long walk.
</em>
<br CLEAR="all">
<!-- *** END bio *** -->
<!-- *** END author bio *** -->
<div id="articlefooter">
<p>
Copyright © 2003, <A HREF="authors/conry.html">Michael Conry</A>. Copying license
<a href="http://linuxgazette.net/copying.html">http://linuxgazette.net/copying.html</a>
</p>
<p>
Published in Issue 97 of Linux Gazette, December 2003
</p>
</div>
</div>
<br />
<div class="content twdtarticle">
<h1>Windows Defectors: Why Linux Is Worth Migrating To, Sometimes</h1>
<p id="by"><b>By <A HREF="authors/roberts.html">James Roberts</A></b></p>
</b>
</p>
<p>
<BLOCKQUOTE><EM>
[James has agreed to coordinate the "Windows Defectors" series
long
<A
HREF="../issue95/lg_mail.html#mailbag.1">requested</A>
in the Mailbag. This series is for those new to Linux who come from a
Windows background. In spite of the series title, it's not just for
those who have stopped using Windows completely. People who still like
Windows, use Windows grudgingly, or deal with Linux-Windows integration
in LANs will also find the information useful. Unlike LG's other
series, this one will be written by multiple authors, since there is
such an interest on writing on this subject. The next article in
this issue (by Tom Brown) is also a Window Defectors
article.
<P> We're considering changing the series title to something less
negative (e.g., "Linux For Your Mom", "Leaning Towards Linux", "Windows
Immigrants Help Box", "c:\>, Drive-In for Windows Users", "At
Liberty Under the Hood", "Linux Incognito" -- all suggested by Petar
Marinov), but we're leaving it as "Windows Defectors" initially
because that's what it has been known in the Mailbag. -Sluggo.]
</EM></BLOCKQUOTE>
<P><TT>"Those who ignore history are doomed to repeat it."</TT>
<CITE>-George Santayana</CITE></P>
<P>Have you heard that quote before? I expect so - and that's part of the
point of the quote. This is the first article in a series aimed at the
many people who are interested in Linux, but currently use Windows. It aims
to ask, and perhaps answer, questions such as:</P>
<UL>
<LI>Why should anyone defect - or migrate - from Windows to Linux?</LI>
<LI>What should be migrated?</LI>
<LI>What are the benefits, if any?</LI>
<LI>What are the problems?</LI>
<LI>Are there work-rounds for the problems?</LI>
<LI>Who should consider this option?</LI>
<LI>Who should avoid it?</LI>
</UL>
<H2>What's the context?
</H2>
<P>All such discussions have a context, and the context I intend here is
that of the Small and Medium Enterprise, or SME. I'm not addressing the
issues for the single desktop, or for the large multinational corporation.
In fact, for both these extremes the issues are arguably simpler: at one end
it's just personal choice of platform, at the other the resources are
available to implement customised solutions as needed. But it is the SME
area that has in the current, somewhat-recessive economic circumstances,
consistently been identified by the IT industry as the last largely untapped
potential growth area. I'm referring here to small installations of between
two and a hundred desktops and servers. This SME area is price-sensitive,
hasn't upgraded for years, has no IT management: it's where Linux can make a
difference, and it's where I reckon it's hardest for Linux to enter - for
reasons that I will describe later. If the problems can be solved here, then
Linux will become 'sticky' at this level of the 'ordinary' user.</P>
<P>In this first article I'd like to set the scene, and this is why I
started with the Santayana quote. I've noticed that people with a UNIX
background often have had little contact with those who have been weaned on
DOS - and vice versa. The target business that I'd like us to keep in mind
is a small office - say eight or ten users altogether - and if this small
office has a history in computing, it will generally have been in DOS and
Windows.</P>
<P>So let's review where this typical office is now, and how it got here.
It's a long and somewhat sad story, but in the end, you'll maybe see why,
once, Windows NT was better for our clients than XENIX/SUN, and why now
Linux may be better than NT.</P>
<H3>Anti-flame note
</H3><P>Before we start, let me state that I am convinced that GNU/Linux is
a masterly piece of work on the whole, and an astonishing achievement. Since
it's made by humans however, it's not perfect, and inevitably it's the
imperfections that I'll have to emphasise. The alternative options are also
imperfect, that's why we're looking at Linux. But in some areas the
alternatives may have strengths that GNU/Linux lacks. Please take the
comments in the appropriate light. I also have to say that all trademarks
are acknowledged.</P>
<H2>Blast from Past
</H2>
<P>I'd like us to think back ten years or so - at which time (by mere
coincidence) I'd just joined a small UK SME VAR as hardware tech. Within
about ten days of starting I'd been bumped up into a systems and end-user
support role as well. The VAR was then primarily a Novell reseller and
customiser, and I quickly got to know the advantages and disadvantages of
Novell 3.1. At that time most of the clients were solicitors (lawyers), and
their systems typically were running a Novell server on a i386 or i486 with
SCSI drives, with up to twenty-five diskless net-booted i386 workstations,
running WordPerfect.</P>
<P>Overall the server/diskless workstation was a very good fit for the
clients' needs; it was reliable, fast (the 10 Mbps network was faster than
contemporary IDE drives) and easy to maintain (all the configuration files
were in one place).</P>
<P>It was also abstruse, non-intuitive (indeed, counter-intuitive at times)
and completely non-user-friendly. Any minor configuration error was often
fatal. But it did work, and did the job well.</P>
<H2>Enter the Band-wagon
</H2><P>Then Windows for Workgroups came along. We could put a network of
twenty-five peer-to-peer workstations into a site for much less than we
could do a Novell installation. Not only that, all the hardware was readily
available and used standard parts (the diskless workstations needed specific
types of PSU and weren't easily upgradeable). Moreover, with the Windows
system, the clients had the illusion of a familiar system - most of the
decision-makers who wanted to introduce networked systems already had
Windows boxes at home. Also the clients could install their own extra
software packages without invoking our aid (and paying for it).</P>
<P>Pretty soon we were installing a lot more Windows for Workgroups than
Novell. Of course, it didn't take long for the downside to be apparent - no
central installation of applications, no central control of rights, no user
controls whatsoever, big problems with workstation backup, insecure
peer-to-peer networking. So our recommended system included a Novell server,
which solved some (but not all) of these problems.</P>
<P>Then Windows NT came out - and it was cheaper than Novell, both for the
server and for the client access licences. And for the client, again it gave
the illusion of familiarity - it looked like Windows. And for me, it came
from the architect of Digital VMS - it was written by someone who did know
what they were doing.</P>
<P>Meanwhile, Novell had changed their OS completely to version 4, which no
one I knew found easy to use. They had introduced large-scale management
tools, which merely muddied the waters for our typical installs of 5 to 10
clients, and it cost more than version 3.x.</P>
<P>Pretty soon we were selling networks made up of Windows for Workgroups
workstations with a Windows NT 3.51 server, for a much lower overall cost
than the previous Novell-plus-diskless workstations solution, and with
pretty reasonable reliability and performance. Of course, building all the
workstations took time, so I developed a custom cloning system that could
build ten identical workstations in about fifteen minutes each.</P>
<H2>Nixing XENIX
</H2><P>By then (and we are getting to 1995 or so), we had become pretty
well-known and had a good reputation for looking after clients, so more
than one solicitor came to us to replace their 286/386 XENIX-based system,
which was by then getting pretty long in the tooth (like me now!). I never
installed any RS232 terminals, but I removed a lot. They'd done a good job
for their owners, but the replacement - with Windows 95 on the desktop and
Windows NT 3.51 on the server - was like jumping forward a whole epoch,
compared with the 9600 baud green-screen serial terminals in previous use.
Was Windows actually as reliable? Well, yes, given the age of the systems
being replaced, it was in fact more reliable.</P>
<P>So things went on, and as they went on the problems of this Windows
computing paradigm - which had always been apparent in contrast to the
Novell/diskless paradigm - became more and more cogent.</P>
<P>Windows 95 was effective - it's a masterpiece of forward and backward
compatibility in my view - but it was not stable. It crashed easily. It was
not secure. It was big, and the interactions within the systems were
unpredictable. Add third-party software (and a different mix of such
software on every box) and problems would arise that no-one reliably could
solve. We got used to reformatting and reinstalling.</P>
<P>Windows 98 was better, and more reliable, but much bigger again, for no
very good reason. It still crashed unpredictably, and took even longer to
fault-find or reinstall. Windows NT server was pretty darn stable (after a
few service packs), and so we all looked forward to Windows NT 4 coming in
1996, with the back-end stability of NT and the new interface of 98.</P>
<P>I adopted NT4 workstation as my personal desktop as soon as it was
released, but I had to dual-boot with 98 because NT4 did not run games
well - and I like games. However, NT workstation was too expensive to sell
into our clients in general, so our standard install was Windows 98 on the
desktop and Windows NT 4 server on the back end, and this worked pretty
well.</P>
<H2>Setting Sun
</H2><P>In 1996/7 we sold this system into various sites that were running
Sun Solaris/SPARC. It was interesting how this came about. Why ever would
someone using Sun SPARC workstations want Windows? Well, for freedom, odd as
this may seem given the current context. </P>
<P>At the particular sites in question, 'the Sun' was under the exclusive
control of 'The System Administrator' - who would install only what they
wanted to install, after triplicate written requests, passed back up to
company HQ and triple signed off by company IT. Maybe. Meanwhile the workers
and researchers, who just wanted to get things done, were bringing in their
own Windows machines and running SPSS or MathCAD or some custom sample
analysis software on them just to get the work done, and meanwhile the new
spectrometers in the lab came with Windows-based software that had to be
copied BY HAND to the UNIX system! Yes, Windows and Windows networking at
that time actually represented more 'Freedom' for these people, and
eventually the lab Sun systems were retired and sold off.</P>
<P>Do I feel shame? No! I remember two issues. One was concerning a video
lead for a monitor. The video lead - which if I remember correctly was
standard apart from the blanking off of one pin - was $150, about, from Sun.
I could source the same lead (apart from the blanked hole) for $7. And the
price of a network card? Don't ask. Meanwhile, it took twenty minutes to
link the lab pc talking to the machinery into the network - something that
had been on request for a year. Any company that exploits a monopoly in this
way develops users who detest it. Yes, any company.</P>
<H2>Back in the future
</H2><P>So we get up to 1999 and Windows 2000 Pro. Windows 2000 is as good
as Windows has got. It was pretty solid, pretty easy to use, fast,
adequately tuned, and a good desktop system. But Windows 2000 Pro had a
deliberately broken networking model, presumably to force a contrast with
Windows 2000 server. Windows 2000 Workstation would only handle ten clients;
this was reminiscent of the Intel tricks with the 486 series. The Outlook
mail/groupware client was also broken, in that core functionality had been
moved to Exchange server, and as far as I could see for one reason only: to
make clients buy Exchange server. I didn't like this. But Windows 2K was
still a good bet for our clients, although it was getting really overblown
in size and slower and slower every issue.</P>
<H2>The Plague years
</H2><P>Then the viruses started to really hit.</P>
<P>Then Windows XP came out.</P>
<P>We don't sell XP, if we can help it.</P>
<P>We have a few problems with it. We don't like the licence (it's a
potential problem for most solicitors/lawyers and anyone else with a duty of
confidentiality), we don't like the desktop (it's an insult), we don't like
the vulnerabilities, or the slow performance, or the sheer undocumented mass
of it all. But that's not the <em>real</em> problem. The <em>real</em>
problem we have is that soon we won't be able to get Windows 2000 any
more.</P>
<P>There's a problem in another area too. Many of our clients are running
Windows NT 4 server. It's very solid. It works. It does the job. But there
will soon be no more security updates or support for this version, and we
will have to migrate clients to something else. Windows 2000 server, 2000 AS
or especially Windows Server 2003 are a ridiculous overkill for an office
with six client machines, as well as being much more expensive and needing
huge hardware resources to run. So what else can we install to replace
NT4?</P>
<H2>Enter the Penguin
</H2><P>Now, back in 1993 I had ran into Slackware, presented as a cover
disk with Personal Computer World UK. I installed it and played with it, but
it didn't do anything I needed. Nonetheless, I kept an eye on GNU/Linux and
installed most builds of Slack, then Red Hat. We bought in a pre-configured
GNU/Linux Slackware box in about 1996 to run as our mail server, initially
on dial-up and then ISDN, and over 5 years it never crashed. The PSU failed
one day, and I managed to migrate the system to a different box and a bigger
hard drive and get it all working again (I never was sure how). Many people
say that Windows is unstable. With the NT series and all relevant patches on
supported hardware - I just don't think that's true. I've had Win NT 4 boxes
stay up for years. But that GNU/Linux could so easily match or exceed this
performance impressed me.</P>
<P>Moreover, GNU/Linux has over the last few years transformed its graphical
desktop capacity. Not only are there lots of interestingly geeky X-desktops
available, but two mainstream competitors for Windows 2k/XP, with generally
enhanced capabilities.</P>
<P>Two years ago, with the launch of XP and the developments in Samba, I
decided to seriously evaluate the potential of Linux for replacing Windows
NT 4 on the backend with a GNU/Linux box running Samba. I installed every
mainstream distro I could get, on every box I could test it on. I played
with it, broke it, fixed it (sometimes) and did my sums. Then we put some
test boxes into clients, mostly as mail servers/file servers with AV
integrated, and they have on the whole been working flawlessly ever
since.</P>
<P>But all is not sweetness and light. There are some problems to overcome
in retro-fitting GNU/Linux into a Windows network, and now I've given the
history I've just laid out, I hope you'll see them a little differently.</P>
<P> Next month I'll start discussing what sorts of problems
we've encountered and how we've tried to work with them.</P>
</p>
<!-- *** BEGIN author bio *** -->
<!-- *** BEGIN bio *** -->
<P>
<img ALIGN="LEFT" ALT="[BIO]" SRC="../gx/2002/note.png">
<em>
James is the coordinator of LG's "Windows Defectors" series.
</em>
<br CLEAR="all">
<!-- *** END bio *** -->
<!-- *** END author bio *** -->
<div id="articlefooter">
<p>
Copyright © 2003, <A HREF="authors/roberts.html">James Roberts</A>. Copying license
<a href="http://linuxgazette.net/copying.html">http://linuxgazette.net/copying.html</a>
</p>
<p>
Published in Issue 97 of Linux Gazette, December 2003
</p>
</div>
</div>
<br />
<div class="content twdtarticle">
<h1>Windows Defectors: I Don't Think We're In Redmond Anymore, Toto</h1>
<p id="by"><b>By <A HREF="authors/brown.html">Tom Brown</A></b></p>
</b>
</p>
<p>
<P>Before I begin, I want to warn you. I'm a very opinionated person. I expect
things to work well. I expect computers to work my way, not the other way
'round. When I get new software, I expect to be able to put the manual in a
drawer, then use the software's basic functionality with few hassles. I'm also
a control freak, which is why I like C/C++ over something like Visual Basic.
Ease of use gets you only so far. As I said, I expect things to work well,
which is why I decided to give Linux a try.
<P>I've programmed on a lot of different operating systems in the last 20
years, starting with the venerable Commodore 64 in the early 80's. In that
time, I've discovered that, despite the venting of various zealots, each
operating system has its appropriate place in the digital universe. Amigas
focused on multimedia (TV shows like Babylon 5 and Seaquest used it to generate
3d scenes), Macs focus on the printed page (most ad agencies and print shops
depend on it), and Windows focuses on taking over the world (sorry, cheap
shot). Diversity is a good thing.
<P>My introduction (!) to the world of Unix came quite a while ago, when my
boss gave me a month to benchmark the same database on SCO, HP/UX, and Solaris
(sort of a "let's see if he can breathe underwater" exercise). I liked the
flexibility and stability of Unix, but wondered what joker came up with the
cryptic commands (ls to read a directory? Rename a file by moving it? Huh?). My
favorite was the somewhat recursive SCO user manual of the time, where you had
to know what a command did before you could look it up to see what it did.
<P>It wasn't until Mandrake 8.2 came along that I seriously considered using
Linux. Having experienced Unix through remote terminal connections, I didn't
expect too many surprises. Ha! I'd like to share with you my introduction to
Linux from my own rather unique perspective.
<P><H2>Off to see the Wizard</H2>
<P>The target machine for the installation was a 2.53GHZ Pentium 4, with 512MB
of memory, two 80GB IDE hard drives set in a Raid 0 configuration (which means
that a file is written by sending sectors to alternating drives, giving you
faster reads and writes) using a Promise Raid controller built into the Intel
motherboard, and a standard 60GB IDE drive. I wanted to put Linux on the Raid
drive, but ran into my first problem. The installer didn't recognize the
Promise controller. Instead, it saw the two Raid drives as separate volumes.
That's where I had my XP installation at the time, so I absolutely wasn't going
to risk mucking it up. I decided to use the non-Raid IDE drive for Linux.
<P>The voice of experience: Before you start a Linux installation, have a list
ready of the hardware in your machine, including brand names and model numbers.
If you already have Windows on the machine, this info is easy to get. Mandrake
is pretty good these days auto-detecting hardware, but there's always that one
last bit it fails to identify. If the installer doesn't recognize your monitor,
you may have to enter its max resolution by hand, so keep the monitor manual
handy.
<P>Mandrake, as with the latest Red Hat distro, supplies a wizard to walk you
through the installation process. Once you know where you want to put things,
it's smooth sailing. You can use the installer to partition your hard drive,
but I recommend having a copy of Partition Magic handy to divvy the drive up
beforehand. That lets you resize an existing partition without wiping
out existing data. It comes in handy if you need to tweak things later.
<P>Another tip: Don't accept the default installation packages. Make sure you
have enough disk space, and install everything. It's easier to do it now than
later. If you think you'll never need the programming packages and kernel
source, for example, you'd be surprised!
<P>Many how-to books give you a simple method to boot a Linux partition from
Windows, and this generally works.
<P>Except in my case. Booting Windows with the Raid volume as the first drive
meant that the Linux partition was on the second drive. But when Linux was
installed, it thought it was on the first drive. It was trying to boot "hdb1"
as "hda1". Hmmm. You can't get there from here. Of course, since Linux didn't
recognize my Raid controller, it couldn't boot Windows. It seems you can't get
here from there, either. I ended up setting Linux to boot Windows using an
invalid drive spec. This fails, of course, but when it does, you simply hit a
key, and Windows starts up. Say what? This only works if you have only one
regular IDE drive. If you have a second, the boot-up fails, because it tries
to boot the second IDE drive instead of the Raid volume. The real solution, of
course, is to move Windows off the Raid volume. I think I'll leave that to my
yearly Windows reinstall (What? You don't reinstall Windows every year? Didn't
you get Bill's memo?).
<P><H2>If I Only Had a Brain</H2>
<P>Sometimes, I can be really stupid. I can't leave well enough alone. A few
weeks after the successful install, with everything working fine, I decided to
upgrade the computer's memory from 512MB to 1GB. I burn some home movies to
DVD, and keep my CD audio collection on the computer, so the extra memory would
come in handy.
<P>Only, Mandrake won't boot with the extra 512MB! The scroll lock and caps
lock LED's on the keyboard started flashing, but nothing appeared on the
screen. For those of you in the Windows world, this flashing indicates what is
called a "kernel panic". This is just what it sounds like. The Linux kernel
(the core logic of the OS) gets to a point where it doesn't know what to do
next, and it freaks out. One web site suggested I reduce the amount of memory
used by Linux. It worked, for Mandrake 8.2. But not, as it turned out later,
when I upgraded to Mandrake 9.0!
<P>You know that part in the Wizard of Oz, where Dorothy starts down the Yellow
Brick Road, and it's going in tiny circles? That was me. As much as I really
wanted to use Mandrake, I wasn't about to give up on the extra memory. So, I
wiped Mandrake from the computer, and started all over with Red Hat 8. Other
than a different look to the wizard, it was Deja Vu All Over Again. Same Pew,
Different Church. You get the picture. Red Hat installed easily, and it was
finally time to get to know Linux. I promised myself I wouldn't change anything
else (for a while).
<H2>There's No Place Like /home</H2>
<P>In Windows, each user has an entry in the Documents and Settings directory
on the "C" drive. The Linux equivalent is the user's "home" directory,
which bears the user's login name, and is located in the path "/home"
(reminder: Linux separates directories with a slash, not a backslash as in
Windows and DOS). Everything in there defaults to being private to that
particular user. A user can structure their "home" directory any way they
want, and their changes don't affect anyone else. Once you leave "/home",
however, Linux directories can be confusing to a Windows user.
<P>Here's a short list of the important Linux directories, and what goes in
them:
<P><B>/home:</B> This contains all the user directories in the system, except
for root.
<P><B>/root:</B> This is root's home directory. Never login as root (the
Linux equivalent of the Administrator in Windows)! Always login as yourself
and use the "su" command to give yourself root privileges for specific
commands. The reason is that programs and scripts can do a lot of damage when
run as root. The damage can be due to a hostile program, or just your own
(ahem!) stupidity (been there, done that, got the t-shirt).
<P><B>/bin:</B> Programs and scripts essential to boot and/or repair
the system. Some of these are used by other programs.
<P><B>/sbin:</B> Programs and scripts used by system itself, and by
users to administer the system.
<P><B>/boot:</B> Programs and scripts used to start Linux.
<P><B>/etc:</B> Configuration files. You may well find yourself editing some of
these, but do be careful, and backup the file before you make a mess of it
(voice of experience #2).
<P><B>/lib:</B> Routines that are shared between programs. Sort of like DLL's
(I hear some choking from the Answer Gang at that analogy).
<P><B>/tmp:</B> A place to store temporary files.
<P><B>/usr:</B> This directory contains contains all programs (/usr/bin) and
libraries (/usr/lib) that aren't essential for the system to boot and undergo
emergency repairs. /usr takes up 90% of the disk space on many systems, so
many sysadmins keep it on a separate read-only partition. Any information that
is host-specific or varies with time is stored elsewhere.
<P><B>/var:</B> Contains variable data files. For example, you'll find logs
here. This directory allows /usr to be read-only, since anything that is
written to during system operation is in /var.
<P><B>/opt:</B> This directory is reserved for the installation of add-on
application software. For example, Oracle uses this to contain its binaries,
and the files they use. This directory is a standard used on some Unix systems.
Its use on Linux systems has been controversial.
<P>There are in addition, directories that only look like directories. They are
special, and have a specific purpose:
<P><B>/dev:</B> Each "file" inside this directory represents a hardware
device on the computer.
<P><B>/mnt:</B> This directory (or one of its its subdirectories) is
conventionally used as a location to mount temporary filesystems like floppies.
Once mounted, the floppy's contents appear to be physically located in the path
"/mnt/floppy". Think of it as assigning a drive letter to a network drive in
Windows. However, other Linux distributions mount floppies onto /floppy
instead.
<P><B>/proc:</B> The "files" that appear in this directory aren't
really files at all, but represent the programs currently running, information
from the Linux kernel. You can write to certain "files" to modify the
kernel's behavior, but the changes last only until reboot.
<P>Additional information on these directories can be found by referencing the
<a HREF="http://www.pathname.com/fhs/2.2">Filesystem Heirarchy Standard</a>.
<P><H2>Pay No Attention to the Man Behind the Curtain</H2>
<P>One of the biggest concerns I had moving from Windows to Linux is support
for the various devices in the machine. You're more likely to find hardware
supported on an older machine than one that's state of the art. A good example
of that is my Promise Raid controller. I can work around it by using another
drive, but it means I'll continue to use Windows to access that 160GB of space.
<P>Another example is my nVidia graphics card. I have a Gforce 4 ti4200, and
only relatively recently has nVidia supplied a driver for it. Now, if you're
used to the nice way Windows installs device drivers, you're in for a real
"treat". The installation of the driver (in Red Hat 9, my current flavor of
Linux) was as follows:
<P>1. Reboot Linux in command-line mode (not in GUI mode).
<P>2. Run the nVidia installer. If the kernel isn't one it expects, it builds
one for you (remember, I warned you to have programmer tools and kernel source
installed).
<P>3. Make config file changes, per the instructions that came with the
installer.
<P>4. Reboot Linux into GUI mode.
<P>Now, if you update the kernel, you need to do this all over again, so the
nVidia installer can re-build the kernel. Not exactly as simple as running
"setup.exe", is it? Personally, I think it should be that easy, but that's an
argument for another time.
<P>That having been said, most of my hardware was recognized and used properly.
I can burn CD's on my DVD burner. I can watch home movies on DVD. My Creative
sound card works well (it didn't work at all in earlier versions of Linux). The
latest version of Red Hat (version 9) works even better on my laptop than it
does on my desktop, because the laptop is slightly older (a Compaq Presario
1800T).
<P>DVD Note: If you want to play movies (the kind from Hollywood) in Linux, you
need a library of routines that can defeat the DVD copy protection. Yes, this
is illegal, and a violation of the DMCA. I use Windows to play DVD's for now.
Not wanting the MPAA to knock on my door, I can't identify the software needed
to play them in Linux, but you can probably google for it. You may have to
learn Norwegian, though.
<H2>Flying Monkeys</H2>
<P>Another concern I had with moving to Linux is losing familiar applications.
While Red Hat comes with a version of Open Office, I was tempted by Ximian,
which promised better integration, through a customized Open Office, and other
additions. I was particularly interested in Ximian's implementation of a
"Network Neighborhood", which used an Open Source program called Samba to
access shared Windows directories from Linux. While Samba can be installed
separately, you have to configure it yourself. Ximian claimed to do it for you.
<P>Ximian installs from the web, rather than downloading a tarball or a zip
file. This can be a problem if you're installing to a machine that doesn't have
a fast Internet connection. (I wouldn't suggest you do this over a dialup
connection). It installed to my laptop easily, and works as advertised. Its
implementation of "Network Neighborhood" was nice. It saw all printers and
shared directories on my home network, without any tweaks or configuration.
Sweet.
<P>Well, now that you're suitably impressed, I'll disillusion you.
<P>The problem came when I next used the Red Hat Network up2date program (sort
of like Windows Update) to apply the latest patches. No go. It seems that
Ximian replaces parts of the OS with its own customized bits, causing
dependency errors during the update process. As a result, I could no longer
apply all the patches. I couldn't even add some packages from the install CD
because of this (I said this before: install everything).
<P>I hope Ximian solves the conflict problem, because I'd really like to use
it.
<H2>And Your Little Dog, Too</H2>
<P>As with anything else, Linux has its annoyances. At least, from a Windows
perspective.
<P>Both Red Hat and Ximian default to using the Gnome desktop, but I prefer
using the KDE desktop. KDE is an optional install, another reason to just
install everything the first time around.
<P>RPM package dependencies. This is more than annoying if you haven't a clue
how to fix it. You just want something installed. If the computer knows what's
wrong, it should just fix it, or tell you clearly what's missing. Tip: Run
"rpm" from the command line instead of double-clicking on the package icon,
using the verbose option to see what went wrong.
<P>Another annoyance involves modems. Most of them these days are what's called
"winmodems", which mean they depend on Windows to work. They're useless in
Linux, and ones that do work aren't always easy to find.
<P>At the risk of offending everybody, vi. It's the most commonly used text
editor in both Unix and Linux, and was originally designed to be used over a
slow modem connection on an 80-character-by-25-row screen. How slow? Try 300
baud. Today there are lots of alternatives, such as Emacs (in both command
line and X-Windows versions), as well as various programming IDE's that do
syntax highlighting, but if all you're doing is editing config files now and
then, these may be overkill. If what you really want is something like Notepad,
then you have a choice of using Kedit (KDE desktop) or Gedit (Gnome desktop).
Voice of experience #3: Keep a printed copy of the vi command keys somewhere
handy. You'll need it when you have to edit a config file or shell script and
X-Windows isn't running (or won't run because you accidently trashed it). Don't
say I didn't warn you.
<P>The installation of programs and device drivers is an unholy pain in the
boot sector. Some vendors, such as Borland with their Kylix and J Builder
tools, make program installation a whole lot easier, but even they have some
room for improvement. And I've already said my two cents worth about installing
device drivers.
<P>Disk partitions don't always automount. Mandrake scans your drives, and sets
up icons for any FAT partitions it finds, but in Red Hat, you have to crack
open the manual and do it yourself. It's not hard, but it's a pain. Reading the
manual, after all, is the option of last resort.
<P>You can't just eject the CD-ROM as you do in Windows. You have to unmount it
first. I know it's just a mouse click (or a CLI command) away, but, hey, I'm
lazy!
<P>Help is a little too scattered for my taste. You have two places to find
manual pages, as well as separate GUI help files. I'd like to have everything
available and cross-referenced in one place, preferably available from the GUI.
Some systems have a command "xman", which is a GUI version of the "man"
command, but I haven't seen it in Red Hat. On the plus side of Linux, there is
a ton of HOWTO guides out there, covering a wealth of topics, so I guess it
balances.
<P>The Open and Save dialog box isn't as elegant as the one in Windows, and is
a bit jarring if you go back and forth between operating systems as I do.
Rather a small nit to pick, but there you go.
<H2>Ding-Dong the Witch is Dead</H2>
<P>Linux has some outstanding positives going for it. Here are favorites from
my rather twisted point of view (your mileage may vary):
<P>In my opinion, Linux in general, and the KDE desktop in particular, has one
of the best, most flexible GUI environments around. Sometimes, I wish I could
replace the Windows desktop with KDE. Then again, sometimes I wish Windows
itself was just a shell on top of Linux (dream on, fool).
<P>Another great feature of Linux is the ability to copy-and-paste almost
anywhere using the 3rd mouse button. Just highlight the source text, and click
the middle mouse button to paste into the current cursor position. Simple, and
oh-so-elegant. This is the sort of job one does repeatedly, and with Linux I
don't have to remove my hand from the mouse to do so. This must sound strange
to most Linux folk, who hate taking their hand from the keyboard to use the
mouse. So, I'm a little strange. Be nice, I've been a prisoner of Windows.
<P>The security available for files is so much better than in Windows. Linux
gives you a much finer control over what you can do with a file. For one thing,
consider that a Linux file needs execute permission before it can be run.
Windows, on the other hand, will let you run just about anything. Once you get
used to it, you'll want this level of security in Windows, too (but you can't
have it: nah..nah...nah..nah..nah).
<P>Command Line Interfaces can color-code the directory listings (and the
"dir" command works without having to create a shell alias or shell script
for it), which is a feature I had in my DOS days using a program called 4DOS.
<P>Any command that needs "root" (think of it as the Windows
"administrator") privileges to work will prompt for the root password before
it proceeds. Good grief, Toto, does this mean that administrative jobs can't be
run behind my back from my login id? I had always known that both Unix and
Linux had better security options than Windows, but this is great. In Windows,
I had to give myself Administrator privileges, or log in as Administrator, to
perform certain tasks. In Linux, I can be an ordinary user, and still have the
power to get things done.
<P>Linux also has a powerful alternative to the "fast user switch" in XP for
logging in as root.. It's called the "su" command. Type it into a command
line by itself, and it prompts you for the root password. From that point on,
only that command line, and the programs it starts, are run with root
privileges. The rest of your screen stays as you.
<P>Yes, their commands are strange, and a bit cryptic, but shell scripts in
Linux make DOS batch files look like something out of the early 80's (oh,
wait...). A shell script is something like a batch file, but with enough power
to replace most "C" programs in daily use. There are two main flavors of
shells: cshell and bash. Of the two, bash is more commonly used in Linux.
Microsoft is going to add a new command line interface to its Longhorn release,
and it sounds a lot like a Linux shell (probably proprietary and incompatible,
of course). That should give you a hint how powerful Shells and Shell Scripting
are.
<P>Mozilla! Goodbye Internet Explorer! Goodbye Outlook and Outlook Express!
I've been using Mozilla Firebird for my browsing, and Mozilla Thunderbird for
email for a while now, and have begun using both in Windows as well.
Thunderbird does a wonderful job killing spam.
<P>Open Office 1.1! Everything I normally do in Microsoft Office I can do here,
including save documents in MS formats. I use this too in both Linux and
Windows.
<P>The Gimp! I had no need of an expensive graphics editor, just to clean up
pictures from my digital camera, but I needed something better than MS Paint. I
tried Gimp simply because it was free (yes, I admit to being a cheapskate), but
was shocked to discover how good this program is. It's not quite as easy to use
as MS Paint (that's because MS Paint doesn't do a whole lot), but when you need
something that's more powerful, you've gotta check it out. Now, I do have a nit
or two to pick with the program (like, give me the option to put all those
separate windows on a MDI form, so I can find everything), but on the whole,
this is the image editor I use in both Linux and Windows. I may even read the
manual for once!
<P>I could go on, but you can see the trend here. If a program is so good it
gets me to use it in both Linux and Windows, you start wondering why use
Windows at all. In fact, I use Windows mostly for gaming these days, and little
else.
<P>I may just throw away my ruby slippers, Toto. Linux has a ways to go to
satisfy Mr. Picky here, but I think I'm already home.
</p>
<!-- *** BEGIN author bio *** -->
<!-- *** BEGIN bio *** -->
<P>
<img ALIGN="LEFT" ALT="[BIO]" SRC="../gx/2002/note.png">
<em>
Tom has been a software developer since the early days of the Commodore 64,
with such commercial classics as Prototerm-64 and Colorez-128, and has seen
lots of operating systems come and go. Every one he's liked is either
discontinued (OS/2) or out of business (Commodore Amiga). He currently likes
Red Hat Linux, which won't be supported after April '04. As a result, we've
been trying to get him to fall in love with Windows, but so far no luck.
</em>
<br CLEAR="all">
<!-- *** END bio *** -->
<!-- *** END author bio *** -->
<div id="articlefooter">
<p>
Copyright © 2003, <A HREF="authors/brown.html">Tom Brown</A>. Copying license
<a href="http://linuxgazette.net/copying.html">http://linuxgazette.net/copying.html</a>
</p>
<p>
Published in Issue 97 of Linux Gazette, December 2003
</p>
</div>
</div>
<br />
<div class="content twdtarticle">
<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 tha
t supports, es.comp.os.linux, the Spanish USENET newsgroup for Linux. The
strips are drawn in Spanish and then translated to English by the author.
<P>
<EM>These images are scaled down to minimize horizontal scrolling.
To see a panel in all its clarity, click on it.</EM>
<P>
<A HREF="misc/ecol/ecol-131-e.png">
<IMG ALT="[cartoon]" SRC="misc/ecol/ecol-131-e.png"
WIDTH="640" HEIGHT="240"></A>
<BR CLEAR="all">
<A HREF="misc/ecol/ecol-135-e.png">
<IMG ALT="[cartoon]" SRC="misc/ecol/ecol-135-e.png"
WIDTH="640" HEIGHT="240"></A>
<BR CLEAR="all">
<A HREF="misc/ecol/ecol-136-e.png">
<IMG ALT="[cartoon]" SRC="misc/ecol/ecol-136-e.png"
WIDTH="640" HEIGHT="240"></A>
<BR CLEAR="all">
<P>
All Ecol cartoons are at
<A HREF="http://tira.escomposlinux.org/">tira.escomposlinux.org</A> (Spanish),
<A HREF="http://comic.escomposlinux.org/">comic.escomposlinux.org</A> (English)
and
<A HREF="http://tira.puntbarra.com/">http://tira.puntbarra.com/</A> (Catalan).
The Catalan version is translated by the people who run the site; only a few
episodes are currently available.
<P> <SMALL>These cartoons are copyright Javier Malonda. They may be copied,
link ed 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 *** -->
<!-- P>
<img ALIGN="LEFT" ALT="[BIO]" SRC="../gx/2002/note.png">
<em>
</em>
<br CLEAR="all" -->
<!-- *** END bio *** -->
<!-- *** END author bio *** -->
<div id="articlefooter">
<p>
Copyright © 2003, <A HREF="authors/malonda.html">Javier Malonda</A>. Copying license
<a href="http://linuxgazette.net/copying.html">http://linuxgazette.net/copying.html</a>
</p>
<p>
Published in Issue 97 of Linux Gazette, December 2003
</p>
</div>
</div>
<br />
<div class="content twdtarticle">
<h1>Recent Events, and Trademark Actions by SSC, Inc.</h1>
<p id="by"><b>By <A HREF="authors/moen.html">Rick Moen</A></b></p>
</b>
</p>
<p>
<P> Casting our minds back to early on October 28, 2003: The entire Linux
Gazette staff (unanimously) decided to take the magazine to new hosting
for the first time since time-strapped founder John M. Fisk gratefully
turned over guardianship of the publication to SSC, Inc. and publisher
Phil Hughes in 1996.
<P> There were a number of reasons for this; one of the two biggest was
SSC's covert deletion of material (including entire articles) from back
issues, and, repeatedly, totally ignoring our questions about those
removals, after we found out. We tried one last time on October 26:
After 48 hours of no SSC reply to those inquiries, we decided upon
departure.
<P> So, early that Tuesday the 28th, we wrote a very polite letter to
Hughes, thanking him for seven years of assistance and asking his
assistance in our transition. We also asked him to fix SSC's (assumed
inadvertant) violation of past authors' copyrights in its recent
republications of old articles. As of December, those violations are
<em>still ongoing,</em> e.g., replacement of the authors' copyright
notices with SSC corporate copyright notices (falsely claiming them to
be SSC property) on these two articles:
<P>
<A HREF="http://www.linuxgazette.com/node/view/58">http://www.linuxgazette.com/node/view/58</A><BR>
<A HREF="http://www.linuxgazette.com/node/view/61">http://www.linuxgazette.com/node/view/61</A>
<P> Our October 28 letter notifying Mr. Hughes of the staff's departure can be
read here, and is recommended:
<P> <A HREF="http://lwn.net/Articles/57161/">http://lwn.net/Articles/57161/</A>
<P> The above was approximately the state of affairs when we went to press
for the November (#96) issue, as reflected in that issue's
<A HREF="../issue96/moen.html">Brief History of Linux Gazette</A> article.
<em>This</em> article aims to update LG readers on developments since then.
<P>
The first and most crucial involves the <em>other</em> chief reason Linux
Gazette left its longtime home at SSC: Mr. Hughes and his webmaster had
been consistently giving us staffers the very clear message that they
intended to change LG to have only dynamic Web content, with no more
monthly issues and no editors. In effect, there would be no magazine,
and the http://www.linuxgazette.com/ site was slated to become another
Slashdot-style news/discussion site.
<P> In essence, this would have meant the end of Linux Gazette in all
meaningful senses. LG was already starting to erode since the summer, because
several authors had stopped contributing articles in protest over the editor's
elimination, and the quality of the remaining articles was going significantly
downhill. The staff's options were thus to either let this continue to happen,
or to move the magazine.
<P> Many have commented that they felt SSC has a moral right to run the
Gazette, because of founding editor John Fisk's 1996 hand-off to Mr.
Hughes and his company. <STRONG>However, on October 28, the question we faced
was <em>not</em> whether SSC had the right to run it, but rather whether
it had the right to kill it, over the staff's objections.</STRONG>
<P> The foregoing is an important point to realise, because the situation
was then changed on us a second time, immediately after the November issue
went to press: After we announced on October 28 that the magazine
would be continuing elsewhere, SSC apparently reversed policy and
decided to resume publishing magazine issues — using uncredited paid
SSC employees to assemble material. We knew nothing of this until we
noticed the unheralded, surprise appearance of a <em>second</em> Linux Gazette
magazine (at linuxgazette.com).
<P> Accordingly, although the staff regret the confusion resulting
from this situation, it was not our idea, and it resulted from a sudden
SSC policy change outside our knowledge or control. We're doing
everything we can to alleviate the confusion. We also note that even though
SSC has reinstated monthly editions, they have not said one word about
reinstating an editor.
<P> We are likewise doing everything we can to avoid conflict with SSC in
this matter, and to discourage intemperate actions and commentary.
Unfortunately, this attitude has not been reciprocated:
<P> 1. The very same day it received our notice of the magazine's
departure, SSC, Inc. suddenly filed a US $300 fee and trademark
application #78319880 with the USA Patent and Trademark Office (USPTO),
requesting registration of the name "Linux Gazette" as a service mark
(explained below). On that form, SSC certified that it had used the
mark in commerce starting August 1, 1996.
<P> 2. SSC retroactively started adding the symbol "TM" to its instances of
our magazine name on its site. "TM" is an unregulated symbol used to
assert existence of a commercial brand identity for goods offered for
sale. The same concept applied to commercial services is technically
called a service mark, and can be publicly asserted with an "SM" symbol
(not "TM").
<P> 3. On December 3, 2003, we received a letter from Phil Hughes at SSC,
Cc'd to our DNS domain registrar, claiming "Linux Gazette" is an SSC
trademark and that our possession and use of the linuxgazette.net domain
violates SSC's commercial rights. SSC's main intent appears to be
seizure of our domain name via invocation of ICANN's Uniform Domain-Name
Dispute-Resolution Policy (UDRP), without any need to prove their
entitlement in court.
<P> Our attempt to assess and respond to this attack on our Internet
presence — sprung on us right at our publication deadline —
is part of the reason for this issue being delayed, for which we
apologise. (The other reason was our desire to change the logo and layout,
and this required updating several templates and scripts.)
<P> Here is is a brief explanation of the relevant portion of trademark law.
(I'm not an attorney, so people needing to make business decisions
should consult appropriate legal experts, rather than my analysis.)
<P> Trademark law, in essence, recognises your stake in any commercial
"brand" you establish in the market. Contrary to popular misconception,
you as a trademark owner cannot prevent others from using your brand
identity in the general sense — but you <em>are</em> entitled to
stop others from offering competing commerical goods or services (within
the same trade or industry) using your brand to mislead your customers
into thinking you produced or endorsed them.
<P> For example, in hanging out my shingle as "Viking Network
Consulting[SM]", I'd be establishing a brand identity within my
profession: In legal terms, my firm's name would be recognised as a
service mark. I would thus be entitled to bring civil suit to suppress
sales of "Viking Firewall Installation" services by competitors, on
grounds of likelihood of my customers thinking I'd produced or endorsed
those.
<P> Notice that the reach of a trade or service mark, if valid and
legitimately owned by you, extends solely to (1) uses by others in
commerce, (2) within your trade or industry, and (3) in the same
geographical area. I would not be able to enjoin a different Viking
Network Consulting from operating in Trondheim, nor Viking Senior
Computer Volunteers from giving non-profit help to retirees.
<P> Broader geographical coverage applies if you pay US $300 every ten years
to USPTO, certifying you used the mark in commerce, within your field of
business, before any other applicants. This is what SSC claimed, in its
application to USPTO. If granted by trademark examiners, such
registration entitles the owner to put "®" (a legally regulated symbol)
next to the mark, rather than just the toothless "TM" or "SM" insignia.
<P> This gets us neatly back to the question of who "owns" Linux Gazette.
It's a fair question. The copyright question is clear: All material
remains the property of each individual contributor and is issued under
an open-source licence (OPL 1.0) — an arrangement LG
instituted early on because LG was always an explicitly free magazine.
To quote founding editor John Fisk in issue #8 (Aug. 1996), who wished
to explain his vouchsafing of LG (a free magazine) to SSC, a commercial
company:
<P> <blockquote>
So, after chatting at some length with Phil Hughes about this, I've
decided to turn the Linux Gazette over to the Linux Journal. I think
that the Gazette has demonstrated the "proof of concept" — that a
freely available and open-to-all online publication is a great means for
sharing information and ideas. There are a number of great things that
could be done with this and I'm excited about the Gazette continuing on
in this tradition.
<P> Also, please know that the Linux Gazette has been, is, and will continue
to be an absolutely free publication. I can't stress this enough: I know
that many folks feel passionately about keeping Linux from any
commercialization whatsoever. I happen to disagree with this as it's my
feeling that a free and a commercial side can peacefully coexist and
actually encourage and support each other. That said, I've really
enjoyed knowing that the Gazette has been freely available to all and
that it will continue to be so.
</blockquote>
<P> We agree that SSC had a well-established moral claim to LG leadership
from John M. Fisk, and maintained that custodianship well for seven
years. Our view changed during the year 2003, with SSC's announced
plans to (in effect) kill the magazine as such, and with its refusal to
account for its surreptitious deletions from the linuxgazette.com
back-issues archives and their mirrors.
<P> Consider, for comparison's sake, a hypothetical situation in which Linus
Torvalds announces his intent to shut down the Linux kernel project.
The situation is closely parallel: You have a collective effort
headed by one party, but in which copyright is retained by each
individual contributor, and material is issued under an open-source
licence. We'd be sorry to see Linus go, but I doubt we'd dally more
than about a minute before forking the kernel and moving it elsewhere.
If he later changed his mind and resumed work on his fork, things would
be awkward (just as they are now with two Linux Gazettes), but we would
not say ours had suddenly became an imposter kernel.
<P> Moving on from moral claims, there are legal ones:
<P> SSC's recent legal claim to hegemony over the name "Linux Gazette"
strikes us as outrageously unmerited, and cheeky: (1) We see no
indication that Fisk assigned SSC commercial rights over Linux Gazette.
If anything, Fisk made the opposite intention crystal-clear. (2)
Separately and in addition, SSC's claim to have used the name in commerce
starting August 1996 seems, to our knowledge, materially false. We can
find no offering of commercial services under that name by SSC or anyone
else. And last (also separately and in addition), (3) the attempt to
use commercial trademark law as a ploy to strong-arm us — a 100%
non-commercial, volunteer-staffed community project — is
monumentally outrageous: It's inherent in the nature of trademark
law that non-commercial uses simply cannot infringe trademark. Period.
<P> A study of the Gazette's eight years of history suggests there's no
way in Hades it can be reasonably claimed to have been ever a service
offered in commerce, not in 1996 and not today. As we hope to point out
in our draft response to SSC's attempted ICANN UDRP domain-snatching,
SSC's acceptance of financial underwriting for LG from other Linux firms
(cited by Hughes as justifying his alleged trademark) doesn't make it a
service offering in commerce; it makes it a charity. We think that can
be shown to anyone's satisfaction, including a judge.
<P> We'd like to stress that we still have no intention to undermine or
attack SSC. In fact, we worked out on November 5 one of numerous ways
the two Gazette initiatives could work in harmony. (This is transcribed
from an IRC discussion:)
<P> <pre>
Frank: anyone feeling sorry for Phil yet, btw? *G*
JimD: Frank, actually yes. I have been for several days.
Frank: yes, me too...
I feel sad that he feels to need to be like this...
but I do not feel sorry enough not to call him on this situation...
JimD: I won't let my sympathy for him deter me, either.
Rick: jimd: Second your comments, and it reminds me of a related point:
When you've embarrassed someone, it's advantageous if you can offer
him a way out, rather than putting his back up against the wall.
I've been guilty of doing the latter, in disputes with people.
JimD: I can't see a good way for us to offer Phil *another* way out of all
this. We've offered several.
Rick: It's a point.
I had a half-baked notion, which I'm trying to recall right now.
Supposing LG.com operated its CMS, and generated content on there.
They can do Web-things with it as desired. The Web contributions
then are one of the diverse sources of candidate material for the LG
newsletter (per OPL) that is published monthly by the LG.net editors,
canonical location LG.net, but then mirrored to lots of other places
including LG.com.
If Phil objected to particular content in any issue, he would have
the option of not mirroring that entire issue.
Other mirrors of course also inherently have that right.
Advantages: Saves face, doesn't require any domain transfers. Phil
gets Web toys, we get a monthly magazine, of which there then is
only one.
Nobody has to rename. Nobody gets censored.
Also, the editors get editorial control over the magazine, SSC gets
editorial control over the Web stuff (other than the magazine).
SSC remains free to disclaim its links to the magazine mirror with
"SSC, Inc. does not necessarily endorse blah blah."
SSC can continue to claim that it's asserting trademark over the name,
but not try to register it. The editors can disregard the trademark
claim in knowledge that successful assertion of trademark allows you
ONLY to bar competing use of the mark in <em>commerce</em> that falsely
tends to convince customers that those competing goods are endorsed
or produced by the trademark owner.
(See: Lanham Act, US Code — easily googleable).
JimD: I don't think Phil is in the frame of mind to take such an option
Rick: A point, too. Maybe in time.
JimD: Yep.
</pre>
<P> At present, indeed, SSC appears in absolutely no mood to work with us,
but only to work <em>on</em> us, e.g., by launching surprise attacks on
our Internet presence. However, the door remains open on our end, and
we continue to regard SSC as our natural friends and allies in the long
term. We hope they'll eventually remember, despite injury to their
pride (but nowhere to their commercial interests), that they caused an entire
Linux-community institution to walk out en masse.
<P> Readers should rest assured that we are acting to prevent seizure of our
Internet domain, and will take other measures as required to protect our
name. We <em>are</em> Linux Gazette and will continue to do our best at
being that. Our readers deserve no less.
<H2>Suggested reading</H2>
<UL>
<LI> <A HREF="http://www.openp2p.com/pub/a/p2p/2003/08/14/trademarks.html">
A Good article by Cory Doctorow of EFF</A>, explaining trademark law and
detailing just how badly people tend to misunderstand it
<LI> <A HREF="http://inventors.about.com/library/bl/toc/bltmfaq.htm">About.com'sTrademark FAQ</A>
<LI> <A HREF="http://www.law.cornell.edu/topics/trademark.html">General overview of trademark law</A>
<LI> Bitlaw has excellent information resources:
<UL>
<LI> <A HREF="http://www.bitlaw.com/trademark/">http://www.bitlaw.com/trademark/</A>
<LI> <A HREF="http://www.bitlaw.com/trademark/infringe.html">http://www.bitlaw.com/trademark/infringe.html</A>
<LI> <A HREF="http://www.bitlaw.com/trademark/dilution.html">http://www.bitlaw.com/trademark/dilution.html</A>
<LI> <A HREF="http://trademark.blog.us/blog/2003/10/01.html">http://trademark.blog.us/blog/2003/10/01.html</A>
</UL>
<LI> <A HREF="http://www.chillingeffects.org/trademark/faq.cgi">EFF's ChillingEffects.org trademark FAQ</A>
(See especially "What are the limits of trademark rights?")
</UL>
</p>
<!-- *** BEGIN author bio *** -->
<P> Rick is a member of The Answer Gang.
<!-- *** BEGIN bio *** -->
<P>
<img ALIGN="LEFT" ALT="[BIO]" SRC="../gx/2002/tagbio/moen.jpg"
WIDTH="202" HEIGHT="184">
<em>
Rick has run freely-redistributable Unixen since 1992, having been roped
in by first 386BSD, then Linux. Having found that either one
<a href="http://linuxmafia.com/cabal/os-suck.html">sucked less</a>, he blew
away his last non-Unix box (OS/2 Warp) in 1996. He specialises in clue
acquisition and delivery (documentation & training), system
administration, security, WAN/LAN design and administration, and
support. He helped plan the LINC Expo (which evolved into the first
LinuxWorld Conference and Expo, in San Jose), Windows Refund Day, and
several other rabble-rousing Linux community events in the San Francisco
Bay Area. He's written and edited for IDG/LinuxWorld, SSC, and the
USENIX Association; and spoken at LinuxWorld Conference and Expo and
numerous user groups.
<P> His first computer was his dad's slide rule, followed by visitor access
to a card-walloping IBM mainframe at Stanford (1969). A glutton for
punishment, he then moved on (during high school, 1970s) to early HP
timeshared systems, People's Computer Company's PDP8s, and various
of those they'll-never-fly-Orville microcomputers at the storied
Homebrew Computer Club -- then more Big Blue computing horrors at
college alleviated by bits of primeval BSD during UC Berkeley summer
sessions, and so on. He's thus better qualified than most, to know just
how much better off we are now.
<P> When not playing Silicon Valley dot-com roulette, he enjoys
long-distance bicycling, helping run science fiction conventions, and
concentrating on becoming an uncarved block.
</em>
<br CLEAR="all">
<!-- *** END bio *** -->
<!-- *** END author bio *** -->
<div id="articlefooter">
<p>
Copyright © 2003, <A HREF="authors/moen.html">Rick Moen</A>. Copying license
<a href="http://linuxgazette.net/copying.html">http://linuxgazette.net/copying.html</a>
</p>
<p>
Published in Issue 97 of Linux Gazette, December 2003
</p>
</div>
</div>
<br />
<div class="content twdtarticle">
<h1>Using the HTML::Template module</h1>
<p id="by"><b>By <A HREF="authors/okopnik.html">Ben Okopnik</A></b></p>
</b>
</p>
<p>
<p>
Recently, I needed to generate a Web page - the Linux Gazette's <a
href="http://linuxgazette.net/mirrors.html">"Mirrors and Translations"</a>
page, actually - based on the contents of a database. Perl is famous for
its ability to connect to almost any database via a common interface, given
its <code>DBD::DBI</code> module kit; however, the challenge in this case
came from the front end, the HTML generation. Sure, I could use the CGI
module to output whatever I needed - but in this case, I already had the
static page that I wanted to create, and saw no reason to rewrite all the
static content in CGI. Also, the final product was not to be a CGI file but
a generated HTML page. In fact, everything in this case hinted at
<b>templating</b>, a process in which I would use the static HTML with a
few special tags and a script which would then apply processing based on
those tags. This made especially good sense since it drew a clean
separating line between writing HTML and creating code, very different
tasks and ones for which I have different mental states (layout designer
vs. programmer.)
<p>
As with anything in Perl, <a
href="http://okopnik.freeshell.org/acronyms.cgi?string=TMTOWTDI&type=acronym">TMTOWTDI</a>
- there was a number of modules available on <a href="http://cpan.org">CPAN</a>
(the Comprehensive Perl Archive Network) that could do the job. However, I
had used the <code>HTML::Template</code> module in the past, and the job
wasn't particularly complicated (although <code>HTML::Template</code> can
handle some very complex jobs indeed), so that's what I settled on. My
first task was to hunt through the HTML, removing the dozens of repetitive
stanzas and replacing them with the appropriate tag framework that the
module would utilize later. We had also made the decision not to display
the maintainers email addresses, even in the <a
href="../issue86/okopnik.html">munged form</a> that I use to deter
spammers; those of you who use our mirrors and want to thank these fine
folks for making LG available should be able to find an address link on the
mirror site without much trouble.
<p>
<b>Fragment of the old page (there were several dozen entries like this):</b>
<pre><hr>
...
<A name="AU"></A>
<DT><B><font color="maroon">AUSTRALIA (AU)</font></B></DT>
<DD>
<STRONG><FONT COLOR="green"><TT>[WWW]</TT></FONT></STRONG>
<A HREF="http://www.localnet.com.au/lg/index.html">http://www.localnet.com.au/lg/index.html</A>
<BR>
<SMALL>
Maintainer: Jim McGregor &lt;<A HREF="mailto:nospam@here.please">nospam@here.please</A>&gt; &nbsp;
</SMALL>
<P>
</DD>
<DD>
<STRONG><FONT COLOR="green"><TT>[WWW]</TT></FONT></STRONG>
<A HREF="http://www.eastwood.apana.org.au/Linux/LinuxGazette/">http://www.eastwood.apana.org.au/Linux/LinuxGazette/</A>
<BR>
<SMALL>
Maintainer: Mick Stock &lt;<A HREF="mailto:nospam@here.please">nospam@here.please</A>&gt; &nbsp;
</SMALL>
<P>
</DD>
</BODY></HTML>
...
<hr></pre>
<b>Single-stanza replacement for all the entries (new template):</b><br>
<pre><hr>
...
<a name="<TMPL_VAR NAME=FQDN>"></a>
<dt><b><font color="maroon"><TMPL_VAR NAME=FQDN> (<TMPL_VAR NAME=TLD>)</font></b></dt>
<dd><strong><font color="green"><tt>[WWW]</tt></font></strong>
<a href="<TMPL_VAR NAME=HTTP>"><TMPL_VAR NAME=HTTP></a>
<br>
<strong><font color="red"><tt>[FTP]</tt></font></strong>
<a href="<TMPL_VAR NAME=FTP>"><TMPL_VAR NAME=FTP></a>
<br>
<small>
Maintainer: <TMPL_VAR NAME=MAINT>
</small>
<p>
</dd>
</BODY></HTML>
...
<hr></pre>
Now, the challenge had shifted away from generating the HTML to just
dealing with code. What I needed to do was sort the data into groups and
subgroups - that is, there would some number of "country" headings, some
number of "mirror" headings under each of those, and either one or two
(WWW, FTP, or both) hosts plus a maintainer under each "mirror" heading. In
programmatic terms, these are known as "nested loops", and are not that
difficult to code. However, translating that into HTML terms could be an
exercise in kind of language abilities of which your mother would not
approve... if it wasn't for <code>HTML::Template</code>.
<p>
<b>Note:</b> Using <code>HTML::Template</code> is normally very simple; in
fact, learning the basics of using it usually takes only a minute or two
(see the example at the top of "perldoc HTML::Template".) However, in this
instance, we're creating <i>nested lists</i> - a rather more complex issue
than simple variable/tag replacement - and thus, the coding issues get a bit
deeper. However, this isn't due to <code>HTML::Template</code>; if you
think about the issues inherent in modeling what is already a complex data
structure and then transferring that structure into a "passive" layout
language... truth to tell, I'm somewhat surprised that it can be done at
all. Kudos and my hat's off to Sam Tregar (author of the module) and Jesse
Erlbaum (the man responsible for TMPL_LOOP.)
<p>
<h3>References</h3>
The area that seems to strike fear into the heart of neophyte programmers,
more so than anything else, is the topic of <i>references</i>. Particularly
in Perl, where everything is supposed to be warm, fuzzy, and easy to
understand. However, understanding references and objects - in my opinion -
are the very things that take one from being a Perl user to a Perl
programmer. I'm going to simply show how references work with a bit of an
explanation, but the real comprehensive reference for references :) is
included with the standard Perl documentation. Simply type "perldoc
perlreftut" at your command line for a good introduction, and be sure to
take a look at "perldoc perlref" for the complete documentation.
<p>
First, in order to understand how the data structure must be laid out to
create the pattern that we need, let's take a look at that pattern.
Fortunately, in Perl it's easy to lay out the data structures to match what
they represent (whitespace is arbitrary, so you can follow your preferences
- but see "perldoc perlstyle".) What we'll want to do here is build the
structure that contains all the values we want to assign within the loop as
well as the names which are associated with those values. Those of you with
a little Perl experience are nodding and smiling already: the word
"associated" points very clearly to the type of variable we need - a hash!
Taking a single "row" (per-country entry) - Austria, as a random example -
here is how it looks:
<pre><hr>
%row = (
tld => AT,
fqdn => Austria,
sites => [
{
http => "http://www.luchs.at/linuxgazette/",
maint => "Rene Pfeiffer"
},
{
http => "http://info.ccone.at/lg/",
maint => "Gerhard Beck"
},
{
http => "http://linuxgazette.tuwien.ac.at/",
ftp => "ftp://linuxgazette.tuwien.ac.at/pub/linuxgazette/",
maint => "Tony Sprinzl"
}
]
);
<hr></pre>
The above hash, <code>%row</code>, matches our requirements exactly: its
keys will be used to match (case-insensitively) the tag names in the HTML,
and the values associated with those keys will be used to replace those
tags. That is, every instance of <code><TMPL_VAR NAME=FQDN></code>
in the template will be replaced by "Austria" while this entry is being
processed. Here are some of the less-obvious points of the above
structure:
<p>
<ul>
<li>The <i>anonymous hash constructor</i>, defined by the curly braces
surrounding each group, stores all the data in an <font
color="red"><b>anonymous hash</b></font> and returns a reference to it.
<li>In turn, the <i>anonymous array constructor</i>, defined by the square
braces surrounding the list of groups, stores all of the above references
in an <font color="green"><b>anonymous array</b></font> and returns a reference to it.
<li>The <code><b>sites</b></code> key points to (is associated with) the
reference to the above <font color="green"><b>anonymous array</b></font>,
and is the name of the loop that we'll use within the HTML to iterate
through all of the above data.
</ul>
As we create a "row" for each country, we will need to store all of them in
a list. Each entry in this list must, of course, contain a reference to
each row that we have built:
<pre><hr>
# Add the hashref to the end of the array
push @mirrors, \%row;
<hr></pre>
Note the '\' preceding the <code>%row</code>; this stores a reference to
<code>%row</code> rather than the hash itself (stuffing a hash into an
array would result in a generally unusable mess - key/value pairs in
effectively random order as array elements.) This is a standard mechanism
for creating multidimensional arrays, lists-of-hashes, etc. in Perl.
<p>
And - one more time, <b><i>with gusto</i></b> - HTML::Template's
<code>param()</code> subroutine, as most other subroutines in Perl and many
other languages, expects a reference to the array rather than the array
itself:
<pre><hr>
# Create a new HTML::Template object
my $t = HTML::Template -> new( filename => "mirrors.tmpl" );
# Pass the listref to param()
$t -> param( MIRR => \@mirrors );
<hr></pre>
"<b>And</b>", as Austin Powers would say, "<b>Oi'm <i>spent.</i></b>" Those of you scared
of the Big Bad References may come out from under the bed now. :)
<p>
Looking at it from the other end, the matching part of the template for
this loop looks like this:
<pre><hr>
<dl>
<TMPL_LOOP NAME=MIRR>
<dt><b><font color="maroon">
<a name="<TMPL_VAR NAME=TLD>">
<img src="gx/flags/<TMPL_VAR NAME=TLD>.jpg" border="1">
</a>
<TMPL_VAR FQDN> [<TMPL_VAR NAME=TLD>]
</font></b></dt>
<TMPL_LOOP NAME=SITES>
<dd>
<TMPL_IF NAME="HTTP">
<strong><font color="green"><tt>[WWW]</tt></font></strong>
<a href=<TMPL_VAR HTTP>>
<TMPL_VAR HTTP>
</a><br>
</TMPL_IF>
<TMPL_IF NAME="FTP">
<strong><font color="green"><tt>[FTP]</tt></font></strong>
<a href=<TMPL_VAR NAME=FTP>>
<TMPL_VAR NAME=FTP>
</a><br>
</TMPL_IF>
<small>
Maintainer:
<TMPL_VAR NAME=MAINT>
</small>
<p>
</dd>
</TMPL_LOOP>
</TMPL_LOOP>
</dl>
</BODY></HTML>
<hr></pre>
To recap what we're looking at, there are two loops defined in the above
template, one inside the other: <code><TMPL_LOOP NAME=MIRR></code> and
<code><TMPL_LOOP NAME=SITES></code>. Note that the outside loop corresponds
to the name of the parameter key that we assigned when passing the data
construct to <code>param()</code>, and the name of the inside loop is the
same as the key associated with the groups inside the hash we created.
<p><br></p>
However, fine as the above may be for static data that we can simply type
into those anonymous hashes in the 'groups' listref, static data isn't
often what we get in the real world. Databases are updated, file contents
change - and we obviously need to reflect this in our HTML. So, let's take
a look at a code fragment that does this:
<pre><hr>
for $tld ( @tlds ){
# Set some temporary (per-loop) variables
my @sites;
my %row;
my %line;
# Here's the inner loop!
for ( grep /^$tld/, @mirr ){
# Parse the CSV into fields
my @rec;
my %site;
s/\\,/&comma;/g;
@rec = split /,/;
s/&comma;/,/g for @rec;
# Mirror listings don't require much data
$site{ http } = $rec[2];
$site{ ftp } = $rec[3];
$site{ maint } = $rec[4];
# Load it up!
push @sites, \%site;
}
# Outer loop vars
$row{ tld } = $tld;
$row{ country } = $country{ $tld };
# Ref to the inner loop, attached
$row{ sites } = \@sites;
# ...and load up the total into the array to be passed to param()
push @mirrs, \%row;
}
# Feed the data to the hungry HTML::Template object
$t -> param( MIRR => \@mirrs );
<hr></pre>
By the way, the data we're reading in looks like this:
<pre><hr>
AT,,http://www.luchs.at/linuxgazette/,,Rene Pfeiffer,nospam@here.please,
AT,,http://info.ccone.at/lg/,,Gerhard Beck,nospam@here.please,
BE,,http://linuxgazette.linuxbe.org/,,Cedric Gavage,nospam@here.please,
CA,,http://blue7green.crosswinds.net/hobbies/lg/,,Jim Pierce,nospam@here.please,
<hr></pre>
Now we have a highly dynamic chunk of code that will process the data that
we give it, generate the necessary data structure on the fly, and feed it
out to the template. <i>Voila!</i>
<p>
If you want to see the complete script that I wrote for this project, go <a
href="../issue97/misc/okopnik/mirrorgen.txt">here</a>; the template can be
found <a href="../issue97/misc/okopnik/mirrors.tmpl">here</a>. If you would
like to see the latest generated page, go <a
href="http://linuxgazette.net/mirrors.html">here</a>. If you would like to
change the way the page looks and do something great for the Linux
community, join the folks on the list and become a mirror maintainer:
commit some of your disk space and bandwidth and let the Linux Gazette
"mirrors and translations" person - that's me! - know about it <a
href="mailto:mirrors@linuxgazette.net">here</a>.
<p>
Happy Linuxing to all!
<hr>
<b>Source material: (I <i>was</i> going to write "References"... :)</b>
<p>
<pre>
perldoc perlreftut
perldoc perlref
perldoc HTML::Template
</pre>
<b>Motivation:</b>
<p>
My annoyance at the lack of good documentation for nested loops under
HTML::Template. :)
</p>
<!-- *** BEGIN author bio *** -->
<P> Ben is a Contributing Editor for Linux Gazette and a member of
The Answer Gang.
<!-- *** BEGIN bio *** -->
<P>
<IMG ALT="picture" SRC="../gx/2002/tagbio/ben-okopnik.jpg" WIDTH="199"
HEIGHT="200" ALIGN="left" HSPACE="10" VSPACE="10">
<em>
Ben was born in Moscow, Russia in 1962. He became interested in
electricity at age six--promptly demonstrating 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 resulting nightmares.
<p>Ben's 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. Having recently completed a seven-year
Atlantic/Caribbean cruise under sail, he is currently docked in Baltimore, MD,
where he works as a technical instructor for Sun Microsystems.
<p>Ben 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 © 2003, <A HREF="authors/okopnik.html">Ben Okopnik</A>. Copying license
<a href="http://linuxgazette.net/copying.html">http://linuxgazette.net/copying.html</a>
</p>
<p>
Published in Issue 97 of Linux Gazette, December 2003
</p>
</div>
</div>
<br />
<div class="content twdtarticle">
<h1>Songs in the Key of Tux: Songwrite</h1>
<p id="by"><b>By <A HREF="authors/oregan.html">Jimmy O'Regan</A></b></p>
</b>
</p>
<p>
<p>Hello and welcome to Songs in the Key of Tux. Over the next few issues I hope to introduce some of the many packages
available under Linux for musicians. The topics I intend to cover include guitar tablature (this article), music
typesetting, sound recording with home studio software such as Ardour and Ecasound, and creating electronic music
with some of the various synthesisers around.</p>
<p>If you have any questions or suggestions, please feel free to e-mail me, but please bear in mind that I use a dial-up
connection, and pay by the minute - so please don't send me sound files without clearing it with me first. If you think
I haven't covered something in enough detail, I'll be happy to go over it again - everything in this series is open to
suggestion, including the name (I was going to go with Tux#, but that might have confused Mono/.Net fans).</p>
<h2>Songwrite</h2>
<p>As well as a being a computer fanatic, I'm also a guitarist. In a recent lull between bands, I decided to start
learning music theory; or at least, enough to create my own tablature. A friend introduced me to GuitarPro on Windows,
which I still need to use for Internet access (Winmodem), and using it I eventually managed to learn enough of the
basics to create my own tablature.</p>
<p>I wasn't satisfied with this however, and searched in vain for a suitable Linux-based program. At first I tried
KGuitar, but it wouldn't compile for me, and the only binaries I found lacked MIDI support; I'm still learning, so I need
to hear a playback of almost everything I enter to make sure it's right.</p>
<img src="misc/oregan/songwrite-screen.png" alt="[Songwrite screenshot]" height="325" width="567">
<p>I saw Songwrite mentioned a few times, but was put off using it by the screen shots available on the program's website;
Songwrite is based on GTablature, but the author didn't appreciate the API changes of GNOME 2, and rewrote GTablature
using Tk, and renamed it Songwrite. I find Tk intolerably ugly, and try to avoid it whenever possible, but I was tempted
into giving Songwrite a try after seeing how far the program has come in the past year.</p>
<h2>Guitar Tablature</h2>
<p>Guitar tablature is the lingua franca of rock guitarists; many are self-taught, or received only basic instruction,
and do not read music. Tablature shows the fingering layout of a song, and is therefore easier for guitarists to
understand. Most of the tablature available on the Internet shows just the fingering for a song, in ASCII text. For
example, an E minor arpeggio looks like this:</p>
<pre>
e|-----------------0--------|
B|--------------0-----0-----|
G|-----------0-----------0--|
D|--------2-----------------|
A|-----2--------------------|
E|--0-----------------------|
</pre>
<p>However, in the past few years, several programs have become available which allow guitarists with some knowledge of
music theory to have their songs played back to them on the computer, removing the ambiguities of plain text, and the
need for guitarists who can't read sheet music to own the CD. It was only a matter of time before Linux guitarists would
feel the need themselves, and create software of their own.</p>
<img src="misc/oregan/songwrite-screen2.png" alt="[E-minor arpeggio]" height="325" width="567">
<p>Songwrite is one of the few tablature programs available for Linux, and despite its' early version (I'm using version
0.12), it is quite capable. Among its features are:</p>
<ul>
<li> MIDI import/export
<li> Printing (using Lilypond)
<li> GuitarPro 3/4 Import
<li> Multiple tracks
<li> ASCII import/export
<li> XML file format
<li> Songbook support
</ul>
<p>Songwrite does have its limitations though; for example it can only support x/4 and x/8 rhythms (though in practise
this isn't much of a problem), it has no support for harmonics, and though it supports string bends, it doesn't support
releasing the bend, or whammy bar type bends. Songwrite is under active development though, and important new features
are being added with each release, so it will hopefully only be a matter of time before it matches the software for
Windows; perhaps even beat them - none of those programs can handle non-standard harmonics; but Songwrite's interface
means it won't have to undergo any major overhaul to add this support.</p>
<img src="misc/oregan/songwrite-screen4.png" alt="[Note properties]" height="325" width="567">
<h2>GuitarPro support</h2>
<p>GuitarPro is the most popular of the Windows-based tablature programs, and several sites, such as MySongBook.com, have
been set up so that people can share their favourite tabs with one another, and other Windows programs support the format.
Supporting GuitarPro's format is therefore very important to anyone who wishes to make the transition from Windows, or to
gain access to the thousands of pre-made tabs available in this format.</p>
<p>Having previously tried a pre-release version of KGuitar, I didn't have high hopes for Songwrite's GuitarPro import.
There are several problems; it can't handle non-standard note durations (though it does support triplets), its recognition
of repeated bars and linked notes is hit and miss, it doesn't recognise tempo changes and it has difficulty importing
complicated tabs. Some of the features it lacks are not a problem when it comes to GuitarPro import, however; though it
has limited support for non standard time signatures, it still manages to play back simple files without a problem.</p>
<h2>Getting started</h2>
<p>When you first run Songwrite, you are faced with a blank screen. Entering notes is as simple as with other programs:
you click the line representing the string you wish to enter upon, and type in the number of the fret. To play it back,
simply hit the space bar.</p>
<p>Entering chords is just as easy; and as a bonus over other programs, Songwrite can copy and paste any combination of
notes and chords, rather than just individual bars. You simply select the area of music you wish to copy, and middle-click
to paste. This also allows you to place chord fragments on other string groups.</p>
<p>Another feature unique to Songwrite is the ability to enter notes at any point in a bar; in other tablature programs
you would have to enter rests before the next note. This is useful if you are transcribing music and aren't sure which
chord or note is being played, or if the music starts late in the bar - lead fills and vocal harmonies can be entered
much more quickly with this feature.</p>
<img src="misc/oregan/songwrite-screen3.png" alt="[Selecting an area of music]" height="325" width="567">
<h2>Things to watch out for</h2>
<p>When pasting, click on the highest string used in the chord. For example, if you wish to paste a G5 chord as a C5 chord,
then you should click on the G string. If you click lower, Songwrite will add extra strings to your fret layout.</p>
<pre>
e|-----------|
B|-----------|
G|--------5--|
D|--5-----5--|
A|--5-----3--|
E|--3--------|
G5 C5
</pre>
<p>If you try to do something Songwrite doesn't support, it may end up as part of your file. I've had it add strange
rhythms to files, thinking that the change had simply rejected. If you get an error message, use the Undo function, and
check to see if anything noticable has changed.</p>
<h2>The competition</h2>
<p>Songwrite has only two main competitors at the moment (though there are several programs to help with the preparation
of simple ASCII tabs) - KGuitar and Gnometab. KGuitar is possibly the best option for guitarists new to music theory; the
most recent version added the ability to click the rhythm of a riff with the mouse button - KGuitar then attempts to
figure out the note durations and time signature. I can't comment on how well this feature works, however, as I still
can't get it to compile. From the version I have tried, however, I can say that the chord tool is wonderful.</p>
<p>I haven't tried out Gnometab, so I can't comment on it; though I can say that it has the best looking interface of any
of the tablature programs I've seen.</p>
<h2>Examples</h2>
<p>For the more adventurous types who may be interested in using songwrite, I'm attaching a tarball of GuitarPro files. A
lot of them don't import, but I have confidence in the development of Songwrite, so I'm including them to "future-proof"
this article. For the time being, however, I've also included midi files, so you'll know what they should sound like in
the meantime. [<a href="misc/oregan/examples.tar.gz">examples.tar.gz</a>]</p>
<h2>Links</h2>
<ul>
<li><a href="http://oomadness.tuxfamily.org/en/songwrite/">Songwrite</a>
<li><a href="http://www.mysongbook.com/">MySongBook.com</a>
<li><a href="http://kguitar.sourceforge.net/">KGuitar</a>
<li><a href="http://www.solutionm.com/gnometab/gnometab.html">Gnometab</a>
</ul>
</p>
<!-- *** BEGIN author bio *** -->
<!-- *** BEGIN bio *** -->
<P>
<img ALIGN="LEFT" ALT="[BIO]" SRC="../gx/2002/note.png">
<em>
</em>
<br CLEAR="all">
<!-- *** END bio *** -->
<!-- *** END author bio *** -->
<div id="articlefooter">
<p>
Copyright © 2003, <A HREF="authors/oregan.html">Jimmy O'Regan</A>. Copying license
<a href="http://linuxgazette.net/copying.html">http://linuxgazette.net/copying.html</a>
</p>
<p>
Published in Issue 97 of Linux Gazette, December 2003
</p>
</div>
</div>
<br />
<div class="content twdtarticle">
<h1>Using DCOP from the command line</h1>
<p id="by"><b>By <A HREF="authors/oregan.html">Jimmy O'Regan</A></b></p>
</b>
</p>
<p>
<h2>Introduction</h2>
<p>DCOP is KDE's IPC/RPC mechanism. If you understood that sentence, please feel free to skip the next paragraph.</p>
<p>DCOP stands for Desktop COmmunications Protocol, IPC stands for Inter-Process Communication; RPC stands for Remote
Procedure Call. In essence, they are means by which two programs can communicate, whether on the same machine or across
a network. In this regard, DCOP is similar to Microsoft's OLE Automation: it provides a simple way for developers to
provide access to the functions available in an application.</p>
<p>KDE was originally attempting to build a CORBA-based component system (the GNOME project originally started as this
project, but became a desktop project in a disagreement over the license the Qt widget set was using), but it was decided
that CORBA was too complicated, and two simpler systems were introduced; KParts, for embedded components; and DCOP.</p>
<p>A DCOP enabled application registers at launch time with the DCOP daemon, and registers its functions. When queried,
the dcop daemon provides a list of running processes and the functions they provide. This enables a range of applications,
such as the DCOP browser, or the DCOP to XMLRPC daemon; but the one I'm going to look at is 'dcop', which allows shell
access to DCOP.</p>
<p>Unlike other systems, such as GNOME's Bonobo or Microsoft's Automation, DCOP does not provide an activation system;
only running processes are listed by DCOP. Activating the application is left up to the user.</p>
<p>This article is about using DCOP to control KDE applications from the command line; links are provided at the end of the
page to developer information for those who wish to delve deeper into this technology.</p>
<h2>Using DCOP from the command line</h2>
<p>The 'dcop' program provides command line access to the DCOP system. The syntax is:</p>
<pre>dcop [application] [object] [function] [arguments ...]</pre>
<p>To see which applications are available, enter 'dcop' with no arguments</p>
<pre>
$ dcop
khelpcenter
kwin
kicker
kword-4354
kded
knotify
kio_uiserver
kalarmd
kcookiejar
konsole-4300
korgac
klauncher
kdesktop
klipper
ksmserver
</pre>
<p>Let's have a look at klipper, the KDE clipboard service:</p>
<pre>
$ dcop klipper
qt
klipper
</pre>
<p>We can assume that klipper is the object we're looking for here; the default object (i.e., the one you want, to control
the application) is normally given the same name as the application, with or without "IFace" appended, or is marked as
"default":</p>
<pre>
$dcop klipper klipper
QCStringList interfaces()
QCStringList functions()
QString getClipboardContents()
void setClipboardContents(QString s)
void clearClipboardContents()
int newInstance()
void quitProcess()
</pre>
<p>Now, I think the most interesting functions here are setClipboardContents and getClipboardContents. In fact, I've been
using setClipboardContents in a konsole window to add the shell output above:</p>
<pre>dcop klipper klipper setClipboardContents "$(dcop klipper klipper)"</pre>
<p>Now, to be honest, this isn't the best example, as it's a lot quicker to use the mouse than to type that, but it can
become a lot more useful if set as an alias, e.g.</p>
<pre>alias klip="dcop klipper klipper setClipboardContents"</pre>
<p>I've always thought it would be useful to have post-it notes available from the shell - DCOP makes that possible.</p>
<pre>
$dcop knotes KNotesIface
QCStringList interfaces()
QCStringList functions()
int newNote(QString name,QString text)
int newNoteFromClipboard(QString name)
ASYNC showNote(int noteId)
ASYNC hideNote(int noteId)
ASYNC killNote(int noteId)
QMap<int,QString> notes()
ASYNC setName(int noteId,QString newName)
ASYNC setText(int noteId,QString newText)
QString text(int noteId)
ASYNC sync(QString app)
bool isNew(QString app,int noteId)
bool isModified(QString app,int noteId)
</pre>
<p>So let's add a note:</p>
<pre>dcop knotes KNotesIface newNote "A note" "Stuff I want to keep track of"</pre>
<p>Sure enough, a bright yellow note pops up. </p>
<p>Let's see what notes are available:</p>
<pre>
$dcop knotes KNotesIface notes
1->A note
</pre>
<p>After adding a few more nonsense notes, maybe I want to have them in a text file, so I wrote a silly script to go
with a silly idea:</p>
<pre>
#!/bin/bash
n=$(dcop knotes KNotesIface notes|awk -F- '{print $1}'|tail -1)
dcop knotes KNotesIface notes > $1
echo >> $1
for ((i=1;i<=$n;i++));do echo -n "$i: "; dcop knotes KNotesIface text $i;echo;done >> $1
</pre>
<h2>Summary</h2>
<p>DCOP is a powerful means to control KDE applications. As more and more developers recognise its usefulness, we get
closer to a nice blend of desktop eye candy and scriptability.</p>
<h2>Links</h2>
<ul>
<li><a href="http://developer.kde.org/documentation/library/kdeqt/dcop.html">Programming with DCOP</a>
<li><a href="http://developer.kde.org/documentation/books/kde-2.0-development/ch13.html">Chapter from KDE 2.0 Development</a>
</ul>
</p>
<!-- *** BEGIN author bio *** -->
<!-- *** BEGIN bio *** -->
<P>
<img ALIGN="LEFT" ALT="[BIO]" SRC="../gx/2002/note.png">
<em>
</em>
<br CLEAR="all">
<!-- *** END bio *** -->
<!-- *** END author bio *** -->
<div id="articlefooter">
<p>
Copyright © 2003, <A HREF="authors/oregan.html">Jimmy O'Regan</A>. Copying license
<a href="http://linuxgazette.net/copying.html">http://linuxgazette.net/copying.html</a>
</p>
<p>
Published in Issue 97 of Linux Gazette, December 2003
</p>
</div>
</div>
<br />
<div class="content twdtarticle">
<h1>A simple Pulse Width Modulation trick with Linux/RTAI</h1>
<p id="by"><b>By <A HREF="authors/pramode.html">Pramode C.E</A></b></p>
</b>
</p>
<p>
<p>
In an <a href="../issue95/pramode.html">
earlier article</a>, I had discussed the basics of realtime programming
with <a href="http://aero.polimi.it/projects/rtai/">Linux/RTAI</a>.
This article demonstrates a nice trick which you can do on your
home machine, provided you are willing to hook up a simple circuit
to your parallel port (and, of course, run an RTAI patched kernel). I
also demonstrate elementary use of:
<ul>
<li>Inter-task messages
<li>Mail boxes
</ul>
<p>
Be careful when you play with PC hardware - don't come looking for
me if you burn up something!
<h2>The Trick</h2>
<p>
You want to make an LED light up, slowly. It gets brighter,
brighter, brighter.... It should then
go off - again, little by little. This should keep on repeating.
By controlling the current flowing through it, we can control
the brightness of the LED - but trouble is, our PC parallel
port gives us only two voltage levels - low (0V) and high (around
5V). As this can't be varied, we will only be able to bring the LED
on and make it go off - instantaneously - which is not what we
would like to do.
<h2>Pulse Width Modulation</h2>
<p>
Imagine that you are cycling along a road, in a rather
peculiar way. You pedal hard for 3 seconds, then you sit
idle for 7 seconds - again, you pedal hard for 3 seconds
and sit idle for 7 seconds. If you keep on doing this, you
will cover the distance between two points in a certain amount
of time - by dividing the distance by time, you get an `average'
speed. What happens to this average speed if you increase the
amount of time pedalling? It surely goes up, and if you decrease
the pedalling time, it goes down. In a similar way, instead
of applying a constant DC voltage on the LED, we apply a signal
of a fixed frequency (say 1KHz, period of 1ms). The LED will burn
brightly if out of the total 1ms period, the signal stays high for
say .8ms and low for only .2ms. By varying the duty cycle of the
signal (keeping the frequency fixed), we will be able to deliver
variable levels of power to the circuit, making it brighter and
dimmer. We are now able to do analog control in a purely digital
manner!
<P>
<img alt="[waveforms]" src="misc/pramode/pwm.png" width="247" height="159">
</P>
<h2>The Hardware</h2>
<p>
You won't need anything more than an LED (preferably a bright one)
and a 1K resistor. The resistor and the LED should be connected
in series between pin number 2 (an output pin) and pin number 25
(ground) of the parallel port. The 8 output pins (2 to 9) of the
parallel port can be accessed via IO port 0x378. Writing a 1 to
0x378 will result in only pin number 2 going high; writing 0xff will
result in all pins going high - you write some other pattern and
you can control the logic level at any of the pins.
</p>
<P>
<img alt="[LED schematic]" src="misc/pramode/led.png" width="160" height="78">
</P>
<p>
The resistor is to limit the current flowing through the
circuit to a few milli amps. The trouble is that the LED
will burn only feebly when you limit the current through it.
A solution is to use a transistor as a switch.
<h2>The Software</h2>
<p>
The basic idea is simple - we write a real-time task
which will turn on the LED, sleep for some time, turn
it off, and again sleep for some time. The total
on plus off time is 1ms. Initially, the on time would be
0 and off time, 1ms. In the next iteration, the on time
would become 1*1microsecond and off time would become
(1ms - on time). In the next iteration, the on time would
be 2*1microsecond, and so on. In the 1000th iteration
on time would be 1000*1microsecond, ie 1ms and off time would
be (1ms - on time), which would be 0. Once we reach here,
we start bringing down the on time so that it ultimately
becomes 0 and off time becomes 1ms. This process is repeated.
So, in 1 seconds time (each iteration takes 1ms, and
we have 1000 iterations), the LED will go from off to the brightest
possible level and in the next 1 second, it comes down to its
off state slowly.
<p>
Here is the code which implements this idea:
<pre>
#include <linux/kernel.h>
#include <linux/module.h>
#include <rtai.h>
#include <rtai_sched.h>
#define STACK_SIZE 4096
#define MIN_ON_PERIOD 0
#define TOTAL_PERIOD 1000000 /* 1ms */
#define NSTEPS 1000
#define STEP_PERIOD 1000
#define LPT1 0x378
static RTIME on_time, off_time, total_period;
static RT_TASK my_task;
enum direction {DOWN, UP};
static void pwm_task(int n)
{
int step = 0;
static int dir = UP;
while(1) {
outb(0xff, LPT1);
rt_sleep(on_time);
outb(0x0, LPT1);
rt_sleep(off_time);
if(step == NSTEPS) {
dir = !dir;
step = 0;
}
step++;
if(dir == UP) on_time = nano2count(step*STEP_PERIOD);
else if(dir == DOWN) on_time = total_period - nano2count(step*STEP_PERIOD);
off_time = total_period - on_time;
}
}
int init_module(void)
{
RTIME now;
rt_set_oneshot_mode();
rt_task_init(&my_task, pwm_task, 0, STACK_SIZE, 0, 0, 0);
start_rt_timer(0);
on_time = nano2count(MIN_ON_PERIOD);
off_time = nano2count(TOTAL_PERIOD);
total_period = nano2count(TOTAL_PERIOD);
now = rt_get_time() + total_period;
rt_task_make_periodic(&my_task, now, total_period);
return 0;
}
void cleanup_module(void)
{
stop_rt_timer();
rt_busy_sleep(10000000);
rt_task_delete(&my_task);
}
</pre>
The pwm_task's code should be easy to understand.
<p>
Because RTAI ensures us that realtime tasks would always
meet their deadlines, penalizing only non-realtime tasks,
we see that the PWM generation process continues smoothly
even when the system is heavily loaded. The time `step' of
1 microsecond in our code will be difficult for RTAI to
achieve, but we won't be getting any visual indications
regarding it (unless we use an oscilloscope to watch the
waveform). Also, ours is just a `fun' program!
<h2>Sending Messages</h2>
<p>
Tasks can send messages to each other - a message is a simple integer value.
Here is a small program which demonstrates message passing:
<pre>
#include <linux/module.h>
#include <rtai.h>
#include <rtai_sched.h>
#define LPT1_BASE 0x378
#define STACK_SIZE 4096
#define TIMERTICKS 1000000000
static RT_TASK tasks[2];
static void task_sender(int t)
{
int msg = 0xab;
RT_TASK *r;
r = rt_send(&tasks[1], msg);
rt_printk("sender: r = %x\n", r);
}
static void task_receiver(int t)
{
int msg;
RT_TASK *r;
r = rt_receive(&tasks[0], &msg);
rt_printk("receiver: msg = %x\n", msg);
rt_printk("receiver: r = %x\n", r);
}
int init_module(void)
{
RTIME tick_period, now;
rt_set_periodic_mode();
rt_task_init(&tasks[0], task_sender, 0, STACK_SIZE, 0, 0, 0);
rt_task_init(&tasks[1], task_receiver, 0, STACK_SIZE, 0, 0, 0);
rt_printk("sender = %x\n", &tasks[0]);
rt_printk("recevier = %x\n", &tasks[1]);
tick_period = start_rt_timer(nano2count(TIMERTICKS));
now = rt_get_time();
rt_task_make_periodic(&tasks[1], now + tick_period, tick_period);
rt_task_make_periodic(&tasks[0], now + 2*tick_period, tick_period);
return 0;
}
void cleanup_module(void)
{
stop_rt_timer();
rt_busy_sleep(10000000);
rt_task_delete(&tasks[0]);
rt_task_delete(&tasks[1]);
}
</pre>
The recevier task starts executing at the next timer tick. It immediately
inovkes rt_receive. The first argument is address of the RT_TASK object
corresponding to the sender task. Because the sender is not yet active,
task_receive blocks. At the next timer tick, task_sender becomes active
and sends the `message' 0xab to task_receiver. The receiver task comes out
of the block and prints the received message as well as the address of the
RT_TASK object corresponding to the sender task.
<h2>Using Mailboxes</h2>
<p>
A mailbox is a convenient mechanism using which multiple tasks
can communicate with each other. Let's look at a small program:
<pre>
#include <linux/module.h>
#include <rtai.h>
#include <rtai_sched.h>
#define LPT1_BASE 0x378
#define STACK_SIZE 4096
#define TIMERTICKS 1000000000
static RT_TASK tasks[2];
static MBX my_mbx;
static void task_sender(int t)
{
int msg = 0x12cd, r;
r = rt_mbx_send(&my_mbx, &msg, sizeof(msg));
rt_printk("sender: r = %d\n", r);
}
static void task_receiver(int t)
{
int msg, r;
r = rt_mbx_receive(&my_mbx, &msg, sizeof(msg));
rt_printk("receiver: msg = %x\n", msg);
rt_printk("receiver: r = %d\n", r);
}
int init_module(void)
{
RTIME tick_period, now;
rt_set_periodic_mode();
rt_task_init(&tasks[0], task_sender, 0, STACK_SIZE, 0, 0, 0);
rt_task_init(&tasks[1], task_receiver, 0, STACK_SIZE, 0, 0, 0);
rt_mbx_init(&my_mbx, 4*sizeof(int));
tick_period = start_rt_timer(nano2count(TIMERTICKS));
now = rt_get_time();
rt_task_make_periodic(&tasks[1], now + tick_period, tick_period);
rt_task_make_periodic(&tasks[0], now + 2*tick_period, tick_period);
return 0;
}
void cleanup_module(void)
{
stop_rt_timer();
rt_busy_sleep(10000000);
rt_mbx_delete(&my_mbx);
rt_task_delete(&tasks[0]);
rt_task_delete(&tasks[1]);
}
</pre>
<p>
A mailbox is represented by a static variable of type MBX. We create a new
mailbox by calling rt_mbx_init. The second argument is the size of the mailbox.
The sender task calls rt_mbx_send and stores a message `msg' of size
`sizeof(msg)' in the mailbox. The receiver task receives the message by
calling rt_mbx_receive. The receiver will block until all the bytes of the
message have been received (or until some error occurs).
<h2>Conclusion</h2>
<p>
I started exploring Linux/RTAI out of curiosity, but I am being tempted to
learn more. I hope my excitement becomes contagious and more readers start
tinkering on their own. Just don't forget to tell us about your experiments!
</p>
<!-- *** BEGIN author bio *** -->
<!-- *** BEGIN bio *** -->
<P>
<img ALIGN="LEFT" ALT="[BIO]" SRC="../gx/2002/note.png">
<em>
I am an instructor working for IC Software in Kerala, India. I would have loved
becoming an organic chemist, but I do the second best thing possible, which is
play with Linux and teach programming!
</em>
<br CLEAR="all">
<!-- *** END bio *** -->
<!-- *** END author bio *** -->
<div id="articlefooter">
<p>
Copyright © 2003, <A HREF="authors/pramode.html">Pramode C.E</A>. Copying license
<a href="http://linuxgazette.net/copying.html">http://linuxgazette.net/copying.html</a>
</p>
<p>
Published in Issue 97 of Linux Gazette, December 2003
</p>
</div>
</div>
<br />
<div class="content twdtarticle">
<h1>Let There Be Music</h1>
<p id="by"><b>By <A HREF="authors/shuveb.html">Shuveb Hussain</A></b></p>
</b>
</p>
<p>
<p>
Linux multimedia has been a field buzzing with activity. Many open minds have now contributed to make Linux a decent multimedia platform. Today many projects exist that make a large number of multimedia activities possible under Linux. If you need a good introduction to various sound utilities under Linux, you should read an excellent previous article on Linux Gazette found <a href="../issue47/ayers.html">here</a>.
</p>
<p>
I wanted to include sound in one of the apps I was writing and began googling the web. I learnt that there are many libraries that make it possible to decode common compressed sound file formats like Ogg Vorbis or MP3. Playing sound on to your speakers is no big deal either. In this article, we'll see how to decode Ogg Vorbis and MP3 files by writing simple programs. This article has been written with beginners in mind, so Linux gurus, sorry for too much explanation of the simple stuff.
</p>
<h3>
Programming the Sound Card
</h3>
<p>
Before we actually get into the details of programming the sound card, it would be actually helpful to know how sound data is recorded, stored and played back on our computers.
</p>
<h4>
Sampling
</h4>
<p>
When sound is to be recorded, we ought to choose the quality at which we want to do it. One main criterion that determines sound quality is the sampling rate. Take for example music, it is just frequency that varies over time. If we want to record sound digitally, we note down the frequency of the sound at a fixed rate. This is known as the sampling rate. The higher the sampling rate, the better the quality of the music. For example, CD quality audio has a sampling rate of 44100 per second or 44100 Hz. This technique is used by devices called ADCs or Analogue to Digital Converters and is called Pulse Code Modulation or PCM.
</p>
<h4>
Bits and Channels
</h4>
<p>
When sound is sampled, fixed number of bits are used per sample and there are one are more channels. The number of bits at which the data is sampled is known as the resolution of the sampling. The most common form is a 8 bit unsigned byte or 16 bits. Data for different channels is maintained separately. For example, CD audio has two channels, Left and Right (Stereo). If you make a simple calculation, to record CD quality audio at a resolution of 8 bits, for 1 second it would take:
<p>
<pre>
2 x 44100 = 88200 bytes
(Number of channels x sampling rate)
</pre>
<p>
Now that we have enough information on the theory lets get started with the actual programming. There are actually a few ways to program the sound card. In the early Linux days, when drivers were being written, two separate groups were formed. Open Sound System or OSS was a group that wrote many device drivers and even included binary modules from sound card manufacturers who were reluctant to provide hardware specifications, or provided specs, but not without the driver developer signing an non-disclusure agreement. Since the hardware guys were reluctant to give out specs to individuals, OSS went on to create 4Front Technologies, a company. One more group ALSA, or Advanced Linux Sound Architecture wrote drivers only for those sound cards whose manufacturers were ready to give out specifications. ALSA drivers are now very popular. They have been included in the 2.6-test kernel too.
</p>
<p>
Note that ALSA provides an OSS emulation layer, so if you program for OSS your program might work on systems with OSS or ALSA. In this article, I'll try and explain OSS programming since it's simple and is present in majority of the systems.
</p>
<p>
Remember that under UNIX/Linux, all the device drivers have a file system interface, usually under the /dev directory. Most of the file related sytem calls like open,read,write,lseek,close work on these devices. The device files may be considered hooks in the file system from where the device drivers keep listening for requests. As an example, the file /dev/hda1 is the file that represents the interface for the first partition on the primary master IDE hard disk. If you open it using the open system call, you would be returned a file handle like in all file operations. If you now try and read from it, you would actually read data from the first sector of this partition! Similarly, a forward lseek will move the file pointer forward. To skip a sector, you'd lseek forward the size of a sector. Please don't fiddle around with your hard disk device file, its rather dangerous. Writing rubbish on to the partition will render it unuseable. You'll mostly have direct access to hardware devices only as root.
</p>
<p>
Having said that, lets move on to some code. This code should run as non-root without issues. In case there are problems accessing the device file, su as root and chmod and grant access. Ofcourse you should have a sound card thats known to work under Linux. Save typing by getting the source from <a href=misc/shuveb/oss.c.txt>here</a>. Don't forget to download the <a href=misc/shuveb/demo.pcm>demo.pcm</a> file.
</p>
<pre>
/*
oss.c plays a raw PCM 22KHz sample sound on the sound card
Important - Make sure the demo.pcm file is is the current directory
before you attempt to run this program.
*/
#include < sys/types.h >
#include < sys/stat.h >
#include < sys/soundcard.h >
#include < sys/ioctl.h >
#include < unistd.h >
#include < fcntl.h >
#include < errno.h >
#include < stdlib.h >
#define SECONDS 5 //playback seconds
int main()
{
int fd;
int handle = -1;
int channels = 1; // 0=mono 1=stereo
int format = AFMT_U8;
int rate = 22000;
unsigned char* data;
/* Open the file corresponding to the soundcard for writing, DSP stands for Digital Signal Processor */
if ( (handle = open("/dev/dsp",O_WRONLY)) == -1 )
{
perror("open /dev/dsp");
return -1;
}
/* Tell the sound card that the sound about to be played is stereo. 0=mono 1=stereo */
if ( ioctl(handle, SNDCTL_DSP_STEREO,&channels) == -1 )
{
perror("ioctl stereo");
return errno;
}
/* Inform the sound card of the audio format */
if ( ioctl(handle, SNDCTL_DSP_SETFMT,&format) == -1 )
{
perror("ioctl format");
return errno;
}
/* Set the DSP playback rate, sampling rate of the raw PCM audio */
if (ioctl(handle, SNDCTL_DSP_SPEED,&rate) == -1 )
{
perror("ioctl sample rate");
return errno;
}
// rate * 5 seconds * two channels
data = malloc(rate*SECONDS*(channels+1));
if((fd=open("demo.pcm",O_RDONLY))==-1)
{
perror("open file");
exit(-1);
}
/* read the data contained in the demo file to the allocated memory */
read(fd,data,rate*SECONDS*(channels+1));
close(fd);
/* just write the data to the sound card! This will play it. */
write(handle, data, rate*SECONDS*(channels+1));
if (ioctl(handle, SNDCTL_DSP_SYNC) == -1)
{
perror("ioctl sync");
return errno;
}
free(data); //Be good, clean up.
close(handle);
printf("\nDone\n");
return 0;
}
</pre>
<p>
The program listed above plays a raw PCM, 22 KHz, Stereo data file for 5 seconds. The program does three simple things:
<br><br>
a. Opens the sound device<br>
b. Sets the playback parameters<br>
c. Writes the data to the device
<p>
The open()/write()/close() system calls are the same ones used for normal files. To set the device playback parameters, we use the ioctl() (Input/Output Control) system call. The ioctl() system call is used to communicate with I/O devices and set their parameters. It might also be seen as a trick to decrease the number of invidual system calls. Its known as the programmer's swiss army knife. The signature of the ioctl() sytem calls is :<br><br>
int ioctl(int fd, int command, ...)
</p>
<p>
The first parameter is the file descriptor of the device, the second parameter is the request/command passed to the device and the rest of the parameters are command specific [See man ioctl_list for a list of commands]. Examine this:<br><br>
ioctl(handle, SNDCTL_DSP_SPEED,&rate)
</p>
<p>
This ioctl() call sets the DSP playback rate, the third parameter is the actual rate passed to the device driver.
</p>
<p>
There are three main ioctl() calls used in the example program. The first one sets the number of channels to be used for playback, the second one sets PCM format and the third, the rate. Since this is all the device needs to know, we next write the PCM data right on to the device file and the device plays it for us. We then flush the device with the final ioctl() and release the memory allocated for the PCM data. Thats it, we are done.
</p>
<h4>
Music storage formats
</h4>
<p>
Man, just to play 5 seconds of 22KHz sound data in the previous example, 220 KB of raw PCM data was needed.
<pre>
22,000 x 5 x 2 = 220,000
(sample x seconds x channels)
So to play 1 minute of CD Quality audio, one would need:
44,100 x 60 x 2 = 5292000 bytes or roughly 5 MB!
</pre>
<p>
Audio CDs store raw PCM data, but to store music efficiently in computers, and to stream or share it over the Internet, music is compressed to reduce file size and decompressed on the fly during playback. If you can see, the sampling rate is fixed, no matter what the nature of the music being played. Imagine silence being sampled for a few seconds, it would still consume the same amount of space as a loud rock number would for the same given time. Raw audio files don't compress well since there is very little data repetition which is important for good compression. Different audio formats use different techniques to reduce the size of the resulting file. The most common technique is to remove sound that the human ear doesn't care about, or to compress the audio stream depending on the music being played. The most popular format for music lovers is unargueably MP3. Since MP3 is now shrouded in patent issues, Ogg Vorbis is now welcome among members of the open source community. Both formats achieve the same reduction in size and are able to maintain audio quality with minimal loss.
</p>
<p>
Lets see how to play Ogg Vorbis files on our system, since we know how to tell the sound card to play raw audio data. For us to play Ogg Vorbis format files, we first need to decode it or in other words, convert it to raw PCM data. This will be done by libvorbisfile. This library presents decoding at much a higher level than libvorbis, which is quite low level, but allows relatively more fine grained control. Its really simple from here: We provide the library with the input data from a Ogg Vorbis file and the library provides us with the decoded raw PCM format data which we feed right into to sound card. Source available <a href=misc/shuveb/oggplay.c.txt>here</a>
</p>
<pre>
#include < sys/types.h >
#include < sys/stat.h >
#include < sys/soundcard.h >
#include < sys/ioctl.h >
#include < unistd.h >
#include < fcntl.h >
#include < errno.h >
#include < stdlib.h >
#include "vorbis/codec.h"
#include "vorbisfile.h"
int setup_dsp(int fd,int rate, int channels);
char pcmout[4096]; // 4KB buffer to hold decoded PCM data.
int dev_fd;
int main(int argc, char **argv)
{
OggVorbis_File vf;
int eof=0;
int current_section;
FILE *infile,*outfile;
if(argc<2)
{
printf("supply file arguement\n");
exit(0);
}
if ( (dev_fd = open("/dev/dsp",O_WRONLY)) == -1 )
{
perror("open /dev/dsp");
return -1;
}
infile=fopen(argv[1],"r");
if(infile==NULL)
{
perror("fopen");
exit(-1);
}
if(ov_open(infile, &vf, NULL, 0) < 0)
{
fprintf(stderr,"Input does not appear to be an Ogg bitstream.\n");
exit(1);
}
char **ptr=ov_comment(&vf,-1)->user_comments;
vorbis_info *vi=ov_info(&vf,-1);
while(*ptr)
{
fprintf(stderr,"%s\n",*ptr);
++ptr;
}
fprintf(stderr,"\nBitstream is %d channel, %ldHz\n",vi->channels,vi->rate);
fprintf(stderr,"\nDecoded length: %ld samples\n",(long)ov_pcm_total(&vf,-1));
fprintf(stderr,"Encoded by: %s\n\n",ov_comment(&vf,-1)->vendor);
if(setup_dsp(dev_fd,vi->rate,vi->channels-1))
{
printf("dsp setup error.aborting\n");
exit(-1);
}
int count=0;
while(!eof)
{
long ret=ov_read(&vf,pcmout,sizeof(pcmout),0,2,1,&current_section);
if (ret == 0)
{
/* EOF */
eof=1;
}
else if (ret < 0)
{
/* error in the stream. Not a problem, just reporting it in
case we (the app) cares. In this case, we don't. */
}
else
{
printf("Writing %d bytes for the %d time.\n",ret,++count);
write(dev_fd,pcmout,ret);
}
}
ov_clear(&vf);
fclose(infile);
if (ioctl(dev_fd, SNDCTL_DSP_SYNC) == -1)
{
perror("ioctl sync");
return errno;
}
close(dev_fd);
fprintf(stderr,"Done.\n");
return(0);
}
int setup_dsp(int handle,int rate, int channels)
{
int format;
if ( ioctl(handle, SNDCTL_DSP_STEREO,&channels) == -1 )
{
perror("ioctl stereo");
return errno;
}
format=AFMT_U8;
if ( ioctl(handle, SNDCTL_DSP_SETFMT,&format) == -1 )
{
perror("ioctl format");
return errno;
}
if ( ioctl(handle, SNDCTL_DSP_SPEED,&rate) == -1 )
{
perror("ioctl sample rate");
return errno;
}
return 0;
}
</pre>
<br>
To compile this program use the following command
<pre>
gcc oggplay.c -oggplay -lvorbisfile -I/path/to/vorbis/header/files -L/path/to/vorbis/lib/files
</pre>
<p align=justify>
If the library file or the header files are in the usual locations like /usr/lib and /usr/include, then you can skip the -I and -L command line switches. All major distibutions ship with the vorbisfile lbrary, if your system doesn't seem to have it installed, you can always download it from <a href=http://www.vorbis.com/download_unix.psp>here</a>. You can also visit the Ogg Vorbis site <a href=http://www.xiph.org/ogg/vorbis/>here</a>. You need the development header files if you need to compile the program.
</p>
<p align=justify>
The setup_dsp function opens the dsp device, sets the three main parameters, channels, format and rate. You need to remember that these are the three most important parameters to set for audio playback. In the main function, other than the error checking, we have only two main things going on. The Ogg Vorbis file supplied as shell arguement is opened and user comments and information about it is printed. The sampling rate and channel information is extracted from the information structure filled up by the ov_open() library function and passed on to the setup_dsp function. The program then enters a loop where bytes decoded from the Ogg Vorbis file stream and placed into a buffer. This raw PCM data contained in the buffer is then played by writing to the dsp device which has already been setup. This loop continues until end-of-file is reached, finally things are cleaned up and exit happens. That wasn't difficult or was it? Thanks to libvorbisfile, decoding is so easy and straightforward.
</p>
<p align=justify>
To decode Ogg Vorbis files, the obvious choice is libvorbisfile, but if you want to decode and play MP3 files, there are a lot of libraries that can do the job. One library thats popular is the <a href=http://www.lokigames.com/development/smpeg.php3>smpeg</a> library which is capable of decoding both video and audio streams. One more library I came across is <a href=http://www.underbit.com/products/mad/>libmad</a>. We'll select smpeg and use its audio decoding capabilities alone. You can further explore its MPEG video decoding capabilities if you are interested. A sample application plaympeg is also provided that demonstrates the useage of the library. For Video playback, smpeg uses <a href=http://libsdl.org>SDL</a>, which is a very simple to use yet a very capable graphics prgramming library. There are many many more libraries around, but smpeg is provided by many Linux distributions and that made me choose it. The popular gtv MPEG video player is a part of the smpeg package.
</p>
<p align=justify>
Here is an example program that plays MP3 files. Please note that smpeg library plays the decoded MP3 stream directly on the sound card. We don't get to handle any PCM stuff. Also available <a href=misc/shuveb/playmp3.c.txt>here</a>
</p>
<pre>
#include < stdio.h >
#include < stdlib.h >
#include < string.h >
#include < signal.h >
#include < unistd.h >
#include < errno.h >
#include < sys/types.h >
#include < sys/stat.h >
#include < sys/ioctl.h >
#include < sys/time.h >
#include "smpeg.h"
void usage(char *argv0)
{
printf("\n\nHi,\n\n%s <filename>\n\nThis is the normal useage.\n",argv0);
}
int main(int argc, char *argv[])
{
int volume;
SMPEG *mpeg;
SMPEG_Info info;
volume = 100; //Volume level
/* If there were no arguments just print the usage */
if (argc == 1)
{
usage(argv[0]);
return(0);
}
mpeg = SMPEG_new(argv[1], &info;, 1);
if ( SMPEG_error(mpeg) )
{
fprintf(stderr, "%s: %s\n", argv[1], SMPEG_error(mpeg));
SMPEG_delete(mpeg);
}
SMPEG_enableaudio(mpeg, 1);
SMPEG_setvolume(mpeg, volume);
/* Print information about the audio */
if ( info.has_audio )
{
printf("%s: MPEG audio stream\n", argv[1]);
if ( info.has_audio )
printf("\tAudio %s\n", info.audio_string);
if ( info.total_size )
printf("\tSize: %d\n", info.total_size);
if ( info.total_time )
printf("\tTotal time: %f\n", info.total_time);
/* Play it, and wait for playback to complete */
SMPEG_play(mpeg);
while(SMPEG_status(mpeg)==SMPEG_PLAYING);
SMPEG_delete(mpeg); //release the struct
}
return(0);
}
</pre>
<p align=justify>
You need to compile this program after you install smpeg which can be found <a href=http://www.lokigames.com/development/smpeg.php3>here</a>. Please note that smpeg needs SDL to be installed as a pre-requisite. To complie, you need to provide the paths to include files and library files. To make this process easy, the smpeg package provides a simple utility named smpeg-config. Compile the program with the following command:
</p>
<pre>
gcc playmp3.c `smpeg-config --cflags --libs` -I/usr/include/SDL
</pre>
<p>
Please note that its not the single quote character that encloses the smpeg-config command, its the character thats present along with the tilde (~) character in US layout keyboards, sometimes called a backquote. This character instructs the shell to inject the output of the enclosed command into the actual command line. If you run the smpeg-config command separately, you'll know what I am talking about. Replace the -I/usr/include/SDL command option with -I < your SDL path >. Even though we don't use any of the SDL functions, we need to provide gcc with the SDL header file path because smpeg.h uses it internally. RPM users should install both the smpeg and the smpeg-devel packages for the program to compile.
</p>
<p>
The library function SMPEG_new allocates a new internal object, while filling up an SMPEG_info structure which contains information about the MP3 file. In the program this information is printed and playback begins by calling SMPEG_play. Thing is this call returns immediately which is really good when you're dealing with MP3s in an application program because it lets you do other things. Since we have nothing else to do in the program, we wait until the file has finished playing. SMPEG_delete then releases memory previously allocated by the library and we are done.
</p>
<p>
I hope this article finds use in some of your programing ventures. I'd like to hear from you folks. Do get in touch for any clarifications or criticism. I can be reached through <a href= mailto:shuveb@shuvebhussain.org>shuveb@shuvebhussain.org</a>.
</p>
<i>
<b>Linux Zindabad</b><br>
(Means long live Linux, in Hindi which is India's primary and national language)
</i>
</p>
<!-- *** BEGIN author bio *** -->
<!-- *** BEGIN bio *** -->
<P>
<img ALIGN="LEFT" ALT="[BIO]" SRC="../gx/2002/note.png">
<em>
Shuveb is a pervert by social compulsion sitting in a
small but historical city in southern India. He thinks
life is neither a Midsummer Night's Dream nor a
Tempest, it's simply a Comedy Of Errors, to be lived As
You Like It. Apart from being a part time philosopher,
he is a seasoned C programmer who is often in
confusion about what the * does to a pointer
variable.... APR Bristol is the company that pays him
for learning Linux.
</em>
<br CLEAR="all">
<!-- *** END bio *** -->
<!-- *** END author bio *** -->
<div id="articlefooter">
<p>
Copyright © 2003, <A HREF="authors/shuveb.html">Shuveb Hussain</A>. Copying license
<a href="http://linuxgazette.net/copying.html">http://linuxgazette.net/copying.html</a>
</p>
<p>
Published in Issue 97 of Linux Gazette, December 2003
</p>
</div>
</div>
<br />
<div class="content twdtarticle">
<h1>A Look At Jython</h1>
<p id="by"><b>By <A HREF="authors/tougher.html">Rob Tougher</A></b></p>
</b>
</p>
<p>
<div id="abstract">
<p>
This article discusses Jython, a software project that aims to provide seamless integration
between Java and Python. This article requires a basic understanding of both
languages.
</p>
</div>
<h2>
Introduction
</h2>
<p>
There are many different programming languages.
<a href="http://people.ku.edu/~nkinners/LangList/Extras/langlist.htm">The Language List</a>, a comprehensive
database of computer languages, puts the number at around 2500.
Having different languages is advantageous to developers -
each language has features that are well-suited to
certain classes of problems. For example, when I'm transforming XML, XSLT
is my tool of choice (this is a popular method of rendering HTML for dynamic web sites). When
coding server-based applications, I prefer languages such as
Java, C++ and Python. I think the general advice for programmers is to "use the right tool
for the job".
</p>
<p>
One noticeable drawback in this abundance of languages is the inability (or extreme difficulty)
in reusing code written in one language from another
language. For example, say you had written a database library in Java, and wanted to
reuse that library in Python. You could write a glue layer, using a technology
like COM, CORBA, sockets, or SOAP,
but that layer would take time to write. It would be nice if this glue layer already existed,
ready to be consumed with little or no effort expended.
</p>
<p>
Enter <a href="http://www.jython.org">Jython</a>. The goal of the Jython project is to provide
seamless integration between Java and Python. The project contains two main tools:
</p>
<ul>
<li><b><a href="http://www.jython.org/docs/interpreter.html">jython</a></b> - a Python interpreter
written in 100% pure Java. This interpreter allows you to use Java classes in your Python programs.</li>
<li><b><a href="http://www.jython.org/docs/jythonc.html">jythonc</a></b> - a Python compiler that
compiles Python source code into Java bytecode. The
resulting Java bytecode can be interpreted by any standard Java Virtual Machine.</li>
</ul>
<p>
This article provides a basic introduction to Jython. First I'll
describe installation, next I'll talk about the jython interpreter, and I'll finish up
with a discussion of the jythonc compiler. I'll use the following naming conventions when
referring to the different interpreters, compilers, and projects:
</p>
<ul>
<li><b>jython</b> - with a lowercase j, refers to the <a href="http://www.jython.org/docs/interpreter.html">jython
interpreter</a></li>
<li><b>jythonc</b> - refers to the <a href="http://www.jython.org/docs/jythonc.html">jythonc compiler</a></li>
<li><b>Jython</b> - with a capital J, refers to the entire <a href="http://www.jython.org">Jython project</a>.
This project includes the jython interpreter and the jythonc compiler.</li>
<li><b>CPython</b> - refers to the <a href="http://www.python.org">C implementation</a> of Python. This
is the implementation that most people are familiar with.</li>
<li>
<b>Python</b> - refers to the language itself. I'll use this term when discussing implementation-independent
Python concepts.
</li>
</ul>
<h2>
Installation
</h2>
<p>
To use Jython on your system you need two pieces of software: the Java SDK, and the
Jython distribution.
</p>
<p>
You can get Sun's latest Java SDK for Linux (1.4.2) at the <a href="http://www.javasoft.com">main Java site</a>.
Sun distributes the SDK as a single binary file that you can download and run on
your Linux machine. After the install completes, the remaining step is to create an environment variable named
JAVA_HOME, and set its value to the root directory of the Java installation. I set this variable as part of
my ~/.bashrc file:
</p>
<pre class="code">
#
# For the 1.4.2 sdk
#
export JAVA_HOME=~/apps/j2sdk1.4.2_01
export PATH=~/apps/j2sdk1.4.2_01/bin:$PATH
</pre>
<p>
Notice that I set the PATH environment variable also - I do this so that I can access the Java command
line tools (java, javac, jar, etc) from any directory.
</p>
<p>
The latest release of Jython (2.1) is distributed from the <a href="http://www.jython.org">main Jython site</a>. The
Jython project provides a graphical installer written in Java and packaged as a single Java
*.class file. When you run the installer you are presented
with a graphical setup wizard, which asks you to specify the installation type, agree to the license
terms, and specify the target directory for installation. When the install completes, you are ready to
use Jython on your machine. It is useful to update your PATH and CLASSPATH variables
to point at the newly installed Jython distribution. I do this in my ~/.bashrc file:
</p>
<pre class="code">
#
# For Jython
#
export JYTHON_HOME=~/jython-2.1/
export PATH=$JYTHON_HOME:$PATH
export CLASSPATH=$JYTHON_HOME/jython.jar:$CLASSPATH
</pre>
<p>
To check that your installation succeeded, type "jython" at the command prompt:
</p>
<pre class="code">
<b>prompt$</b> jython
Jython 2.1 on java1.4.2_01 (JIT: null)
Type "copyright", "credits" or "license" for more information.
>>>
</pre>
<p>
If you see the above, you've successfully installed Jython.
</p>
<h2>
Using The Jython Interpreter
</h2>
<p>
The <a href="http://www.jython.org/docs/interpreter.html">jython interpreter</a> is a Python interpreter
implemented in 100% Java. It allows you to write Python code that accesses Java classes.
</p>
<p>
The latest stable version of jython, released in December of 2001, implements features of
Python 2.1. Python, however, has already reached version 2.3. This means that Python features
unique to versions 2.2 and 2.3 are unavailable in the current stable version of jython:
</p>
<ul>
<li>
<a href="http://www.python.org/doc/2.2.3/whatsnew/whatsnew22.html">New in Python 2.2</a>
<ul>
<li>deriving from built-in types</li>
<li>attribute and method descriptors</li>
<li>changes to the class lookup algorithm for complicated class hierarchies</li>
<li>new built-in methods for attribute access</li>
<li>iterators</li>
<li>generators</li>
</ul>
</li>
<li>
<a href="http://www.python.org/doc/2.3.2/whatsnew/whatsnew23.html">New in Python 2.3</a>
<ul>
<li>new boolean and set data types</li>
<li>source code encodings</li>
<li>importing from zip archives</li>
<li>universal newline support</li>
<li>an enumerate function for clearer iterative loops</li>
<li>new import hooks</li>
</ul>
</li>
</ul>
<p>
An alpha version of jython, available for download at the Jython site, implements a
mixture of Python 2.1 and 2.2. The Jython group characterizes this alpha version
as an unstable and experimental release that contains significant known issues. In other words,
use the alpha version at your own risk.
</p>
<p>
Besides lacking recent Python language features, jython is missing some Python
modules in its library implementation. On top of that, there is little documentation
describing which modules are supported and which are not. If you want to know if a module is supported, the
<a href="http://www.jython.org/cgi-bin/faqw.py?req=index">FAQ</a> suggests attempting to import the
module in question. If the import fails, you can try to copy over
the corresponding *.py module from the CPython implementation. As a last effort you can
request help on the public <a href="http://sourceforge.net/mail/?group_id=12867">mailing lists</a>.
</p>
<p>
While the Python support in jython is restricted to version 2.1, the Java support is completely up-to-date. You
can use _any_ Java code from inside the jython interpreter. This includes the
standard Java 1.4.2 libraries, libraries written by third parties, and your own custom libraries.
</p>
<p>
For example, you could use Java's
<a href="http://java.sun.com/j2se/1.4.2/docs/api/java/awt/package-summary.html">Abstract Window Toolkit</a>
(AWT). The AWT is a graphical
windowing library that provides widgets for creating user interfaces (windows, buttons, text areas,
etc). You could write Python code that accessed the AWT, and then run that code using the jython
interpreter.
</p>
<p>
Here's an example of using AWT functionality from within Python:
</p>
<pre class="code">
#
# file: AWTTest.jy
#
#
# Import the AWT classes.
#
from java.awt import Frame
from java.awt import Panel
from java.awt import Button
from java.awt import TextArea
from java.awt.event import ActionListener
#
# Define the TestButtonAction class. TestButtonAction
# inherits from the Java ActionListener interface.
#
class TestButtonAction(ActionListener):
def actionPerformed(self, e):
textArea.append("Test Button Clicked!\n")
#
# Create the Frame, Panel, Button,
# TextArea, and TestButtonAction objects.
#
frame = Frame("Hello World")
panel = Panel()
button = Button("Test Button")
buttonAction = TestButtonAction()
textArea = TextArea()
#
# Put everything together and show
# the window.
#
button.addActionListener(buttonAction)
panel.add(button)
panel.add(textArea)
frame.add(panel)
frame.pack()
frame.show()
</pre>
<p>
You can run this using the jython interpreter:
</p>
<pre class="code">
<b>prompt$</b> jython AWTTest.jy
</pre>
<p>
Running this code should produce a window similar to the following:
</p>
<img alt="[screenshot]" src="misc/tougher/awt.jpg" width="608" height="192" />
<p>
The example creates a window and adds a Button and a TextArea to it.
When you click the button, the text "Test Button Clicked!" is appended to the TextArea's
contents. The example displays a few key features of Jython:
</p>
<ul>
<li><b>Imports</b> - Java classes are imported using the standard Python import syntax. The above
example imports the Frame, Button, Panel, TextArea and ActionListener classes from the AWT.</li>
<li><b>Instantiation</b> - Java classes can be instantied, and their public properties and methods can be
accessed. This is shown with the Frame, Panel, Button and TextArea classes.</li>
<li><b>Inheritance</b> - you can define a Python class that derives from a Java class, and then
pass that Python class to Java code that expects a Java class as input. The example
passes the TestButtonAction class to the Button class' addActionListener() method. When
a user clicks the button, the Button class calls the TestButtonAction class' actionPerformed method.</li>
</ul>
<h2>
Using The Jythonc Compiler
</h2>
<p>
The second tool that the Jython project provides is <a href="http://www.jython.org/docs/jythonc.html">jythonc</a>.
jythonc compiles Python source code into Java bytecode. This Java bytecode
can be executed using a standard Java Virtual Machine.
</p>
<p>
(Java bytecode is the intermediate language that the Java Virtual Machine executes. When you compile a
Java source file using javac, the compilation output is a file with a *.class extension. This
file contains Java bytecode, which you can execute using the Java Virtual Machine. For more information
about Java bytecode and the JVM, check out
<a href="http://java.sun.com/docs/books/vmspec/">The Java Virtual Machine Specification</a>
)
</p>
<p>
jythonc suffers from the same feature lag as the jython interpreter - the latest jythonc release implements
features from Python 2.1. Furthermore, the alpha version of Jython contains a jythonc compiler
that is basically unchanged since the last release. It looks like jythonc will be stuck at version 2.1
for a while.
</p>
<p>
When compiling a Python class with jythonc, you need to provide extra information
about each publically accessible method in your class. This information includes the return type,
arguments, argument types, throws clause, and access control declaration (private, public,
or protected). You can provide this information in one of two ways:
</p>
<ul>
<li><b>Inheritance</b> - you derive your Python class from an existing Java class or interface
that defines the publically accessible methods, and override those methods in your Python class. The
base Java class provides the information that the JVM needs.
<li><b>Docstrings</b> - you describe each method's signature in its corresponding docstring. The docstrings
need to follow a special convention to be available to the JVM.
</ul>
<p>
For example, you could write a <a href="http://java.sun.com/products/servlet/">Java Servlet</a> in Python
(servlets are Java classes that run inside servlet containers, like
<a href="http://jakarta.apache.org/tomcat/">Tomcat</a> and
<a href="http://jetty.mortbay.org/jetty/">Jetty</a>, and
respond to web page requests).
You could create a Python class that derives from HttpServletRequest, compile that
class into bytecode using the jythonc compiler, and run that bytecode inside of a servlet container.
</p>
<p>
The following is a simple servlet written in Python:
</p>
<pre class="code">
#
# file HelloWorldFromJython.py
#
import os
from javax.servlet.http import HttpServlet
class HelloWorldFromJython(HttpServlet):
def service(self, request, response):
response.setContentType("text/html")
out = response.getOutputStream()
print >>out, """<html>
<head>
<title>Hello World Servlet</title>
</head>
<body>
<p>Hello World From Jython!</p>
<p>os.getcwd() == """ + str(os.getcwd()) + """</p>
</body>
</html>"""
</pre>
<p>
You can run this example using <a href="http://jakarta.apache.org/tomcat/">Tomcat</a>.
Tomcat installation is pretty straightforward - it only requires downloading the distribution
and extracting it to your hard drive. You should create an environment variable named TOMCAT_HOME
and set its value to the Tomcat root directory:
</p>
<pre class="code">
#
# For Tomcat.
#
export TOMCAT_HOME=~/apps/jakarta-tomcat-4.1.27/
</pre>
<p>
The next step is to compile the Python servlet with the jythonc compiler
(note that the CLASSPATH environment variable needs to be updated to include the servlet.jar archive):
</p>
<pre class="code">
<b>prompt$</b> export CLASSPATH=$TOMCAT_HOME/common/lib/servlet.jar:$CLASSPATH
<b>prompt$</b> jythonc --deep HelloWorldFromJython.py
processing HelloWorldFromJython
processing javaos
processing string
processing UserDict
processing copy
processing repr
processing javapath
processing re
processing sre
processing sre_constants
processing sre_compile
processing copy_reg
processing sre_parse
Required packages:
java.lang
org.python.core
java.io
javax.servlet.http
Creating adapters:
Creating .java files:
sre_constants module
javaos module
sre module
javapath module
re module
string module
sre_compile module
copy_reg module
HelloWorldFromJython module
HelloWorldFromJython extends javax.servlet.http.HttpServlet
UserDict module
sre_parse module
repr module
copy module
Compiling .java to .class...
[snip]
</pre>
<p>
The jythonc compiler creates a directory named "jpywork" in your current directory. This directory contains
the *.class file output of the jythonc compilation, along with supporting files.
</p>
<p>
The next step is to deploy the binary *.class files to the Tomcat server's webapps directory.
Normally you would create a new web application for your servlets, but for this example
you can use the existing "examples" web application that ships with Tomcat. Create a new
directory inside of that web application and copy the class files to it:
</p>
<pre class="code">
<b>prompt$</b> mkdir $TOMCAT_HOME/webapps/examples/WEB-INF/classes/HelloWorldFromJython
<b>prompt$</b> cp jpywork/*.class $TOMCAT_HOME/webapps/examples/WEB-INF/classes/HelloFromJython/
</pre>
<p>
Next add the jython.jar archive to the webapp's lib directory (if the directory doesn't exist,
create it):
</p>
<pre class="code">
<b>prompt$</b> mkdir $TOMCAT_HOME/webapps/examples/WEB-INF/lib
<b>prompt$</b> cp $JYTHON_HOME/jython.jar $TOMCAT_HOME/webapps/examples/WEB-INF/lib/
</pre>
<p>
Now that the Python servlet has been compiled and deployed to the Tomcat server, and
the jython.jar archive has been included in the lib directory, you can run the Tomcat server:
</p>
<pre class="code">
<b>prompt$</b> $TOMCAT_HOME/bin/startup.sh
Using CATALINA_BASE: /home/robt/apps/jakarta-tomcat-4.1.27
Using CATALINA_HOME: /home/robt/apps/jakarta-tomcat-4.1.27
Using CATALINA_TMPDIR: /home/robt/apps/jakarta-tomcat-4.1.27/temp
Using JAVA_HOME: /home/robt/apps/j2sdk1.4.2_01
</pre>
<p>
You should be able to access your Python servlet using the following URL:
</p>
<ul>
<li>http://yourmachine:8080/examples/servlet/HelloWorldFromJython/HelloWorldFromJython</li>
</ul>
<p>
The servlet will produce output similar to the following:
</p>
<pre class="code">
<b>prompt$</b> wget http://yourmachine:8080/examples/servlet/HelloWorldFromJython/HelloW
orldFromJython
<b>prompt$</b> cat HelloWorldFromJython
<html>
<head>
<title>Hello World Servlet</title>
</head>
<body>
<p>Hello World From Jython!</p>
<p>os.getcwd() == /home/robt/apps/jakarta-tomcat-4.1.27/bin</p>
</body>
</html>
</pre>
<h2>
Conclusion
</h2>
<p>
This article served as an introduction to the Jython project. For more information
about the subjects presented in this article, check out the following links:
</p>
<ul>
<li><a href="http://www.jython.org">Jython</a>,
<a href="http://www.python.org">Python</a>,
<a href="http://www.javasoft.com">Java</a> - web sites for the Jython, Python, and Java
programming languages.</li>
<li><a href="http://java.sun.com/products/servlet/">Java Servlet Technology</a> - information
about Java Servlets.</li>
<li><a href="http://www.levenez.com/lang/">Computer Languages History</a> - a graphical timeline
of the major programming languages, showing the relationships between each.</li>
<li><a href="http://people.ku.edu/~nkinners/LangList/Extras/langlist.htm">The Language List</a> -
a comprehensive list of programming languages. Close to 2500 languages are included!
<li><a href="http://java.sun.com/docs/books/vmspec/">The Java Virtual Machine Specification</a></li>
</ul>
</p>
<!-- *** BEGIN author bio *** -->
<!-- *** BEGIN bio *** -->
<P>
<img ALIGN="LEFT" ALT="[BIO PEN]" SRC="../gx/2002/note.png">
<em>
Rob is a software developer in the New York City area.
</em>
<br CLEAR="all">
<!-- *** END bio *** -->
<!-- *** END author bio *** -->
<div id="articlefooter">
<p>
Copyright © 2003, <A HREF="authors/tougher.html">Rob Tougher</A>. Copying license
<a href="http://linuxgazette.net/copying.html">http://linuxgazette.net/copying.html</a>
</p>
<p>
Published in Issue 97 of Linux Gazette, December 2003
</p>
</div>
</div>
<br />
<div class="content twdtarticle">
<h1>Mozilla Firebird - A review</h1>
<p id="by"><b>By <A HREF="authors/shekhar.html">Raj Shekhar</A></b></p>
</b>
</p>
<p>
<P>
<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="firebird.html#SEC1">1. Firebird</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="firebird.html#SEC2">2. Installation</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="firebird.html#SEC3">3. Making it the default browser in GNOME</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="firebird.html#SEC4">4. What's Good</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="firebird.html#SEC5">5. More tips</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
</TABLE></BLOCKQUOTE>
<P>
<A NAME="SEC1"></A>
<A NAME="Firebird"></A>
<H1> 1. Firebird </H1>
<!--docid::SEC1::-->
I have been using Mozilla Firebird for some time now and have stopped
my search of a better browser. I had used Mozilla earlier, but it was
so bloated that I switched to Galeon. However, if I had a beefier
system, I would have been happy with Mozilla, bloat or no
bloat. Mozilla took a lot of time to startup and came bundled with a
chat client and a mail reader, which I seldom used. On the other hand
its <SAMP>`tabbed windows'</SAMP> reduced a lot of desktop clutter. The
Firebird is a spin-off from Mozilla. The project aims to
develop software that is smaller and faster than Mozilla by extracting
and redesigning the browser part of the application suite.
<P>
The developers of Firebird started out with the aim of creating a
browser to provide an efficient (speedy, easy to use, useful) web
access. According to the
<A HREF="http://www.mozilla.org/projects/firebird/charter.html">Mozilla
Firebird 1.0 Development Charter</A>:
<BLOCKQUOTE>
The goal was, and is not to have more or less features than any other
client (Mozilla included) but to have the <EM>right set of features</EM>
to let people get their jobs done.
</BLOCKQUOTE>
From what I see, I must congratulate the developers on a job very well
done.
<P>
<A NAME="Installation"></A>
<A NAME="SEC2"></A>
<H1> 2. Installation </H1>
<!--docid::SEC2::-->
<DL COMPACT>
<DT><STRONG>Using RPMs</STRONG>
<DD>I used the RPM to install Firebird on Red Hat 9.0. I am sure the hints
provided here will prove useful for installing on another RPM based
system. I used the RPMS for Red Hat maintained and built by
<A HREF="http://dag.wieers.com/packages/mozilla-firebird/">Dag Wieers</A>. If
you want to locate the RPMs for your own distribution, try searching
at <A HREF="http://rpmseek.com/">rpmseek</A>. Use <SAMP>`mozilla-firebird'</SAMP> as
your search string.
<P>
After downloading the RPM, you can install it from the command prompt <BR>
<CODE>rpm -ivh <package-name></CODE> <BR>
</P><P>
If you had installed Mozilla or Galeon earlier, you should have no
dependency problems. Otherwise, you may have to search, download and
install other packages too to solve the dependency problems. Again the
best places to find the packages are
<A HREF="http://rpmseek.com/">rpmseek</A>,
<A HREF="http://rpmfind.net/">Rpmfind.Net</A> and
<A HREF="http://rpm.pbone.net/">Rpm pbone</A>.
</P><P>
If you installed Firebird using the RPM package provided by Dag
Wieers, then you can launch Firebird by giving the command
<CODE>mozilla-firebird</CODE>. If you installed using the package provded by
some other repository, type <CODE>rpm -ql <package-name>|grep -i
/usr/bin</CODE>. That will provide you the command to launch Firebird.
</P><P>
<DT><STRONG>Using official Firebird Release</STRONG>
<DD><STRONG>Disclaimer </STRONG> I installed from a RPM and not from the official
Firebird Release.
<P>
You can get Firebird from the
<A HREF="http://texturizer.net/firebird/download.html">Mozilla Firebird
download page</A>. At the time of writing, the website recommends to
install Mozilla Firebird 0.7. There are downloads available for
<A HREF="http://ftp.mozilla.org/pub/mozilla.org/firebird/releases/0.7/MozillaFirebird-0.7-i686-pc-linux-gnu.tar.gz">GTK (9.1 MB)</A> and
<A HREF="http://ftp.mozilla.org/pub/mozilla.org/firebird/releases/0.7/MozillaFirebird-0.7-i686-linux-gtk2+xft.tar.gz">GTK2
and XFT (8.6 MB)</A>. Read the
<A HREF="http://texturizer.net/firebird/download.html#install">How To
Install</A> section to learn more on installation.
</P><P>
I will give a brief outline of the installation process. After you
have downloaded the appropiate tarball from the above mentioned links,
login as <CODE>root</CODE>. Unzip the files into the directory
<TT>`/usr/lib/'</TT>. Next, issue the command <BR> <CODE>chown -c -r
root:root /usr/lib/mozilla-firebird</CODE> <BR> In case you unzipped the
tarball into a different directory, remember to substitute the proper
name of the directory. That's all to the install process. To launch
your brand new browser, issue the command <BR>
<CODE>/usr/lib/mozilla-firebird/MozillaFirebird</CODE> <BR> However, if you
want to make it your default browser in GNOME and want to avoid the
hassle of typing the full path every time, see the next section.
</P><P>
<DT><STRONG>Installation in Windows</STRONG>
<DD>If you have a 100% Linux shop, you can safely skip this
step. However, if you have to use Windows, I would strongly suggest
that you consider switching from Internet Explorer to
<A HREF="http://ftp.mozilla.org/pub/firebird/releases/0.7/MozillaFirebird-0.7-win32.zip">Firebird</A>. I
tested it out on a Windows 2000 PC. As in Linux, you have to just
unzip the files, click on the <TT>`MozillaFirebird.exe'</TT> and that is
the end of the installation process. The first time it starts up,
Firebird imports your IE bookmarks and also asks you if you would like
to make Firebird your default browser.
<P>
</DL>
<P>
<A NAME="Making it the default browser in GNOME"></A>
<A NAME="SEC3"></A>
<H1> 3. Making it the default browser in GNOME </H1>
<!--docid::SEC3::-->
Login as root and in your <TT>`/usr/bin/'</TT> directory create a file
called <TT>`firebird-remote'</TT>. Put the following lines into it
<P>
<TABLE><tr><td> </td><td class=example><pre>#!/bin/sh
/usr/lib/mozilla-firebird/MozillaFirebird -remote "openURL($@, new-tab)" ||
exec /usr/lib/mozilla-firebird/MozillaFirebird "$@";
</pre></td></tr></table>Just change the directory locations to suit your installation. Use
<CODE>chmod a+x /usr/bin/firebird-remote</CODE> to assign everyone the
permission to execute the script. That is all the work required by you
as root.
</P><P>
In case you are wondering what this shell-script does, here is a brief
explanation. When Firebird is invoked with the <SAMP>`-remote'</SAMP>
argument, it does not open a window, but instead connects to and
controls an already-existing process. The argument <SAMP>`openURL
(URL, new-tab)'</SAMP> creates a new tab displaying the specified
document. If you would rather have it open a new window, use
<SAMP>`openURL (URL, new-window)'</SAMP> instead. The page
<A HREF="http://www.mozilla.org/unix/remote.html">remote control of unix
mozilla</A> has more explanation about this. Thie above script first
checks if we already have a Firebird running and displays the page in
a new tab. If it does not find one, it creates a new process and
displays the page in it.
</P><P>
Next, if you wnat to make Firebird your default browser in GNOME, you
have to edit the file <TT>`~/.gnome/Gnome'</TT>. You will find it contains a directive
<TABLE><tr><td> </td><td class=example><pre>[URL Handlers]
http-show=nautilus "%s"
https-show=nautilus "%s"
:
[ other non-interesting suff ]
:
</pre></td></tr></table>Add or edit the lines so that it becomes
<TABLE><tr><td> </td><td class=example><pre>[URL Handlers]
http-show=firebird-remote "%s"
https-show=firebird-remote "%s"
ftp-show=firebird-remote "%s"
:
[leave this portion unchanged]
:
</pre></td></tr></table>Thats all to it. Your default browser for GNOME and its associate apps
like Evolution is now Firebird.
</P><P>
<A NAME="What is Good"></A>
<A NAME="SEC4"></A>
<H1> 4. What's Good </H1>
<!--docid::SEC4::-->
Firebird packs quite a lot of power under its hood. The feature I like
the most is <EM>tabbed-browsing</EM>. When you <KBD>Ctrl + click</KBD> on a
link, it opens on a page in background <EM>Tab</EM>. This way, you go on
reading the current page and the new page gets loaded in the
background.
<P>
Firebird stops annoying popup windows dead in their tracks. This is a
good example of a good thing implemented in a very non-intrusive
manner. When it blocks a popup window, it displays an icon in the
status bar. Clicking this icon shows a breakdown of the popup that
Firebird stopped when loading the current page. You can then allow
some or all of the popup windows to be shown.
</P><P>
Quite a few people think
<A HREF="http://www.gnu.org/philosophy/free-sw.html">Free Software</A> means
an ugly user interface. Firebird is aesthetically designed, with nice
icons and colors. If you are not happy with the default look-and-feel,
checkout the <A HREF="http://www.texturizer.net/firebird/themes/">themes
collection on display</A>. Some themes simply change the colors of
Mozilla Firebird, others can change every piece of the browser
appearance. I have switched from the default theme to the
<A HREF="http://www.geocities.com/alfredkayser/mozilla/thunderbird.htm">LittleFirebird theme</A>, which reduces screen-space usage.
</P><P>
Firebird allows enhancing of the basic browser by use of
extensions. If there a particular feature which you think Firebird
lacks, check out the
<A HREF="http://www.texturizer.net/firebird/extensions/">extensions</A>
available. In all probability, you will find what you need there.
</P><P>
<A NAME="More tips"></A>
<A NAME="SEC5"></A>
<H1> 5. More tips </H1>
<!--docid::SEC5::-->
<DL COMPACT>
<DT><STRONG>Plugins</STRONG>
<DD>Whenever Firebird comes across a page which needs some particular
plugin to be installed, it asks you whether you want to install the
plugin or not. It then takes you to the download page of that
particular plugin. However, you can get all the major plugins from
<A HREF="http://plugindoc.mozdev.org/linux.html">Mozilla Plugin Support
page for Linux</A> (or the
<A HREF="http://plugindoc.mozdev.org/windows.html">Windows page</A>).
<P>
<DT><STRONG>Block opening new windows</STRONG>
<DD>Firebird doesn't stop web pages from opening in new windows (i.e using
the <CODE>target="_blank"</CODE> or the illegal <CODE>target="_new"</CODE>
properties.) you can tweak your settings to do this. In the address
bar, if you type <CODE>about:config</CODE>, it takes you to the browser's
settings page. Use the <SAMP>`Filter'</SAMP> to find the string
<CODE>browser.block.target_new_window</CODE>, right click on it and
<CODE>Modify</CODE> the value to <CODE>true</CODE>.
<P>
<DT><STRONG>Increase text size</STRONG>
<DD>If you find the text size of a site too small, you can increase it by
using the <KBD>Ctrl</KBD> + <KBD>+</KBD> key.
</DL>
<P>
There are more tips on the
<A HREF="http://texturizer.net/firebird/tips.html">Tips & Trick page</A>.
</P><P>
<BR>
<FONT SIZE="-1">
This document was generated
on <I>December, 4 2003</I>
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>
</p>
<!-- *** BEGIN author bio *** -->
<!-- *** BEGIN bio *** -->
<P>
<img ALIGN="LEFT" ALT="[BIO]" SRC="../gx/2002/note.png">
<em>
I have completed my Bachelor in Information Technology from University
of Delhi. I have been a Linux fan since the time I read "Unix Network
Programming" by Richard Stevens and started programming in GNU/Linux in my seventh
semaster . I have been trying to convert people right, left and center ever
since.
</em>
<br CLEAR="all">
<!-- *** END bio *** -->
<!-- *** END author bio *** -->
<div id="articlefooter">
<p>
Copyright © 2003, <A HREF="authors/shekhar.html">Raj Shekhar</A>. Copying license
<a href="http://linuxgazette.net/copying.html">http://linuxgazette.net/copying.html</a>
</p>
<p>
Published in Issue 97 of Linux Gazette, December 2003
</p>
</div>
</div>
<br />
</body>
</html>
|