NO.1 FOR RASPBERRY PI 444 DDDIIISSSTTTRRROOO • INTEL VS RASPI • BUILD AN ONION PI • PYTHON MASTERCLASS LIVE BOOTING DVD www.linuxuser.co.uk L IN U X U S E R & D E V E L O P E R IS S U THE MONTHLY MAGAZINE E 1 FOR THE GNU GENERATION 3 1 HAS THE RASPBERRY PI MET ITS MATCH? H A S T MinnowBoard: Review, Intel interview & spec face-off H E R A S P VS Build B ERR extensions Y PI M Sync files for XBMC ET with Unison Make your own ITS with Python M The quick & reliable A T way to save data C H ? 9> 91 5.3 The other half £ 2 0 0 0 of WordPress 327 27 1- 3 4 120 1 3N 4 The story of co-creator Mark Little E 1ISS 20 U 7 S 7 S I 9 Studio Android w w w .lin ux Masterclass Create a ALSO INSIDE u ser.c database with »» MLaaTsetXe dr othces Vwimith e LdyiXtor o .uk Google’s new IDE is here – get started today! LibreOffice » 14+ pages of reviews 001_LUD_131_WS_6 PK.indd 1 04/09/2013 18:11 Raspberry Pi Inc VAT £ 3 2 .99 Model B - 512MB with 8GB NOOBS SD Card code SC1313058 £27.49 Ex Vat NOW IN STOCK! 5MP Raspberry Pi Camera £19.24 £16.03 Ex Vat code SC1302358 visit cpc.co.uk for more information Get everything for your projects... • Full range of project accessories • Kits and Cases • Expansion, Breakout and Prototyping Boards Y E • Vast Range of Components R E • WiFi Dongles & HDMI to VGA Adaptors E R • Video and Audio Leads V F y, • Keyboards, Mice and Monitors LI appluk s o. • GPIO Ribbon Cables E n c cpc.co.uk • Programming and User Guides D C onvidsiitti ocpc. Full Page.indd 1 03/09/2013 10:36 Welcome to issue 131 of Linux User & Developer Get This issue Linux User … Mihalis Tsoukalos has over 15 years of UNIX system administration and for £4.19 programming experience and has s been using Linux since 1993. He is » MinnowBoard exclusive per issue also proficient in Oracle database t administration, Cisco IOS and » Build add-ons for XBMC r Cocoa. In this issue Mihalis shows Page 32 e us how to sync files with Unison, a » Sync your fi les with Unison useful open source CLI tool (42-45). p » Get started with Android Studio Himanshu Arora is a software programmer, x open source enthusiast and Linux e researcher. His articles have been Welcome to the latest edition of Linux User & featured on IBM developerWorks Developer, the UK and America’s favourite open x and Computerworld among others. He also blogs at mylinuxbook.com. source and Linux magazine. u This month he shows us how to When you’re trying to make the best Linux and open make the most of Vim with his n expert guide starting on page 62. source read in the world, there’s nothing more useful than feedback from readers. There’s little point us Li Michael Reed is a technology writer, and he’s being here if we don’t aim to give you a healthy dose been hacking away at Linux for over 15 years. He specialises in of what you want, so we pay close attention to what you f desktop Linux solutions among o have to say. But what have you been saying? After collecting, other things. In issue 131 Michael shows us how to get started with formatting, graphing and a lot of stubble scratching, it’s clear m databases using LibreOffi ce – it’s many of you want more tutorials, bigger reviews and more easier than you might think. See his work on pages 34-37. introductory and intermediate developer content. a As you’ll see this issue, we’ve dedicated more pages e Jon Masters is a Linux kernel hacker who has been working on Linux for some to tutorials and guides than ever before and we’ve even t 18 years, since he fi rst attended reformatted our distro reviews to make them more useful. university at the age of 13. Jon lives r in Cambridge, Massachusetts, We still need your help, though. If you’re keen to learn more u and works for a large enterprise about development in the open source fi eld, we want to know Linux vendor. You can fi nd his o indispensable Kernel Column on what languages and frameworks you care about. We’ve been Y pages 22-23 this month. focusing very heavily on Python in recent months and intend Gareth Halfacree is our new resident news to continue with this, but would you like to see Qt, Vala and reporter and brings us the latest C++ here too, or something else entirely? from all over the open source Let us know on Facebook and Twitter or simply drop me an ecosystem, starting on page 14. Also this issue, Gareth speaks to email directly at [email protected]. Intel about its new dev platform MinnowBoard on page 6. You can also find his review of this potential Russell Barnes, Editor RasPi-beater on pages 12-13. Get in touch with the team: Rob Zwetsloot studied aerospace engineering at university, using Python to model complex simulations in [email protected] class. Along with tutorials, reviews and more this issue, Rob tells us which IDE we should be using Buy online (pages 72-77) and walks us through Facebook: Twitter: the build process of an Onion Pi Linux User & Developer @linuxusermag (pages 46-49). Visit us online for more news, opinion, tutorials and reviews: www.linuxuser.co.uk 3Issue 131 003_LUD_131 PK.indd 3 06/09/2013 13:28 Contents Reviews 72 ISDEo sfutpewr-taesrte Enhance your workfl ow with the best dev environments… Code::Blocks Geany 06 Has the Raspberry Pi Eclipse Netbeans met its match? MinnowBoard has arrived 12 MinnowBoard Has the Raspberry Pi got real competition? OpenSource Tutorials 79 Nook HD+ 14 News 34 Make a database with LibreOffice The perfect mix of low cost and high performance? T he biggest stories from the Combine a form-based front-end with a open source world portable, networked MySQL back-end 82 Sparky Linux 3.0 18 Opinions 38 Write LaTeX docs with LyX One of the first distros to use Debian 7.0 ‘Jessie’ The latest from your favourite Take the pain out of writing LaTeX! free software columnists 42 Synchronise your files with Unison 85 Books Get to grips with this CLI tool to sync your FE A T Read all about the latest fi les quickly and reliably U R Linux-related books E 46 Browse privately with Onion Pi 94 Letters Turn your RasPi into a portable Tor router Your views on the magazine Developer tutorials and the open source scene Features 56 Make extensions for XBMC Create your own add-ons with Python 06 The MinnowBoard 62 Master Vim in easy steps Intel’s new dev platform Get more productive with this popular editor 24 Android Studio On your free disc masterclass Learn Google’s new IDE 96 Cover disc 52 The other half of Four of the latest Subscribe WordPress distros for you to try out today! on this issue’s DVD! We speak to its co-creator 52 The other half of WordPress Mark Little Elementary OS, 32 Save at least 30% We catch up with Mark Little, co-creator Puppy Linux 5.6, on the shop price. of the world’s most popular open source 88 Q & A US customers Sparky Linux 3.0, can subscribe via blogging platform, WordPress, to find out Your questions answered by page 84 what he’s doing now… our panel of experts OpenELEC (beta) Join us online for more Linux news, opinion and reviews www.linuxuser.co.uk 4www.linuxuser.co.uk 004_LUD_131 PK.indd 4 06/09/2013 13:06 NEW OPPORTUNITIES WITH NEW DOMAINS NEW! Choose from over 700 new top-level domains! Create a short, memorable web address that perfectly fi ts your business or website theme, like fashion.blog, kitchens.online or john-smith.london. You can also make your website easier to fi nd by getting new extensions for your current domain. PRE-ORDER With almost 20 million registered domains, 1&1 is Europe’s market leader for domain registration. Thanks to integrated forwarding features, domains FREE registered with us can be quickly and easily connected with any website, no matter which web hosting provider you use. Find out more at 1and1.co.uk WITH NO OBLIGATION!* 1and1.co.uk DOMAINS | MAIL | WEB HOSTING | E-COMMERCE | SERVERS * Pre-ordering a domain name is not a guarantee that the domain will be registered. If your requested domain has already been pre-ordered, you will be added to a waiting list for that domain. Full Page.indd 1 05/09/2013 09:38 Exclusive Intel’s big fish in a little pond n Scott Garman is a Yocto Project engineer at Intel, and the company’s evangelist for the MinnowBoard Intel’s big fish in a little pond We chat to Scott Garman about Intel’s first foray into the world of Linux-powered open hardware development systems Scott Garman, the man Intel has appointed Open Source Technology Center, Garman has at its heart a low-power 32-bit Atom processor, as the ‘evangelist’ for its first steps into open already given plenty back to the community. He’s the board is designed as a development platform hardware development, has a history of responsible for Yocto-related training materials, to bring the lexibility and familiarity of the embedded development. “I’m not a hardcore including one of the most popular screencast x86 instruction set architecture to embedded kernel hacker,” he tells us during an interview to introductions to the project, and is now leading systems – and to do so at a low cost. commemorate the launch of the MinnowBoard the effort to introduce the irst open hardware Most surprisingly of all, the device is open single-board computer, “but a generalist who platform designed with Yocto irmly in mind: the hardware: all speciications, schematics, board enjoys working with the big picture in mind.” Intel MinnowBoard. layouts and irmware packages are available for A software engineer for the Yocto Project, a The MinnowBoard, reviewed on page 12, download and reuse under a permissive licence collaborative effort to make the development owes a clear debt of gratitude to devices like the – a irst for an Intel hardware product. Clearly, this of Linux distributions for embedded platforms Raspberry Pi and the BeagleBoard. Designed is a departure from the norm, and one of which as simple as possible, working under Intel’s around Intel’s ‘Queens Bay’ platform, which has Garman is understandably proud. 6www.linuxuser.co.uk 006-009_LUD_131_WS PK.indd 6 05/09/2013 18:30 Intel’s big fish in a little pond How the MinnowBoard came about INTERVIEW The open hardware movement n Open hardware – an offshoot of open source, where the schematics, component lists, and even the individual Gerber iles for having printed circuit boards made are released under a permissive licence – is growing increasingly popular. Although the Raspberry Pi, one of the most popular low-cost embedded development platforms, is proprietary, many of its competitors are more open: as well as the MinnowBoard, the Gizmo, the BeagleBoard and its smaller BeagleBone offshoot, the Olimex OLinuXino family, and the microcontroller-based Arduino range are all open hardware. Open hardware can lead to rapid advances in features and technologies for the projects that adopt it, but as with open source software there are risks: the Arduino’s open nature has led to it being one of the most copied projects n The MinnowBoard itself around, with Far Eastern factories is compact yet powerful, churning out illegitimate clones by the and boasts impressive dozen and misappropriating the project’s trademark in direct contravention of its I/O capabilities otherwise extremely permissive licence. How did the MinnowBoard come about? up this irst board. It’s turned out to be a great “I’d say development in earnest started collaboration and we’re really pleased with happening at the end of 2012. MinnowBoard the results. was an unusual project because of the way “In one sense, the Intel team working on this Intel and CircuitCo [the company behind the is extremely small. At the same time, I wouldn’t BeagleBoard and BeagleBone development want to discount the contributions that many platforms] collaborated on it. The Intel people have done to help make this happen, Yocto Project team provided input to help even if they weren’t involved with the project full- design the requirements for MinnowBoard time on a daily basis.” around performance, openness, lexibility and standards. CircuitCo then used an Intel What led to the decision to choose the Queens “To my knowledge, reference design – the ‘Queens Bay’ platform Bay platform, with its ‘Tunnel Creek’ Atom – and adapted it as needed. They also processor, in the MinnowBoard? MinnowBoard is manufacture and sell the MinnowBoard, so “Two main issues led us to use Tunnel Creek it’s primarily their product, not Intel’s. The result CPU for MinnowBoard. One, we were looking the irst hardware is a win-win situation where our team got a for longevity of the platform. Going with an great development platform and more, and open hardware model means that this is platform designed CircuitCo has a compelling product platform going to be an attractive board for embedded to sell. product companies to use and adapt for “We’ve been really happy to work with commercial products. I can tell you from with the Yocto CircuitCo on this, because they understand experience, there is nothing more frustrating the open hardware/open community model so Project in mind” well, but we both had plenty of things to learn from each other during the process of bringing n Along with the power and reset buttons n The MinnowBoard sits on four stilts to help aid the on the right, the MinnowBoard boasts four passive cooling of its 1GHz Intel Atom processor programmable buttons 7www.linuxuser.co.uk 006-009_LUD_131_WS PK.indd 7 05/09/2013 18:30 Exclusive Intel’s big fish in a little pond ■ Larger and pricier than the Pi, the MinnowBoard offers full x86 compatibility than developing a successful embedded product and then fi nding out that your components are about to enter end-of-life. Queens Bay is a platform used in IVI [In-Vehicle- Infotainment] devices, and was designed with a long lifespan – since people tend to own cars for a long time. It still has four to fi ve years left in the product’s life cycle. “Two, the time to execute was now, so we weren’t about to wait for upcoming Intel platforms to roll out. Tunnel Creek met our main requirements and was available immediately, so Do you agree that the success of the ARM- we ran with it.” based Raspberry Pi has demonstrated a clear standards. demand for low-cost development boards The Intel What advantages does the x86 architecture from hobbyists? Atom CPU provides used in the Atom processor offer in the “Yes, absolutely. One of the things I appreciate plenty of performance for high embedded space, compared to ARM or other and respect about the Raspberry Pi project computational workloads. It also has RISC platforms? is that it’s introducing so many new people strong I/O performance due to PCI Express “Compatibility is likely the biggest advantage. to embedded Linux development. It used to powering its Gigabit Ethernet and SATA disk Linux originated on the Intel 386, and whether be that embedded was a niche thing that features. We also make PCI Express available you’re working on embedded or desktop software engineers specialised in, and now the through MinnowBoard’s expansion connector applications, the toolchain, libraries etc were embedded Linux community is becoming much to enable high-speed I/O to custom hardware designed on and are pretty much guaranteed to more diverse, especially with younger people. I projects, for example interfacing with FPGAs or work on x86. love that.” other hardware. “Performance is another signifi cant one. “The MinnowBoard can be used for fun hobby Countless person-years have been put into What does the MinnowBoard offer that other, projects, yet scales up to higher workloads. It’s optimising compilers such as GCC to take full more established development boards lack? expandable via several PC and embedded bus advantage of x86 platforms, so you can leverage “MinnowBoard stands out in its combination standards, and offers an environment for custom that to its greatest benefi t.” of performance, fl exibility, openness and fi rmware development. ■ The MinnowBoard includes eight GPIO pins ■ With Gigabit Ethernet and a real-time clock, it pulls ahead and a dedicated expansion port for ‘Lures’ of the Raspberry Pi 8www.linuxuser.co.uk 006-009_LUD_131_WS PK.indd 8 06/09/2013 11:08 Intel’s big fish in a little pond How the MinnowBoard came about INTERVIEW “The open hardware model is Queens Bay The code name for the combination of an Intel Atom E6xx-series processor with very attractive in empowering the EG20T controller hub (code-named Tunnel Creek and Topcliff respectively), your customers” Intel launched the Queens Bay platform in 2010 with the embedded market fi rmly in mind. Initially, the company targeted in-car MinnowBoard includes PC architecture “It’s still a bit early for me to have good visibility computer systems for navigation standards including PCIe, USB and SATA, into this, as the board has only been available and entertainment – so-called ‘infotainment’ devices – but claimed as well as embedded standards such as SPI, for about three weeks [at the time of the the platform would be equally at I2C, GPIO and even [a CAN bus] for automotive interview]. As I hear about community projects, home in gaming, communications, applications. It was designed with the Yocto I do intend to highlight them on our social point-of-sale, industrial and digital Project in mind, which is an industry-wide media channels. signage applications. standard for embedded Linux.” “I am aware of someone who plans to use The Tunnel Creek family of processors a MinnowBoard as part of a quality control are not true system-on-chip designs, offl oading much of the circuitry to the The MinnowBoard is open hardware – how system for 3D printers by making use of EG20T chip, but do include the CPU, a important do you think that will be to its computer vision capabilities. I’ve also heard graphics processor supporting up to success in the market? that folks in the FGPA design community are two simultaneous displays, an audio “The open hardware model is very attractive quite interested in the MinnowBoard due to its controller and a hardware video codec in empowering your customers and high-speed expansion capabilities. There’s also on a die some 46 per cent smaller than allowing them to innovate in ways you a group of students interested in building out its predecessors. Until the launch of the MinnowBoard, can’t anticipate. Since people learning exercises on the MinnowBoard, as a however, using Queens Bay in hobbyist are free to reproduce way to advance their embedded design skills.” applications was almost impossible: and customise the Intel’s offi cial development board was MinnowBoard, the sky Intel has something of a mixed history with the provided only to registered hardware is the limit with this open source community - in particular in failing partners, and came with the expectation board’s potential. I think to release graphics drivers for selected Atom that you would be placing an order for a few thousand processors once you had this will be fundamental processor models. With the MinnowBoard being fi nished your design. to [its] success. truly open, does this signal a shift in attitude “Keep in mind that towards the open source and open hardware open hardware is communities at Intel? the embedded input/output capabilities and meaningful not only if the “The Open Source Technology Center at Intel community of Arduino will open up a lot of design fi les are available, but when is full of incredibly talented, well-known and interesting possibilities.” all the parts are available through accessible passionate people who care deeply about distribution channels and the board’s price is openness. In recent years this group has How critical is Linux and the Yocto Project to the not subsidised. If someone wants to rebuild it, grown dramatically in both size and infl uence, MinnowBoard’s success? or rebuild something similar, they can at about and it refl ects the reality of the increased “We designed the board to be a Yocto Project the cost it’s being sold for now. Not many boards infl uence open source plays in the global development platform, and Yocto produces can offer that potential.” software ecosystem. embedded Linux distros. So it’s pretty core to our “Intel’s Core graphics have open source purpose. It was the primary motivation behind the What made Intel get involved in hobbyist-level drivers that work with hardware acceleration, project itself – to my knowledge, MinnowBoard embedded computing development? and the upcoming Bay Trail Atom platform is the fi rst hardware platform designed with the “We wanted MinnowBoard to become a useful makes use of it. This will address the issue Yocto Project in mind. But most people using platform for Yocto Project development that you mentioned with graphics drivers on Atom. the MinnowBoard may have no knowledge of or encouraged experimentation and the pursuit I’m looking forward to this, and I think Intel interest in the Yocto Project – that’s okay, too.” of fun projects in addition to more serious is defi nitely moving in the right direction in embedded applications, as a board we would use this regard.” Is the MinnowBoard likely to be the fi rst in a in Yocto Project training courses. And we needed family of open development boards from Intel, it to be flexible enough so you could do interesting Intel and CircuitCo have published a list of or is it merely an experiment for the company? things in a classroom-style setting, which lines up current and proposed add-on boards, dubbed “There are a lot of people within Intel who are with what hobbyists want, too.” Lures, for the MinnowBoard. Is there a excited about open hardware. I can’t speak particular add-on you would like to highlight? [about] any specifi c future product plans, but I With the board now in the hands of early “One of the Lures that I’m sure will be quite think the future is very, very bright.” adopters, have you seen any particularly popular is the Trainer Lure – the one based on innovative or exciting applications for the an Arduino [microcontroller]. Combining the MinnowBoard emerge from the community? computational power of MinnowBoard with 9www.linuxuser.co.uk 006-009_LUD_131_WS PK.indd 9 05/09/2013 18:30 Specifications MinnowBoard vs Raspberry Pi MinnowBoard Intel’s Atom-powered development board is the first to be Yocto Project- compatible and runs Angström Linux. While considerably more expensive than the Raspberry Pi, it utilises the x86 architecture so offers computational power more akin to desktop and mobile computers. It’s also a very complete package, offering both Angström Linux on a microSD card and a properly rated power supply in the box. However, without decent driver support for the Intel GMA 600 GPU and a DVI-over-HDMI video interface (no HD audio or HDCP encryption), ■ The MinnowBoard supports tinkerers with ■ The stilts increase airfl ow to help keep the it lacks the same multimedia appeal as the two on-board LEDs and six buttons 1GHz Intel processor (under heat sink) cool Raspberry Pi. ■ SATA support brings ■ Analogue audio input is ■ Four stilts and bigger mass storage within easy a defi nite step up from the dimensions mean it MinnowBoard Specs reach of MinnowBoard Raspberry Pi towers over the RasPi Price £162 Dimensions 106 x 115mm Weight 119g Operating system A ngström Linux (Yocto certifi ed) supplied on microSD Processor 32-bit Intel Atom E640T single-core at 1GHz Video Embedded Intel GMA 600 Max resolution 1366 x 768 (no HDCP encryption) Memory 1GB DDR2 (shared), 4 MB SPI fl ash (fi rmware storage) Output D VI-over-HDMI (no audio), analogue audio out Input A nalog audio in, 2x USB, 1x SATA-2, 1x micro-USB, 1x mini-USB, 1x serial console, SD card slot, 1x micro-SDIO, 8xGPIO pins Networking 1 0/100/1000 Ethernet Real-time clock Yes (no battery installed) Extras L ure connector with CAN bus, HD audio, LVDS, IC, 3x PCI Express, SATA-2, SDIO, SPI bus, UART, 2x USB ■ It has fewer GPIO pins, ■ Gigabit Ethernet means ■ MinnowBoard needs Power 5V at 2.5A (adaptor included) but includes two LEDs and faster networking – great a staggering 2.5A to four buttons to control if you’re planning a server keep its lights fl ashing 10www.linuxuser.co.uk 010-011_LUD_131 PK.indd 10 06/09/2013 11:08