ARCADE and OTHER | Icecast COOL PROJECTS | Firefox NOKIA E61 and OPENSWAN VPN | 64-Bit Linux PLAYSTATION 3 SUPERCOMPUTING CLUSTER MAGNATUNE Is NOT EVIL AUGUST
Total Page:16
File Type:pdf, Size:1020Kb
DJANGO | OPENSWAN | ALPHAMAIL | PLAYSTATION 3 | ICECAST LINUX JOURNAL ™ Ices and Icecast Streaming Audio COOL PROJECTS Embedded Linux SOP Intro to LMMS, inotail, Karmen and GAMGI Since 1994: The Original Magazine of the Linux Community AUGUST 2007 | ISSUE 160 Next-Generation Residential Gateway Django | Openswan BUILD IT | AlphaMail YOURSELF | PlayStation 3 PlayStation ARCADE AND OTHER | Icecast COOL PROJECTS | Firefox NOKIA E61 and OPENSWAN VPN | 64-Bit Linux PLAYSTATION 3 SUPERCOMPUTING CLUSTER MAGNATUNE is NOT EVIL AUGUST www.linuxjournal.com 2007 $5.99US $6.99CAN 08 ISSUE 160 Create Exploit + Firefox Extensions 64-Bit Linux 0 74470 03102 4 Manage Any Data Center. Anytime. Anywhere. Avocent builds hardware and software to access, manage and control any IT asset in your data center, online or offl ine, keeping it, and your business, “always on”. Visit us on our Remote Control Tour. For locations near you, go to Avocent, the Avocent logo and The Power of Being There, are registered www.avocent.com/remotecontrol. trademarks of Avocent Corporation. ©2007 Avocent Corporation. AvocentRemote_LinuxJournal.indd 1 5/8/07 1:01:52 PM AUGUST 2007 CONTENTS Issue 160 ILLUSTRATION ©ISTOCKPHOTO.COM/CYRO PINTOS ©ISTOCKPHOTO.COM/CYRO ILLUSTRATION FEATURES 38 BUILD YOUR OWN ARCADE GAME 54 THE BEST GAME IN TOWN PLAYER AND RELIVE THE ’80S! Clustering game machines? Donkey Kong won’t steal your lunch money. James Gray Shawn Powers ON THE COVER 44 CREATE A LINUX VPN FOR A NOKIA E61 • Ices and Icecast Streaming Audio, p. 84 WITH OPENSWAN • Embedded Linux SOP, p. 88 Want your personal phone VPN? • Intro to LMMS, inotail, Karmen and GAMGI, p. 68 • Next-Generation Residential Gateway, p. 58 Ben Martin • Built It Yourself Arcade, p. 38 • Nokia E61 and Openswan VPN, p. 44 50 MAGNATUNE AN OPEN CHOICE; • PlayStation 3 Supercomputing Cluster, p. 54 • Magnatune Is Not Evil, p. 50 ITUNES AN EXPENSIVE CHOICE • Create Firefox Extensions, p. 74 Trade iTunes for your tunes. • Exploit 64-Bit Linux, p. 62 James Lees 2 | august 2007 www.linuxjournal.com Keep it simple. Rest easy. High technology is exciting. But all too often that includes pointless complexity. Not with Coyote Point. From local to global load balancing, application acceleration or ultimate network manageability, Coyote Point leads the pack. We take the guesswork out of application traffic management to deliver reliable solutions. You won’t find anything faster, smarter or more affordable out there. Find out why more than 2,000 businesses save time, money and mental energy with Coyote Point. Write [email protected] or call 1-877-367-2696. A coyote is a creature of elegant simplicity. Your network should be, too. Copyright © 2007 All Rights Reserved. www.coyotepoint.com AUGUST 2007 CONTENTS Issue 160 COLUMNS INDEPTH 20 REUVEN M. LERNER’S 58 BUILDING A NEXT- AT THE FORGE GENERATION RESIDENTIAL Django Views and Templates GATEWAY So you want a residential gateway? 24 MARCEL GAGNÉ’S Alexander Sirotkin COOKING WITH LINUX It’s Like Déjà Vu, but at a 62 EXPLOITING 64-BIT LINUX Higher Resolution Remember when 640K was enough 50 MAGNATUNE RAM for anyone? Steve Munroe 68 TAKE A PEEK AT SOME OF THE FRESHEST PROJECTS AROUND Some cool apps on the radar. John Knight 74 BUILDING FIREFOX EXTENSIONS 36 NEW PRODUCTS Customizing Firefox at this level is geek paradise. 28 DAVE TAYLOR’S Justin Huff WORK THE SHELL Next Month 007’s Favorite Game: Baccarat? 84 STREAMING AUDIO WITH ICES AND ICECAST 30 JON "MADDOG" HALL’S How W0ZWY put announcements ULTIMATE LINUX BOX BEACHHEAD on the Net. We’ve got the design for an Cool Change Brian Matherly Ultimate Linux Box next month: a balance of do-it-yourself effort DOC SEARLS’ 32 88 STANDARD OPERATING and price that delivers a powerful LINUX FOR SUITS PROCEDURES FOR punch in performance and fea- Work to Be Done EMBEDDED LINUX SYSTEMS tures. We also examine some Need some embedded Linux alternative configurations in case 96 NICHOLAS PETRELEY’S guidelines? your priorities lean more toward /VAR/OPINION price or more toward perfor- Chi-Hung Chou, Tsung-Hsien Yang, The Benevolent Racketeer mance. And, we’ve chosen the Shih-Chiang Tsao and Ying-Dar Lin Ultimate Linux Box in notebooks too, for those who prefer power IN EVERY ISSUE 92 ALPHAMAIL IS SCALABLE and portability. Plus, we also com- 8 LETTERS AND ACCESSIBLE WEB MAIL pare the performance several 12 UPFRONT Middleware improves performance. powerful $7,000 servers. NEW PRODUCTS Tony Kay 36 As always, there’s much more. 81 ADVERTISERS INDEX We’ve got the scoop on the evo- lution of Linux authentication, namely Fedora Directory Server, and hacking cell phones using Bluetooth tools. USPS LINUX JOURNAL (ISSN 1075-3583) is published monthly by Belltown Media, Inc., 2211 Norfolk, Ste 514, Houston, TX 77098 USA. Periodicals postage paid at Houston, Texas and at additional mailing offices. Cover price is $5 US. Sub scrip tion rate is $25/year in the United States, $32 in Canada and Mexico, $62 elsewhere. POSTMASTER: Please send address changes to Linux Journal, PO Box 980985, Houston, TX 77098. Subscriptions start with the next issue. 4 | august 2007 www.linuxjournal.com 'RQ·WIHHOEDG 2XUVHUYHUV ZRQ·WJRGRZQ RQ\RXHLWKHU :H¶YHDOONQRZQGLVDSSRLQWPHQW$QGIHZWKLQJV DUHPRUHGLVDSSRLQWLQJWKDQXQGHSHQGDEOH H[SHQVLYHVHUYHUVWKDWGRQ¶WVDWLVI\\RXUQHHGV 7RDYRLGWKHKHDUWEUHDNRIORVWH[SHFWDWLRQV 462/SURYLGHVGHSHQGDEOHVHUYHUVROXWLRQVIRU YLUWXDOO\DQ\SRSXODURSHUDWLQJV\VWHPDWDSULFH WKDWZLOOEORZ\RXUPLQGQRW\RXUEXGJHW 462/FRP6HUYHU$SSOLDQFHVFRPHLQDYDULHW\RI FRQILJXUDWLRQVWRPHHWWKHPRVWVSHFLILFQHHGVRI RXUXVHUV:KHWKHU\RX¶UHLQWR8ZLWK&RUHV RU8ZLWKQHDUO\7HUDE\WHVZHFDQSURYLGHDVHUYHU WKDWFDQSHUIRUPXQGHUWKHPRVWGHPDQGLQJFRQGLWLRQV ,I\RXUVHUYHULVQ¶WJLYLQJ\RXZKDW\RXZDQWYLVLW462/ 'RQ¶WZRUU\LW¶VDVXUHWKLQJ T '48'422.+#0%'5 6HUYLQJ6HUYHUVVLQFH 462/&20,1&$OOULJKWVUHVHUYHGDOOWUDGHPDUNVDUHWKHSURSHUW\RIWKHLUUHVSHFWLYHFRPSDQLHV 7KHSHUVRQSLFWXUHGLQWKLVDGYHUWLVHPHQWLVDPRGHODQGLVXVHGIRULOOXVWUDWLYHSXUSRVHVRQO\ Editor in Chief Nick Petreley, [email protected] Executive Editor Jill Franklin [email protected] Senior Editor Doc Searls [email protected] Art Director Garrick Antikajian [email protected] Products Editor James Gray [email protected] Editor Emeritus Don Marti [email protected] Technical Editor Michael Baxter [email protected] Senior Columnist Reuven Lerner [email protected] Chef Français Marcel Gagné [email protected] Security Editor Mick Bauer [email protected] Contributing Editors David A. Bandel • Greg Kroah-Hartman • Ibrahim Haddad • Robert Love • Zack Brown • Dave Phillips • Marco Fioretti • Ludovic Marcotte • Paul Barry • Paul McKenney • Dave Taylor Proofreader Geri Gale Publisher Carlie Fairchild [email protected] General Manager Rebecca Cassity [email protected] Director of Sales Laura Whiteman [email protected] Regional Sales Manager Joseph Krack [email protected] Regional Sales Manager Kathleen Boyle [email protected] Circulation Director Mark Irgang [email protected] Marketing Coordinator Lana Newlander [email protected] System Administrator Mitch Frazier [email protected] Webmaster Keith Daniels [email protected] Accountant Candy Beauchamp [email protected] Linux Journal is published by, and is a registered trade name of, Belltown Media, Inc. PO Box 980985, Houston, TX 77098 USA Editorial Advisory Board Daniel Frye, Director, IBM Linux Technology Center Jon “maddog” Hall, President, Linux International Lawrence Lessig, Professor of Law, Stanford University Ransom Love, Director of Strategic Relationships, Family and Church History Department, Church of Jesus Christ of Latter-day Saints Sam Ockman, CEO, Penguin Computing Bruce Perens Bdale Garbee, Linux CTO, HP Danese Cooper, Open Source Diva, Intel Corporation Advertising E-MAIL: [email protected] URL: www.linuxjournal.com/advertising PHONE: +1 713-344-1956 ext. 2 Subscriptions E-MAIL: [email protected] URL: www.linuxjournal.com/subscribe PHONE: +1 713-589-3503 FAX: +1 713-589-2677 TOLL-FREE: 1-888-66-LINUX MAIL: PO Box 980985, Houston, TX 77098 USA Please allow 4–6 weeks for processing address changes and orders PRINTED IN USA LINUX is a registered trademark of Linus Torvalds. 7+(1(: /%%8//< 7+(1(:48$'&25(5($'<3(5)250$1&(:$5( )285'8$/2548$'&25(237(5216*%''55$0,1$75,08%2'< 8QEHDWDEO\WRXJKRQ\RXUPRVWFKDOOHQJLQJDSSOLFDWLRQVEXWHDV\RQWKHEXGJHW \RXPD\HYHQJHWWRNHHS\RXUOXQFKPRQH\ ÝÌÀiiÞÊV«>VÌÊ>`Ê«ÜiÀvÕ]ÊÌ iÊ*iÀvÀ>Vi7>ÀiÊ£ÈnäÊÃÊ`iÃ}i`ÊÌÊÌ>iÊÊV«iÝÊ`>Ì>L>ÃiÊ>««V>ÌÃ]ÊÃViÌwVÊV>VÕ>ÌÃ]Ê>`Ê Ì iÊ>ÌiÃÌÊÛÀÌÕ>Ê>V iÊÌiV }Þ°ÊÊ Ê"«ÌiÀÊ+Õ>` ÀiÊÀi>`Þ]Ê£Ón ÊvÊv>ÃÌÊ ,ÓÊÈÈÇÊ,Ê>iÊÌ iÊ*iÀvÀ>Vi7>ÀiÊ£ÈnäÊÌ iÊÃiÀÛiÀÊ ÌÊLi>Ì° "ETHElRSTONYOURBLOCKTOHARNESSTHEPOWEROFTHISBULLY#ALLNOWFORMOREDETAILS ÜÜÜ°«}ÕÝ°V Ý«iÀiVi]Ê>}>Ì]Ê>`Ê-Õ««ÀÌ°ÊÊ *}ÊÕÝÊÃÊ>À`Ü>ÀiÊ-ÕÌÃÊ ÕÌÊvÀÊÕÝ]Ê ÕÌÊvÀÊ9Õ° /Ê}iÌÊÃÌ>ÀÌi`]ÊVÌ>VÌÊÕÃÊ>ÌÊnnn°nÓn°*""ÊÀʵÕÀiãäJ«}ÕÝ°VÊ *}ÊÕÝ]ÊV°ÊÇä£ÊvÌ ÊÛi°Ê-ÕÌiÊÈnxä]Ê-i>ÌÌi]Ê7Ên£ä{ ]ÊÌ ]ÊÌ Ê8*]Ê>`ÊÌ iÊ Ê}Ê>ÀiÊÀi}ÃÌiÀi`ÊÌÀ>`i>ÀÃÊvÊÌ iÊ`Û>Vi`ÊVÀÊ iÛViÃÊÀÊÌÃÊÃÕLÃ`>ÀiÃÊÊÌ iÊ1Ìi`Ê-Ì>ÌiÃÊ>`ÊÌ iÀVÕÌÀið ÀÊ>``Ì>ÊÌiÀÃÊ>`ÊV`ÌÃÊ«i>ÃiÊÛÃÌÊÜÜÜ°«}ÕÝ°V letters One can only hope that Jon “maddog” I often spend time telling people of the Hall learned his programming languages merits of Linux and that we are winning— better than he learned his Latin. In his much like Doc Searls’ “Picking New June 2007 column, he says that he named Fights” article in the June 2007 issue. But his boat Agape from the Latin word mean- I never fail to run into the standard, ing “the highest form of love”. The word “what about obscure hardware or newer agape is not Latin, as Hall suggests, but hardware that doesn’t run on Linux? With Greek, and being one of several Classical Windows, it just works.” Greek words for different types of love, it generally is understood to mean some- I then have to explain that, no, it doesn’t thing like “brotherly love” or charity. “just work”. The manufacturers simply Maybe maddog needs to debug his Latin. write drivers under Windows, and if they -- would get pressure to write for Linux, it Max E. Klinger would “just work” there as well. Our answer is that the manufacturers are the The origin of the word agape is Greek, ones that should spend time testing for but Latin assimilated it.