Download Linux User & Developer - Bpfine...
EBEN UPTON www.linuxuser.co.uk
EXCLUSIVE RAS PI INTERVIEW BIRTHDAY SPECIAL
THE MONTHLY MAGAZINE FOR THE GNU GENERATION
10 AMAZING
RASPBERRY PI PROJECTS Revealed: Incredible things you can do with the $25 PC
Secure your network Find and prevent attacks on your network the open source way
Eben Upton
Raspberry Pi VPN
Interview ALSO INSIDE
Master networking’s darkest art in easy steps
» CuBox reviewed » Beating Microsoft at its own game » Fedora 18 reviewed
Live distro super-test
The ultimate desktop in your pocket
Wine for developers How advanced users can harness the power of Wine
The Ubuntu Phone The latest details revealed in full
Linux genealogy 20+ pages Map out your family of reviews tree with Gramps
ISSUE 123
MANAGE
FILES
CONVERT PRINT CREATE MODIFY & COMBINE Aspose.Words
Aspose.Pdf
Aspose.Cells
Aspose.Email
Aspose.BarCode
Aspose.Slides
Get your FREE evaluation copy at http://www.aspose.com
Welcome Your team of Linux experts…
to issue 123 of Linux User & Developer Gareth Halfacree has been breaking, fixing,
tinkering and voiding warranties on electrical items for many years, without once receiving a fatal electric shock. This issue Gareth brings us his thoughts on the latest mini-PC to hit the market - the CuBox. See what he thinks on pages 68-69.
Kunal Deo is a veteran open source developer
leading multiple open source projects. He is also a KDE developer and has contributed to many projects including KDESolaris, Belenix and Openmoko. This month Kunal shows us how advanced users and developers can leverage Wine (pages 56-59).
Liam Fraser is the creator of the hugely popular
RaspberryPiTutorials YouTube series and is a Linux server admin for the Raspberry Pi Foundation. This month Liam delves into the dark art of VPN to show how the Raspberry Pi can be used to create a viable virtual private network. Follow along on pages 52-55.
Joey Bernard has been using Linux at home
for almost 20 years and he’s now getting paid for it as a computational research consultant with ACEnet. This month Joey shows us how to create a family tree using open source software in his geneology with Linux tutorial (pages 32-35).
Rory MacDonald is our resident open
source reporter with a keen nose for a story and a good eye for detail. In the news starting on page 6 this month, Rory brings us up to speed on the latest developments in mobile technology and discovers that CES has lost out on this year’s big announcements to MWC.
Rob Zwetsloot studied aerospace engineering at university, using Python to model complex simulations in class while configuring Linux HTPCs at home. In this issue Rob reveals Canonical’s latest plans with his special news report on the Ubuntu Phone (pages 6-7) among other things.
This issue
Get Linux User for £4.19 per issue
» Fedora 18 reviewed » Eben Upton exclusive Page 30 » 10 amazing RasPi projects » The Ubuntu Phone revealed
Welcome to the latest edition of Linux User & Developer, the UK and America’s favourite high-end open source and Linux magazine. This issue we’re celebrating the first birthday of the Raspberry Pi in grand style with two very special features and another excellent ‘how-to’ article from the Raspberry Pi Foundation’s own Liam Fraser. Our first special feature required us to gather together three key members of the Raspberry Pi Foundation for tea, a slice of birthday cake and a whole host of questions. In our exclusive interview starting on page 46, Eben, Liz and Pete take time out of their packed schedules to tell us all about the first year on sale and what we can expect in the future. Our second birthday treat is a huge 12-page exposé of the very best projects Raspberry Pi enthusiasts have created. It’s quite incredible what can be achieved with a £25 computer and a bit of imagination – see pages 18-29 to find our favourites. We’ve already started compiling our top-picks for the next ten amazing Raspberry Pi projects, so if you’ve got an amazing idea and have been waiting for an excuse to put it into action, get in touch with the magazine and let us know! Enjoy the issue… Russell Barnes, Editor
Get in touch with the team:
[email protected] Buy online
Visit us online for more news, opinion, tutorials and reviews:
www.linuxuser.co.uk 3 Issue 123
Contents 10 amazing Raspberry Pi projects
Reviews 66 HTC One X+
HTC updates its flagship smartphone for 2013
68 SolidRun CuBox
Another tiny-PC contender
18. Revealed: Incredible things you can do with the $25 PC
70 Samsung Galaxy Ace 2 The market leader takes another shot at budget handsets
72 Live distro super-test The latest live distros fight to earn space on your USB stick
OpenSource Tutorials 06 News
The biggest stories from the open source world
12 Opinions
The latest from your favourite free software columnists
94 Letters
Your views on the magazine and the open source scene
18 10 amazing Raspberry Pi projects Incredible things you can do with a $25 computer!
46 RasPi Foundation exclusive interview
We celebrate the occasion with Eben, Pete and Liz
60 Kolab: David & Goliath
Can Kolab beat the likes of Microsoft at their own game?
72 Live distro super-test Four of the best fight it out
86 Q & A
Your problems solved!
32 Genealogy with Gramps
Track your family history with open source
36 Install Cinnamon on your distro
Add this exciting new desktop experience to your favourite distribution
40 Protect your network with Snort Spot attacks and protect your network
The Spherical Cow has finally entered the field!
80 Pear Linux 6.1
We put the squeeze on the latest Pear build to see if it’s ripe
82 Fuduntu 2013.1
A fun and functional desktop for everyday use
Developer tutorials
E UR AT FE
Features
78 Fedora 18
52 Create a VPN with the RasPi
Master the mysterious art of virtual private networks with the aid of the Raspberry Pi
56 Wine for Developers
Build and run Windows apps sans Microsoft Tax
On your free disc 96 Cover disc
The very latest distros on one DVD
Fuduntu 2013.1 Knoppix 7.0.5 Parted Magic Fedora 18
Subscribe today! 30
Save at least 30% on the shop price. US customers can subscribe via page 84
46 Celebrating the life of Pi
We sit down with three core members of the Raspberry Pi Foundation to celebrate the first year on sale and to find out what 2013 has in store
Join us online for more Linux news, opinion and reviews www.linuxuser.co.uk 4 www.linuxuser.co.uk
06 News | 12 Opinion | 94 Letters
The Ubuntu phone Ubuntu for Android evolves into a full phone OS
Swipe Each edge of the phone has a specific use. Here’s what happens when you swipe from the top…
All the icons on the top bar represent accessible system settings, such as Wi-Fi, mobile network, battery settings and even message notifications. All you need to do is touch the one you wish to access.
Pull down the bar with your finger part of the way to get a description of what the icon means. You can swipe left to right from here to move between the different icons on the bar if you need to.
On the first working day of the year, Linux User & Developer attended a conference at Canonical HQ, where a top secret Ubuntu product would be shown off for the very first time. The rumour mill had been churning over the Christmas holiday period as to what we’d be seeing, and needless to say when Mark Shuttleworth revealed the Ubuntu Phone, it was not totally unexpected. Taking a special Galaxy Nexus from his jacket pocket loaded with Ubuntu for Phones, he then proceeded to give us a first look at what is essentially a full Ubuntu OS for smartphones. Although the Galaxy Nexus is test hardware for now, it’s indicative of the functionality Ubuntu for Phones will have. It currently uses
the Android Board Support Package, effectively allowing the OS to run on any current Android hardware with very little modifications needed. To begin with, entry-level phones for the OS will need mid- to high-range specs, with a dualcore CPU and plenty of RAM recommended. However, within a few years the plan is to optimise it for even the most low-powered phones. At the highest end, Ubuntu for Phones also includes the full Ubuntu desktop, accessible via docking similar to the Ubuntu for Android implementation; however, it’s recommended to use a quad-core CPU for this. Shuttleworth was keen to show off the way Ubuntu for Phones works, with its fairly unique interface based on the phone’s edges. Swiping
THE SPECS When you want to access the particular setting or notification, pull down the rest of the bar right over the running app, similar to Android notifications. This allows you to change system settings without going to a whole different menu.
ENTRY-LEVEL SMARTPHONE For a solid competitor to today’s smartphone, you’ll need:
SUPERPHONE INCLUDING DESKTOP For a high-end smartphone that docks as a portable desktop, you’ll need:
CPU: Dual-core Cortex-A9 Memory: 512MB-1GB Internal flash storage: 4-8GB Multi-touch: Yes Desktop: No
CPU: Quad-core Cortex-A9 or Intel Atom Memory: 1GB Internal flash storage: 32GB Multi-touch: Yes Desktop: Yes
■ The Galaxy S II meets
the minimum specs
6 www.linuxuser.co.uk
■ High-end phones like the Galaxy S III can run the desktop
News
The latest in the Linux community
OPEN SOURCE
ANDROID
Ubuntu for Android What’s going on with the Android dock? Canonical released Ubuntu for Android to little fanfare late last year – and it plans to support it outside of Ubuntu for Phones. Making its debut last year at CES 2012, the original image we saw allowed you to access the Android phone through an emulation window – this has now been mostly removed, as Ubuntu for Android can access the full telephony stack of more Android phones now, allowing you to call and text from a dedicated
app on the desktop. It still contains the ability to retrieve data from the Android portion, such as contacts, documents and photos. There is unfortunately no phone or network provider that uses it just yet – however, 2011 and 2012 saw a few failures in terms of phone-powered desktop experiences, and we’re only just seeing the advent of smartphones powerful enough to provide a seamless experience.
■ Mark Shuttleworth believes in the vision of one OS for all your devices
from the left edge brings out the Unity app bar, where you can place some of your favourite apps and then also access the full home screen. Swiping from the right edge allows you to go back through all the apps you’ve been using, and swiping up from the bottom brings up the app-specific controls. Swiping down from the top allows quick access to system settings for time, volume, networking, messaging, battery etc – each can be modified without leaving the current screen, as well. On the Galaxy Nexus the interface was fairly slick and responsive. The edge gestures worked well – although trying to select items in the corners was sometimes a little tricky, but it is still in development. App development wise, Canonical says it has been working closely with some of the major smartphone app developers for native Twitter, Facebook and other popular apps to be ready for Ubuntu phones. Shuttleworth reiterated that the OS was more open than any other current mobile OS, and that development of apps and tools would be much easier using the Ubuntu framework. There are no current release plans for an Ubuntu Phone, and while talks are underway with networks and manufacturers, no deal has been reached as of yet. Images for Ubuntu for Phones are going to be released to the public sometime in February, though, so those with decent Android phones will be able to give it a try.
Estimated OS stretch by 2016
<
> v2
Lean smartphones
v3
v4
Mid-range smartphones
High-end smartphones
Superphones
7 www.linuxuser.co.uk
OpenSource
Your source of Linux news and views Contact us…
Register and post your comments… Email us directly…
[email protected] www.linuxuser.co.uk/forum/
MOBILE
Mobile World Congress steals device launches New processors reveal what we can expect When it comes to new, market-ready smartphones and mobile devices, this year’s CES was widely seen as a disappointment. What the trade show has revealed, however, is a serious selection of the latest mobile processors that will be found at the core of the devices we eventually see at Mobile World Congress (MWC) on 25-28 February. Nvidia announced its successor to the Tegra 3 chipset, used in 2012’s most successful highend Android devices, such as the Nexus 7. Billed as the world’s fastest mobile processor, the
■ The Tegra 4 offers blistering mobile power
Tegra 4 combines an eye-watering 72 custom GeForce GPU cores (six times the graphics processing power of the Tegra 3) with the first quad-core implementation of ARM’s newest Cortex A-15 CPU and a second-generation battery saver core for less intensive tasks. As with most of the new high-end chips announced at the show, the Tegra 4 can deliver 4K Ultra HD video. However, 4G mobile support requires an additional chipset. Importantly, given the criticisms of the Tegra 3, Nvidia also claimed that the new processor consumes up to 45 per cent less power than its predecessor “in common use cases” and enables up to 14 hours of HD video playback on phones. Meanwhile, Qualcomm announced its quad-core Snapdragon 800, with a 75 per cent performance increase on the S4 Pro. It will be based on four of Qualcomm’s own Krait 400 CPU cores, which can be clocked at up to 2.3GHz each. Graphics will be delivered by an Adreno 330 GPU, which doubles the power available on
TIZEN
Tizen set to rival Android
Ubuntu Mobile is not the only new game in town – Tizen looks set to grow in 2013 While the loudest noise on the Linux front came from the new Ubuntu Mobile distro (see page 6), it was not the only significant mobile Linux development at CES. Samsung let slip that 2013 will see it launching a new range of phones built on the Tizen OS. Tizen was developed by the Linux Foundation and mobile Linux
■ The Tizen OS is gaining momentum
8 www.linuxuser.co.uk
pioneers the LiMo Foundation. The project took the groups’ existing investments into MeeGo Linux and several other mobile Linux variants and redeveloped these into an even more sophisticated and up-to-date mobile platform. With a heavy focus on open HTML5based applications, Tizen has been making significant inroads into both the IVI and smartphone markets. However, Samsung is the first major manufacturer to confirm plans for smartphones built on the new platform. With Samsung’s current smartphone success built on Android, it is no secret that the company has been looking for alternatives that would allow it to hedge its bets against overdependence on the Google-dominated platform. Google’s decision to buy Motorola
■ A new Snapdragon
the S4 Pro. The Snapdragon 800 also supports 4G on the chip, which will reduce costs for device manufacturers. The inclusion of a dual image signal processor to allow the capture of 3D images and standard resolution video also gives the Snapdragon an added edge. Although many of Samsung’s 2012 phones featured Qualcomm processors, the firm has been working on updating its own Exynos range. The Exynos 5 ‘Octa’ unveiled at CES offers an eight-core design, based on ARM’s big.LITTLE architecture. It uses four low-power ARM Cortex-A7 cores for less CPU-intensive tasks and four Cortex-A15s to handle heavy loads. The intention is to reduce power consumption, with Samsung claiming a 70 per cent increase in battery life for the dual-core Exynos 5. Finally, Intel, whose Atom x86-based chips have been rivalling ARM in 2012, announced that devices based on the ‘Bay-Trail’ quad-core Atom chip are scheduled to hit the shelves towards the end of 2013.
last year will almost certainly have added extra impetus to Samsung’s search. Samsung, a key founder member of the former LiMo Foundation, had been working on Bada, its own mobile Linux distro. But with limited uptake of Bada, much of this work was subsequently rolled into Tizen. The vision of Tizen – to provide a Googlefree, unified platform running across phones, cars, home entertainment and broader smart devices – is compelling. With other Tizen Foundation members including Intel, Huawei, NEC, Panasonic and some of the world’s largest mobile carriers, this vision is looking increasingly viable as a new force across the consumer electronics industry. Official details of Samsung’s Tizenphone plans have yet to emerge. However, early reports on the Japanese Daily Yomiuri Online news site were confirmed at CES, when a Samsung spokesperson told CNET reporters that the company plans “to unveil competitive Tizen devices within this year.”
News
The latest in the Linux community
OPEN SOURCE
Samsung model top in US Online retail giant Amazon is currently putting different variants of the Google Chromebook at the top of its hourly updated listings of the bestselling notebooks in the UK and the US. At the time of writing, Samsung’s 11-inch offering is in the number-one position for US sales, while the Acer C7 Chromebook is sitting
■ Samsung’s 11-inch Chromebook
at the number-two spot in the UK. Although the Windows 8-powered Acer Aspire E1 currently holds the top spot in the UK, Windows has been knocked into third place by the 13-inch Apple MacBook Pro in the US. It certainly seems that Microsoft’s one-time dominance of computer hardware is now in question.
HARDWARE
Steambox is confirmed
Based on Xi3 Piston PC Xi3, a firm formed as a Kickstarter project to create small, modular Linux-based PCs, caused a stir at CES amid rumours that the company’s new Piston PC was, in fact, a prerelease version of Valve’s upcoming Steambox gaming console. Xi3 has taken investment from Valve and executives said they have been
■ Piston PC
working together to optimise the Piston PC for running Steam on Linux. However, Valve founder Gabe Newell finally laid all speculation to rest after the show. “We’ll come out with our own,” Newell told reporters at The Verge, “and we’ll sell it to consumers by ourselves.”
14 March 2013
■ X marks the spot for a new Google phone
Motorola’s patent portfolio as the chief reason for the acquisition. Google initially played down any talk of the company creating its own inhouse, end-to-end, Android ecosystem. “Google remains firmly committed to Android as an open platform and a vibrant open source community,” Andy Rubin, Google’s senior vice president of mobile, commented at the time. “We will continue to work with all of our valued Android partners to develop and distribute innovative Android-powered devices.” Since then, Google has avoided any sign of favouritism to Motorola. The ‘Nexus’ branded contract to premiere the latest version of Android has been awarded to a string of other hardware vendors in the Android ecosystem. However, the appointment of a heavy hitter such as Ron to head up its in-house hardware development will undoubtedly strike fear into the hearts of an already paranoid Android hardware community.
13-21 March 2013
Google plans new ‘X-Phone’ Google has tasked Lior Ron, ex-chief technology officer of the Israeli Army Intelligence, to head up the team to develop a new Android super-phone, according to reports in The Wall Street Journal. The ‘X-Phone’ is part of a plan for Google to increase the profitability of its Motorola Mobility unit and claw back a share of the smartphone hardware market now dominated by Samsung and Apple. When Google first bought Motorola Mobility last year, the company carefully stagemanaged the deal. The focus was placed on
» www.littlegreenrobot.co.uk Android Magazine, our best and only print source for everything Android, is coming out today. Check out what’s in store over on page 64.
» Hilton Los Angeles International Airport, Los Angeles, CA » USA »www.socallinuxexpo.org/ scale11x The 11th annual Southern California Linux Expo is the first Linux and open source software expo this year in North America, and will be host to more than 100 exhibitors and 70 speakers.
PyCon 2013
MOBILE
Ex-CTO of Israeli military to head up development
Android Magazine – issue 22
SCALE 11x
22-24 Feb 2013
Chromebook tops the charts
21 Feb 2013
Linux calendar
HARDWARE
» Santa Clara Convention Center, Santa Clara, CA » USA » https://us.pycon.org/2013/ The largest annual gathering for the Python community, PyCon is a diverse conference dedicated to providing an enjoyable experience for everyone who attends. Tutorials, talks, summits and open spaces are available at the conference.
Linux User & Developer – issue 124 » www.linuxuser.co.uk The next issue of Linux User will be out today – find out what will be in issue 124 on page 98…
9 www.linuxuser.co.uk
OpenSource
Your source of Linux news and views Contact us…
Register and post your comments… Email us directly… www.linuxuser.co.uk/forum/
[email protected]
hardware
OLPC previews new touch devices at CES
Two new low-cost learning devices, both with touch screens Less cutting-edge, more at the cuddly edge of Linux, the One Laptop Per Child (OLPC) association was also showing off its latest wares at this year’s CES. OLPC suffered a bumpy ride into the world of tablets, shelving initial plans for the XO 3.0 device. However, with the new XO Learning Tablet and XO 4.0 Touch, the project seems to have found its feed again. The XO 4.0 Touch is the fourth generation of OLPC’s now iconic green and white notebook aimed at providing a modern education to children through a rugged, low-cost, connected computing device. It features a robust swiveling Neonode touch screen to convert between notebook and tablet mode. The processor has been updated to a 1GHz Marvell Armada multicore ARM processor with hybrid-SMP technology. Memory and storage have been left as flexible as possible, with the option for either 1 or 2GB of DDR RAM, 4 or 8GB of drop-proof NAND flash storage, internal microSD and a fullsize external SD slot. The XO 4.0 is designed with a focus on power efficiency in order to cope with the erratic electricity supplies in the developing nations where OLPC predominantly operates. However, running a customised version of Fedora 18, the device still delivers sterling performance and the new touch screen is usable in an unlit classroom or in direct sunlight. OLPC’s first pure touch device, the XO Learning Tablet, offers even more poke with a dual-core 1.6GHz processor and 1GB of RAM (for full specs, see below right). The XO Learning Tablet also marks a change for OLPC, as it is the project’s first Android-based device. To date, the XO notebook range has run Fedora
n OLPC XO Learning Tablet – scheduled for widespread release in May 2013
10 www.linuxuser.co.uk
n The OLPC XO
4.0 Touch
Linux, customised with the project’s own Sugar user interface. The Tablet’s new XO Learning interface is an Android-compatible software suite for childcentric learning. The interface was developed by OLPC together with Yves Behar’s fuseproject and Common Sense Media, a non-profit organisation dedicated to helping parents and teachers make informed decisions about media. “OLPCA and Common Sense Media share the same vision of a world in which all kids have access to the limitless learning opportunities that technology provides,” OLPC commented in the official launch announcement. “Every child has dreams, and XO Learning directs the child’s passion, creativity and energy for these dreams into a new user interface that has 12 dreams. Such dreams include ‘I want to be’ an artist, a musician and a scientist. Each dream features a rich learning experience and applications, books, games and videos that allow children ages 3 to 12 to naturally explore their dreams and learn at the same time.” XO Learning provides a full range of parental controls and user IDs for up to three children, plus a dashboard where the child or the parent can review usage, types of content and the skills
the child is developing. Current content partners include Sesame Street, MyCityWay and Little Pim, and OLPCA is currently in negotiations with many more of the world’s leading companies to provide unique experiences in time for the product’s expected launch in May 2013. In contrast to the traditional XO models which were always hard to come by in the Western world, the XO Learning Tablet is intended for truly global use and is likely to be made available through high-street retailers. We will keep you updated.
Vivitar licensed XO Learning Tablet
Technical specs
Display size 7.0-inch Processor 1.6Ghz dual-core RAM 1GB Wi-Fi SDIO 802.11b/g/n Screen resolution 1024x600 pixels Free apps 100 preloaded Parental control Built-in Storage 8GB Battery 3,800mA I/O microSD, HDMI, micro-USB, stereo headset Cameras 1.3MP 720 HD (front); 2.0MP (rear)
News
The latest in the Linux community
OPEN SOURCE
OPEN SOURCE
NetflixOSS Open House promises new insights
Open source developers invited to showcase event Online film and TV provider Netflix aims to strengthen its position in the open source community by holding an Open House event at its Los Gatos offices in California. In the past year, the firm has released 16 of its core infrastructure components as open source projects on GitHub (http://netflix.github.com). These releases have included its Asgard cloud management tool, Eureka load balancing software and the Simian Monkey suite of cloud network and cloud infrastructure testing tools. The NetflixOSS Open House event will provide a showcase for the company’s existing GitHub releases and the opportunity to “deep-dive” into
the technologies with their core developers. In addition, Netflix is promising more new releases. Despite several requests to the event’s organisers, we have yet to determine if the Open House will be streamed live (given Netflix’s business, we’d expect it to be). However, it will almost certainly develop interest and activity around some of the more useful open source technologies to have been released last year. It is also worth noting that Netflix is clearly not releasing new tools and holding this type of event simply to be friendly to its new open source community: the company is clearly looking to attract new developer talent.
Grab Linux User digitally at greatdigitalmags.com
In case you missed it, Linux User magazine is available to read on any digital format thanks to the excellent digital editions super-site, www.greatdigitalmags.com. The site brings together Linux User’s offerings on Zinio and Newsstand, allowing you to enjoy your favourite mag on your Mac, PC, iPad, Android and a host of other devices. There are some incredible subscription incentives up for grabs too – not just for Linux User but for all Imagine Publishing titles. To find these amazing deals, point your web browser at www.greatdigitalmags.com, where you can find links to back issues, subscriptions and more, across almost every platform. It’s all available in just one place, and there are massive savings to be had!
■ Netflix is wooing open source developers
OpenSource
Your source of Linux news and views
THE KERNEL COLUMN
Jon Masters
Jon Masters summarises the latest happenings in the Linux kernel community, including the closing of the development ‘merge window’ for the 3.8 kernel Jon Masters is a Linux kernel hacker who has been working on Linux for almost 17 years, since he first attended university at the age of 13. Jon lives in Cambridge, Massachusetts, and works for a large enterprise Linux vendor. He publishes a daily Linux kernel mailing list summary at kernelpodcast.org Linus Torvalds closed the 3.8 kernel ‘merge window’ (the period of time during which disruptive changes are allowed into the kernel, and are then stabilised before final release) just prior to the Christmas holiday. In his announcement of the first 3.8 ‘release candidate’, Linus said, “The longest night of the year is upon us (and by ‘us’ I mean mainly people in the same time zone and hemisphere as I am. Because I’m too self-centred to care about anybody else), and what better thing to do than get yourself some nice mulled wine, sit back, relax, and play with the most recent RC kernel?” Some readers might question whether this is truly the most relaxing course of action, but nobody can fault Linus for trying to motivate developers to spend some holiday time testing code. The 3.8 merge window was, according to Linus himself, the biggest merge window in the 3.x kernel series so far (in terms of raw number of changes going into the kernel codebase). It will contain a number of new and exciting features. Two that interest this author in particular are the support for transparent huge zero pages, and newly added support for the AllWinner ‘A1X’ series of system-on-chip ARM processors. The latter are very popular, inexpensive and more capable (in terms of
12 www.linuxuser.co.uk
compute) bigger brothers than the chip used in the Raspberry Pi, while being used in systems of similar price. It is possible, for example, to purchase one of the popular ‘MK802’ plug-in TV dongles built using the AllWinner A10 CPU for $35. That yields a full ARM-based Linux system running at 1GHz, with 1GB RAM, USB, Wi-Fi, an SD card interface and full HDMI output. Even more capable systems of a similar price point are appearing all the time, so the A1X will remain popular. Transparent zero huge pages are another 3.8 kernel feature that will be popular with users, although if the feature is working correctly, users who use it may never realise that it is even there. Huge pages are a hardware feature of modern CPUs in which the built-in CPU virtual memory translation caches, known as TLBs (translation lookaside buffers), support both the conventional smallest unit of virtual memory page size of (typically) 4KB, as well as a much larger ‘huge’ page of 2 or 4MB or more. This is useful because the CPU has only a limited number of these much faster TLB caches that it uses to store previously lookedup (translated) virtual memory mappings from addresses used by applications to those of the underlying hardware. By using huge pages, the hardware can keep more translations cached and improve performance. But, there is a performance catch to using huge pages. Historically, huge pages had to be manually assigned, but support for ‘transparent’ or automatic huge pages was added to the kernel some time ago and has been present in distributions for a number of releases. With the introduction of transparent huge pages came the unintended side effect that some systems would actually waste memory in the process. This is because when allocating conventional
Opinion
The kernel column – Jon Masters
pages, the kernel has the option of using the ‘zero’ page, a special page that is read-only and full of zeros. When applications attempt to write to it, a process known as copy-on-write actually allocates and sets up the real page entries in the kernel. The transparent huge pages code did not have a similar concept, so applications mapping large amounts of contiguous memory might have a large number of huge pages filled with zeros allocated that were never used. Linux 3.8 addresses this situation by sharing a ‘huge’ zero page, similar to the regular zero page. During the merge window, some changes to the Video4Linux (V4L) code were merged that broke a user-space application (PulseAudio) by altering the return codes passed by a system call. Linus got particularly angry about this, telling the kernel developer concerned to “SHUT THE F*** UP!” when responding to protests that the user-space application was doing something wrong. Linus reminded everyone of longstanding policy by saying, “[If] a change results in user programs breaking, it’s a bug in the kernel. We never EVER blame the user programs. How hard can this be to understand?” Strong responses aside, there is established history of never questioning even the weirdest of application behaviour, always endeavouring to retain compatibility. The patch in question was reverted by Linus and an alternative reworked. With the merge window closed, development has returned to a combination of new patch development and refinement of the existing 3.8 release candidates, which are several weeks in as of this writing. There are typically seven or eight release candidate kernels (spread over several months’ duration) for a typical kernel, meaning that we can expect 3.8 final sometime in February.
Ongoing development
This past month saw an interesting series of conversations around hash collisions in nextgeneration file systems. Many modern file systems use a hash-based approach to store the names of individual filename entries within normal directories. A given name, such as ‘passwd’ (as in /etc/passwd) is passed through a hashing algorithm which generates a finite number of possible numeric values. This value
n Linus Torvalds encouraged developers to play with the latest RC kernel over the holidays
is then used internally within the file system to determine where in the ‘data structure’ within the file-system metadata the given entry will be stored. If multiple files hash to the same location, a list is created. Such lists (buckets) are not typically very large because the hashing algorithm does a good job at keeping hash ‘collisions’ to a minimum. Sometimes, however, these lists can be artificially enlarged by creating special file-system entries that are known to generate collisions. This is what Pascal Junod blogged about in December. He raised a number of known issues with Btrfs and discovered a new bug in the code, which Chris Mason (the author) has now posted a patch intended to address the concern. A lot of memory (virtual and otherwise) work is ongoing. Minchan Kim has continued working on support for volatile memory mappings. Using special parameters, applications can explicitly mark regions of memory as being volatile (the kernel is allowed to trash them at will), and unmark them as volatile when they are needed again. The application is able to determine whether the volatile memory was actually destroyed in the meantime. Related work includes a user-space memory shrinker from Anton Vorontsov, which allows applications to use a mempressure cgroup to register reclaimable chunks. When the system is low on memory, the application will be asked to reclaim a number of chunks. It will then
“Transparent zero huge pages are a 3.8 feature that will be popular”
CC. GFDL. Permission of Martin Streicher, Editor-in-Chief, LINUXMAG.com
open source
update the kernel as to what was reclaimed. Both this and the volatile work are useful, for example, in applications that retain large caches (eg of webpage content) that can easily be regenerated. Linux 3.7 introduced support for ARM’s new ‘AArch64’ 64-bit ARM architecture. Previous kernel cycles have sometimes introduced more than one new architecture. Although it seems as if this won’t be the case for 3.8, it does look like 3.9 could have two new architectures. James Hogan posted pretty comprehensive support for Imagination’s ‘Meta’ processor cores (hybrid CPU/DSP cores capable of running multiple RTOSs and regular kernels on hardware threads at the same time), while Vineet Gupta reworded the older 3.2 kernel support for Synopsys’s ARC processors to bring it up to date. The latter is interesting because it is intended to be a highly configurable and extensible processor architecture. Those implementing the (licensable) ARC processor can customise the number of instructions, registers and many other features, in a manner described online as being “like Lego blocks”. Finally this month, a number of kernel developers have been considering putting the ‘Kernel Hacking’ menu options within the kernel Kconfig “on a diet”. Dave Hansen, as well as other developers, consider that 120 possible options is now too large and that a number of these should be removed, or split out. In particular, Dave posted a cleanup patch to move ‘debugfs’ out into the file-systems menu.
13 www.linuxuser.co.uk
OpenSource
Your source of Linux news and views
the open source column
The tablet the industry needs? Simon ponders the continued explosion in the sales of tablet devices, and wonders how it can all be turned to good
Simon Brew is a technology writer and editor, working across the Linux, Windows and Mac OS X platforms
Given that the general impression given of the British retail sector in particular postChristmas was one of doom and gloom, with several major chains facing well-documented problems, closer inspection revealed some interesting upward trends in the midst of the figures. And technology, not for the first time, was adding some of the fuel. Appreciating that there were many contributory factors, the numbers for highstreet electrical giant Currys were surprisingly impressive. In line with similar chains in other countries, Currys has spent money making its stores bigger, consolidating its brands under one (very big) roof. I went in one just before Christmas and, truthfully, couldn’t leave fast enough. The PC World segment of the business seems to exist to try to sell us copies
14 www.linuxuser.co.uk
n Apple is no longer getting it all its own way in the tablet market
of Windows 8 (which I suspect will continue to cause Microsoft as many problems as it resolves), and listening to a salesperson try and sell anti-virus software to someone buying a tablet computer called for rarely seen levels of restraint. The methodology of old remains the same, it seems, even if the products themselves gradually changed. Two things have buoyed Currys, however. The first is the demise of another big British chain, Comet, which inevitably brought fresh footfall into the market. But the other, and less UK-specific factor is the staggering, ongoing success of tablet computers. Tablets are now heavily mainstream, as well as filling in niches in the market that a full computer can’t do. Take the rise in educational and child-targeted tablet computers, for instance. Granted, this is usually a cheap Android-powered model that’s had a few apps clustered together on it. But there’s potential here to push the hardware itself into affordable, interesting places, and the low price that’s been asked for such devices suggests that there’s headroom to do more. What’s particularly interesting about the tablet market too is that Apple no longer appears to be having things its own way, and that’s been crucial to the relaxing of the sector as a whole. Samsung and its Galaxy line is at the top end of Apple’s rivals, and Google’s Nexus line continues to thrive. Sadly, it looks as if Amazon’s less-friendly-than-it-looks Kindle Fire has been making serious headway, though, which is a worry. As those who have used the Kindle Fire extensively can testify, it’s a tablet that exists to get you closer to Amazon’s products and
services above all else. It adds little to nothing to the open source community at all. But it doesn’t have to be like that. Convincing the mass market to adopt an open source operating system for a desktop PC or laptop was always going to be a proverbial uphill struggle, but there’s a different set of parameters now. While Windows 8 continues to try to win people over, the truth that Microsoft is facing is that, for the first time in a generation, there’s change on a software as well as a hardware level. Sadly, by allowing the likes of Amazon to seize that, there’s an argument that some opportunities have been lost already. But the taking for granted of a touch-screen interface means that there’s space here for something of note in the retail sector to develop; for devices that work on a genuine framework of open source software, to offer genuine choice. Remember the days when Dell first introduced its laptop customisation purchase screen that seemed intent on selling you as much as it possibly could? Well, that might just be inverted now. Instead, software becomes the choice. Given that most hardware in the sector is created equal, we’re at a stage where end users can, instead of quibbling over memory and storage space, focus on application and what they actually want a device for. Currys is unlikely to be interested in that any time soon. But by continuing to fuel the tablet explosion, the retailer may yet have a helping hand in bringing to the fore a more interesting way of computing.
Opinion
The free software column
open source
the Free software column
Apple scruffs
Android phones are no more a ‘rip-off’ of the iPhone than the iPhone is a rip-off of earlier mobile phones and technology, argues Richard Hillesley…
Richard Hillesley writes about
art, music, digital rights, Linux and free software for a variety of publications
Igor Stravinsky once said that “a good composer does not imitate; he steals”, and TS Eliot once said “immature poets imitate; mature poets steal.” Even the idea that good art embraces the work of other good artists is not unique or original. Good art is often a synthesis of thoughts and methodologies that have been poached and recycled from other sources. Very little is entirely new or original, and this understanding is equally true of other aspects of our lives. Ideas are cumulative and depend upon the evolution of techniques, observation and criticism, so it isn’t entirely surprising that inventions and discoveries are often made simultaneously by different people in different locations. It is still a matter of argument, for instance, whether the electric light bulb was invented by Joseph Swan or Thomas Edison, or the telephone by Elisha Gray or Alexander Graham Bell… The style and design of the prevailing art and everyday items of our lives reflect the zeitgeist and are a refinement and an assimilation of the judgement of their times. Everybody copies everybody else, and style is not a patentable
idea. So the cars of any era, however different they might have seemed in their time, look like other cars of that era – and the same can be said of, say, furniture, graffiti, clothes, hairstyles and mobile computer devices. A mobile phone is based on any number of software and hardware technologies developed by individuals and firms such as Nokia, Samsung and Motorola over a period of 30 years, but a modern phone looks very different to one of 30 years ago. A mobile phone has some basic requirements. It has to be portable and fit in your pocket, preferably with smooth edges so that it doesn’t catch on the threads of your jacket or shirt. It has to be able to scan the web and talk to other phones. Sometimes we expect a little bit more, but the basic technology and appearance, albeit refined and improved, remains the same, and owes everything to 30 years of research and development by any number of companies and individuals who wormed away at the idea of touch screens and mobile communications, sometimes making breakthroughs and sometimes encountering failure. The commercial breakthrough of the smartphone is dated to the launch of the iPhone in 2006, but the ideas and technology it embraced did not slip, clean and new, out of Apple’s ownership of one particular part of the ether. Apple was not alone in recognising that the mobile phone had a significant future, but had the advantage of being an outsider to the business, able to take a dispassionate view of the possibilities. Apple synthesised the best aspects of existing mobile phone technologies and smartphones, and added the marketing potential of the idea behind iTunes to make an iPhone out of an iPod – a phone that doubled as an iPod and a web device, and gave access to the Apple store. Marketing and the inertia of the competition did the rest. The iPhone was the best mobile phone of its time, used the best hardware, and relied
on clean design and usability principles. Apple made all the right decisions, sidestepped the competition and still holds a significant share of the market – but very few of the constituent parts of the iPhone were really unique or original. Competitors adopted Android, which had been under development since 2003, offered all the advantages of the iPhone and cost significantly less. The justification for Apple’s subsequent righteous war against the Androids is the tendentious claim that Android is a ‘rip-off’ of the iPhone and “a stolen product”. The primary contention is that Samsung and Android have ripped off Apple’s style and look and feel, but Android is no more stolen from the iPhone than the iPhone is a ‘rip-off’ of the pioneering work of the likes of Motorola, Nokia and Samsung itself. The instrument for Apple’s war has been the acquiescence of the United States Patent and Trademark Office (USPTO) and the US courts, ownership of scores of debatable utility and design patents, and its claims against Samsung and others of ‘trade dress infringement’. The good news in recent months is that some of these entitlements, such as Apple’s patent entitled ‘Touch screen device, method, and graphical user interface for determining commands by applying heuristics’ (bit.ly/TPWeEw) and ‘the rubber band patent’ (ars.to/SmJ6pP) have come up for review and been found wanting by the USPTO. The bad news is that Apple still has a vast portfolio of debatable patents to draw upon. Patents are not a defence of the rights of the innovator, but a weapon against competition and invention and the rights of the user. Android is no more a ‘rip-off’ or ‘stolen product’ than the iPhone itself, or the music of Stravinsky or poetry of Eliot.
15 www.linuxuser.co.uk
CELEBRATE
6 MONTHS
FREE!
DOMAINS | E-MAIL | WEB HOSTING | eCOMMERCE | SERVERS *12 month minimum contract term applies. Visit www.1and1.co.uk for full offer details, terms and conditions. Prices exclude VAT.
SHARE OUR SUCCESS This year at 1&1, we’re celebrating our 25th anniversary! In honour of this occasion, we‘re making it even easier for you to benefit from our knowledge and experience, with 6 months free on all our web hosting packages! Over the past 25 years, 1&1 has grown to become one of the world’s leading web hosts. Today, with more than 11 million customer contracts, £2 billion in annual turnover, 5000 employees and 5 highperformance data centres, 1&1 provides superior web hosting to support your business. Share in our success and take advantage of our anniversary offers!
OFFERS END 28/02/13 1&1 Starter
1&1 Standard
5 GB Webspace 1 MySQL 5 Database (1 GB each) 1000 e-mail accounts (2GB)
50 GB Webspace 10 MySQL 5 Databases (1 GB each) 3000 e-mail accounts (2GB)
–
–
PHP 5.4, PHPDev, Zend Framework
PHP 5.4, PHPDev, Zend Framework, Perl, Python, Ruby, SSI
1&1 Unlimited
1&1 Business
Unlimited Webspace 100 MySQL 5 Databases (1 GB each) 5000 e-mail accounts (2GB)
Unlimited Webspace Unlimited MySQL 5 Databases (1 GB each) Unlimited e-mail accounts (2GB)
1 domain included. Choose from .co.uk, .me.uk or .org.uk
1 domain included. Choose from .co.uk, .me.uk or .org.uk
PHP 5.4, PHPDev, Zend Framework, Perl, Python, Ruby, SSI
PHP 5.4, PHPDev, Zend Framework, Perl, Python, Ruby, SSI
Unlimited Traffic 1&1 Click & Build Applications: WordPress, Joomla!®, Drupal™ and more 1&1 Security: Geo-redundancy and Webspace Recovery
2
£ .49
per month*
4
24/7 phone and e-mail support
£ .99
per month*
6
£ .99
per month*
9
£ .99
per month*
6 FREE 6 FREE 6 FREE 6 FREE MONTHS
MONTHS
MONTHS
MONTHS
Plus: secure your ideal domain now from just £0.99!*
Call
0844 335 1211 or buy online
1and1.co.uk
Feature
10 amazing Raspberry Pi projects
TEN AMAZING RASPBERRY PI PROJECTS
The £25 computer is celebrating its first anniversary – here’s to a year’s worth of magnificent, unique and exciting achievements As portable computing goes, the Raspberry Pi could hardly be bettered. Small enough to slip inside a pocket, it can go anywhere and everywhere with you. Yet to use the Pi as a standard Linux machine kind of misses the point – or, at the very least, the opportunities afforded by this small-form-factor, high-spec wonder. Over the past year, this inexpensive machine, produced as an educational plaything, has taken centre stage for a
18 www.linuxuser.co.uk
whole host of projects. Some have satisfied a craving for fun; others for exploration and indulgence. More still have satisfied the current trend for performing real-world tasks at the lowest possible price. The Pi is the recession buster with the potential to empower a future generation (as one schoolboy emphatically showed). Here we present ten of those projects. Each of them, we believe, encapsulates all that is good about the Pi, making great use of two things: the machine itself, with its tiny credit card size; but above all, the bold
imagination of the creators. And the balls to keep going to realise those dreams, of course, but that would be three things. Over the next few pages, the creators of these projects talk us through their projects. You will find the majority of the source code on our cover disc and we'll also tell you where you can find tutorial instructions, where available, to allow you to replicate them. But more than all of this, we hope it provides you with inspiration for your own projects. You never know – you may see your creation here in a year's time.
10 amazing Raspberry Pi projects 1 RasPi birthday Top Raspberry Pi projects to amaze and inspire st
feature
special
19 www.linuxuser.co.uk
Feature
10 amazing Raspberry Pi projects
The Raspberry Pi Supercomputer Take some Lego and 64 Pis for a delicious slice of processing power
With 64 Raspberry Pis and more than 1,000 pieces of Lego, this is a supercomputer in more ways than one
Since the ultimate aim of the Raspberry Pi is to encourage children to experiment with computers and understand their inner joy, the supercomputer project built by computational engineers at the University of Southampton could not be a better example of the magical things being done with this miniature marvel. The creation by Professor Simon Cox and his team cost less than £2,500 to build, excluding the switches, but it also had a special ingredient: Prof Cox’s six-year-old son, James. It was while playing around with a Pi with his son that the supercomputer expert decided it would be an interesting experiment to buy 64 of the machines and produce something rather spectacular. And it was the young boy who provided specialist support on Lego and system testing, providing an eye-catching aspect to the entire project.
The supercomputer runs Raspbian OS, which is based on Debian and optimised for Raspberry Pi
Maker profile: Prof Simon Cox Simon Cox is Professor of Computational Methods at the University of Southampton. His research is about applying and developing high-performance computing and big data to tackle problems in science and engineering. The university of has a powerful 12,000-core Intel-based supercomputer which cost millions of pounds.
20 www.linuxuser.co.uk
There is 1TB of Class 10 SD card memory on Iridis-Pi, which is named after the University of Southampton’s 12,000-core Iridis supercomputer
It has 192W total electric power draw, ~4 GFlops of CPU power and ~1500 GFlops of GPU graphics compute power
10 amazing Raspberry Pi projects 1 RasPi BIRTHDAY Top Raspberry Pi projects to amaze and inspire st
FEATURE
SPECIAL
“The thing about the Raspberry Pi is that suddenly things can be done that come within the budget of a school so you could actually have term-long projects and a whole class involved”
■ Lego features highly in the project, but so does research. Although the supercomputer uses an ordinary downloadable system image from the Raspberry Pi website, the performance and various other parts of the firmware and drivers have been improved by a factor of 50 or more
Running off a single 13 amp mains socket and using MPI to communicate between nodes using Ethernet, it offers a staggering amount of power when you consider the low cost. Prof Cox had been impressed straight away by how great the Pi was for playing around with electronics using the GPIO connectors. “The fact you could turn LEDs on and off and
link a little Python computer program to a bar graph LED caught the imagination of myself and my son who built a Lego case for it,” he tells us. So he waited for a large supply of Pis to became available. “We then had to decide on the network switches. My background researching supercomputers and IT meant I knew you could spend a lot of money on switches. We begged, stole and borrowed some old switches that were being decommissioned from our computing service, which meant we could link them together. I got some power over Ethernet switches from another project I was working on.” James used his design skills to build the racking out of little plastic bricks before testing it using Python and Scratch. But one of the most time-consuming processes was getting all of the images set up. Prof Cox found it was one thing to download one image on to one SD card, but quite another doing 64 of them. “The Pi, for the first time, has meant you can assemble a supercomputer for a couple of thousand of pounds. And if you take just four of the units, suddenly you are at £100 and that means that large-scale supercomputing, or the principle of it, can be seen in schools. That's very special.”
■ The project started when Prof Simon Cox and his son, James, began to play with a Pi
TRY IT YOURSELF The Kit:
• 64 Raspberry Pis Model B/256MB = £1,475.20 • 64 Kingston Ultimate X 16GB Class 10 (SD10G2/16GB) = £622.72 • 64 metres of CAT 5E (misc colours) = £90.88 • 64 micro-USB power supply adaptors, UK, 1.2A = £244.48 ■ Since the drivers for the Pi's video card are open source, the potential to use that video chip for processing opens up 24 gigaflops of general-purpose computer performance
The Knowhow:
www.soton.ac.uk/~sjc/raspberrypi
Plus items that were in the lab:
• 3 Netgear ProSafe 24-port smart switches with PoE / 192W total 4 SFP (GS724TP) = £269.99 each • DrayTek Vigor 2820N router • Keyboard • Monitor • Mouse • HDMI-to-monitor cable • 3 CAT 5E cables to connect the switches together
21 www.linuxuser.co.uk
Feature
10 amazing Raspberry Pi projects
Picade arcade cabinet No need to stand
around in arcades – bring the action to your home Games have often been said to be a key driver of technology and so we were extremely excited to see the Picade project when it emerged on Kickstarter. Created by Jonathan Williamson and Paul Beech, it looks like a mini, retro-style cabinet and comes in kit form. All people need is a screwdriver, a pair of pliers and an hour of time to put it together. “The idea had been in our heads for a while,” says Jonathan. “Paul and I have been through a number of startups and we had frequently seen a JAMMA cabinet in the office. It seemed the thing to have. We thought that only people with too much money or time on their hands were getting enjoyment out of them, so we decided it would be good to build one ourselves.” The pair have been interested in technology for a long time and the Picade has been an accumulation of knowledge. From reading about joysticks to monitors, all of those ideas have come together. “We’ve also benefited from Kickstarter and globalisation,” says Paul. “Having the Pi was amazing.” As if to underline just how the project has turned heads, Ian Stewart, the founder of Sheffield’s Gremlin Graphics – a games
“There are those little specialist niche markets. The Raspberry Pi lets you do things which were previously very expensive if you are prepared to get your hands dirty and hack a bit” Maker profile: Jonathan Williamson and Paul Beech Paul is a designer, hacker and maker. He designed the Raspberry Pi logo and is the brand and design lead for the Foundation. Jon is a software guy and electronics hobbyist. He is the co-founder and technical lead for Netcopy (a digital archiving solution).
22 www.linuxuser.co.uk
n Ian Stewart from Gremlin Graphics stepped forward and allowed his old games to be available on the Picade
10 amazing Raspberry Pi projects 1 RasPi BIRTHDAY Top Raspberry Pi projects to amaze and inspire st
FEATURE
SPECIAL
■ Jon and Paul say the exciting stuff with the Pi is 3D and new games like Minecraft
■ There is no profit margin on this project. It is something the pair just wanted to build
developer big in the Eighties and early Nineties – has allowed the use of the firm’s old-school games. “This means we can provide a games machine that can be used straight away,” says Paul. “And when you look at the Pi Store, the Picade suddenly becomes a great way to play legal games.” Jonathan is excited about the future. “It’s the 3D games which I am loving,” he enthuses. “It will show off the Pi as a great gaming machine.” However, there have been some problems encountered by the pair. “Screens,” says Paul. “There are tons of models out there and some of these are 3mm in width. You can’t believe how thin they are. We had to look at how easy they are to mount, and separating wheat from the chaff. There is always a delay in stock too and we have to get on with other stuff while waiting for things to appear. Trying to get quality parts on time is difficult. A lot of components have to come from the East, such as arcade joysticks. But it’s been brilliant to work on.”
TRY IT YOURSELF
The creators noticed lots of startups had JAMMA cabinets in the break room and associated them with people with a lot of money. Picade opens up cabinets to the masses
Finding quality parts was hard. A lot of components had to come from the Far East
Getting a quality screen was important for Jon and Paul. Delays in stock caused problems
Both Paul and Jon have accumulated knowledge of items from joysticks to monitors following years of reading and research
The Kit:
• Cabinet panels and fasteners • LCD panel mount with protective overlay • LCD panel and driver board with inputs (at least 8” for the Picade Mini and 12” for the Picade) • Amplifier and speakers • 3.5mm stereo panel-mounted headphone socket • Panel-mounted video input socket (allows you to use your Picade as a second display for your computer or laptop) • A proper arcade stick • Illuminated microswitch arcade buttons (at least 4 on the Picade Mini and 6 on the Picade) • All other required components and cables The Knowhow: www.kickstarter.com/projects/pimoroni/picadethe-arcade-cabinet-kit-for-your-raspberry-p
23 www.linuxuser.co.uk
Feature
10 amazing Raspberry Pi projects
MAKER: TOM REES
Lego remotecontrolled car A Pi-powered self-contained remote-controlled car guided by an Xbox controller
Very often what you didn’t have in your childhood inspires you in adulthood. That was the case with the Lego remote-controlled car created by Tom Rees using the Raspberry Pi. Having always wanted a remote-controlled car when he was young, the desire never left him. And thanks to the power of the Pi, he was also able to go one better. Rather than build something controlled on a long tether to a computer or via Wi-Fi from a laptop, Tom could integrate the computer into the car itself. This means it became a ‘real’ remote-controlled car comprising just the vehicle and the controller. The original plan was to build an RC Lego DeLorean, but all he could produce was an ugly white box. He then came up with different prototypes, most of which looked nothing like a car and were essentially motors, servos and LEDs attached to Technic towers. “I remember the very first thing I built was a pair of LEDs which were turned on and off by the Xbox controller,” he says. “It’s important to begin
The steering is controlled via a hightorque 180-degree TowerPro servo and a Lego gear is attached with superglue
Tom wanted a simple and robust chassis design, so Technic clip joints and axles are used through everything. Servos and motors need to be held together tightly and two motors are required
with the simplest possible proof-of-concept to show all parts of the system working.” To even begin to prototype, jumper wires, breadboards, a multimeter and lots of batteries were needed, plus a selection of resistors, capacitors, LEDs and a soldering iron. Once Tom had all the necessary supplies, he just decided to dive in. He learned as he went along. “I had plenty of disasters,” he admits. “The cheap inductors I used in the 5V power regulator
“I think the thing that has really encouraged me is if you actually look at the number of these things where the Pi is a tool, it is not the Pi that is really the hit, it is the thing around it that is really the piece of inventive genius” ■ The car is controlled via a wireless Xbox 360 controller. Software on the Pi translates the controller buttons into motor speed, motor direction and steering rotation
■ All the hardware lives on the car. There is no need for a laptop issuing commands over Wi-Fi. This is the simple chassis
24 www.linuxuser.co.uk
Although Tom says he could go on for years building larger and more complex vehicles with increased power, four-wheel drive, weaponry, cameras, caterpillar treads, he is keen to invent something new
Tom suffered dodgy 5V regulators and overloaded components. He also found that the cheap micro-USB cable going into the Pi could barely carry half an amp and had to be replaced
kept catching fire because the Pi consumes so much current. Smoke pouring out of the Lego Technic holes is pretty terrifying.” Trickiest of all was powering the electronics aboard the car. “The Raspberry Pi has strict tolerances on its 5V input, and it will consume well over 1 amp when the Microsoft USB peripheral is attached,” he says. But he is more than pleased with the result. “Most stunning has been the reaction to this project. I knew I wanted to do something original with my Pi, to push the envelope very slightly, and be a little more imaginative than another ‘internet-controlled LEDs’ project. It’s seen a great reaction and I’m very pleased to see some projects inspired by this one.” ■ Extra electronics are needed on top of the Lego and the Raspberry Pi. The Cobbler breakout kit from Adafruit broke out the power, GPIO, I2C and SPI pins from the 26-pin header onto a solderless breadboard
10 amazing Raspberry Pi projects 1 RasPi BIRTHDAY Top Raspberry Pi projects to amaze and inspire st
FEATURE
SPECIAL
Light painting with the Pi Artistic images that simply astound are possible with the power of Pi There is seldom a more stunning effect than light painting. It uses long exposure times with lights in motion to produce amazing images. When Phil Burgess wanted to produce a machine that could create effective artistic images, he had a hunch that the Raspberry Pi would be able to streamline the process, not least because of the memory it could provide for the project. The concept had been stewing for months, but no existing device made for a really satisfactory solution, Phil says, and by that he meant something that could be shared and easily built by others. The open source electronic prototyping platform Arduino was considered and Phil says it could handle the core task but it requires a ton of ■ The bike. Other than having
the basic concept already, there was no planning: Phil just went straight into implementation, which took about two days
■ An Arduino could handle the core task, but required a ton of preprocessing and staging of the image data in flash storage. Another thought by Phil was to use his laptop and FTDI chip, but that machine is rather precious to him and he was not eager to strap it on a bike. The Pi was a middle ground – the horsepower and programming ease of the laptop, but the throwaway inexpensive nature of it. As you can see, the results are astounding.
preprocessing and staging of the image data in flash storage. The Pi could handle this – and because it is inexpensive, it got over the worry of getting it damaged. “So far we have created the prototype,” Phil tells us. “The next version will be smaller and lighter with a proper battery pack. At the time I was just scrambling among parts in the garage and relied on an enormous camping inverter to quickly solve the problem at hand.” Things went well too. “All the hardware and software was amazingly co-operative and everything fell into place,” Phil adds. The trickiest part of the project was the documentation. “Explaining things as concisely as possible, cleaning up the code to be presentable, providing clear diagrams and such is always hard,” comments Phil. “Good documentation can elevate even a modest project into something desirable, but no
amount of ‘coolness’ in a project can cover for a lousy explanation.” And there were other considerations. A 5V DC power supply was needed because the LED strip draws so much more power than the micro-USB connector can provide. A 26-pin IDC cable was sacrificed to create a purpose-built cable between the Raspberry Pi GPIO header, LED strip and power supply in order to make the whole project more robust. Phil also says Python warrants a mention: “My first attempts at communicating with the LED strip were in C, but if this project was to be shared, C with makefiles and extra libraries and such would add complexity. In 48 hours, starting with zero Python exposure, it was possible to get this not just working, but actually pretty well optimised as I got a better handle on the language. And it’s all in one source file, easily shared.”
TRY IT YOURSELF The Kit:
■ Phil just scrambled among parts in the
garage and relied on an enormous camping inverter to get these effects
• Raspberry Pi = £25 • Adafruit Pi Cobbler breakout kit = $7.95 • Digital RGB LED weatherproof strip 32 LED = $29.95 • 4-pin JST SM receptacle cable = $1.50 • 4-pin JST SM plug cable = $1.50 • 5V 10A switching power supply = $25 • 5V 2A (2000mA) switching power supply = $9.95 • Female DC power adaptor: 2.1mm jack to screw terminal block = $2 • Plus a bike and mounting hardware (PVC pipe, hula hoop, zip ties) The Code: We’ve included the code on the cover disc The Knowhow: learn.adafruit.com/light-painting-withraspberry-pi
MAKER PROFILE: PHIL BURGESS A Californian living in the San Francisco Bay area, Phil Burgess’s roots in art and technology go back many decades. The light painting demo is the latest in a progression of LED projects inspired by artist/engineer Bill Bell in the 1980s. Today Phil develops kits and tutorials for Adafruit Industries, a firm at the centre of the open source and ‘maker’ movements.
25 www.linuxuser.co.uk
Feature
10 amazing Raspberry Pi projects
The one-button audio player
Music to a grandma’s ears… it’s the easy-to-use audio player Michael Clemens’s idea for his Raspberry Pi project came less out of hobbyism and more out of a solution to a very personal problem. His wife’s grandmother is visually impaired and the couple find it difficult to keep her entertained. Listening to television is not ideal and she struggles to operate her CD player.
TRY IT YOURSELF The Kit:
• Raspberry Pi = €40 • ModMyPi enclosure = €12 • 1 button = €2 • 2 resistors (330 ohm, 10 kilo-ohm) = few cents • 1 blue LED = few cents • 1 (slow) 8GB SD card = €8 • Some wire = few cents • A pair of speakers – he already had them, rough cost about €30 The Code: We’ve inluded the code on the disc The Knowhow: blogs.fsfe.org/clemens/ 2012/10/30/the-one-button-audiobook-player
With her 90th birthday approaching, Michael sought a solution: to build an audiobook player that was inexpensive and easy to operate, with as few buttons as possible. It also needed to be open source. The Raspberry Pi was the answer. “The idea came quick, but planning it through and building it was kind of fragmented because my work includes travelling,” he says. “When I knew what I wanted, I soldered the button and LED to a board that could be connected via the GPIO pins and then I used a little Python coding and configuration of standard Linux software for the rest. Being no good coder or expert in electronics, this was the simplest way to achieve my goals.” The sound quality can crack when you play or resume an MP3. “But,” Michael says, “that is a known problem in the Raspberry Pi community. The quality of the device itself is quite solid, but I’m thinking about building a new, large enclosure out of wood for the player together with the speakers.”
Time-lapse photography with Pysnap
The competition-winning CLI tool created by a talented schoolboy It was a contest for young programmers, but few would have expected to see quality of the type produced by 12-year-old Aaron Hill, who ran away with first prize in the under-13 category.
TRY IT YOURSELF The Kit:
• PySnap software • USB camera The Code: Aaron’s code is on the disc The Knowhow: www.raspberrypi.org/ archives/2544
26 www.linuxuser.co.uk
His success? Amazing software that turns a Raspberry Pi computer into a time-lapse camera. By connecting a USB camera to a Pi and running the software, it is possible to fine-tune the interval at which it takes pictures. “My aunt has a motion-sensing camera set up in the woods near their hunting stand. That triggered the idea,” Aaron tells us. “The first thing that I did was to find out how I would get the program to take the pictures… I discovered a command-line program called Streamer, which was in the Debian and Ubuntu repos. I installed it and, after playing around with it, decided that
■ The difficult part came in the automatic
mounting of the USB flash drive and the process of deleting the old audiobook, copying the new one and refreshing the playlist of the music player daemon (MPD) which Michael used to play the MP3s
As for how well the present was received, Michael laughs. “It was Christmas and she was obviously confused about all the people around her. On another day, we showed her how to use it and she was very happy about it.”
MAKER PROFILE: MICHAEL CLEMENS Fascinated by electronics and mechanics from childhood, Michael began work as an IT apprentice and worked seven years as a UNIX and database administrator before becoming an IT security consultant.
MAKER PROFILE: AARON HILL Aaron Hill is a 12-yearold schoolboy who loves to program and is very knowledgeable about computers.
I would use it for my project. Next, I started writing the actual code. I started off with just adding the option to choose different time intervals: seconds, minutes and hours. Later I got the idea to allow taking of pictures on a specific day, and a specific time.” One feature he initially liked but ended up discarding was having the program print out text one character at a time, instead of all at once. The effect wasn’t very noticeable with a fast speed, and irritating to the user if it was slower, he says. And although he didn’t have the GUI ready in time for the content, there was enough to prove that Aaron was very much on to a good thing.
10 amazing Raspberry Pi projects 1 RasPi BIRTHDAY Top Raspberry Pi projects to amaze and inspire st
FEATURE
Pi-Face - the digital interface
SPECIAL
The interface has been designed to take some abuse since it’s targeted at beginners
Let the Raspberry Pi be the hub to your digital life Being able to control the real world using a computer is the sort of thing that we wanted back in the mid-Eighties when watching Back To The Future. There have been lots of solutions for this issue, but none has been as cost effective and wide open as the Pi-Face Digital Interface created by scientists at Manchester University. “I’d been working on getting more people interested in computing for a few years,” explains Dr Andrew Robinson, the brains behind the device. “I was really excited to hear Raspberry Pi was coming along, but worried that people wouldn’t know what to do with it. I saw the interface as a missing link, to allow people to put the Raspberry Pi where they
The Pi-Face is credit card sized and it stacks on top of Raspberry Pi. It is buffered to protect the Pi wouldn’t put a PC and connect it up to the world. So I designed Pi-Face to be ready for when the Raspberry Pi came out, and planned some fun activities – like the twittering chicken.” The first design was published on 15 December 2011 and the interface board is the same size as the Raspberry Pi. It slots onto the GPIO pins and has screw terminals so it’s very easy to connect up switches to sense things and lights/motors for the Raspberry Pi to control. It’s very easy to program in Scratch or Python too. It’s not just about the interface, either. The project is also about creating the fun activities and tutorials to support using the Raspberry Pi. “It took four prototypes to get right,” says Dr Robinson. “The first one has a yellow wire tacked
The interface and software is being used all over the world for robots and a central heating controller, for example on because a connection got missed. It was a bit like the early Raspberry Pis that also had bits of wire tacked on by hand.” Apart form that, it has all gone rather smoothly, however. “The interface has been designed to take some abuse since it’s targeted at beginners,” he adds. “We’ve connected things up wrongly a few times, but so far not seen any smoke! On the workshop side of things, the children have really loved it. We have a harder time when we run the workshops for teachers! Still we’ve learned from it.” ■ Pi-Face integrates with
existing tools already prevalent in the classroom, such as Scratch and Python. A range of class activities are planned
MAKER PROFILE: DR ANDREW ROBINSON
TRY IT YOURSELF ■ The hardware architecture was altered
during the project so that it would work with mobiles (with Android and USB OTG) and desktop PCs too. It works with Raspberry Pi through SPI, but also through USB
The Kit: Pi-Face is available complete from Farnell for £20, which is cheaper than buying the parts separately – piregistration.element14.com/signup.html The Knowhow:
pi.cs.man.ac.uk/interface.htm
Andrew Robinson can trace his first interest in electronics back to making a model lighthouse aged five. At the University of Manchester, Andrew did a PhD in low power processor architectures (which included looking at ways to make ARM processors more efficient). While working in the group Andrew became interested in ‘public engagement’, to get more people interested in Computer Science.
27 www.linuxuser.co.uk
Feature
10 amazing Raspberry Pi projects
Pi in the sky - 40km high photography A record-breaking balloon mission records stunning near-space photos It’s hard to say what is more amazing – the photographs taken high up in space or Dave Akerman’s Raspberry Pi/webcam/GPS/ hydrogen balloon combination which enabled him to capture such magnificent shots. Not only are they believed to be the highest ever photographs transmitted live from an amateur device, the ability to thrust a Raspberry Pi into space is an amazing feat. And it barely took Dave any time at all to figure out, making it all the more extraordinary. “The idea to combine the Pi and a weather balloon came after I took delivery of the Pi,” he tells us. “I ordered it just because I was curious, and didn’t really have any use planned for it. By then I’d been flying weather balloons with Arduino trackers for about a
“I’m just about young enough to be a space cadet. I remember staying up when I was a kid to watch the first shuttle launch. Dave Akerman was sending down images from 40 kilometres up. That is wonderful”
year, and thought that it would be fun to fly the Pi instead. The Arduino is ideal as a basic tracker, but the Pi does make it much easier to add things like live picture downloads.” It took about an hour to wire up a radio transmitter and GPS, and another hour to port Dave’s Arduino code over to the Pi. At that point he had a working Pi tracker and he was keen to fly it just to be the first to do so. But the weather remained poor and he couldn’t launch for two weeks. That gave him time to add some more capability. “Adding a live image download was obvious, since the Pi can interface very easily to a USB webcam,” Dave says. “It was a couple of days’ work to get that working. After that I had to make a regulator so the tracker could run from batteries.” He kept quiet about his project because he wanted to do it before anyone else. He didn’t say when the launch was planned either. “The launch itself was fairly stressful – as they usually are – but particularly this time because it was a new tracker and the first time I’d transmitted live images,” he admits. “I had two trackers to get ready, one as a backup, and a friend added his payload with a GoPro camera. So it was quite a complex launch and it made an impressive sight as it went up.”
n Above is the radio transmitter for sending
data back, while below it is the GPS receiver
n This is the power regulator to reduce the
battery voltage to 5V for the Pi. This became warm and David now uses an improved version
n In the future, Dave wants to
use the forthcoming Pi camera: “That will mean I can record highdefinition images and video”
Maker profile: Dave Akerman David Akerman is a high-altitude ballooning enthusiast who hit the headlines when he tethered a Raspberry Pi, complete with a webcam to photograph its progress, to a helium balloon.
28 www.linuxuser.co.uk
Try it yourself The Kit:
• Raspberry Pi = £25 • NTX2 radio transmitter = £25 • Webcam = £13 • Lassen IQ GPS receiver and antenna = £30 • 1200g Hwoyee balloon = £70 • Gas cylinder (Helium = £80) • Parachute = £30 • 6x Energizer AA Lithium = £8 • Yupiteru radio scanner = £80 • Radio aerial = £15 • Plus polystyrene foam, duct tape, nylon cord
The Knowhow:
www.daveakerman.com/?p=592 www.ukhas.org.uk
10 amazing Raspberry Pi projects 1 RasPi BIRTHDAY Top Raspberry Pi projects to amaze and inspire st
FEATURE
SPECIAL
Brew beer with BrewPi Relax with a cool beer (and maybe a pie) thanks to the magic of the Pi
Elco Jacobs loves his beer. So much so that he makes his own. What he has found, however, is that a tasty brew can be enhanced using the power of the Raspberry Pi. This capability led to the forming of the BrewPi project with three aims: to control the temperature of his fermenting beers, log temperature data into graphs and the ability to slowly raise or lower the beer temperature.
MAKER PROFILE: ELCO JACOBS Elco Jacobs is a 26-year-old from Eindhoven, the Netherlands, studying electrical engineering at the Technical University of Eindhoven. He likes electronics, design, user interaction and entrepreneurship.
Elco had experimented with analog temperature sensors, which were noisy and needed a lot of software filtering, so he replaced them with more accurate digital OneWire sensors. He also ditched floatingpoint filtering and used fixed point. BrewPi uses solid-state relays which are safe and quiet. Elco also dropped the idea of a threebutton interface in favour of a rotary encoder interface, which is much more intuitive.
“Things like this let me have thermostatically controlled beer brewing!!”
Retaliation-inspired mobile missile launcher
This simple foam-missile project is a great way to inspire young coders
This office missile launcher is an inventive use of the Pi and while not original (the inspiration came from https://github.com/codedance/ Retaliation#readme), the portable nature of the Pi has proved a perfect fit. “The original project had a few limitations,” says Nathan Byrd. “Using a full computer for this project
TRY IT YOURSELF The Kit:
• Raspberry Pi (initially he used an early 256M revision with polyfuses) = £25 • Dream Cheeky USB missile launcher = $34.99 (www.dreamcheeky.com/thunder-missile-launcher) • Powered USB hub = from £14 • USB extenders, mounting hardware etc as needed for environment The Code: You’ll find everything on the DVD The Knowhow: itr8r.tumblr.com/post/ 31840231144/raspberry-pi-retaliation
requires one to be on all the time or at least whenever there are people there to shoot… and greatly limits the placement of the missile launcher. With the Raspberry Pi I could mount it just about anywhere and leave it on all the time without requiring a full computer.” Nathan bought the Pi to teach his 11-yearold son to program and familiarise him with hardware. Retaliation worked in this regard too: “What 11-year-old, or adult for that matter, doesn’t love shooting foam missiles around the house?” Nathan had to order the missile launcher, then find the packages and software, before testing and documenting the build. Hooking it up without a powered USB hub proved a problem so there was a bit of soldering involved (although that is no longer the case with newer revisions of the Raspberry Pi). And along the way they had to shoot lots of foam missiles at each other.
■ The Pi offered a great alternative for the
original BrewPi (called UberFridge). The Pi replaced a Linksys WRT54G router flashed with open source firmware and 16MB of RAM – running a Python script and a web server, it had logged data to a USB memory stick
TRY IT YOURSELF The Kit:
SparkFun Inventor’s Kit for Arduino, a professional kit for Arduino = £83 Raspberry Pi = £25 The Code: Elco’s code is on the cover disc The Knowhow: brewpi.com
MAKER PROFILE: NATHAN BYRD Nathan Byrd is a technical consultant in software development with almost 20 years of experience in the field. He lives in Saint Louis, Missouri with his wife and son. Other hobbies include amateur photography and open source software development.
■ While a powered USB hub can be used (and
is recommended), Nathan removed the need for one by soldering across the polyfuses on his early-model Pi (bit.ly/RDIJVe)
29 www.linuxuser.co.uk
✔ YES I would like to subscribe to Linux User & Developer ■ YOUR DETAILS
Title Surname Address
OR H DEUR R RY N OW
SUBSCRIPTION VOUCHER First name
Postcode Telephone number Mobile number
Country
Email address
Please complete your email address to receive news and special offers from us
DIRECT DEBIT PAYMENT ■ UK Direct Debit Payment Pay only £25.15 every six issues (save 30%)
Instruction to your Bank or Building Society to pay by Direct Debit Please fill in the form and send it to: Linux User and Developer Subscriptions Dept, 800 Guillat Avenue, Kent Science Park, Sittingbourne ME9 8GU Name and full postal address of your Bank or Building Society To: The Manager
Originator’s Identification Number Bank/Building Society
5
0
1
8
8
4
Address Reference Number
Postcode Name(s) of account holder(s)
Instructions to your Bank or Building Society Please pay Imagine Publishing Limited Direct Debits from the account detailed in this instruction subject to the safeguards assured by the Direct Debit guarantee. I understand that this instruction may remain with Imagine Publishing Limited and, if so, details will be passed on electronically to my Bank/Building Society Signature(s)
Branch sort code
Bank/Building Society account number Date A6 instruction form
Banks and Building Societies may not accept Direct Debit instructions for some types of account
PAYMENT DETAILS
YOUR EXCLUSIVE READER PRICE, ONE YEAR (13 ISSUES)
■ UK: £62.40 (Save 20%) ■ Europe: £70.00 ■ World: £80.00 Cheque
■ I enclose a cheque for £
(made payable to Imagine Publishing Ltd)
Credit/Debit Card
■ Visa
Card number
■ MasterCard
■ Amex
■ Maestro
Expiry date
Security number ■■■ (last three digits on the strip at the back of the card) Issue number ■■ (if Maestro) Signed Date Code: PAG123 ■ Tick this box if you do not wish to receive any promotional material from Imagine Publishing Ltd ■ Tick this box if you do not wish to receive promotional material from other companies. Terms & Conditions apply. We publish 13 issues a year, your subscription will start from the next available issue unless otherwise indicated. Direct Debit guarantee details available on request. This offer expires without notice. I would like my subscription to start from issue:
Return this order form to: Linux User & Developer Subscriptions Department, 800 Guillat Avenue, Kent Science Park, Sittingbourne, ME9 8GU or email it to
[email protected] You will be able to view your subscription details online at www.imaginesubs.co.uk
FANTASTIC SUBSCRIBER OFFER
Start a direct debit today and for just £25.15 get the next six issues – saving over £23 a year ■ Pay only £4.19 every issue ■ Free UK delivery to your door ■ Never miss an issue ■ Money-back guarantee
SUBSCRIBE
TODAY TO
Readers in the US see page 84 for exclusive offer
and save 30% off the shop price THREE EASY WAYS TO SUBSCRIBE 3.Post or email 1.Online www.imaginesubs.co.uk/lud And enter PAG123
2.Telephone
0844 249 0282 And quote PAG123
Please complete and post the form to Linux User & Developer Subscriptions Department 800 Guillat Avenue Kent Science Park Sittingbourne ME9 8GU Or alternatively, you can scan and email the form to
[email protected]
Tutorial
Open source genealogy with Gramps
This panel provides quick access to all the various sections, like people, events, places and media entries
The centre panel will show lists of whatever object type you have selected in the left side panel, like a list of people if you select the ‘People’ entry
If you have many entries, you can filter down to a manageable subset by selecting filter criteria here
You can find details for the item you select above. The tabs that are available depend on what type of object you are looking at
Open source genealogy with Gramps Genealogy is a fun hobby for many people around the globe. While there are lots of programs for Windows, Linux options have been lacking. Gramps helps fill this gap
Resources Gramps: gramps-project.org
Advisor
Joey Bernard As a true renaissance
man, he splits his time between building furniture, helping researchers with scientific computing problems and writing Android apps. When the kids let him have some time, that is
32 www.linuxuser.co.uk
Genealogy is a very popular hobby with people all around the world. If you pick up any of the genealogy magazines at your local bookstore, they will cover Windows programs that are available. But no one seems to have realised that people who use Linux are also interested in researching their family trees. While there have been text-based programs to work with GEDCOM files, there hasn’t been a really complete GUI program until Gramps came onto the scene. With Gramps, you have all of the functionality available
that Windows users have enjoyed for some time. Gramps is written in Python and is designed with a plug-in architecture. This means that you can rather easily write your own plug-in to add any specialised functionality that isn’t provided through a base installation. In this article, you’ll see how to get started on your family tree, analyse the data that you have collected, and generate reports that you can print and share with others. You’ll also learn how to share the data you have collected through GEDCOM files.
Open source genealogy with Gramps
Use Gramps to research, organise and share your family tree
TUTORIal
on the plus sign in the icon bar will bring up a dialog box where you can enter all of the relevant information.
04
Setting the home person
To generate charts and reports from all of this data, you will need to set a ‘home person’ who will act as the root of the family tree. Again, if you are doing your own family tree, it would make sense to select yourself. To do so, you will need to select the People entry on left-hand side of the screen. Then select the person from the list, and click on Edit>Set Home Person from the main menu.
01
Getting Gramps
Gramps should be available in most Linux distributions. For Debian-based ones, you would install with ‘sudo apt-get install gramps’. There are Windows binaries available, if you want to get your friends hooked on Gramps, too. As always, the source is available if you would rather compile your own copy.
02
Create a new tree
The first step, once you have Gramps, is to create a new family tree. This can be considered almost like a project, for the software developers out there. A family tree will contain all of the information relevant to a single lineage going back in time.
03
Add a new person
A family tree is of little use without people. So, the next step is to add your first person. If you are doing your own family tree, you may as well start with yourself. Clicking
07
Adding a spouse
08
Setting marriage Information
09
Adding children
Staying in the Relationships section, you can click on the ‘Add a new family’ icon to create a new family with this person as a parent. You can then either add an existing person or create a new person as the spouse.
While the New Family dialog is open, you will need to click on the Event tab in the bottom section. Click on the plus icon to add a new event, selecting Marriage as the type. You can then set the date and location.
05
Adding birth Information
Double-clicking a person from the list will reopen the Edit dialog. At the bottom, you can add events to the person’s record. Arguably the most important event is their birth. To add an event, click on the plus icon in the event section.
06
Adding parents
Click on the Relationships entry on the left-hand side. This will open the relationship section for the selected person. You can add parents to this person by clicking on the plus icon in the top bar. You can either add existing people or create new people, for the father and mother.
Before closing the New Family dialog, you can also add any children. Clicking on the Children tab in the bottom section will allow you to add either existing people or new ones as children of this family unit.
33 www.linuxuser.co.uk
Tutorial
10
Open source genealogy with Gramps
Editing events
You have used events to add information, like births and marriages. There are many builtin event types when you install Gramps, covering most areas of life. You can edit the details of any of these events by clicking on the Events link on the left-hand side.
11
Adding and editing places
Events take place somewhere in the real world. When you add a new event, you can select a place where it happened. After you have added a place to an event, you can edit the details by clicking on the Places link on the left-hand side and selecting the place of interest.
12
Adding sources
13
Adding media
You can add sources to your family tree by clicking on the Sources link on the left-hand side. You can add a new one by clicking the plus icon and filling in all of the relevant information. Recording where you get your information is a very important part of research.
In this age of digital media, it is easier than ever to add a new dimension to your research. You can add media objects (eg image files, videos) to your family tree. Once added, they can be linked through references to events and people.
34 www.linuxuser.co.uk
14
Adding notes
15
Displaying your ancestral chart
All of the objects in Gramps can have notes attached to them. This allows you to add extra information to items like photos that have been added, places of importance, sources of information. You can edit details of these notes by clicking on the Notes link.
Now that you have all of your information entered into Gramps, you can start to see what your family tree looks like. There are many charting functions available in Gramps. They are available under the Reports menu item. The
You can generate a full website, with navigation, of all of your genealogical information usual chart that you will likely want to look at is the ancestral chart. This shows all of your direct ancestors in the classic family tree form. Clicking on the menu item Reports>Graphical Reports> Ancestor Tree will open a dialog window. Here, you can select how many generations to display and presentation details.
16
Displaying a fan chart
Another common way of visualising your ancestors is by using a fan chart. You can select the number of generations to look at, and several display options. These graphs are interactive, allowing you to move around in your history.
Open source genealogy with Gramps
Use Gramps to research, organise and share your family tree
TUTORIAL
17
20
Exporting a GEDCOM file
21
Checking an import
The standard file format for genealogical information is called GEDCOM. There are several versions around, the latest one being 5.5. Gramps exports to the latest version. This is how you can share the information you’ve collected with other researchers.
Generating a calendar
With the power of Python, you have the ability to do very complicated processing. One of the included plug-ins allows you to generate a calendar of important dates, like birthdays and marriage anniversaries. You can generate a calendar by clicking on Reports>Graphical Reports>Calendar.
Tools>Family Tree Processing>Find Possible Duplicate People will bring up a dialog box where you can set the sensitivity. Then it will search through the data for possible matches.
You can also import data from a GEDCOM file. Sometimes these files may have errors in them. You can check the imported data by clicking on the menu item Tools>Family Tree Repair>Check and Repair Database. This will check several possible problems in your data.
24
18
19
You can generate a full book report containing all of the information you have collected. Clicking on Reports>Books>Book Report will open up a window where you can select which items to include. Each of these elements can be configured individually. Once everything is ready, you can click on ‘OK’ to get output in either an ODT file or a PDF file.
Looking at a timeline
You can generate a timeline of events throughout your history. Clicking on Reports> Graphical Reports>Timeline Chart will open a new dialog where you can set the options. By default, it will create an OpenDocument file, but this can be changed to one of several other file formats.
Generating a website
You can generate a full website, with navigation, of all of your genealogical information. You can choose how much information gets exported, and details of the formatting. You can set the stylesheet that is used for the display. You can even export the whole thing into a gzipped tarball.
Getting a full book
22
Verifying your data
23
Locating duplicates
You may also need to verify the actual data itself. Do you have a 200-year-old relative? Do you have someone who has kids that are older than they are? Clicking on Tools>Utilities>Verify the Data will bring up a dialog window where you can set the parameters to use in the verification.
One common issue, especially when importing data from other sources, is having duplicate entries in your database. Clicking on
35 www.linuxuser.co.uk
Tutorial
Put Cinnamon on your distro
A mixture of the KDE and GNOME 2 menu also includes a great search function
The panel shows you what windows you have open, unlike GNOME 3
There’s plenty of ways to add extra bits of information and navigation with applets
Cinnamon is also highly customisable by default, and is extendable with plenty of extensions
Put Cinnamon on your distro Want to use the Linux Mint desktop environment, but partial to a different operating system? We show you how to get Cinnamon on some major distros
Resources
Cinnamon source:
https://github.com/linuxmint/ Cinnamon
Advisor
Rob Zwetsloot models
complex systems and is a web developer proficient in Python, Django and PHP. He loves to experiment with computing
36 www.linuxuser.co.uk
Every time GNOME gets an update, more and more people seem to be complaining and ultimately switching from the once ubiquitous desktop environment to any number of alternatives. At the same time, one of the most popular Linux distributions in the world debuted its own homegrown desktop, as Ubuntu adopted Unity amid groans and complaints from fans and users alike. Recently, Linux Mint’s Cinnamon desktop has been stealing the limelight from previous popular alternatives, such as LXDE or KDE,
thanks to a very smartly designed, traditional layout. The layout utilises the best parts of GNOME, namely the search function and keyboard shortcuts, with a familiar and easy-touse interface for mousing around. Not every Linux distro comes with Cinnamon by default. However, some have it readily available in the repository, or can have it added via other means. In this tutorial, we’ll show you how to get Cinnamon added to a number of major distros, and throw in a few essential tweaks as well.
Put Cinnamon on your distro
Use the Cinnamon desktop environment with any major distro
TUTORIal
01
For starters…
Remember, once you’ve installed Cinnamon, you’ll need to log out and select it from the Session’s menu of your login/display manager before you log back in. It will show up as Cinnamon, and don’t worry about the GNOME options it might add.
02
04 Mint MATE
Here’s a simple one to start off with – if you got the MATE version of Linux Mint and want to try out Cinnamon, you can easily install it either via the Software Centre, or in a terminal like so:
$ sudo apt-get install cinnamon
Ubuntu repository
Cinnamon is not included in the standard Ubuntu repos, but no matter what the reason for that is, you can simply add the official Cinnamon PPA using the following:
$ sudo add-apt-repository ppa:gwendal-lebihan-dev/cinnamonstable Agree to the prompt to add the PPA.
05
Cinubuntu
Once that’s finished, you can install it from the terminal you’re using by first of all updating your package list with:
$ sudo apt-get update …followed by:
$ sudo apt-get install cinnamon
07
openSUSE GNOME
08
openSUSE sources
The first step to getting Cinnamon onto openSUSE may sound a little odd – you need to install GNOME first. To do this, open the package manager and install GNOME 3.4. If you’re already running the GNOME spin, then you can continue to the next step.
Once you have GNOME installed, you can add the repos you need by entering this in the terminal:
$ sudo zypper ar http://download. opensuse.org/repositories/ X11:/Cinnamon:/GNOME34/12.2/ X11:Cinnamon:GNOME34.repo Unless you have an update or installation going, you can tell openSUSE to quit the PackageKit.
09 03
CinnamonSUSE
To install Cinnamon, first refresh your package list with:
$ sudo zypper refresh
Cinnamon Fedora
You can choose whether to trust the new repo temporarily or permanently. Follow that up with the installation command:
Cinnamon is included in the Fedora repos, and once you find the package manager or a terminal somewhere in GNOME, you can either search for it, or install it with:
$ sudo zypper in cinnamon …and you’re done!
$ sudo yum install cinnamon-destop The install is fairly quick, and in Fedora 18 it’s looking a lot better.
10 06
Ubuntu tip
In Ubuntu 12.10, if you have too many desktop environments and too low a resolution monitor, you may not be able to click the Accept button to switch session. The trick to this is to key down with an arrow until you get to where Accept is, and hit Return.
Debian distributions
You can easily create a DEB binary to work in any Debian-based distribution. First you’ll need to install dpkg-dev so you can download dependencies for other packages. Do this with:
$ sudo apt-get install dpkg-dev
37 www.linuxuser.co.uk
Tutorial
Put Cinnamon on your distro
15
Build Cinnamon
Now we’ve built Muffin, the window manager for Cinnamon, we can actually build Cinnamon itself. Move into the Cinnamon directory using cd, and start the process with:
$ ./autogen.sh This will quickly get things set up to compile. You can create your DEB files by again using:
$ dpkg-buildpackage This shouldn’t take as long as the Muffin compiling. Once it’s done, cd back up again, and install the Cinnamon DEB with:
$ sudo dpkg -i cinnamon[version and architecture].deb Log out or reboot, and then select it from the session manager.
11
Cinnamon dependencies
Now that dpkg-dev is installed, you can install the necessary dependencies with the following:
$ sudo apt-get build-dep muffin …followed by:
$ sudo apt-get build-dep cinnamon Both will take a little while to download all the necessary packages.
12
Cinnamon source
14
Install Muffin
Move back up to the working directory with this command:
$ cd .. Here’s where all the DEBs are you just made. The best thing to do is install of them using:
$ sudo dpkg -i *.deb At the very least, though, install: libmuffin-dev, gir1.2-muffin-3.0, libmuffin0, muffin and muffin-common.
16
Cinnamon Mageia
17
Arch Cinnamon
While it’s definitely not recommended, if you’re desperate to get Cinnamon in Mageia without compiling, the RPM binaries from Fedora will install and work. Long term, though, it’s not the best solution. The Mageia devs are currently considering adding the DE officially to the repos. There is a specific Arch Linux remix called Cinnarch that already exists, but if you want to install it to an existing Arch system, you can find the source in AUR at: h t t p s: //a u r. a r c h l in u x .o r g /p a c k a ge s . php?ID=55330 Download the tarball, makepkg, and then install with pacman to add it to your system.
You can get the source for Muffin and Cinnamon from Git to build your DEB. First create a project folder with:
$ mkdir CinnamonSource Then sync the sources for Muffin with:
git clone git://github.com/ linuxmint/muffin.git …and Cinnamon like so:
git clone git://github.com/linuxmint/ Cinnamon.git
13
Compile Muffin
Use cd to move into the Muffin folder we downloaded in the project directory, and build the DEB binaries with:
$ dpkg-buildpackage It will take a while, but it will automatically compile you the correct packages to install.
38 www.linuxuser.co.uk
Now we’ve built Muffin, we can actually build Cinnamon itself
Put Cinnamon on your distro
Use the Cinnamon desktop environment with any major distro
TUTORIAL
18
Turbo Cinnamon
23
Cinnamon spin
24
Cinnamon everywhere
A quick and easy way to speed up Cinnamon if you’re using a slightly older or low-powered system is to turn off the desktop effects. These are also found in the Cinnamon Settings under the Effects menu.
Cinnamon Gentoo
Cinnamon is actually available in the main portage tree for Gentoo, and can be found here: http://packages.gentoo.org/package/gnomeextra/cinnamon Make sure to use the latest build, as older ones are unstable on x86 and x86_64 systems – you know, the kind you’re most likely using.
22
20
Cinnamon spaces
By default, there are two workspaces in Cinnamon, which can be accessed with the applet, or by using Ctrl+Alt+Left or Right. To add or remove workspaces, press Ctrl+Alt+Up, and press the ‘+’ button on the right side, or click X on the spaces. You can also use this mode to preview spaces and switch between them with a mouse.
More and more distributions are adding Cinnamon to the repos, and there are some that come with Cinnamon spins for Cinnamon by default. Next time you need to reinstall a system and want to go with Cinnamon, look for such distros as Cinnarch, Snowlinux and more in the future.
19
Cinnamon applets
You can add extra features to the panel with the applets selector. To find this, click on the up arrow next to the Network Manager, click Settings, and go to Applet. From here you can add buttons to click between workspaces, a shortcut link to monitor settings, and accessibility.
21
Cinnamon corner
Like GNOME 3, you can move the mouse to the top left of the screen and zoom out to preview the workspaces. You can turn this function on or off, and move the location in the Cinnamon Settings. The Cinnamon Settings menu is automatically added to the left side of the Cinnamon Menu.
Now you’ve got Cinnamon running, play about with it. While every environment has its own quirks and can take a little bit of getting used to, Cinnamon should be familiar to anyone. Over the past year it’s got better and better, and we’re looking forward to the next year of updates.
39 www.linuxuser.co.uk
Tutorial
Protect your network with Snort
Protect your network with Snort
Whether meaning to be mischievous or malicious, hackers can wreak havoc on your network. Fortunately, Snort makes it easy to spot them and set up protection
Resources Snort: www.snort.org The Snort manual: www.snort.org/start/documentation A second network card (optional)
Snort runs on single machine, but can monitor an entire network
You can visit the website to grab the rulesets
Snort has one main configuration file, but it comes with sensible defaults for most scenarios
Snort will sit on the network and output attack logs in a variety of formats
40 www.linuxuser.co.uk
Snort is an intrusion detection system (IDS). It works by monitoring network activity and raising an alert in the case of suspicious activity. What constitutes suspicious activity is definable by rules, and it comes with a massive selection. It can protect a single machine from attacks or even an entire network. This guide will show you how to set up and use Snort and also take you through some typical security scenarios in which Snort will prove useful.
Advisor
Michael Reed is a technology
writer and he’s been hacking away at Linux for over 15 years. He specialises in desktop Linux solutions
As you get to know Snort, you might consider setting up a testing environment using virtual machines. A simple approach would be to use a virtual machine that has its network adaptor configured to be visible on your network (the setting is called ‘bridged adaptor’ in VirtualBox, for example). The techniques outlined here are not dangerous, but they can be considerably easier to get working within a controllable environment.
Protect your network with Snort
Use the Snort intrusion detection system to log and block attacks
TUTORIal
04 01
Install Snort
Install Snort with ‘sudo apt-get install snort’. If you need the very latest version, visit the website and fetch, build and install it.
02
Set Up a ‘quiet’ network environment
When first setting up Snort, it helps to have as little activity on the network as possible. Disconnect other computers or even set up a VM with a bridged adaptor which you can operate upon from the host machine.
03
Test Snort installation
Nearly all Snort operations need to be carried out by the root user. On Ubuntu, it’s probably worth using ‘sudo -i’ to avoid password prompts. Use ‘su’ on other distros. As root, type ‘snort -v’. This puts Snort into packet sniffer mode.
Create network activity
Presuming that the network you are on is reasonably quiet, you can generate some network activity by pinging the server. Open another terminal and type ‘ping [IP address of server]’, and cancel after a couple of successful pings. Now, go back to the terminal with Snort running.
05
More detail
08
Log packet data
09
Back up Snort configuration file
Here’s a more extensive command line: ‘snort -vde’. This produces more output due to the d (display packet data) and e (application layer). For example, if you fetch POP email without SSL selected, you’ll be able to see the username and password scroll past.
Interpreting the data
In this example, the ping activity is reported in entries that end with lines ‘ECHO’ and ‘ECHO REPLY’. You may have to scroll back in the terminal to see these entries. Notice that the entries contain the time that the activity occurred and the source and destination of the traffic.
06
07
Exiting Snort
Exit Snort by hitting Ctrl+C. When you exit Snort, it prints a statistical summary of the traffic that it observed. In this example, there should have been some ICMP traffic from the ping operation.
Make a directory called ‘snort_logs’. Now run ‘snort -d -l ./snort_logs’ and Snort will log all recorded traffic into the log directory with a separate file for each interface. We’ll skip the verbose flag (-v), as all of the screen output eats into Snort’s throughput.
Snort comes with a default configuration file which we will back up. Type ‘locate snort.conf’ to find the file and then make a copy of it. ‘cp /etc/ snort/snort.conf /etc/snort/snort.conf_old’ should work for Ubuntu, for example.
41 www.linuxuser.co.uk
Tutorial
Protect your network with Snort
13 10
Initial configuration
Open the config file in a text editor. For now, make sure that the variable ‘HOME_NET’ accurately describes your network. For example, if your computers have IP addresses that begin at 192.168.0.1, set it to 192.168.0.1/24.
11
Create launch script
Make a startup script to save time. Create an empty file with ‘nano start_snort’, then add the line ‘snort -de -l [full path to script]/snort_logs -c /etc/snort/snort.conf’ to it, and then save. Now type “chmod +x start_ snort”. This will launch snort in IDS mode, with reasonable defaults.
12
Intrusion detection mode
First, find the IP address of the machine running Snort by using ‘ifconfig’ and make a note of it. Now run ‘./start_snort’. Some extra startup information scrolls past as we are now using the Snort configuration file and the rules files that it references.
42 www.linuxuser.co.uk
Simulate an attack (Nmap)
We’ll begin by carrying out a port scan on the machine running Snort using Nmap, a common first step in a typical intrusion attempt. From a different machine on your network, type ‘nmap [IP address of Snort machine]’. A file called ‘alert’ should have appeared in the log folder. Examine it.
14
Automatically start Snort
The method to launch a script at startup varies between distributions. On Ubuntu, simply add our ‘start_snort’ script to ‘/etc/init’ by typing ‘ln start_snort /etc/init/’. Remember to use fully qualified path names in the script.
15
Protect the network
Protecting an entire network requires either a dedicated Snort machine or a dedicated
network adaptor on your server. This is because the network card must be put into promiscuous mode to capture all traffic being transmitted, and this is the scenario we will work with here. Once you have installed the second card and rebooted the machine, determine the naming of the two network interfaces by typing ‘ifconfig’. In this example, the second network card is called ‘eth1’. Now open ‘/etc/networking/interfaces’ in a text editor.
16
Configure promiscuous mode
17
Test promiscuous mode
Add the following lines to the file: ‘iface eth1 inet manual’, ‘up ifconfig $IFACE 0.0.0.0 up’, ‘up ip link set $IFACE promisc on’, ‘down ip link set $IFACE promisc off’, ‘down ifconfig $IFACE down’. Type ‘sudo ifup eth1’ to start up the second Ethernet adaptor and physically plug it into your router, hub or spanning switch.
Type ‘ifconfig’ and eth1 should be listed without an IP address. Now add ‘sudo ifup eth1’ to your Snort startup script along with the flag ‘-i eth1’ on the Snort launch command. When launched, Snort will now monitor all traffic on your network.
We’ll begin by carrying out a port scan on the machine running Snort
Protect your network with Snort
Use the Snort intrusion detection system to log and block attacks
TUTORIal
18
Create a simple Snort rule
19
Test simple rule
For the sake of simplicity, we are going to add a rule to the configuration file rather than create a new rule file. As root, open up snort.conf in a text editor. On the final line of the configuration file, add the following line: ‘alert tcp any any -> any 23 ( msg: "telnet alert!"; sid: 1; )’.
Launch Snort with ‘snort -dev -l ./snort_ logs -c /etc/snort.conf’. From another machine, type ‘telnet [IP address of Snort machine]’. If everything has worked, you should now have an update in the alert file. See the Snort manual for a full breakdown, but open the file and check that source IP and destination IP look correct.
21
Add CSV output module
Unless you know that you are going to have to use Snort alert logs as input for another networking utility, consider switching it to CSV output so that you can view the data in a spreadsheet. Simply add the line ‘output alert_csv: alert.csv default’ to the end of the configuration file.
23
Block an attack (part 1)
24
Block an attack (part 2)
Block the IP address of the attacker as reported in the alert file. Obviously, the address can change, but they tend to be fairly static from the most common type of automated attacks. Use the command ‘iptables -A INPUT -s [attacker IP address] -j DROP’.
20
Fetch extra rules
Get extra rules from the Snort website (free sign-up required). They belong in ‘/etc/ snort/rules’ and should be enabled using the ‘include’ directive in snort.conf. The comprehensive selection is an excellent starting point for creating your own rules for dealing with, for example, application-specific exploits.
22
Interpreting an attack
When an attack is logged, begin by looking up the IP address with the ‘whois’ command or by using an online geographic IP lookup address. Note the port number of the attack to try to figure out the service or application that is the focus of the attack.
It’s possible that an attack is targeting an unused or unimportant port on your network. Use ‘/iptables -A INPUT -p tcp --destinationport 80 -j DROP’ to block a port, if you have determined that it will not harm the normal function of your system. To unblock a port or IP address, use the ‘-D’ switch instead of ‘-A’.
43 www.linuxuser.co.uk
BUILD A BETTER WEB www.webdesignermag.co.uk
Available from all good newsagents and supermarkets
ON SALE NOW
Develop with Spotify | Build a WordPress plug-in | Create 3D effects DESIGN INSPIRATION
PRACTICAL TIPS
BEHIND THE SCENES
STEP-BY-STEP ADVICE
INDUSTRY OPINION
BUY YOUR ISSUE TODAY Print edition available at www.imagineshop.co.uk Digital edition available at www.greatdigitalmags.com Available on the following platforms
facebook.com/webdesignermag
twitter.com/webdesignermag
The only Linux magazine for open source developers 100% FOSS focused » Features » Tutorials » Sample code
Celebrating the
life of Pi
An exclusive interview with Pete Lomas and Eben & Liz Upton Page 46
VPN with Raspberry Pi Conquer the dark art of virtual private networks Page 52
Wine for developers
Get your Windows software running under Linux Page 56
We had the profile of a large electronics company before we shipped a single unit
RasPi Foundation special!
45 www.linuxuser.co.uk
Interview
Celebrating the life of Pi
RasPi
1st BIRT SP HDAY
ECIAL
■ Co-founder Eben Upton
■ Pi designer Pete Lomas
46 www.linuxuser.co.uk
Celebrating the life of Pi
The Raspberry Pi founders talk about its first year
INTERVIEW
Celebrating the
Life of Pi We celebrate the first birthday of the Raspberry Pi with an exclusive interview with its creators covering its first year on sale and goals for 2013
In a year when Nintendo was supposed to be taking the plaudits for its latest console; at a time when Apple was expecting punters to lap up its latest tablet and phone; during a period when small-form-factor gaming was going to be the sole preserve of the Sony PlayStation Vita, another machine was gathering column inches. By the end of 2012, no less than The Independent newspaper was celebrating this underdog as the standout technology innovation of the year. And yet it was not one made by a well-known brand, nor one which had design aesthetics appealing to anyone but in-the-know geeks, nor a device which had dozens upon dozens of games for it. It was the Raspberry Pi, a computer that’s barely larger than a credit card and which readers of this magazine don’t really need explaining in any greater detail. This computer has the potential to do so much more than any of the aforementioned giants and their kin, and that is because it is as much about ideology as it is about mechanics. And it has been successful, of that there is no doubt. “I really do think that this time last year we were starting to get the idea that we weren’t going to sell 10K of them,” Eben Upton, the co-founder of the Raspberry Pi Foundation tells us. “I think we were starting to get the idea that we were going to sell tens of thousands of units. But I don’t think any of us had imagined that it would come true.” Gathering together Eben, wife Liz and technical guru Pete Lomas for this interview was not a simple task. Despite Eben’s
incredible work on the Raspberry Pi, he remains technical director and ASIC architect for Broadcom and, during a mammoth email exchange, suddenly had to change plans when he was asked to go to Los Angeles on urgent business. Liz also has her work cut out. She is the Raspberry Pi Foundation’s only full-time worker – and that entails running the large community which has built up around the device, carrying out PR and communications work, looking after social media, taking photos and getting busy with a soldering iron when needed. On top of that, she is a professional writer and the sole blogger at gastronomydomine.com, which she has had to effectively abandon due to the mammoth Pi workload. Then there is Pete, trustee of the Raspberry Pi Foundation and designer of the final hardware that turned into the device so many love. But if they are busy, it is for a reason. And Pete just can’t quite believe the ride which has taken place since the first Pi was swallowed up by those eager to buy it on 29 February 2012. “The pickup from the community has been tremendous and the amount of innovation that has come out of the back of what is a relatively simple piece of kit has been absolutely fantastic,” he says. “The way that they have been able to repurpose it from our original ideas and the way that it just teaches kids how to program and do some basic interfacing has gone stratospheric. I say that literally too, because we’ve had Pis in space.” The large number of projects for which the Pi has been put to use has been phenomenal
and the team say they still cannot believe the innovation which is evident on an almost daily basis. “Just today I was looking at a post on the blog about water droplet photography which somebody is doing with a Raspberry Pi,” says Liz. “It has been a whole year and pretty much every day there is something which we just haven’t considered. The educational stuff is working brilliantly, but there is also this huge hobbyist maker crowd out there just picking it up and running with and they are brilliant. They are really, really good people.” One of the biggest challenges for the team has been the sheer demand for the device, and the major breakthrough came when they realised that they needed to create a licensing model for the Pi and have a UK manufacturer produce a high volume of them. The transition from a few thousand to tens of thousands went relatively smoothly in the end thanks to a lot of hard work by many people, and the complex transition has meant they now have a secure manufacturing base to take them forward. There were some bumps in the road – some customers experienced extensive delivery delays – but the biggest promise, which was to remain true to its initial price point, has held firm and it is something the Pi team remain committed to. “That was something that, to be honest, scared me to death in the early days, because it was my responsibility to bring it in at the price points we stated,” says Pete. “It has taken us a
47 www.linuxuser.co.uk
Interview
Celebrating the life of Pi
“We had the profile of a large electronics company before we shipped a single unit” while to get the model made at this price point, but it is now there and will be available very, very shortly at the price point that we stated. There is no doubt in the very early days where we were only making a couple of thousand to 20,000 that we would be struggling, but now we’ve got a user base, we’ve got a perception within the industry and the supplier base that allows us to get volume pricing has made that really achievable.” The Foundation was keen not to build the Pi on charity. At no point, they say, has anyone been asked to lose money in order to keep the device affordable. “If there is not a commercial story for everyone involved, you are kind of building on sand,” says Eben. “Charity doesn’t scale, so you would get to a point where we might have gone to a component supplier and got a price that they could sustain for 20,000 or 30,000 units and then we would have got to
a point where they were just losing too much money and then they would have had to have jacked the prices up. So you know, the only thing that we ever asked from our component suppliers was, in the early days, that they not penalise us for having low volumes. You know, that they should be prepared to extend to us the kind of pricing that they would give you at a million of, at our initial volumes, which were down in the sort of 10,000 range. Now, of course, we do have those kinds of volumes and it looks much more like a regular commercial business for a lot of people in the supply chain.” The exposure of the Pi has ensured that the Foundation and its team have been thrust into the limelight of the technology industry. One thing which blindsided them, however, was EMC testing. This is required to confirm that a particular device meets the required standards and it is divided broadly into emissions testing
Is Kickstarter pie in the sky? Over the past year, the concept of crowdfunding has become ever more popular, with services such as Kickstarter and Indiegogo attracting much cash for new projects. But would The Raspberry Pi Foundation have gone down that path? “I can answer that: absolutely not,” says Eben. “No, absolutely no way,” adds Liz. “On some level, if you can get an unsecured interest-free loan from your customers to build the thing you want to build, it is a very appealing concept,” continues Eben. “And I think over the last year we have looked at one or two projects that have [had[ some success in that area and you know, on some level thought ‘Oh my God’ you know, that would have made a lot of problems go away. The reason we didn’t do that was we didn’t want to have that horrible day where you realise that you can’t hit the price point. I have seen projects in the past do this and I think we were very conservative in wanting to make absolutely sure that we’d build a few thousand of these on price before we went out and started taking money off people. I don’t regret having done that. I think it was a good move even if it gave me a lot of sleepless nights.”
RasPi
1st birt sp hday
ecial
48 www.linuxuser.co.uk
Celebrating the life of Pi
The Raspberry Pi founders talk about its first year
Interview
and susceptibility testing. “We spoke to the government about it, and they said if you sell two boards, two PCBs and you are not EMC tested and you are not CE marked, you are breaking the law,” says Pete. “But they said they had a light touch regulatory regime, which means that in general they don’t get to you until you’ve sold a decent bit of volume.” This system allows low-volume products to climb up and get to a point where they have got volume in place and they have got revenue coming in the door before they have to jump through some of those compliance hoops. The problem with the Pi’s success, however, was that it was pushed into the spotlight very early on. “We had the profile of a large electronics company before we shipped a single unit,” says Eben. “So this is the reason why we had this horrible thing in March where we had to stall; we had to stop for a couple of weeks and Pete and I were down in Cardiff, EMC-testing these boards and crossing our fingers. All of this was simply because we’d achieved a level of visibility… We stuck our necks out, beyond anything that the actual volumes that we were shipping justified. It was an interesting experience and I think we continue to be surprised by both the level of interest and also the very positive interest that we get. I think people do appreciate that we are trying to do something new.” A major aim of the Raspberry Pi project has been for education. The team stated early on that this was their driving motivation. The much-loved BBC Micro helped to encourage a generation of programmers and it kickstarted interest not just in what computers did but how they achieved it. The bare-bones system of the Raspberry Pi invites young people to play around with the technology and understand the component parts. It also gives them a way to program the device. But is it fair to say that the huge take-up of the Raspberry Pi by adults and hobbyists has had an adverse impact on the number of units available for schools and universities? “I think there was a backlog with at least one of the suppliers until shortly before Christmas and I think that that has actually impacted some people’s ability, especially outside of the UK, to get hold of them,” says Liz. “So at the moment we are saying about 20 to 25 per cent of them are actually getting straight into the hands of kids now, which is great and although that doesn’t sound like a massive percentage, when you look at that as part of sales of around
The Pi Store Linux User & Developer: What was the thinking behind the Pi Store? Eben Upton: It is important to give non-technical users a route to get more content onto their Pi. One of the nice things about the store is that it provides a way to access all sorts of documentation and tutorials and examples and applications. It does this without having to cross that command-line hurdle on the first day. Obviously we want them to cross the hurdle at some point, but not necessarily on the first day. LUD: Why have paid content? EU: It gives kids an opportunity to make a little bit of money. If a child does an interesting thing they can put it up there for free and get respect, you know, get recognition, which was I think a powerful motivator for kids. Or if they want to make a little bit of money, and we’ve always said we want to compete with the paper round, then they can.
LUD: Were you pleased that Blitz Games is behind the Pi Store? EU: The Pi Store was provided for us by IndieCity, which is a division of Blitz Games, which is the company founded by The Oliver Twins, Andrew and Philip, who wrote [1980s computer game] Dizzy among other things. In fact, they were two of the people who I read about as a child, who were making a bit of money out of computer games. So there is a wonderful kind of closure there in terms of what we’ve done with the store, for me anyway. LUD: Why have games content? EU: Games get that rap you know. But it is what got me into programming. I love to program and write computer games and I think that is true of a lot of people.
LUD: So it’s about empowering children and getting them to recognise their talent? EU: You know, we want children to think ‘well you know I could go out and do a paper round or I could do this’. Maybe I’m an unusual moneygrabbing capitalist, but it was a motivator for me. All of the motivators for me as a child were that there were stories about people, stories in the press about young people who had been able to make a bit of money using computer programming ability.
800,000 or 900,000 units, that is actually a lot of computers going to kids.” In the future, the Foundation is keen for after-school clubs to use them, teaching programming in the evenings. “We are seeing lots and lots of pictures from parents of kids sitting in front of the television coding,” says Liz. “Somebody last week sent me some photos of his five-year-old girl actually building games from scratch, so that has been kind of an eyeopener for the whole family. It is just really, really nice to watch with everyone pushing ahead with this stuff.” Pete admits that getting Pis into schools was always going to be a long haul. An educational manual has been produced and they have taken on board comments from teachers. They have been encouraged by the amount of extracurricular education taking place using the Pi. Talks have been held with exam boards and there is growing interest in computer science in schools. In 2013, the educational
side of the Foundation is going to be running separately from the technical side. And it is already reaping benefits. “In September, when schools went back, we saw a great big bump in orders because a lot of teachers have been coming in now and outfitting whole classrooms,” says Liz. “We are also sending people out from the Foundation to master classes workshops, so that teachers actually get to be on top of things and [it’s] not as intimidating as some IT teachers think… One thing that I really, really like actually, is that we are seeing all the parents who are engineers, so using the Raspberry Pi as a tool to show their kids what it is that they do at work.” It is a concept that strikes a chord for Pete, whose father was an electrical engineer. Such father-son bonding led to him becoming an engineer himself. His father would take bits
49 www.linuxuser.co.uk
Interview
Celebrating the life of Pi
“Yes I think it has [peeled away] the levels of abstraction that the kids have seen with their ‘shiny toys’ that you can’t get inside” of electronics home with him and Pete was inspired by what could be achieved. “We have children with their iPads, their computers and the games that they’ve been playing,” he says. “They are very comfortable with it, so they are just surprised that the Pi doesn’t come in a box and they can actually touch the bits and they can actually see the bits that do all the work. I mean I love the story about the young lad that looked at one and said ‘where is the computer?’, until somebody pointed out this little 2cm square chip in the middle and he went ‘wow, is that it?’.”
RbairsthPdaiy
1st
CC: Jim Killock
l specia
50 www.linuxuser.co.uk
The sense that children can make a difference when programming on the Pi is noted by Eben, who says that kids coding on regular, desktop or laptop machines tend to think that the computer is responsible in some way for whatever they create. The Pi gives the illusion, he adds, that it is such a simple piece of hardware and that they are the driving force behind whatever they achieve with it. “There is a higher level of ownership of the things that the child has done,” he says. “They credit themselves more because they believe the Pi can’t possibly be as sophisticated enough to have helped them. So it must have
been all their own work, you know, and that is a great thing. Again, it’s something we didn’t see coming.” Pete agrees. “Yes I think it has [peeled away] the levels of abstraction that the kids have seen with their ‘shiny toys’ that you can’t get inside,” he says. “It has allowed them to sort of peel the onion right back to centre core and see the bit that actually does the work. Although having said that, I mean we have software systems on there that are quite sophisticated and allow them to do quite sophisticated things. But in the essence they can actually see the chip that
Celebrating the life of Pi
The Raspberry Pi founders talk about its first year
INTERVIEW
Educating teachers Minecraft and the Raspberry Pi One release which has got people very excited is Minecraft: Pi Edition. Markus Persson revealed the port at MineCon 2012 and it was said that the Pi Edition is similar to the Pocket Edition except that is downgraded to an older version, and with the added ability of using text commands to edit the game world. “Marcus is like a rock star to a lot of these kids,” says Eben. “So yeah we were really
does the work, they can even feel it getting warm when it is working hard and staying cool when it is idle. So there is a massive amount of education that comes from having this bit of computer in front of you.” Education seems very much to be the focus for the Foundation over the next 12 months and the aim is to get through to children who do not have a teacher at school and a parent at home with computer knowledge. They are looking beyond these shores too. “I very, very much want to see the educational side of things working in other places,” says Liz. “So I have got plans this year to look at the developing world as well because there are things that we can do there, not just with computing education, but with education in general. It is a good tool and giving people access to those tools I think is very, very important, so for me that is what it is about.” At the same time, they do not want to lose the engineering focus, with Pete in particular keen on this area. “My drive is to see some of these extension boards actually get into the mainstream and get kids using them,” he explains. “I want them to actually build out from the Pi and see what they can control and what they can monitor and what they can measure, using the Pi as a tool. I mean that is a really exciting area for me because that is the bit that I love to do.” For Pete, computing and real life has to interact. “I just think being able to make kids enthusiastic about being able to sense temperatures, pressures, humidity, measure light, cosmic rays or anything like that, is a good thing,” he says. “It allows them to interact with the real world and it brings home what computers are really about. They are a tool to allow you to achieve other things. They are not
pleased when they said they were going to produce a Pi version. The Pi version has this very rich integration with other programming languages so there is wonderful stuff you can write.” Liz continues: “I was talking to a teacher in America actually who is using Minecraft with his students. He is going to design stuff inside the Minecraft world and then exporting both things to a 3D printer, which I thought was super cool. Suddenly you are not stuck with the physical now.”
just things to play games on – although I [must] admit to have spent most of my Christmas playing games with my nine-year-old on various products, including the Pi – but devices to capture imaginations and allow people then to say ‘wow, this is fantastic, I wonder if I can do this and I think I have got a tool in front of me that will allow me to at least try’.” There will not, however, be a major overhaul of the platform. There will be a third revision at some point to the PCB and that will probably take the Pi very close to a state where the team are completely happy. But there are no immediate plans for a higher-performance Pi and efforts will concentrate on subsidising software development work to try to get more out of the existing platform. For them, videogame consoles provide a good analogy. “If you compare a year-one PlayStation 3 game to a modern PS3 game they are almost unrecognisably different,” says Eben. “You would imagine they were different pieces of hardware. So it is kind of this other model where you put a marker down, you work on optimising the software experience and hardware on that. We want to look at taking cost out of the hardware, on adding incremental features to that piece of hardware rather than a revolution per year. So I guess
LUD: Is there a need to educate the teachers to understand the Raspberry Pi if they are to help children get the most out of it? Liz Upton: Definitely yes and we’ve got some stuff in motion at the moment to do things about that in the next couple of months. We do recognise that for some ICT teachers this is a little bit intimidating because not everybody has necessarily done any coding before. Now we continue to believe that there is actually quite an attractable thing, but it is quite hard sometimes for teachers to come forth and say ‘Look I could do with a little bit of handholding here, I need some help just to get started’, so we are working very hard on that at the moment. And yeah we have got some stuff coming up. LUD: To what level do you need to teach them? Eben Upton: Teachers and professionals want to deliver a quality education experience to the kids who are in their care and there is that confidence thing. Professional development is very important for giving them confidence. They don’t need to be that good: we’re not talking about training teachers up to be professional engineers and then having them teach this stuff. We are talking about getting people to a point where they are just confident that they can answer the basic questions; confident they can stay a page ahead.
that is probably where we are going over the next year. And also things like putting in the camera in the display board, these things that we said we would do, bringing in the model A which we said we’d do. So to some extent we are introducing new hardware, it is already bringing out stuff, it is just kind of fulfilling promises that we’ve made.”
Tutorial
Create a VPN with the Raspberry Pi
Create a VPN with the Raspberry Pi
The Raspberry Pi is cheap enough to leave on a network you’d like to connect to remotely, so let’s learn how to set it up to do just that…
Resources A Raspberry Pi with all necessary peripherals : www.raspberrypi.org
An SD card containing the latest Arch Linux image for the Raspberry Pi: www.raspberrypi.org/downloads
A second computer to be used as a VPN client – we’ll assume you’re using a popular Linux distribution that uses Network Manager, like Debian
52 www.linuxuser.co.uk
One possible scenario for wanting a cheap server that you can leave somewhere is if you have recently moved away from home and would like to be able to easily access all of the devices on the network at home, in a secure manner. This will enable you to send files directly to computers, diagnose problems and other useful things. You’ll also be leaving a powered USB hub connected to the Pi, so that you can tell someone to plug in their flash drive, hard drive etc and put files on it for them. This way, they can simply come and collect it later whenever the transfer has finished. We’ll be using Arch Linux as the operating system for our VPN server, since it is lightweight and has only the minimum packages required for a working system. If it’s been a while since you’ve used Arch Linux, the distro has recently moved to a new service management framework called systemd, so it’ll be good to get up to speed on that also. Our VPN server will be made up of the following software components:
Advisor
Liam Fraser is the creator of the RaspberryPi Tutorials YouTube series and volunteers as a Linux server administrator for the Raspberry Pi Foundation
Base Arch Linux system OpenVPN – the software we will use to create a secure VPN Netcfg – used to easily manage the multiple network adapters we’ll need Bridge-utils – used to bridge the VPN and Ethernet adaptors SSH – will provide secure remote access to the Raspberry Pi and the files on it A dynamic DNS daemon (No-IP) – software that runs in the background and points a domain name to your router’s IP address, meaning that you can access your Raspberry Pi from anywhere using an easy-to-remember web address. This tutorial assumes that you have flashed the latest Arch Linux ARM image to an SD card. If you haven’t, the instructions for flashing an image can be found at www.linuxuser.co.uk/ tutorials/how-to-set-up-raspberry-pi/. You’ll only need to go up to the step where you write the image to the SD card. You’ll have to adapt the instructions slightly for using the Arch Linux image rather than the Debian one.
Create a VPN with the Raspberry Pi
Configure the Pi as a VPN server that you can access from anywhere
TUTORIal
01
Logging into Arch Linux
02
Run a full system update
Connect the necessary cables to the Pi and wait for the Arch Linux login prompt. The login is ‘root’, and the password is also ‘root’. We’ll change the root password from the default later on.
Arch Linux runs on a rolling release schedule, meaning that there are no version numbers and software is continually updated. The package manager in Arch Linux is called pacman. Use the command ‘pacman -Syu’ to start a full system update. If for some reason the update fails, try running ‘pacman -Syu’ again. Sadly, the Arch Linux ARM servers tend to be quite busy. There may be a lot of packages to update so it may take a while, especially because the Pi runs from an SD card.
03
Install the required packages Use the command
pacman -S noip netcfg bridge-utils openvpn to install the required packages mentioned at the start of the article. Answer ‘y’ to any prompts you may encounter.
04
A word about subnets
One thing to note here is that because we’re setting up a client-to-site bridge, we’ll be connecting the client to the server’s network. This means that the subnet that the server is on needs to be different from the client subnet. For example, the subnet at your advisor’s home is 192.168.1.0/24, and the subnet here is 172.17.173.0/24. If the subnet here was 192.168.1.0/24, then there would be a routing conflict because the machine won’t know if you’re referring to a local address or one on the VPN. It’s a good idea to have a non-standard subnet for this reason. In our case, the client subnet is non-standard so it doesn’t matter what the server subnet is for now. However, we’re still going to change the server subnet at some point because you may end up needing to connect from a network such as public Wi-Fi, which may use a standard subnet. If you need to change your server subnet, we suggest picking a /24 subnet (subnet mask 255.255.255.0) in one of the private address ranges: 10.0.0.0 – 10.255.255.255 172.16.0.0 – 172.31.255.255 192.168.0.0 – 192.168.255.255 You should be able to easily change your network configuration on your wireless router’s settings page.
05
Investigate your network
We highly recommend assigning a static IP to your server Raspberry Pi rather than being handed one by your router because you’ll always know where to find it on the network, which will be useful for accessing it remotely. You’ll also need a static IP if you want to access the Raspberry Pi from the internet. We’ll need to find out a couple of things about your current network setup before setting a static IP. You can use the commands ‘ifconfig eth0’ and ‘ip route show’ to do this.
06
Set up a static IP Address
Now that we have found out things about your network, such as your current IP address, the network mask and so on, we can set up a static IP address. We’re going to use the Arch Linux netcfg framework to manage our network connections as we’ll need three different connections eventually: Ethernet, which is automatically handled by the bridge adaptor; a VPN tap adaptor; and a bridge adaptor to combine the two. Change directory to the /etc/network.d directory and open a new file called bridge in nano (or the text editor of your choice):
cd /etc/network.d nano bridge Then fill in the bridge configuration to look as follows and save the changes (swapping our network values for your own):
INTERFACE=“br0” CONNECTION=“bridge” DESCRIPTION=“VPN Bridge connection” BRIDGE_INTERFACES=“eth0” IP=‘static’ ADDR=‘192.168.1.215’ NETMASK=‘24’ GATEWAY=‘192.168.1.254’ DNS=(‘192.168.1.254’) Once done, save the file using Ctrl+O followed by Enter, then exit nano using Crl+X. We’ll add the VPN adaptor to the bridge later on. We now need to configure what profiles netcfg should load by editing /etc/conf.d/netcfg
and configuring the networks array as follows:
NETWORKS=(bridge) Save the changes, exit nano and then run the following commands to disable DHCP and enable the Ethernet interface and the bridge with a static IP permanently:
systemctl disable dhcpcd@eth0. service systemctl enable netcfg.service You can now restart the Pi for the changes to take effect.
07
Log in with SSH
08
Change the root password
09
Set up the public key infrastructure variables
Once the Pi has booted back up, open a terminal on your Linux computer and type ‘ssh root@[IP of your pi]’. Answer yes, to say that you want to connect, and type in the root password, which will still be root. You are now logged in over SSH.
Since we will probably be exposing an SSH login to the internet, it would be a very good idea to change the password to something much more secure. Type ‘passwd’, then follow the onscreen instructions to change your password. Your SSH session will stay logged in, but you’ll need to use the new password next time you log in. You may also want to change the contents of /etc/hostname to set the hostname to a selfidentifying name, such as ‘vpnserver’ rather than the default ‘alarmpi’. The change won’t take place until after a restart.
We’re going to be using a certificate infrastructure to authenticate OpenVPN. This is where a certificate and private key (which
53 www.linuxuser.co.uk
Tutorial
Create a VPN with the Raspberry Pi
must be kept a secret) is generated for each client, and signed by the certificate authority. Only clients with signed certificates are allowed to connect. The key and certificate are used to encrypt the data sent between the client and the server. This secure approach means that additional username and password authentication on the client is not necessary. There are a bunch of scripts which make setting this up easy. Start by copying the scripts to /etc/openvpn with:
cp -r /usr/share/openvpn/easy-rsa/ /etc/ openvpn and then change to that directory. We’re going to be making a template to base our certificates on. Edit the vars file with nano and change the following lines at the bottom of the file from something like:
export export export export export export export export export
KEY_COUNTRY=“US” KEY_PROVINCE=“CA” KEY_CITY=“SanFrancisco” KEY_ORG=“Fort-Funston” KEY_EMAIL=“
[email protected]”
[email protected] KEY_CN=changeme KEY_NAME=changeme KEY_OU=changeme
to
export export export export export export export export
KEY_COUNTRY=“UK” KEY_PROVINCE=“” KEY_CITY=“Ormskirk” KEY_ORG=“Home” KEY_EMAIL=“
[email protected]” KEY_CN=“liamvpn-ca” KEY_NAME=“liamvpn-ca” KEY_OU=“None”
Once you have saved the changes, export the variables with:
source ./vars and then clean any previous configuration with:
./clean-all
10
Create the certificates
Start by generating the certificate authority certificate, with which we will sign everything else (press Enter to leave fields set as they are):
./build-ca Following that, we want to generate a server certificate with:
We now need to generate the Diffie–Hellman parameters, needed to allow two users to exchange a secret key over an insecure medium using the Diffie–Hellman key exchange protocol (this may take a couple of minutes):
last two values are the start and end ranges of IP addresses allocatable to connecting clients. Finally, uncomment the lines:
./build-dh
to give OpenVPN the least privileges possible and then save the changes to the file.
The final step is to generate a certificate for each client that you would like to connect to the VPN. In this case, our client is a laptop.
./build-key liam-laptop Simply do what you did during the buildkey-server script and then you’ll have all the certificates you need.
11
Configure the OpenVPN server
We’re going to base our configuration file on the example server configuration file using the command ‘cp /usr/share/openvpn/ examples/server.conf /etc/openvpn/server.conf.’ Open /etc/openvpn/server.conf in nano. Start by changing:
;dev tap dev tun to:
dev tap0 ;dev tun because we are using a network tap adaptor which allows us to bridge the networks, rather than create a tunnel. Replace the certificates here with the ones you created:
ca ca.crt cert server.crt key server.key # This file should be kept secret dh dh1024.pem
12
Configure the tap interface
Open the file /etc/network.d/tap in nano, add the following lines, and then save the file:
INTERFACE=‘tap0’ CONNECTION=‘tuntap’ MODE=‘tap’ USER=‘nobody’ GROUP=‘nobody’ We then need to add the tap0 interface to our bridge, so edit /etc/network.d/bridge and change the bridge interfaces line to look like:
BRIDGE_INTERFACES=“eth0 tap0” Finally, change the networks line in /etc/ conf.d/netcfg to:
NETWORKS=(tap bridge) Notice that the tap network needs to be started first, so that it can be added to the bridge successfully.
13
Enabling OpenVPN
14
Set up dynamic DNS
Now that we have configured OpenVPN, we want to enable it permanently. Use the command ‘systemctl enable openvpn@server’ and then reboot the Pi to make sure that everything starts successfully from a clean boot. Our VPN is now configured, so we’re going to set up dynamic DNS and port forwarding so that we can access it from the internet.
In our case, the configuration looked like:
ca /etc/openvpn/easy-rsa/keys/ca.crt cert /etc/openvpn/easy-rsa/keys/liamvpn. crt key /etc/openvpn/easy-rsa/keys/liamvpn. key dh /etc/openvpn/easy-rsa/keys/dh1024.pem Comment out the line:
server 10.8.0.0 255.255.255.0 by placing a semicolon in front of it because we want an Ethernet bridge rather than a regular server. To enable the Ethernet bridge, uncomment the line:
./build-key-server [server hostname]
server-bridge 10.8.0.4 255.255.255.0 10.8.0.50 10.8.0.100
Press Enter when asked for any information, don’t fill in a password or company name and accept the request to sign the certificate.
Then change the values to match your server’s network configuration. The first is the server’s IP address; the second is the subnet mask. The
54 www.linuxuser.co.uk
;user nobody ;group nobody
Head over to www.no-ip.com/personal/ and sign up for the No-IP Free option. Once you have done that, don’t bother downloading No-IP’s client because we’ve already installed it. Go to your email inbox and follow the activation link that was just sent to you by NoIP. You can now sign into your account. Once you have logged in, select the ‘Add a host’ option. Choose a hostname and a domain to be part of from the drop-down list. Leave the host type as ‘DNS Host’ and then click the
Create a VPN with the Raspberry Pi
Configure the Pi as a VPN server that you can access from anywhere
TUTORIAL
‘Create Host’ button. For example, we used the hostname liam-ludtest with the domain no-ip.org, so we would access that using liam-ludtest.no-ip.org.
15
Configure No-IP Run the command
noip2 -C -Y to be taken through interactive configuration of the No-IP client. We left the update interval to the default 30 minutes, meaning the client will check every 30 minutes for an IP address change. Once done, start the daemon with:
/etc/rc.d/noip start After a minute or two, your IP address will be accessible via your No-IP hostname. However, it’s likely that trying it from inside your house will simply take you to your router’s homepage.
Fig 1 NAT port mapping
16
NAT port forwarding
It is likely that there are multiple devices behind your router that all use the same external IP address. This is because of the shortage of IPv4 addresses, and also because it is more secure to segregate the internet from your internal home network. NAT (network address translation) forwards a port from the router’s external IP address to a computer on the LAN (local area network). In this case, we’ll want to forward any traffic for TCP port 22 that comes to your router’s external IP address to the IP address of your Raspberry Pi. TCP port 22 is the port used for SSH. SSH will provide remote access to your Raspberry Pi, and also access to any files on it via SCP (Secure Copy Protocol). You’ll also want to forward UDP port 1194, as that’s what OpenVPN uses. The configuration of port forwarding really depends on the router that you are using, so you may have to look it up. The chances are
that it will be hidden away in the ‘Advanced’ section of your wireless router. You should be able to access your router by typing your No-IP hostname into your web browser. If not, it should be at the address of your default gateway that we used earlier on. On our router, we had to go to Advanced>NAT> Port Mapping, and add a mapping (Fig 1). We then had to add a second mapping for OpenVPN, using port 1194 specifying UDP rather than TCP as the protocol.
17
Install an OpenVPN client
We’ll use a virtual machine running Ubuntu 12.04 as our example VPN client. There are simply too many possible combinations to show them all. There are a couple of options that must be used on every client, however: • Use a TAP device • Use LZO data compression • Do not use the default gateway on the remote network (on Ubuntu, this is called ‘Use this connection only for resources on its network’). This basically means ‘don’t tunnel my internet through this VPN’. If this option is disabled, then the client’s internet connection wouldn’t work because we haven’t configured our VPN to deal with internet. Ubuntu uses Network Manager to configure its networks, so the instructions we give here should be almost identical to any other distribution that uses the same thing. Ubuntu doesn’t come with the OpenVPN plug-in for Network Manager by default, so we’ll need to start by installing it. From a terminal, run:
sudo apt-get update sudo apt-get install network-manageropenvpn-gnome
18
Note that we use chmod to add read permissions because the files need to be readable by all users. We need to do this because the Network Manager GUI doesn’t run as root.
19
Create the VPN connection
20
Advanced settings
21
Route settings
22
Test your connection
Note that you’ll probably want to be on a different subnet to your server otherwise it’s likely you’ll run into connectivity issues on the client because of the aforementioned routing problem. We worked around this problem while at home by using a virtual machine that’s connected with NAT. As far as the virtual machine is concerned, it’s on the 10.0.2.0/24 subnet. Click on the Network icon in the top menu bar and click on the ‘Edit connections’ option. You will then be shown a window that has multiple tabs at the top. Go to the VPN tab and click ‘add’. Select OpenVPN as the connection type and then click on ‘Create’. Now fill in the appropriate information. We need to set the advanced settings that we mentioned before: • Use a TAP device • Use LZO data compression The final thing we need to set is the option to ‘Use this connection only for resources on its network’. To do this, go to the IPv4 Settings tab and click the Routes button. Tick the box for the aforementioned option and then click Okay. Once you have done this, you can Save your connection and close the Network Connections window.
Copy the required certificates to the client
We need three files from the Raspberry Pi to be able to connect successfully: The certificate authority certificate The client certificate The client key We’ll be using SCP to copy the files into the /etc/openvpn/keys directory:
cd /etc/openvpn sudo mkdir keys cd keys sudo scp root@[Pi’s IP address]:/etc/ openvpn/easy-rsa/keys/ca.crt . sudo scp root@[Pi’s IP address]:/etc/ openvpn/easy-rsa/keys/[client].crt . sudo scp root@[Pi’s IP address]:/etc/ openvpn/easy-rsa/keys/[client].key . sudo chmod +r *
Click on the Network icon in the menu, hover over the VPN Connections option and then click on the VPN that you just created. You should see a success message and a padlock as part of the Network icon. Open up a terminal and run ifconfig to check that the tap device has been corrected with an appropriate IP address, and that you can ping a device behind the VPN.
55 www.linuxuser.co.uk
Tutorial
Wine for advanced users and developers
Wine for advanced users and developers
Build and run windows apps without using Windows While Linux has one of the largest software catalogues on the planet, there are still many software applications which are either only available for Windows or are only possible to make on Windows. For users, it means that they will miss out on some of their favourite software (for example, Microsoft Office and a lot of games). For developers it means losing a significant market to people who are using Linux. While most of the software can be written for both the platforms if you plan ahead, it becomes painfully difficult (and sometimes impossible) when the software is already written. This is where Wine comes to rescue. For users, Wine provides a way of running Windows applications without any modification on a Linux system. For developers, it provides a way of making their applications work with Linux with maximum compatibility.
Wine
Advisor
Kunal Deo is a veteran open source developer.
Currently he is leading two open source projects: WinOpen64 and KUN Wiki. He is also a KDE developer. He has contributed to many open source projects, including KDE-Solaris, Belenix and Openmoko
Resources Mandatory development tools: GCC, G++, Make etc
Git: It is used by the Wine project as the primary
source control system
Access to Windows system with Microsoft Visual Studio 2008 installed (optional)
56 www.linuxuser.co.uk
Before we dive into the tutorial, let’s understand what Wine is. Wine is not an emulator that emulates the Windows OS to run Windows applications. It is a compatibility layer for Windows applications on POSIX-compliant operating systems such as Linux, BSD and Mac OS X. It translates Windows API calls into POSIX calls on-the-fly. Being just a compatibility layer means that Wine runs applications at native performance. That’s not all: since it doesn’t need Windows to function, you won’t need a Windows licence to run Windows applications. In addition to the Windows compatibility, Wine provides open source implementations for some of the most sought-after APIs in the industry (like DirectX, ActiveX, DDE etc). Wine helps Windows developers to bring their software to Linux in the following ways… Direct binary execution: This is achieved with the tool called ‘wine’ (part of the Wine distribution). In this process, application source code is compiled on the Windows platform, and then the binary file is taken to the Linux system and is run through Wine. When the application is run with binary compatibility, it can use all existing .dll files. This process is pretty
straightforward, but is not able to unleash the full power of the Wine subsystem. However, this is the only way to go if you do not have the access to the source code. You can also wrap Wine with your application to create an easy-to-use way to run it on the Linux platform. Recompiling the application with Winelib: In this method the source code file is taken to the Linux box, where it is compiled against the Winelib libraries using GCC. This way, the application will also be able to catch up with UNIX API calls in order to leverage the full power of UNIX. Winelib ships with a tool called Winemaker, which creates a GNU standard autoconf-based makefile out of a VC++ project. Winemaker is a Perl script that does all the dirty work involved in converting the source code, making it UNIX specific, clearing up case issues and a lot more.
Winelib
Winelib is a software development kit for building Windows applications for Linux (and other POSIX operating systems). It includes the Win32 API implementation providing the necessary libraries and header files. It supports C/C++ and shares 100 per cent of its code with Wine. Winelib is capable of building GUI applications, console applications and dynamiclink libraries (DLLs). One of the biggest benefits Winelib provides is the ability to make calls to UNIX APIs directly from your Windows source code, resulting in better integration than with the direct binary execution method. In this tutorial we will be using Winelib to compile a Visual C++ application on the Linux platform.
01
Rules of engagement
The first step to any porting project is to make sure your code is ready for the new platform. There are a few basic rules of thumb that apply to any application which is supposed to be ported. These cover some basic Windows and Linux operating environment differences. First, differences between DOS and UNIX text
Wine for advanced users and developers
Build and run windows apps without using Windows.
TUTORIAL
files must be fixed. Otherwise you may receive errors related to carriage returns and numerous other similar errors. Then there’s the case of filenames. As you will probably be aware, kunal.c and Kunal.c are the same in a Windows environments, but not in Linux. So, the filenames used in include statements might be different from the original files you are actually referring to. Include statements should avoid using ‘\’ – instead they should use ‘/’. ‘/’ is recognised in both the environments, but using ‘\’ may cause errors in UNIX. Makefiles should be changed accordingly to fit into the new environment. Makefiles are not generally cross-platform compatible. Sprinkle your code with #ifdefs. This good old technique can be used to isolate the platformspecific code in a very efficient manner.
#ifdef _WIN32 // Windows (x64 and x86) #elif __unix__ // all unix // Unix #elif __posix__ // POSIX #elif __linux__ // linux #elif __APPLE__ // Mac OSX code #endif
02
Building Wine
There is a very good chance that the Wine shipping with your favourite Linux distribution is outdated. That’s why we will build Wine directly from the source. This will allow us to build Wine to our liking.
NOTE: We are using Ubuntu 12.10 64-bit for this tutorial. If you are using any other 64-bit distribution you will need the respective package management command. If you are using Ubuntu 12.10 32-bit or any other 32-bit distribution, skip this – go directly to installing build dependencies. Creating chroot for Wine: Since Wine depends upon a lot of 32-bit libraries, it is a good idea to build it in a chroot environment. A chroot is a way of isolating applications from the rest of your computer, by putting them in a jail. In this case we will set up a chroot with the 32-bit binaries and libraries. Install the chroot packages
■ Wine Notepad running in chrooted environment
the chroot environment
$ sudo mkdir /var/chroot Create chroot configuration for the current distribution
@config file: /etc/schroot/schroot. conf [quantal] description=Quantal Quetzal directory=/var/chroot users=kunal groups=sbuild root-groups=root You’ll need to replace ‘Quantal’ with the name of the distro you are using. You will also need to replace ‘kunal’ with the correct username.
NOTE: The distribution name should be a valid distribution, else chroot environment will not be created. To find valid and supported distribution names, look in the directory /usr/share/debootstrap/scripts/. Install the base system for your chroot
$ sudo debootstrap --variant=buildd --arch i386 quantal /var/chroot/ http://mirrors.us.kernel.org/ubuntu/
build dependencies
$ # # #
sudo chroot /var/chroot apt-get update apt-get build-dep wine apt-get install git
Install additional dependencies
# apt-get install libosmesa-dev oclicd-opencl-dev libhal-dev libxmlperl Cloning the Wine Git
$ git clone git://source.winehq.org/ git/wine.git Build and install Wine
We are now all set up to build Wine. # cd wine* # ./configure # make # make install Setting up the X-server To make the GUI applications work from within the chrooted environment, you will need to set up the X-server: On the system shell
$ xhost + NOTE: You can replace the mirror with one
of your liking, preferably nearby. A list of mirrors is located at https://launchpad.net/ ubuntu/+archivemirrors. You will need to make sure that the mirror you are selecting contains the distribution you are chrooting. Set up the Apt sources
$ sudo apt-get install dchroot debootstrap
$ sudo cp /etc/apt/sources.list / var/chroot/etc/apt/
Create a directory which will hold the root of
Enter chroot and install the
On the chrooted shell
# export DISPLAY=:0.0 You can now test the setup by running the following command
# wine notepad Now you can use the chrooted environment for all your Wine-related activities.
57 www.linuxuser.co.uk
Tutorial
03
Wine for advanced users and developers
■ Visual Studio 2008 New Project dialog
Porting Hello World Win32 application
In this step we will see what it takes to build a simple Hello World application in Linux using Wine. The following example shows a message box with the text ‘Hello from Windows World!’.
hello.c #include int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd ) { MessageBox(NULL,TEXT(“Hello from Windows World!”),TEXT(“HelloMsg”),0); return 0; } Winelib ships with nice GCC wrappers which are compatible with the MinGW compiler. These wrappers are called winegcc and wineg++. This way if you have an application that uses the MinGW compiler on Windows, you can simply replace the gcc/g++/windres with winegcc/ wineg++/wrc . To compile the application, we use the winegcc command:
# winegcc hello.c -o hello Upon successful compilation, you will notice that it produces two files instead of just one. In this case… hello.exe.so: This is the main binary of the application. But you cannot execute this directly. It is a shared object file that must be run using Wine. It is directly linked to the Wine library.
# ldd hello.exe.so linux-gate.so.1 => (0xf771d000) libwine.so.1 => /usr/local/lib/ libwine.so.1 (0xf75b9000) libc.so.6 => /lib/i386-linux-gnu/ libc.so.6 (0xf740f000) libdl.so.2 => /lib/i386-linuxgnu/libdl.so.2 (0xf7409000) /lib/ld-linux.so.2 (0xf771e000) hello.exe: Although it looks like the main output of the source, it is merely a script to launch the main application. You can modify hello.exe to customise the launch parameters. You can even specify a different version of Wine for use with the executable.
#!/bin/sh appname=”hello.exe.so” # determine the application directory
58 www.linuxuser.co.uk
appdir=’’ case “$0” in */*) # $0 contains a path, use it appdir=`dirname “$0”` ;; *) # no directory in $0, search in PATH saved_ifs=$IFS IFS=: for d in $PATH do IFS=$saved_ifs if [ -x “$d/$appname” ]; then appdir=”$d”; break; fi done ;; esac # figure out the full app path if [ -n “$appdir” ]; then apppath=”$appdir/$appname” WINEDLLPATH=”$appdir:$WINEDLLP ATH” export WINEDLLPATH else apppath=”$appname” fi # determine the WINELOADER if [ ! -x “$WINELOADER” ]; then WINELOADER=”wine”; fi # and try to start the app exec “$WINELOADER” “$apppath” “$@”
04
Porting a bigger project using Winemaker
Winegcc is helpful if your application consists of only one file, but that isn’t usually the case. In
most cases a Windows application consists of multiple source files as well as resource files. Winelib ships with a tool called Winemaker. It is capable of generating UNIX-compatible makefiles from Windows project source code. Winemaker is a very important tool in getting your first step (also the most difficult one) ready. It does all the dirty work for you, from fixing up files to creating a UNIX-compatible makefile. It is capable of fixing most of the issues mentioned in step 1 ‘Rules of engagement’. Winemaker provides the following options to help you out with porting your code. These options customise the resultant makefile to suit your needs. --lower-uppercase: This option deals with the cases of filenames and puts them in order. --dll: This option instructs Winelib to build a DLL (dynamic-link library) project instead of a GUI project. --console: This option directs Winelib to build a console application. --mfc: This directs Winelib to build an MFC (Microsoft Foundation Class) library application. Please note that Wine does not ship with the MFC library; you will have to build it on your own with Winelib. --nobackup: Winelib keeps a backup of files which it changes. If you already have this source code present somewhere else, you can use this option to save a lot of time and disk space. -Idir: Specifies to include file directories. This option accepts paths to files in absolute format. -Ldir: Specifies library file directories. -idll: Directs Winelib to import a library file through the spec file mechanism. -llibrary: Instructs Winelib to import UNIX library files.
Wine for advanced users and developers
Build and run windows apps without using Windows.
TUTORIAL
In this step we will take the default application built by Microsoft Visual Studio and try to compile it with Winemaker on Linux. Creating the Win32 Application: Open Microsoft Visual Studio 2008. Click File> New>Project… From the New Project dialog box, select Visual C++>Win32. Then select Win32 Project. Give an appropriate Name for the project, Location and Solution Name. Then click OK. The Win32 Application Wizard will open. Click Next to continue. On the Application Settings page, select the Application type as a Windows application. Leave the rest of the settings as is. Click Finish to create the project. The finished project will now open in Visual Studio. Solution Explorer will show all the files created for the project. As you can see, this is a fully featured project with multiple header files, source files and resource files. For this tutorial we need to modify the project itself. We would rather focus on porting part of this application. Let’s run this application to see if everything is working perfectly. Click Build>Build Solution to build the project, then click Debug>Start Without Debugging. Copy the LUDWin32Project directory to the chrooted folder, ie /var/chroot/. Then perform the following steps to create a UNIX makefile project using Winemaker: cd into main project directory
# cd LUDWin32Project/ LUDWin32Project/ Run Winemaker to fix the source files and create UNIX makefiles:
# winemaker --lower-uppercase --nomfc . Winemaker 0.8.3 Copyright 2000-2004 Francois Gouget for CodeWeavers Copyright 2004 Dimitrie O. Paun
Copyright 2009-2012 Andr Hentschel Scanning the source directories... Projectfile found! You might want to try using it directly. Fixing the source files... LUDWin32Project.cpp LUDWin32Project.rc LUDWin32Project.h Resource.h stdafx.cpp stdafx.h targetver.h Generating project files... . The above command fixes the case-related issues with the source code. ‘-nomfc’ indicates that we do not want to use the MFC library with this project. As you can see in the output above, it has located a project file (vcproj), but we will skip it for this tutorial as Visual Studio project files are not fully compatible with Winemaker. Winemaker will fix the files and create .bak files for the modified files. It will also create the makefile which we can run against the standard GNU Make utility to build the application. Makefile structure of a Winelib project: Most of the time, the makefile generated with Winemaker will be a good fit for your project. However, for some advanced and complex applications, you might need to customise the makefile yourself. The following explains the very basic structure of a Winelib project.
Makefile generated by SRCDIR SUBDIRS DLLS LIBS EXES ludwin32project ### Common settings CEXTRA CXXEXTRA
Winemaker = . = = = = = -mno-cygwin = -mno-cygwin
### Global source lists C_SRCS = $(ludwin32project_C_SRCS) CXX_SRCS = $(ludwin32project_CXX_SRCS) RC_SRCS = $(ludwin32project_RC_SRCS) ### Tools CC = winegcc CXX = wineg++ RC = wrc AR = ar This is not a complete makefile, but the main options you should take a look at. However, most of the options will be filled by Winemaker itself. Compile the project by issuing Make
# make wineg++ -c -mno-cygwin -I. -o LUDWin32Project.o LUDWin32Project. cpp wineg++ -c -mno-cygwin -I. -o stdafx.o stdafx.cpp wrc -I. -foLUDWin32Project.res LUDWin32Project.rc wineg++ -mwindows -mno-cygwin -o ludwin32project LUDWin32Project.o stdafx.o LUDWin32Project.res -lodbc32 -lole32 -loleaut32 -lwinspool -lodbccp32 -luuid As you can see, the correct compilers are used for respective files. For example, wineg++ is used for .cpp files, wrc (Wine Resource Compiler) is used for .rc files. The ‘make’ command will produce ludwin32project.exe.so and ludwin32project.exe. Run the ludwin32project.exe file to start the ported application.
05
Conclusion
Wine is one of the key technologies which can help you go Windows free. There are an enormous number of Windows applications that just work on Wine without developer support – see the full list at appdb.winehq.org. If your application is not on that list, you can use Winelib to port your application natively to Linux. It will have the same performance as any other native application. Winelib is very easy to use, especially with a tool like winemaker which takes care of much of the standard porting issues by itself. So, if you are a Windows developer avoiding the Linux platform because you thought it was too much work, it’s time to give Wine a try.
■ Solution Explorer with LUDWin32Project open
59 www.linuxuser.co.uk
Feature
Kolab: David and Goliath
Kolab:
David and Goliath
Groupware is a tough domain to break into. With competition from giants the likes of Lotus Notes and Exchange, how can an open source offering, like Kolab, ever hope to compete? Dr Karl Beecher investigates… Author
Dr Karl Beecher
Until recently an academic specialising in computer science and open source, Karl now works as a freelance consultant, writer and trainer based in Berlin, Germany. You can check out more of his stuff at computerfloss.com
Groupware is an overused and ill-defined term, so you have to make clear what it is you’re talking about. It’s often taken to mean any software that allows users to work together on common projects over a network. Such programs usually package together email, a shared calendar, task management, an address book and document management as a minimum. Just about any organisation that uses a computer these days needs some sort of groupware on their systems. If you use a computer on the planet Earth, you’re probably aware of two groupware programs that dominate the market, namely Microsoft Exchange and
60 www.linuxuser.co.uk
Lotus Notes. Between them, these entrenched players can boast hundreds of millions of users around the world and the backing of some of the wealthiest technology companies in existence. It’s a tough domain to break into and not one you might automatically associate with open source software. Nevertheless, it’s in this domain that Kolab has positioned itself. Kolab is just one of a number of collaborative software applications, both proprietary and open source, which fight to be noticed on a crowded stage. How on earth can a participant in this market hope to distinguish itself, not only from the giants of Microsoft and IBM, but also from a sizeable pool of other more similar players? Entering the groupware domain can be fraught with difficulty if you wish to see any significant usage of your application. In such a well-established realm, where proprietary technologies have long reigned supreme, how can users be convinced to leave their current applications behind and take up an alternative?
Imagine this was your groupware product. You know that users, through desire or necessity, often want to keep using their familiar old systems and will resist change. Any proposed alterations to their setup must therefore cause minimum disruption or risk being rejected; key features must remain intact and the disruptive effects of migration should be few. You basically need to entice users away from the world of Exchange in favour of your product. It needs to provide the same feature set and it had better offer compatibility with Exchange, or an easy migration path at least. Many free and open source (FOSS) products are in this very position. A popular strategy that emerges is to retain Outlook as the desktop client (sometimes offering web and phone interfaces too), but connected to new back-end systems. By building on FOSS technologies, and by virtue of its smaller size, a company attempting this should be able to offer an alternative at a cheaper price than a full-blown Exchange installation. Sounds reasonable, yes?
Kolab: David and Goliath
Can open source groupware take on the big proprietary players?
feature
n Georg Greve, CEO, Kolab Systems
n Roundcube, with its rich UI, becomes the default web interface in the latest version of Kolab
“You can hoover up the smaller customers but the bigger ones will stick with Exchange” Dr Paul Adams Kolab’s alternative strategy
As it turns out, customers with tight IT budgets may go for it, as would smaller clients with humble requirements and an even humbler bank balance. However, groupware users who are more financially flush are apt to stay with Exchange, paying a premium for the warm feeling of ‘reassurance’. “In short,” argues Paul Adams, “this approach is basically a race to the bottom. You can hoover up the smaller customers but the bigger ones will stick with Exchange.” Dr Adams is the chief operating officer at Kolab Systems, the professional organisation behind the Kolab groupware. He and his colleagues believe they know how to avoid this downward race and achieve real success in the FOSS groupware domain. And it’s not just idle talk – it’s the strategy on which they are driving the development of Kolab. Kolab Systems was formed in 2010 to provide services around Kolab, as well as leadership of the development community. Prior to this, the software had been commissioned by the German government in
2003 (see page 60 boxout ‘Profile: Community and Company’). Accordingly, FOSS issues were given a high priority from the start. The CEO of Kolab Systems, Georg Greve, has been outspoken on issues of freeness in groupware and other so-called ‘open source’ alternatives. “Often they turn out to be open core,” Greve explains, pointing out the disappointing mix of proprietary and open source. “But there is another, bigger problem. Outlook is based on the Windows platform. And while the web clients give some level of platform independence even for Microsoft Exchange itself, there are many scenarios where web clients are just not good enough.” We still live in a world where users insist on the rich client experience. If the rich client is Outlook, available only on Windows and Mac, that poses real problems for users of a free operating system. In light of all this, Kolab’s strategy is somewhat different from its competitors’. Kolab itself is still clearly groupware, but it’s trying to distinguish itself in different ways. I first learned about Kolab’s alternative approach when I briefly helped them set up
n Dr Paul Adams, COO, Kolab Systems
their new community website in 2011. You can better appreciate this approach when you realise the nature of Kolab’s architecture. “Kolab is not a single monolithic application,” Adams explains. “When you deploy the Kolab server, you’re actually deploying several independent services. The job of the Kolab code is to make all these work together.” These are programs like OpenLDAP, Postfix, Cyrus and OpenSSL. Hence, Kolab’s developers are not trying to compete on the terms of the entrenched market leader; the Kolab back-end has nothing to do with an Exchange server at all. Instead, Kolab provides its own server, one which makes extensive use of open standards and can boast of being 100% FOSS. The server uses IMAP as its underlying protocol (not just for email storage, but other information too, like tasks, calendar events and contacts) and configuration and user details are stored in LDAP directories using Kolab’s own, published
61 www.linuxuser.co.uk
Feature
Kolab: David and Goliath
XML format. Other open formats are supported too, like iCal and vCard. By glueing several independent programs together, the developers of Kolab make extensive use of open standards. Of course, this can make their job more difficult, but it pays dividends. As well as the obvious modularity, there’s the interoperability which makes Kolab a fertile ground for innovation. For instance, at a recent development sprint, Kolab engineers collaborated with OwnCloud developers to work on integrating OwnCloud functionality into Kolab, a possibility thanks in large part to modularity and open standards. And it’s not just on the server that Kolab deviates from the norm. Kolab’s tagline is ‘Five platforms. One groupware,’ a reference to the rich-client support on no less than five different platforms, including Linux, Windows, OS X,
■ The 2012 development sprint was a
rare, face-to-face gathering. Most Kolab developers work around the world from home Maemo/MeeGo and Windows Mobile. But, as already mentioned, achieving a consistent crossplatform user experience is a challenging thing to do. What’s Kolab’s answer to this problem? Kolab’s client is actually based on Kontact, which itself is a KDE-based application. For several years now, it’s been possible to run
Qt-powered applications on a wide range of operating systems, meaning that Kolab’s client is as consistent and widely supported as Qt allows it to be. Nevertheless, a webbased client is available as well. In fact, the recent release of Kolab version 3.0 might make all this rich-client vs web-client talk quite redundant, because the new release sees Roundcube becoming the application’s default web interface. While web-based mail clients typically aren’t enormous fun to use, Roundcube has been making a big name for itself thanks to a highly fluid and responsive interface. Its judicious use of AJAX makes the browser-based experience much closer to traditional rich-client applications.
Kolab races along
So how is Kolab faring in the race? Is it, too, destined to serve only small customers, making do with the crumbs off Exchange’s table? Its makers claim not, although they’re
PROFILE: COMPANY AND COMMUNITY Who’s behind all this? The Kolab community dates back to 2002, when a consortium of companies (made up Klarävdalens Datakonsult, Erfrakon and Intevation) won a contract from the German Federal Agency for IT Security for the development of Kolab. The Kolab Konsortium, as it became known, led the community until it was succeeded by Kolab Systems, a Swiss-based company that sponsors Kolab’s development and provides related services. The company also maintains the Kolab
System Enterprise Community, an association of organisations that act as Kolab consultants and user support. A good proportion of development is done by paid employees engaged mainly in packaging and distribution. Although there’s plenty of community participation, there are some problems obtaining contributions back from users. Kolab’s user base is highly corporate and, in practice, these business-oriented users have precious little time to give to community participation.
REQUIREMENTS To get started with the Kolab server, you will need a “reasonably recent version of Linux” (CentOS, Debian, Fedora and RHEL are all cited as suitable). At its easiest level, setting up a Kolab server is as simple as entering ‘apt-get install kolab’ at the command line, although this is a meta-package that installs all components on a single machine. The individual packages are: LDAP,
■ Kolab is just as at home
on Windows as it is on Linux
62 www.linuxuser.co.uk
IMAP, MTA, the web admin and the web client. Kolab ships with a standard configuration specifically tailored for smaller, all-on-one-box deployments, which are the most common. If you want to spread the deployment over many boxes, Kolab’s packages do a lot of the work for you, but some post-install configuration will be required.
Kolab: David and Goliath
Can open source groupware take on the big proprietary players?
FEATURE
FURTHER READING AND RESOURCES • www.kolab.org: The community website where you can get information, help, and the latest news from the developers. • www.kolabsys.com: Kolab Systems is the professional organisation behind the Kolab groupware offering. • If you want to get face-to-face (in a virtual sense) with Kolab’s developers, then you’ll find them hanging out in various IRC channels. #kolab and #kontact are sure-fire bets. • There are lots of community mailing lists. Good ones for beginners are: kolab-announce@ kolab.org and
[email protected]. • And there’s a presence at all the usual social media outlets: • diasp.eu/u/kolab • identi.ca/kolaborg • twitter.com/kolaborg
“And speaking of elite users, there’s one other attribute of Kolab that makes its developers beam with pride, and that’s security” frustratingly unable to cite specific examples, as much as they’d like to brag. “We can’t reveal names,” admits Paul Adams. “Large organisations see their choice of groupware as a strategic advantage and so prevent us from advertising them as users.” The best he can do for now is cite certain tricks up Kolab’s sleeve which are essential for attracting big users. Chief among these are the flexibility on offer and the scalability that results from it. When I worked with the community, the developers often boasted how a Kolab sysadmin has lots of options when it comes to evolving their system. Because Kolab is made up of loosely coupled parts, components can be spread out over several machines. The mailboxes, the storage folders, the authentication server etc; these could all be deployed on different machines and maintained separately. This allows an organisation to scale their deployment with a fine level of control, increasing power or space to individual services. The standard approach to scaling – purchasing new boxes as demand increases, installing a separate copy of the whole server on each one and then managing incoming requests via load balancing –
seems like overkill beside Kolab’s method. It’s on these grounds that Kolab’s developers claim its suitability for a wide range of users, from small clubs and societies right up to enterprises and governments. And speaking of elite users, there’s one other attribute of Kolab that makes its developers beam with pride, and that’s security. For big business and government, security of data is paramount. When they use groupware, they want it to be as hard as possible for an attacker to gain unauthorised access to user data. Kolab’s approach makes this very difficult indeed (not surprising when you learn that Kolab’s first major user was the German Federal Agency for IT Security). Storing data the standard way – on a server-side database, like MySQL – means that the data store has an admin account that can automatically access all the contents. Therefore, the danger always lingers that a cracker compromises this account and so gains access to all an organisation’s data. This danger isn’t present for a Kolab installation, because a central database administrator simply doesn’t exist (although a MySQL database is necessary for certain
components to store application data). Instead, all of the user’s data are stored in IMAP folders under the auspices of a Cyrus server and are accessed via services. To get at their data, a user must authenticate against a service. Thus, if a cracker manages to compromise an account, they would only be able to access the data belonging to the compromised user. Without a central admin account, the cracker cannot gain themselves sweeping access to user data.
The future
At the moment, the Kolab community are busy with their latest major release. Kolab 3 has just been launched and brings a raft of improvements to existing features. Version 3 also aims to make Kolab more easily integrated into an existing setup; it will happily work with an existing LDAP system rather than its own, should you be migrating. Other changes include the internal data format, switched from Kolab’s own version (XML based on iCal and vCard) to xCal and xCard. One of the developers’ other devotions, security, also gets a boost from the improved mobile synchronisation. Users will be able to have different credentials on mobile devices, so that the main credentials aren’t compromised in the event of a device being lost. The final release of Kolab 3 was made available on 15 January and the community are now aiming for a six-monthly release cycle. Meanwhile, the race to offer FOSS enterprise groupware will continue.
63 www.linuxuser.co.uk
UNLOCK THE POWER OF ANDROID w w w.li t t l e gre enr o b ot .c o.uk
Available from all good newsagents and supermarkets
ON SALE NOW > Kindle Fire HD > 30 hacks & tweaks > Galaxy Note II > Security HARDWARE REVIEWS
ANDROID HACKING
TIPS & TRICKS
APP REVIEWS
HELP & ADVICE
BUY YOUR ISSUE TODAY
Print edition available at www.imagineshop.co.uk Digital edition available at www.greatdigitalmags.com Available on the following platforms
facebook.com/littlegreenrobot
twitter.com/lgrobot
Review index
Essential kit, software and resources for the open source scene
REVIEWS
Hardware 66 HTC One X+
HTC updates its flagship smartphone for 2013
68 SolidRun CuBox
Another tiny-PC contender
70 Samsung Galaxy Ace 2
The market leader takes another shot at budget handsets
“It’s one of the smallest fully featured microcomputers around” SolidRun CuBox
How we review Our experts thoroughly test the kit and grade it using the following criteria Avoid at all costs A designer/developer’s bad day Good but could do better
Software
72 Live distro super-test The latest live distros fight to earn space on your USB stick
85
Books
The latest Linux reads dissected
Get this. It won’t disappoint Software or hardware nirvana
78 Fedora 18
The Spherical Cow has finally arrived!
80 Pear Linux 6.1
We put the squeeze on the latest Pear build to see if it’s ripe
82 Fuduntu 2013.1
A fun and functional desktop for everyday use
65 www.linuxuser.co.uk
Review
HTC One X+
SMARTPHONE
HTC One X+ £462 HTC moves into 2013 with an update of its 2012 flagship. Does it fix what was wrong with the original?
Technical specs Operating System Processor Memory Dimensions Weight Display Size Display Resolution Expansion Slot
Pros
Up to 64GB of internal storage, very powerful and a stunning screen
Android 4.1 Quad-core 1.7GHz 164GB storage 134.36 x 69.9 x 8.9mm 135g 4.7-inch 1280 x 720 pixels None
HTC began 2012 telling the world about how it intended to streamline its range and focus on a small number of high-quality handsets rather than repeat the strategy that let the company down so disastrously the year before, flooding its portfolio with multiple devices barely discernible from the rest. Alas, while HTC has made great improvements, it still has not been able to completely resist tinkering. And so we get the HTC One X+, a modest update to the company’s flagship phone released only a few months ago. For once though, it is not tweaking for the sake of it. This update attempts to address the two main complaints about the original One X, and is worthwhile, even if it could lead to the inevitable criticism that this new model is what HTC should have produced in the first place. HTC’s One X was hailed as one of the hits of the year. With a quad-core processor, high-resolution screen, good camera and plentiful built-in storage, it was a high flyer only let down by suspect battery life – quite a serious issue. The update improves on many of the core specs and adds a larger battery. The One X+ has a massive 64GB of internal storage and a very impressive 1.7GHz quad-core processor. It positively flies
Cons
No microSD card slot or removable backplate; a very large phone
It’s one of the best handset screens we’ve seen 66 www.linuxuser.co.uk
along, though we did notice it getting hot when we pushed it by asking it to run more graphic-intensive games. The handset supports a range of up-to-date technologies including NFC and MHL (providing HDMI-out through an adaptor used in the micro-USB connector port). It also adds a further 25GB of Dropbox storage to the internal memory for two years. And the front camera has been upped to 1.6 megapixels and takes advantage of access to a dedicated imaging chip to produce quite passable photos. Great if you like self-portraits. The main camera retains the One X’s ability to shoot a still while taking a video, and will produce the latter to 1080p resolution. It is a pity that HTC has not seen fit to include a microSD card slot on the One X+, though. For all that internal memory and access to Dropbox, it would have been nice to also have access to hot-swapping storage. But sadly that’s not to be. HTC has improved on the battery this time around, providing a 2100mAh battery in place of the 1800mAh cell that was used in the original. If you’re hoping this has dealt with the poor
HTC One X+
Improved flagship Android smartphone
REVIEW
The One X+ launches with Jelly Bean, but like on all HTC handsets the OS is largely obscured by the presence of HTC Sense. This overarching skin reworks many of the features of Android, giving them their own distinctive style and functionality
The front camera is improved to 1.6MP and takes decent pictures. The main 8MP camera on the rear can still take a still while shooting video – the latter at 1080p
The 4.7-inch Super LCD 2 display is as good as any we’ve seen on any smartphone. It really shines here, although do beware that it saps the battery quickly as well
HTC has stuck with the dedicated buttons below the screen. They are capacitive rather than physical buttons, and the task-switching one can be reassigned to the Menu function if you wish
battery life issue you’re only half right. The more powerful processor must cause a larger drain, because while we found life to be a bit better than before, it is far from superb. If we spent time gaming and using mobile data during the day, an early evening trip to the mains power was often in order. Physically HTC has retained the HTC One X chassis design almost entirely, with only a couple of stylistic alterations. So, this handset has a polycarbonate shell with a rubberised finish – and it is a bit too easily scratched for our liking. A Beats Audio logo on the back indicates that the partnership continues, and five little notches on the back are the clue that a docking kit can be used with the HTC One X+. Incidentally, the chassis does not incorporate a removable backplate. The micro-SIM goes into a caddy that sits on the top edge of the casing at the back. If you’re worried about battery life, then you should be warned that you can’t swap in a spare in desperate times. This is a big handset, and its screen is a generous 4.7 inches in size, with 1280x720 pixels of display resolution. It’s one of the best handset screens we’ve seen and perfect for reading
webpages, and for looking at video. It’s almost large enough for serious catch-up TV. It is great to see Android 4.1 being used here, and HTC Sense has been given a slight makeover too. It’s not enough to jar or present you with any complex or difficult new learning curves, but if you are upgrading from a recent HTC handset you might notice some subtle changes.
For the most part HTC has done well with its upgrade to what was its flagship handset of 2012. A faster processor and plenty of internal storage headline the updates. But the weakness in battery life has not been completely solved. The trade-off between power and performance looks set to continue for some time yet. Sandra Vogel
More information www.htc.com/uk/
67 www.linuxuser.co.uk
Review
SolidRun CuBox
An optical port on the side of the CuBox provides S/PDIF audio output at up to 192KHz Extra storage can be added via USB 2.0 or an eSATA 3.0Gb/s port, as well as through the microSD slot
Gigabit Ethernet makes the CuBox adept at shuffling high-definition video around a network
The HDMI output on the CuBox is picky about display types, preferring standard 16:9 TVs and monitors
MINI PC
SolidRun CuBox£105 One of the smallest fully featured ARM microcomputers on the market, can the CuBox justify its top-end price? Pros
The CuBox offers a remarkable amount of multimedia performance in an incredibly small package, with IrDA and CEC support
The CuBox, announced in December 2011, has been slow in coming to the UK, but is General-purpose performance is finally available through compact computing poor for the price; specialist New IT. Has it been worth the wait? little to excite developers looking The first thing that strikes you about the CuBox to play with the is its size: measuring just 55mm on a side and ARM architecture 42mm tall, it’s one of the smallest fully featured microcomputers around. Its compact footprint comes courtesy of a split design, which moves some components onto a mezzanine board above the main PCB. Unlike the
Cons
68 www.linuxuser.co.uk
Raspberry Pi, OLinuXino and similar, it’s also provided in a specially designed casing which hides the components and a large aluminium heatsink that’s bonded to the processor. The system-on-chip is a Marvell Armada 510. Based on the ARMv7 instruction set, the chip runs at 800MHz and includes an integrated Vivante GC600 graphics engine. A vMeta HD Video Decoder provides extra grunt for 1080p video playback. That does have a knock-on effect on the system, though: the CuBox’s 1GB of memory seems generous in a market where 512MB is the norm, but a whopping 256MB is reserved for the GPU and a further 128MB for the vMeta – meaning a mere 640MB is available to the user. This can, however, be tweaked: operating system images are available to turn the CuBox into a headless server, disabling the GPU in order to give the user access to the full 1GB of DDR3 memory – extended to 2GB in the recently launched CuBox Pro.
SolidRun CuBox
Miniature desktop computer
REVIEW
Technical specs
A mezzanine PCB provides the secret to the CuBox’s tiny footprint
Processor Marvell Armada 510 (ARMv7) 800MHz GPU Vivante GC600 2D/3D Accelerator plus vMeta HD video decoder Memory 1GB DDR3 (shared with GPU, 640MB available to system) Storage None (expandable via microSD/SDXC card and eSATA) Ports 2x USB 2.0, 1x micro-USB, HDMI, S/PDIF optical audio, eSATA 3.0Gb/s, Gigabit Ethernet, IrDA Audio Digital via HDMI and/or S/PDIF optical port Power 5V DC at 2A (includes suitable PSU) GPIO None Extras Serial console available via micro-USB port Operating System Ubuntu 10.04 ARMEL soft-float Size 55 x 55 x 42mm Weight 91g (excluding cables)
A large aluminium heat sink is attached to the processor but sits snug against the plastic casing, harming its dissipation
A small sensor at the front, with a transparent block in the case, provides IrDA remote
Also consider
1GB of memory is generous, but a lot gets sucked up by the GPU and video decoder
Software is the CuBox’s weak point. Although it’s been out in the US for a year, development is slow and the available software lags behind rival devices. The stock OS, Ubuntu 10.04 supplied on a bundled 4GB microSD card, is particularly poor: as well as being nearly three years out of date, the software is compiled for soft-float – a decision which cripples performance and makes the desktop almost unusable. Replacing the operating system – a handily easy process, thanks to a built-in serial console available on the micro-USB port and a clever script that allows the CuBox to download operating system images and write them to its own microSD card – with a hard-float build of Ubuntu 12.04 drops the SysBench benchmark time from 174.2ms to 48.83ms, beating the Raspberry Pi’s score of 51.45ms. For an ARMv7 chip, though, that score is somewhat disappointing: the Olimex A13-OLinuXino scores 25.7ms on the same benchmark and costs half the price. Where the CuBox shines is not as a general-purpose desktop, but as a home theatre PC. Its eSATA port allows for easy connection to high-capacity external hard drives, and its Gigabit Ethernet connectivity is more than up to the job of streaming 1080p video around the place. Installing the recommended GeeXboX operating system, which includes XBMC, results in an incredibly capable home entertainment system with support for Consumer Electronics Control (CEC) for pausing, playing and navigating the menus using the TV’s
Raspberry Pi £25
remote. An IrDA port at the front allows for a dedicated remote control – not included – and an optical port at the side provides S/PDIF digital output at sample rates of up to 192KHz. The only real fly in the ointment for home theatre use – aside from the £105 price tag, which puts it head and shoulders above the competition and nearly into the realm of professional development platforms – is a somewhat picky HDMI output, which is happiest when working with standard 1920x1080 displays. There’s no support for 16:10, 17:9 or 3:2 display aspect ratios, nor does it support the PAL SD resolution of 768x576. For most users, though, this will be a minor inconvenience.
The multimedia performance of the CuBox is excellent, let down only by the selective nature of its HDMI video output. The integrated microUSB serial console makes recovery from disaster simple, and the compact dimensions make it easy to hide among home entertainment devices. Sadly, its general-purpose compute performance and high price make it a poor choice for other uses. Gareth Halfacree
General compute performance of the Raspberry Pi is equal to or better than that of the CuBox, at a fraction of the price. While it lacks IrDA, eSATA or optical audio output, the Pi has a larger community and supports a wider range of resolutions over HDMI. www.raspberrypi.org
Olimex A13OLinuXino-WiFi £59.95
A fully open source design, the OLinuXino lacks on-board wired network connectivity but comes with integral Wi-Fi support and a general-purpose processor that wipes the floor with the CuBox. Sadly, multimedia support is lacking, with the board limited to 800x600 resolution video output over an analogue VGA connection. www.olimex.com
More information www.newit.co.uk
69 www.linuxuser.co.uk
Review
Samsung Galaxy Ace 2
smartphone
Samsung Galaxy Ace 2 £230
The Samsung Galaxy Ace 2 is a budget handset with highs and lows to reel you in, turn you away and reel you in again Technical specs
Operating System Android 2.3 Processor Dual-core 800MHz Memory 4GB storage Dimensions 118.3 x 62.3 x 10.5mm Weight 118.5g Display Size 3.8-inch Display Resolution 800 x 480 pixels Expansion Slot microSD
Pros
Highly affordable and at 3.8”, the screen is right in the sweet spot for size and usability
It’s tough if you have around £200 burning a hole in your pocket and you are looking for the ideal SIM-free Android handset. There’s a fair bit of choice hovering around that price and Samsung recently added another option for you to ponder in the shape of the Samsung Galaxy Ace 2. This is an update of an earlier handset that proved extremely popular with the pay-as-you-go crowd, and it has to be said that while some of the specifications are noteworthy, others most certainly are not. It also has to be said that Samsung has barely bothered to do anything novel in the design of this phone, but its solid lines are perfectly good enough. In fact, the Samsung Galaxy Ace 2 looks very, very familiar. A physical Home button beneath the screen. A black chassis with rounded corners. Samsung’s trademark name and a silver sliver of speaker above the screen. All these are very clearly Samsung design elements. While it might be a bit dull and samey, what’s good about the design is the well-placed buttons and connectors. Headset on the top edge, micro-USB on the bottom. Volume rocker on the left edge, power switch on the right. What’s not so good is the flimsy backplate that you could snap if you are overenthusiastic when you remove it.
Cons
The chassis is a bit chunky, it features Android 2.3 and doesn’t attempt to innovate
70 www.linuxuser.co.uk
Samsung has managed a strange feat with the sound output. It’s poor through the back-mounted speaker: loud enough but rather too tinny for our tastes. Use the provided headphones, though, and it is much, much better with pretty good bass tones. The camera benefits from an on-board photo editing app, but shooting itself isn’t a great experience. You can’t expect more than 5 megapixels from a handset in this price bracket, and photos are okay as far as quality goes, but there is a big issue: there is serious shutter lag here, and you will need a steady hand to take a half-decent photo. Don’t even think about trying to capture a sharp image of anything that’s moving. If your pet cat is photogenic, you’ll need a proper camera to capture its antics instead of this phone. The highlight of the Samsung Galaxy Ace 2 has to be its screen. At 3.8 inches it hits the sweet spot between size and usability. Larger than this and phones tend to get a bit too big for many people to use one-handed. Smaller and it can be difficult to do media-rich activities like browsing webpages or watching video. At this size both those activities are nice, and eBook/email reading are easy on the eye. The keyboard is perhaps a bit cramped for some hands, but that particular size/usability compromise will be a personal matter.
Samsung Galaxy Ace 2
Low-cost Android all-rounder
Review
The 5-megapixel main camera is supplemented by a frontfacing VGA option
The screen might not be as large as we’re accustomed to, but it delivers good quality
One thing is guaranteed to give away the value of a phone, and its position in the pecking order: its girth. The Ace 2 is a thickset device, taking away much of the benefit that is gained from the smaller all-round profile
The micro SD card slot is on the edge of the phone, and protected by a hinged cover
The dual-core 800MHz processor is nippy The screen itself is clear and sharp. Its 800 x 480 pixels aren’t top-notch, but they do deliver pretty crisp results, and we had no real problems. It’s perfectly acceptable for the price point. We do have a couple of major gripes, though. Android 2.3 is used here, and that just feels quite old hat now. It’s not that you’d have a big problem with it, and it is well hidden for the most part beneath Samsung’s TouchWiz UI, but it’s a couple of paces behind the leading edge and you will find that some apps are not available for the device, such as the Chrome browser for instance. More significant is that the 4GB of storage installed equates to just over 1GB that’s user accessible, and that probably won’t be enough for you. While microSD cards are cheap enough these days, we’d rather not have to buy one right from the off, or would at least prefer to pay a very small amount extra to have one included in the box. There’s good news on the performance front. The dual-core 800MHz processor is nippy, supported ably by 768MB of RAM,
and the battery ought to get many users who place averagelevel demands on their phone through a whole day between charges. This is not a phone for those who want to play the latest high-end games, but for the Angry Birds crowd it is more than up to the job.
Overall, when you add up the pros and cons, the Samsung Galaxy Ace 2 comes out as a pretty good phone, its screen and capable processor standing out in particular. However, if it is on your new phone shortlist, make sure the negatives aren’t things you really care about. Sandra Vogel
More information www.samsung.com/uk
71 www.linuxuser.co.uk
Review
Live distro group test
group test
Live distros
Which portable Linux distro allows you to have a fully functional Linux system with office suites, IDEs and more, wherever you need it?
Knoppix 7 Knoppix has been around for a long time now, and the Debian-based distro has gone through a lot of changes over the years to keep it current with not only the changing computing landscape, but differing user requirements. USB installs and a change from KDE to LXDE are just two examples of these developments in recent years, to deal with the proliferation of large USB sticks and low-power hardware respectively. Knoppix takes a kitchen sink approach to the distro, loading it up with an absolute ton of software that really bulks out the DVD version of the live disc to a full 4GB or so – packing it with much more software for office use, programming and engineering, according to the official blurb. For web you have multiple browsers such as Chromium and Iceweasel, torrent clients, mail clients, instant messenger clients, feed aggregators and more. The full LibreOffice suite is included in the office software, along with some lightweight alternatives and a LyX processor. Major IDEs such as Eclipse and IDLE for a number of languages, as well as web editors and bug
trackers, are available for programming. Every major video and music player, creator and editor is also included, along with preconfigured Wine and a decent set of system management tools. It’s more than a lot of people may be wanting to use; however, if you’re planning to install this to a USB stick and use it as a mobile system, you can easily add and remove missing or superfluous packages as you see fit. The separate HD and flash disk installers give you different options to automatically or manually partition drives, and you can choose a persistent memory option at the end of the flash install to create a way to save system settings. Speed-wise, Knoppix manages to boot incredibly fast thanks to its own custom bootloader that allows you to add your own specific options at boot time. The so-called cheat sheet for this is available on the website to get the most out of it, although simply hitting Return will get you going for any normal situation. It’s still a great live distro after all these years, and that’s no easy accomplishment.
n Installation is handled by different apps
for different storage
scores Installation
9
Software
9
A quick and easy process that automates some key processes
Fantastic selection of default software, and access to much more
Customisability
Boot options give you a lot of customisation while live, which carries over to installs
Speed
Thanks to using LXDE, Knoppix boots very quickly and stays fast while using it
Overall
Knoppix was and continues to be a great live or portable distro if you have very specific Linux needs you cannot always satisfy
8 9
9
More information
n Knoppix has hundreds of apps pre-installed
72 www.linuxuser.co.uk
knoppix.net
Live distro group test
Four of the best live distros battle it out
Review
Slax 7
Three years in the making, Slax 7 brings a major overhaul to the previous 6.x line of the Slackware-based portable OS. Most noticeable in the update has been the upgrade of KDE to a much more recent 4.9, a big leap over 3.5 that was in the last version, and a technical triumph as the usually bloated KDE has been wrangled into a fully functional Linux distro that can come in a tiny 210MB ISO if needed. This base ISO has very little to it, though – Firefox and SMPlayer are among the most exciting applications included by default, and you’ll need to load up a Google Doc if you want to do any more word processing than Kate can handle. If you want to have a bit more included with Slax, you can add ‘modules’ to the ISO before you download directly from the Slax website. Different categories of module are available, maintained by the community, and they allow you to add software, office suites and programming IDEs to expand the functionality. Before Slax 7 came along, the modules for 6 numbered in the thousands and were kept well up to date, as best as Slax 6 would allow. Unfortunately, this number has reduced significantly since 7’s release and has not recovered yet, with temporary solutions to use Calligra Office suite, while Eclipse isn’t even available yet. This will turn around, but it won’t be for a little while. As a more portable OS, Slax doesn’t really have a way to be installed to a system HDD in
n The
modified KDE is fast yet still works just like KDE
the software, and the best way to put it onto a USB stick or similar is by using something like UNetbootin or any other alternative flash installer. While Slax does automatically detect any attached USB storage, like the one it lives on, it would be nice to have the tools to replicate it to other USB sticks or hard drives. At the very least, it’s much more common and practical to use live distros from USB storage. Even using KDE, as Slax is so lightweight in general, it runs at lightning speed. Of course, the more you put on the ISO, the slower it will get; however it doesn’t have anywhere near the bloat of some of the full desktop distros.
scores Installation
6
No dedicated installer program, but putting it onto a USB stick is fairly easy
Software
The base version has very little, and there’s not much to add to it right now from modules
Customisability
Software on the distro is highly customisable, when it’s actually ready
Speed
Extremely fast thanks to a very lightweight image and modified KDE
Overall
We like Slax, but it’s going to be a few months or even a year before there’s enough available software to make it worthwhile
4 8
10
6
More information n The extra modules section is a bit thin right now
www.slax.org
73 www.linuxuser.co.uk
Review
Live distro group test
Ubuntu 12.10 Ubuntu was one of the earlier distros to adopt the use of a live disc, and while it is primarily used to let you test out some of the Ubuntu basics, this test environment gives you access to quite a large selection of default applications. The software present on this base Ubuntu covers you pretty well for a lot of simple tasks: Firefox for web browsing, Thunderbird for emails, Rhythmbox for music, a video player, torrent client and even apparently a disc-burning utility in Brasero. There are some system tools present as well, so you can manually set up your computer before installing it on a regular machine. However, there aren’t any programming tools or IDEs to let you get on with some more heavy coding from the environment. There is the ability to add some extra software, but it’s limited to only the packages in the Ubuntu Main repo – while apparently numbering 10,000, this is a lot less than the full 60,000+ of full Ubuntu. One of the major problems using Ubuntu as a live distro is that it’s slow in comparison to all the others, and is not well suited for older or very underpowered machines. While it will certainly run, the user experience will be pretty terrible and it doesn’t have the benefit of being able to boot into either a 32- or 64-bit kernel like Knoppix can. Installation-wise though, it’s probably the best. From the live environment, it allows you to install
n Installation to all types of storage is quite easy
to any device really, and even includes tools to prepare a USB stick for installation. Also, if you put the image onto a USB stick to begin with, you have a portable way to install Ubuntu, and UNetbootin will allow you to create some specific space on the storage to save files and changes. So it’s not the absolute worst live distro – in a pinch you can easily get some office work done or even just watch something to pass the time. However, if you need a serious portable distro and you need to do some real work on the go on many different computers, Ubuntu is probably not the best distro for the job.
scores Installation
10
It’s Ubuntu, so it has a fantastic native installer for all devices
Software
Usable and extensible, but otherwise still a fairly basic selection of applications
Customisability
You can add the odd piece of software and change the offsystem setting
Speed
While fine on modern PCs, anything where resources are a premium will be affected
Overall
It was worth a look, but Ubuntu just doesn’t really cut it as a live distro, although it wasn’t really designed to be one
6 4 3
5
More information n Good for office and media, not so good for programming
74 www.linuxuser.co.uk
www.ubuntu.com
Live distro group test
Four of the best live distros battle it out
Review
Porteus 1.2
scores Installation
We like its quick and simple installations that can be done over and over
Software
A decent set to start, with a full library accessible after the fact
Customisability
Activating and deactivating modules and other customisations affords you a lot of control
n Simple and with a decent number of applications, Porteus can add more though
Based on an older version of Slax, Porteus provides a much more comprehensive ‘base’ than its ancestor, but still comes in a tiny package of around 250MB while including multiple desktop environments, along with a handful of extra applications to get you going. It handles a lot of functions quite differently from Slax as well, making it a little more customisable post-installation. Mainly, instead of using a system to add software modules to the ISO, it has its own package manager for adding and removing software. The Porteus package manager treats this in a similar manner, though, referring to the packages as modules, and grants access to other Slackware- and Slax-based distros’ libraries to download from. Porteus itself has a large number of programs available in its repos anyway, so this should only be necessary for the more obscure packages. The Slax style of adding modules to the image does still exist to a degree, though, as you can add specific video drivers to the image beforehand. Porteus is very fast. Boot time is minimal, with a pause taken only to choose a desktop environment to begin with – LXDE or KDE for the basic version. LXDE is of course slightly faster, but the KDE version is definitely much faster than a lot of other KDE 4 implementations, save Slax 7. Speaking of that, Porteus is perhaps not as fast overall as Slax, but it beats it by a mile in the installation department: merely copying the
existing files to the hard drive or a USB stick takes a few minutes at most, depending on system and write speeds, and it allows you to set up bootloaders. If you’ve installed it to a USB stick, then you’ve basically got a clone of whatever live media you were using, allowing you to install it onto further devices and storage in the same way. The one thing we have to say is that Porteus is not presented all that well, and although we gladly make concessions for such a small distro, Slax itself looks a lot more professional – better than the sort of hacked together live distro it really is. Functionality-wise though, Porteus is pretty amazing.
Speed
Very fast in general, although mildly laggy sometimes, but only relative to the others
Overall
Porteus is a great reimagining of Slax that allows you to change and tweak stuff after installing, rather than having to get a brand new ISO
9 8 8 7
8
More information
www.porteus.org
n You can select different boot options like choosing a desktop
75 www.linuxuser.co.uk
Review
Live distro group test
In brief: Compare and contrast our verdicts Installation
Dedicated install options for multiple types of storage
9
Software
Comes with a huge selection, and you’re able to add more
9
Customisability
Easy enough to add and remove software, with other system modifiers
Speed
Very fast, in part thanks to a custom bootloader and LXDE
Overall
A comprehensive live and portable distro for working on system maintenance
Limited installation options other than using UNetbootin from other systems At the moment the software database is slowly being rebuilt, but is lacking
8
Fully customisable with different modules of software to add and remove
9 9
Thanks to it being very lightweight, it’s fast even using KDE Out of the gate with a limp, Slax still needs a few months to mature
6 4 8 10 6
Ubuntu installation is simple and straightforward onto any storage
10
A fairly basic selection that can be somewhat augmented Not a huge amount can be changed other than a little software per session On modern machines it’s fine, but in comparison it chugs along Not suited for a live or portable distro if that’s what you need, but okay in an emergency
6 4 3 5
AND THE WINNER IS…
76 www.linuxuser.co.uk
A good selection of all types of software but office, with more to add Not much can be done beforehand, but a rich selection of packages can be installed Generally very fast, but seems to lag a little on slower machines more than others A great Slax remix adding functionality and post-install customisation
9 8 8 7 8
GROUP TEST
WINNER
Knoppix
Knoppix takes home the trophy in this group test for a number of reasons. Firstly, even for what could be considered a bloated image for CD and DVD compared to the Slaxes of this world, it still runs fast enough for this to be of little consequence. And the best part is, you then get to keep the sheer plethora of available applications that Slax frankly lacks right at the moment. If Slax had full access to a more complete library of packages, it may have been a different story, though. While it may not be a clear victor, it would give Knoppix a run for its money by being able to have a much more focused and lightweight image with a similar selection of apps far more customisable to what the user wants. This space saving can be essential when using USB storage if nothing else. Rob Zwetsloot
Installation is easy and fast and can be done from installed devices
■ Full software repos are available to customise your Knoppix
Perfect products for Linux professionals… Essential guides to mastering open source software and operating systems from Imagine Publishing. £6
Back issues
£4
From with code TUX
Bookazines
DVDs
£19.99 now from
£4.99 Web Design: From Desktop to Dotcom eMag Vol. 1 The Cloud Computing Book
Packed with tutorials and guides to help you make the most of cloud computing, you can learn how to share files, store documents, send images, play games, read books, watch movies and much more. £12.99
Linux & Open Source Genius Guide Vol. 2 From in-depth features and step-by-step tutorials to expert interviews and essential software, the Linux & Open Source Genius Guide will walk you through everything you need to know to become a Linux master. £7.99 with code
Linux & Open Source Genius Guide Vol. 3
This book will walk you through everything you need to know to become a Linux master. With tutorials for Ubuntu, Android, SUSE and more. £14.99
A visual guide to Flash, Dreamweaver and Photoshop. Including 256 pages of walkthroughs on one disc! £4.99
Discount code
Get Linux & Open Source Genius Guide Vol. 2 for half price with the code…
OPEN
Become an ImagineShop customer and leave reviews of your favourite products.
Web Designer eMag Vol. 1
Enjoy 21 issues of Web Designer on one interactive disc. Over 1800 pages of expert tutorials, case studies and features. Plus all tutorial workshop files included! £4.99
Order online @imagineshopuk /imagineshopuk
MAGAZINES
BOOKS
DVDS
DOWNLOADS
GIFTS
Review
Fedora 18
n The new Fedora is finally here
distro
Fedora 18
After much delay, the Spherical Cow makes an entrance. How does the final version of Fedora 18 measure up? Pros
A great installer, and it’s also nice to see MATE and Cinnamon in the standard repos
A new Fedora is always a big deal, as the Linux distribution is known for being on the bleeding edge of free and open source software and technology, coming with the best and brightest the extended community has to offer. Fedora 18 may have had a bit of a bumpy ride to the finish line, but the longer wait hasn’t hampered the quality of the release at all. Any quality problems are mainly down to GNOME 3.6, but we’ll get onto that later. As we mentioned in our review of the beta, the new installer is a wonderful, minimalist-designed app that allows for quick installations with decent default settings, and a more advanced setup if you have some specific requirements.
Cons
Limited software selection due to FOSS commitment, GNOME 3.6 is horrible to use
78 www.linuxuser.co.uk
n Installation is easy and looks great
It also starts copying and installing while you finish up with root passwords and such, similar to how the Ubuntu installer works. While there’s not always much to do after the actual installation starts, it’s a step in the right direction to streamline the installation process. It also has the standard post-reboot user setup that we also saw in Fuduntu this issue, which is good for OEMs and sysadmins, and doesn’t really slow down the process for desktop users. The actual installation itself is a little slower than we’d like, but it won’t keep you waiting for too long. It’s after all this that you’re put straight into an updated GNOME environment – GNOME 3.6. We’ve aired our grievances in previous issues about this latest version of GNOME, about how it slows down workflow in favour
Fedora 18
Final release of cutting-edge Linux distro
Review
n The default app selection has grown just a bit n The inclusion of Cinnamon is a great, modern alternative to GNOME 3
n MATE integration is great, and brings GNOME 2 back for purists
n The GNOME 3.6 features and simplification
can be frustrating to navigate of being touch and keyboard friendly. Luckily, it’s at this point that you can start installing any number of other desktop environments, such as KDE, Xfce, or newcomers Cinnamon and MATE. Now that both of these are native to the repos, they definitely look a lot better than previous implementations on Fedora 17, with fonts being crisper on Cinnamon, and MATE gaining the ability to look a lot more like a modern desktop. Red Hat has a big stake in GNOME, same as Fedora, so it’s not surprising that it still shows up as the main desktop choice. It would be nice to have more available spins, though. There’s a bit of an update to the default app selection as well, and while nothing has really changed that’s not related to the system settings, the Fedora Project has at least added the LibreOffice suite to the starting selection. While it’s a minor thing, it’s a nice addition. On the system tools side, the package manager, updater etc are all now part of the same generic Software app. This is not accessible by typing ‘update’ or ‘updater’ into the search bar, and in GNOME 3.6 the dropdown menu to access the graphical updater is a little hidden. It’s easier to just use YUM to update the system.
The new installer is a wonderful, minimalist-designed app The Fedora devs also thought it noteworthy to mention the inclusion of a new command-line tool, System Storage Manager. Available in the repos, this can do some basic partition management, as well as checking partitions for errors and such. It’s a nice little tool, perhaps more suited to headless servers or working from the command line. Otherwise, it’s got the standard package and security updates, a move to Linux kernel 3.6.y, and is still a great operating system for desktop, server or the cloud.
Fedora 18 is a minor but important improvement over Fedora 17, and the new desktop environment choice is great for desktop users, especially with the inclusion of a default GNOME 3.6. Fedora is just as slick, up to date and free as ever, and well worth the update. Rob Zwetsloot
More information fedoraproject.org
79 www.linuxuser.co.uk
Review
Pear Linux 6.1
n Pear comes with built-in social networking tools
distro
Pear Linux 6.1
Has the beleaguered Ubuntu spin sorted out all its issues, or is this OS X clone still not ripe? Pros
A shiny interface that does a good impression of OS X while offering the superior workflow of a Linux DE
The last time we reviewed Pear Linux, the French developer had just changed the name to Comice OS in an effort to rebrand it slightly, to whatever end. This was an updated version of Comice OS 4, which launched with several bugs making it difficult to install, and near unbootable unless you exited to command line and started X manually. The ‘fixed’ version worked all right, but there were still some underlying bugs that made it unsuitable for day-to-day use. So after a name change back to Pear Linux, and a couple of version number upgrades, we’re back to try out the OS X-inspired Ubuntu distribution. And it’s still a mess, only for wholly different reasons now. The image for 6.1 is a point update to another, apparently troubled, 6.0 release, and at the very first step it will not
Cons
Still very buggy, albeit for different reasons. Won’t liveboot, problems with virtualising, and Appstore broken
80 www.linuxuser.co.uk
even live-boot. On different machines it either started X and then did nothing else, or hung at the boot graphic. This is a wide-ranging problem also affecting other users; however, at the very least, if you choose the install option at the boot menu, this works just fine. The installation is pure Ubuntu, with a few branding changes, so it’s pleasant enough to use and installs at an average/decent speed on a modern computer. After installation, you’re presented with the fairly clean, custom Pear desktop environment. Drawing its interface inspiration from OS X, there’s a dock at the bottom of the screen, and the top bar displays user and time information. While you can click the top left of the bar to open up a list of applications, the so-called Launcher (named after the Mac equivalent) is also on the dock. It’s split up into categories
Pear Linux 6.1 OS X-inspired Ubuntu spin
Review
n Pear looks great, but does not work so well
n The black bar obscures a fair portion of the virtual desktop
n At least there’s an alternative to the broken Pear Appstore
n There’s a browser choice app similar to Windows
in the standard GNOME way, but there’s very little on there after you first install it. At this point you’ll want to start installing packages, and there’s a special Pear Appstore (a reskinned Software Centre) to give you access to the various software. Only, the Appstore will never load, cycling a loading animation for as long as we could bear to watch it. Based on our impressions on earlier versions of Pear Linux, this is a great-looking software centre that works absolutely fine, grabbing the right data from the repos and Ubuntu sources to make it a different experience from its Linux counterparts. Luckily, the distro comes with Synaptic installed by default, so if you’re uncomfortable installing all your packages from the command line, you can at least do it graphically. It’s a shame though, as this is one of the selling points of Pear Linux. Another problem that occurred during testing was when we decided to install it on a virtual machine – everything
You’re presented with the fairly clean, custom Pear desktop environment was going well, just like it had on a physical machine, and it even had the correct Guest Additions installed for VirtualBox. However, once logged in, a permanent black bar covered the right quarter of the screen, obscuring full-screen windows and not letting you click past it. Virtualising is great for testing out app builds and if you only have access to a severely handicapped version to test on, it won’t go well. It’s disappointing really, as while not everyone is hankering for an OS X experience on Linux, it doesn’t mean there shouldn’t be one for those that do. The interface is great to use, almost perfectly copying the Mac while throwing in a few Linux extras that make it overall a bit better. Maybe next time we look at it, it will work flawlessly. And we won’t have to use a ‘ripe’ pun again.
Every time we use Pear, we want to like it. There’s a lot of great potential for a custom, ‘unique’ interface that goes beyond the OS X one it’s trying to imitate. However, each time there’s always something pretty major that breaks the experience. One to avoid for the moment, especially the 64-bit version. Rob Zwetsloot
More information pearlinux.org
81 www.linuxuser.co.uk
Review
Fuduntu 2013.1
n A nice welcome when you start Fuduntu
distro
Fuduntu 2013.1
Designed to fit somewhere between Fedora and Ubuntu, this fork of Fedora is a fully functional and easy-to-use distribution Pros
Great to use, plenty of apps in repos, only Linux distro to support Netflix and Steam
Whenever we get a chance to look at the new Fuduntu, our first impressions are always about how nice it is to work with. Positioning itself as a lightweight, battery-friendly distro, Fuduntu is one of the few remaining Linux distributions that still uses the venerable GNOME 2 desktop environment, enhancing its functionality with a dock similar to OS X. It’s quite fast, and comes with a decent selection of default apps to let you hit the ground running while you further enhance the experience. Installation of Fuduntu is nice and simple, with some advanced options for storage and partitioning, followed by setting up users and other system options post-reboot. This particular Red Hat/Fedora style of install is always great for
Cons
GNOME 2 is still great, but it’s starting to show its age in the light of MATE’s maturity
82 www.linuxuser.co.uk
OEMs or sysadmins, and the Fuduntu version is as good as any other bar the Mandriva-derived distros. The whole process runs at a fairly normal speed on a modern computer, but is nothing to shout about. The initial Fuduntu setup comprises Chromium for web browsing, LibreOffice suite for all kinds of office work, and a small selection of media players. Enough to get yourself going, then, and the repos are well stocked with programming packages and IDEs, among everything else, so it’s quick enough to get down to some serious work if time is short. The dock for the GNOME 2 interface has been changed from AWN in previous versions to Cairo – apparently AWN is no longer maintained and there are a few bugs present that are not being fixed. The Cairo dock is a nice replacement, works
Fuduntu 2013.1 Latest release of Fedora fork
Review
n The default apps in Fuduntu are a great starting point
n GNOME 2 still works fine, but it might be time to move to MATE
n The repos are well stocked with more software
in practically the same way and allows for some snazzy UI effects like previewing the contents of a folder on the dock, and of course hides away just fine when it’s not in focus. It seems odd in 2013 for a modern, up-to-date distro to still be using GNOME 2, especially with some high-profile alternatives. Especially MATE, which is slowly maturing as a very competent replacement and upgrade to the original codebase. GNOME 2 still runs fine, of course, and the extra functionality from Cairo is much appreciated; however, it may be time to think about changing to MATE. There are a couple of new, fairly high-profile apps that have been added to Fuduntu – namely Netflix and the Steam Beta client. Fuduntu is the first Linux distro to officially support and distribute either of these via its repos, although there are a few caveats. Netflix itself has to run on Wine, and installing and setting it up takes a while as it sets up enough core Wine modules to allow it to run. It can then be found in the Sound & Vision part of the applications menu; however, we generally had issues getting it to work on our review setup in what was apparently a rare case for people using Fuduntu. Steam is a native app, though, so there wasn’t any problem there. Of course, both of these apps are restricted,
New, fairly high-profile apps that have been added – Netflix and Steam proprietary, non-free software, and that is not likely to change in the foreseeable future – it’s just nice to have them so readily accessible. Fuduntu is a great, user-friendly distro that is very much focused at users who are in the community and need a straightforward version of Linux to use day to day. The extra additions and changes make sure it’s kept relevant as well, and as a rolling distro it means you’ll have to worry about upgrading a lot less than with others.
Fuduntu is a pleasure to use and doesn’t really have any concessions made to appease any particular sect of the community. The use of GNOME 2, while perfectly fine, still seems odd, but it works well even with the new additions of Steam and Netflix. The distro is great for laptops too, with its power management. Rob Zwetsloot
More information www.fuduntu.org
83 www.linuxuser.co.uk
Subscribe
Subscribe today & start saving
Non-USA readers see page 30
USA special offer
Subscribe today and get * 5 free issues Exclusive subscriber benefits
• Subscribe today and pay just $128 for 13 issues* • Pay as little as $9.85 an issue – usually $15.99 in stores
Your exclusive offer code:
USA
For more information and to order visit
www.imaginesubs.co.uk/lud Or call +44 (0) 1795 418661
Imagine Publishing publishes more than 20 monthly magazines, some of which have been running for over 10 years, reaching over 4 million readers every year
84 www.linuxuser.co.uk
*Terms and conditions: This is a US subscription offer, please don’t forget to quote USA when ordering. You will actually be charged £80 sterling for an annual subscription. This is equivalent to $128 at the time of writing, although the exchange rate may vary. Five free issues refers to the newsstand price of $15.99 for 13 issues being $207.87, compared with $128 for a subscription. Your subscription will start from the next available issue. This offer expires 31 May2013.
Book Reviews
Latest Linux books revealed
REVIEWS
COMING SOON The best Linux books heading to a bookshelf near you…
CentOS 6 Linux Server Cookbook: RAW
Ethics of Big Data: Balancing Risk and Innovation A timely enquiry into IT’s newest set of problems
Author: Jonathan Hobson Publisher: Packt ISBN: 978-1849519021 Price: £30.99 Maintain a performancebased server solution, from monitoring your RAM to managing the syncing of remote files. Administer the file system, from monitoring hard disks to rebuilding a logical volume. Design and implement a series of checkpoints to protect your server. Deliver a domain name service to power the working environment.
Processing
Creative Coding and Generative Art in Processing 2 Authors: Ira Greenberg, Dianna Xu, Deepak Kumar Publisher: Apress ISBN: 978-1430244646 Price: £35.49 A fun and creative approach to learning programming. Using the easy-to-learn Processing programming language, you will quickly learn how to draw with code, and from there move to animating in 2D and 3D. These basics will then open up a whole world of graphics and computer entertainment.
Performance Modeling and Design of Computer Systems Queueing Theory in Action
Author: Mor Harchol-Balter Publisher: Cambridge University Press ISBN: 978-1107027503 Price: £48.00 Bringing queueing theory decisively back to computer science, this book is written with computer scientists and engineers in mind and is full of examples from computer systems, as well as manufacturing and operations research. The goal is to train readers not only to customise existing analyses but also to invent their own.
Author: Kord Davis Publisher: O’Reilly ISBN: 978-1449311797 Price: £15.50
With 90 per cent of the world’s data generated in the last two years, the unprecedented size, variety and velocity of new information generates new questions, and companies that have lost reputation through mishandling of aggregated data seem to be those who have failed to ask the right questions, and act on their values. Davis looks at four distinct areas of big data ethics: identity, privacy, ownership, and reputation – and how to frame enquiry into your values in terms of these areas. He then walks us through methods (and benefits) of putting values into practice. The book is a timely ethical enquiry into big data, giving organisations and individuals the necessary framework to ask important questions which just weren’t necessary a few years ago. If your organisation wants to align its actions to its values, here is the framework you need to conduct the necessary conversations. In cyberspace, it seems, philosophy still has something to contribute to practical action.
Definitive XML Schema, Second Edition
Still the definitive guide to XML schemas Author: Priscilla Walmsley Publisher: Prentice Hall ISBN: 978-0132886727 Price: £38.99
Prentice Hall is known for Charles ‘SGML’ Goldfarb’s XML series, and in particular Definitive XML Schema, the classic work on XML schema. This second edition, ten years after the first, is updated for XML 1.1 (released by W3C in 2012) and looks set to extend the classic for at least another decade. Walmsley’s work of reference is also intended to be read through as a tutorial, starting with the purpose of schemas (and considering alternatives such as RELAX NG); then walking the reader through an example schema; exploring the role of namespaces; the relation between instances and schemas; then exploring elements and attributes, the building blocks of XML, and when to use local or global declarations. As knowledge is introduced, it is related back to the reader’s own design problems, such as how to break down data values. Complexity is built from simplicity. Design, documentation, extensibility, reuse and versioning round off a work that should sit on the bookshelf of anyone who has to work with XML documents.
Practical Object-Oriented Design in Ruby: An Agile Primer
Really understand the what and how of OOD
Author: Sandi Metz Publisher: Addison Wesley ISBN: 978-0321721334 Price: £25.99 Object-oriented design (OOD) has been bogged down carrying Java and C++’s baggage train, and OO principles are usually picked up by osmosis, rather than in any systematic fashion. Metz is here to bring back the certainties of real OOD, giving Ruby programmers of all levels rules and principles, and preparing you to use design patterns properly. “OOD is about managing dependencies” – to reduce the cost of change. Metz brings design squarely into programming with agile techniques: OOD techniques giving the ability to support the changes that the agile methodology needs. From the right way to create a class (hint: a single responsibility), to really making dependencies work, Metz helps you code a ready-to-evolve collection of loosely coupled objects. Using Ruby’s duck typing, and walking you through, then around, a number of elephant traps, the author is bursting with insight that she communicates into the fractal nature of object-oriented design, laying down the rules, then giving the reader the confidence to try breaking them.
85 www.linuxuser.co.uk
Contact us...
Web: www.linuxuser.co.uk Email:
[email protected]
Questions & answers
Become a fan on
Contact us @linuxusermag
Linux User & Developer
Your questions
answered
ASK THE EXPERTS This month your questions were answered by…
Send us your questions and we’ll do our best to answer them!
Russell Barnes has been a computer and technology journalist for nearly 15 years
Gareth Halfacree has
been breaking, fixing and overclocking his PC for years
Rob Zwetsloot studied aerospace engineering, using Python to model simulations
Joey Bernard helps
researchers with scientific computing problems
86 www.linuxuser.co.uk
n LibreOffice is readily available in the Fedora repos
Out of Office
Hi, I’ve run into a problem that I hope you can help me with. I tried to install LibreOffice 3.6.4 on Fedora 17, 32-bit version, using the following method: First I downloaded the compressed Fedora RPMs from the website using wget, then made sure to remove any older version of OpenOffice. It turned out there was no OpenOffice on my system, so I then extracted and then installed the packages like so:
$ cd /tmp/LibO_3.6.4_Linux_x86_ install-rpm_en-US/RPMS/ $ rpm -Uvh *.rpm $ rpm -Uvh desktop-integration/ libreoffice3.6-freedesktopmenus-3.6*.noarch.rpm
libraries: libpng12.so.0: cannot open shared object file: No such file or directory It’s also not showing up in the menus, under Office or anywhere else. Have you got any suggestions on how to fix it? Mark Poffo Well, what you can do is try to locate the shared object file. You can do that using:
$ find /usr/lib /lib -name libpng12.so.0 or locate libpng12.s0.0 Then run:
$ ldd /path/libpng12.so.0
After that was all done, I tried to run LibreOffice from the command line using ‘libreoffice3.6’ and was greeted with this error:
After that, find out the missing object file from the ldd o/p and then search/locate for the missing object file:
/opt/libreoffice3.6/program/soffice. bin: error while loading shared
$locate If you find out there’s a similar file, create a soft
Questions & answers
All your technical problems solved
Q/A
Storage RAID
Hi, I’ve done a couple of mdadm arrays and foolishly assumed I knew what I was doing. Now I’m stuck. I was trying to build a fourdrive RAID 10 array, but I messed up the command syntax:
$ mdadm -v --create /dev/md0 --level=raid10 --raid-devices=4 / dev/sda1 /dev/sda2 /dev/sda3 /dev/ sda4 Notice I was incrementing the number and not the letter. Well, the array creation failed and I found my mistake. I then tried to create the array using the correct syntax:
$ mdadm -v --create /dev/md0 --level=raid10 --raid-devices=4 / dev/sda1 /dev/sdb1 /dev/sdc1 /dev/ sdd1 It once again failed to create an array so I tried to remove what I thought was a broken array. But the stop command
$ mdadm --stop /dev/md0
■ GnuCash is popular among accountants
link to that file and run ldd again. Alternatively, you could just try installing again, this time using YUM instead. LibreOffice is in the Fedora repos, though, and is kept fairly up to date, so you shouldn’t have to download the files separately.
Money management
Which personal finance program would you suggest? I’m currently looking at GnuCash or KMyMoney, and I had planned on being further down-the-road in my testing of both products, but alas it is now getting close to my self-imposed deadline to make a decision. My objective is to dump Quicken. To get the data out of Quicken and into either GnuCash or KMyMoney, I need to generate a QIF, which turns out to be less than satisfactory. As an editorial aside, Quicken is very hostile when it comes to sharing (exporting/importing) data. In fact, the ability to export/import data from Quicken seems to have been essentially deprecated. A major reason for moving to a Linux-based accounting program. So far, I have only accomplished preliminary massaging of imported data. In terms of testing, it has been easier to import data into GnuCash than into KMyMoney. Last night I was able to ascertain that KMyMoney ‘chokes’ when attempting to import securities. The
program crashes. I will be checking into how to resolve this issue since it is critical. Which accounting program would you suggest? Steve Richards Both GnuCash and KMyMoney are quite popular among accountants using open source software. However, we have heard of more people having issues with KMyMoney than GnuCash in general. Importing the data from Quicken is trickier the more data you try to import, and we’ve heard of some people just giving up and deciding to enter the data from scratch. You’ll also have to get used to the idea of double-entry bookkeeping, and there may be a few more manual entries than you’re used to. Otherwise though, the best way is to get stuck in as soon as possible and figure out if you like it or not.
Install again, this time using YUM instead
just gives me an ‘It’s a directory’ error message. When I try to zero the superblock I get an error message saying it couldn’t open /dev/sdx. I tried deleting partitions but I get a ‘Device or resource busy’ message. If you guys have any ideas, suggestions or recommendations I’d greatly appreciate hearing them. Joe Barton You’re very nearly there, and I’m sorry to tell you that you’ve missed a fairly minor step. You’ve set up the RAID array, and now you need to format it as a disk/partition. To do this, you need to use the command:
$ mkfs.ext3 /dev/md0 And once that’s finished, it should be working for you. Good luck with mdadm in the future.
■ RAID 10
offers simple striping and mirroring in one array
87 www.linuxuser.co.uk
Questions & answers
Become a fan on
Contact us @linuxusermag
Linux User & Developer
Speak up
I was looking for a low-resource voice-only chat software for Linux. From what I saw, Mumble/ Murmur seems a good choice. The problem is, one of the machines, which will be running the Mumble client only (not the Murmur server) is old – so old that it’s running Ubuntu Intrepid. Due to its remote location, I cannot upgrade that machine right now. So I went back and found an older version Mumble client from Ubuntu Hardy, mumble_1.1.30ubuntu2.1_i386.deb to be exact. Newer versions had too many dependencies that were not met. This old version had only libqt4-core and libqt4-gui as unmet dependencies. I then went and got those older versions of libqt4* from Hardy as well. These seemed to install fine, apart from libqt4-gui, which asks to remove libqt4-designer. It tries to do this automatically; however, it fails and quits out. I don’t know what libqt4-designer does and I am hesitant to remove it as the above message advises, because this is a remote computer I have no physical access to. Since many apps may be dependent on Qt I want to be on the cautious side before doing any removal. What should I do? John Wilkinson
Search for the dependencies manually and install binaries
We hate to be the bearers of bad news, but it seems like the best way to fix this is really to go and upgrade the operating system so you can use the newer, or even upto-date packages. You could use a more creative method, though – using the Launchpad search feature, you can search for the dependencies manually and install the binaries from there. It will be a little tricky, but definitely a lot easier and faster than getting to this remote system, wherever it is.
NFS niggle
I have a problem with NFS regarding file permissions when copying a file that has no read/ write permissions for a group. First, this is how I set up NFS: • Created accounts for users on the server. • Each user has in server’s /etc/exports line with exported folder and his machine IP as well as following parameters: anonuid and anongid to match his uid/gid, rw and all_squash. • All users are in one common group, let’s call it ‘fornfs’. • Each user has in his .profile on their machines umask set to 002. Example of /etc/exports line:
/mnt/share 192.168.1.10(rw,no_subtree_ check,all_squash,anonuid=1001,anong id=1004) Server is Debian Squeeze, clients are Kubuntu 12.04.1. Exported folder is SEC_ TYPE=”ext2” TYPE=”ext3” Now, if user A makes a file, it gets correct permissions (by correct I mean also rw for group) thanks to umask. He puts that file on NFS and other users from the ‘fornfs’ group can open it and edit too.
■ Write permissions in Linux are
difficult to exploit for good reason BUT, if user A gets some file via Skype for example, and that file lands on user’s machine with permission 600, and user A then puts that file on NFS, other users can’t use that file at all because of the permission. What I am looking for is, if there is some kind of umask or similar that will force default permission on a file being copied to NFS. Which means a user puts that file on NFS, NFS sees that file permission has no read and write for the group, and corrects it. Like umask sets for a newly created file. I should mention also that you should assume that users are people that do not know/care to change permissions, they just expect to put files on NFS and that it should work automatically. So advising users to chmod files before putting on a mounted NFS is no-go (nor would I like that system, although that depends on user behaviour). Thank you in advance. Andrew Nguyen
■ Mumble is popular among game clans
88 www.linuxuser.co.uk
Well, there are a few things you can try. Firstly, a cron job could be created to just chmod the files on a regular basis – obviously it’s not ideal and will cause unnecessary server load, even if it’s incredibly minimal. Otherwise, if the file goes to a user folder first,
Questions & answers
All your technical problems solved
Q/A
say in home, you can do some permission tweaking. This will result in that any file downloaded to the folder will then inherit the correct permissions. You can do it with:
$ chmod g+xs /home/UserA Alternatively, you could switch the whole system to Samba, although of course that could take a while to get properly set up depending on the network.
Remix with Linux
I’m a composer. I’ve been using the (wonderful!) program MuseScore to notate music and play it back with MIDI. This is fine for composition purposes, but not for releasing music to the public, since even good MIDI samples tend to sound very artificial. More importantly, this program (or perhaps the samples/MIDI back-end) is unable to articulate things like pitch bending, tapering dynamics etc. I’m aware that ProTools (and others) can use ‘virtual instruments’ to accomplish this, and even be nearly indistinguishable from actual instruments. Audacity seems unable to use MIDI/
score input to control its virtual instruments (not yet implemented). I’m about to give Ardour a shot, but I’ve been having trouble getting a bead on what it can actually do, and am not sufficiently experienced with the program to know if I’m being inept or if the program doesn’t support what I want. Do you know if you can use notation software, or the MIDI output, to control virtual instruments on Linux? Thanks for any help you can provide. Ryan Everson Ardour right now is strictly for recording and mixing audio – currently it does not have any software synthesizers. And while a few may be added in the next version of Ardour, it sounds like it won’t be a full suite. For the moment, I would suggest trying out Rosegarden. Rosegarden is able to do MIDI-controlled software synthesizers in the form of DSSI, as well as LADSPA v2, and while by default they may
not be the quality you want, you can get some proper samples to try to use in Rosegarden itself. Otherwise if you want to emulate it, you’ll get varying results depending on the instrument. Hopefully this is enough information to get you going!
Ardour right now is strictly for recording and mixing audio – it does not have any software synthesizers
n Rosegarden is one of the best free synthesizers on Linux
89 www.linuxuser.co.uk
1
GreatDigitalMags.com
2
Filter titles by your favourite store
Visit the website
3 Purchase in-store, 4 download & enjoy! Choose a digital magazine or book
Sponsorship opportunity
Hosting listings
N/A
2,000MB
N/A
✓
✓
✓
N/A
£20
N/A
N/A
2,000MB
N/A
✓
✓
✓
N/A
£45
N/A
N/A
4,000MB
N/A
✓
✓
✓
24/7 PHONE SUPPORT
N/A
PRIVATE SUBNET
£20
NETWORK BACKUP STORAGE
N/A
UPTIME GUARANTEE
Business Linux
PERMANENT KVM
Starter Windows
Bravo14 (http://bravo14.co.uk)
REMOTE POWER REBOOT
Bravo14 (http://bravo14.co.uk)
HARDWARE RAID
Starter Linux
1GBPS INTERNET CONNECTION
Bravo14 (http://bravo14.co.uk)
DISK SPACE
NAME AND URL
CPU CORES / SPEED
[email protected]
MINIMUM CONTRACT TERM
PACKAGE
Whether you’re a hosting firm or a happy customer who wants a favourite provider listed, drop us a line with the details!
COST PER MONTH
Dedicated server listings
PHONE NUMBER
Got a deal you think we should list?
Bring attention to your brand by sponsoring this section. Contact Rhian Carter on +44(0)1202586421
✓
✗
✓
✓
✓
✗
✓
✓
✓
✗
✓
✓
Bravo14 (http://bravo14.co.uk)
Business Windows
N/A
£45
N/A
N/A
4,000MB
N/A
✓
✓
✓
✓
✗
✓
✓
Bravo14 (http://bravo14.co.uk)
Ultimate Linux
N/A
£60
N/A
N/A
Unlimited
N/A
✓
✓
✓
✓
✗
✓
✓
Bravo14 (http://bravo14.co.uk)
Ultimate Windows
N/A
£60
N/A
N/A
Unlimited
N/A
✓
✓
✓
✓
✗
✓
✓
catalyst2 (www.catalyst2.com)
Bronze Managed Dedicated Server
0800 107 79 79
£199
1 month
1x 2.4GHz vCPU
50GB
✓
✓
✓
✓
99.90%
✓
✓
✓
catalyst2 (www.catalyst2.com)
Silver Managed Dedicated Server
0800 107 79 79
£299
1 month
1x 2.4GHz vCPU
80GB
✓
✓
✓
✓
99.90%
✓
✓
✓
catalyst2 (www.catalyst2.com)
Gold Managed Dedicated Server
0800 107 79 79
£399
1 month
2x 2.4GHz vCPU
150GB
✓
✓
✓
✓
99.90%
✓
✓
✓
123-Reg (www.123-reg.co.uk)
Dell PowerEdge R200 (Ubuntu Linux)
0871 230 9525
£69.99
12 months
4x 2.13GHz
2x 160GB
10Mbit
✓
✓
✗
99.99%
O
✗
✓
123-Reg (www.123-reg.co.uk)
Dell PowerEdge R200 (Windows Web Edition)
0871 230 9525
£79.99
12 months
4x 2.13GHz
2x 160GB
10Mbit
✓
✓
✗
99.99%
O
✗
✓
Daily (www.daily.co.uk)
Linux VPS Pro
0845 466 2100
£29.99
1 month
2.27 Intel Quad Core
60GB
100Mbps
✓
✓
✗
✗*
✓ - full backup
✗
✗**
Daily (www.daily.co.uk)
Linux VPS Max
0845 466 2100
£59.99
1 month
2.27 Intel Quad Core
100GB
100Mbps
✓
✓
✗
✗*
✓ - full backup
✗
✗**
Daily (www.daily.co.uk)
Windows VPS Pro
0845 466 2100
£34.99
1 month
2.27 Intel Quad Core
60GB
100Mbps
✓
✓
✗
✗*
✓ - full backup
✗
✗**
Daily (www.daily.co.uk)
Windows VPS Max
0845 466 2100
£64.99
1 month
2.27 Intel Quad Core
100GB
100Mbps
✓
✓
✗
✗*
✓ - full backup
✗
✗**
Daily (www.daily.co.uk)
VPS Pro Hyper-V
0845 466 2100
£44.99
1 month
2.27 Intel Quad Core
60GB
100Mbps
✓
✓
✗
✗*
✓ - 1GB
✗
✗**
Daily (www.daily.co.uk)
VPS Max Hyper-V
0845 466 2100
£74.99
1 month
2.27 Intel Quad Core
100GB
100Mbps
✓
✓
✗
✗*
✓ - 1GB
✗
✗**
Daily (www.daily.co.uk)
VPS Ultra Hyper-V
0845 466 2100
£139.99
1 month
2.27 Intel Quad Core
200GB
100Mbps
✓
✓
✗
✗*
✓ - 1GB
✗
✗**
Heart Internet (www.heartinternet. co.uk/dedicated-servers)
Linux Dual Core
0845 644 7750
£79.99
12 months
Dual Core Xeon 2.33GHz
160GB
✓
✓
✓
✗
99.99%
✓
✗
24/7 Ticket support
Heart Internet (www.heartinternet. co.uk/dedicated-servers)
Windows Dual Core
0845 644 7750
£89.99
12 months
Dual Core Xeon 2.33GHz
160GB
✓
✓
✓
✗
99.99%
✓
✗
24/7 Ticket support
Heart Internet (www.heartinternet. co.uk/dedicated-servers)
Linux Quad Core
0845 644 7750
£129.99
12 months
Quad Core Xeon 2.5GHz
250GB
✓
✓
✓
✗
99.99%
✓
✗
24/7 Ticket support
Entry-Level
0800 0470481
£79.99
12 months
Quad Core 2.40GHz
250GB
10Mbps
✗
✓
✓
100%
✓
✓
✓
Mid-range
0800 0470481
£119.99
12 months
Quad Core 2.40GHz
2x 250GB
100Mbps
✓
✓
✓
100%
✓
✓
✓
C4L
High-End
0800 0470481
£239.99
12 months
2x 6 Core 2.66GHz
2x 500GB
✓
✓
✓
✓
100%
✓
✓
✓
Webfusion (www.webfusion.co.uk)
Dell PowerEdge R210
0845 130 1602
£79.99
12 months
2x 3.06GHz
250GB
Webfusion (www.webfusion.co.uk)
Dell PowerEdge R210
0845 130 1602
£119.99
12 months
4x 2.66GHz
2x 250GB
www.c4l.co.uk
Webfusion (www.webfusion.co.uk)
Dell PowerEdge R210
0845 130 1602
£149.99
12 months
4x 2.66GHz
2x 500GB
Webfusion (www.webfusion.co.uk)
Dell PowerEdge R410
0845 130 1602
£229.99
12 months
4x 2x 2.13GHz
2x 1TB
Webfusion (www.webfusion.co.uk)
Dell PowerEdge R410
0845 130 1602
£329.99
12 months
6x 2x 2.66GHz
2x 600GB
Up to 100Mbit Up to 100Mbit Up to 100Mbit Up to 100Mbit Up to 100Mbit
✗
✓
✗
99.99%
Free
O
✓
✓
✓
✗
99.99%
Free
O
✓
✓
✓
✗
99.99%
Free
O
✓
✓
✓
✗
99.99%
Free
O
✓
✓
✓
✗
99.99%
Free
O
✓
O = Option
92 www.linuxuser.co.uk
GET YOUR LISTING HIGHLIGHTED! CONTACT RHIAN
[email protected] +44(0)1202586421
Hosting listings LISTINGS
* Excluding planned maintenance, we regularly hit 99.9% uptime on the VPS platform **Hardware and network are monitored 24/7; however, support hours are the following: Monday to Friday 8.00 am to 7.30 pm, Weekends (inc. Bank Holidays) 10.00 am to 3:00 pm
SERVICE LEVEL AGREEMENT
WEB CONTROL PANEL
EMAIL SUPPORT
PHONE SUPPORT
FIREWALL
VIRUS FILTER
SHOPPING CART
DATABASE SUPPORT
POP3 ACCOUNTS
MONTHLY BANDWIDTH
WEB SPACE
COST PER YEAR
NAME AND URL
PHONE NUMBER
PACKAGE
Dedicated and Shared server listings
Donhost (www.donhost.co.uk)
Reseller Unix
0845 226 5566
£399.99
Unlimited
Unlimited
Unlimited
✓
✗
✓
✓
✓
✓
✓
✗
Donhost (www.donhost.co.uk)
Reseller Windows
0845 226 5566
£499.99
Unlimited
Unlimited
Unlimited
✓
✗
✓
✓
✓
✓
✓
✗
Donhost (www.donhost.co.uk)
Enterprise
0845 226 5566
£89.99
1GB
2GB
250
✓
✗
✓
✓
✓
✓
✓
✗
Donhost (www.donhost.co.uk)
Commerce
0845 226 5566
£179.99
2GB
5GB
500
✓
✗
✓
✓
✓
✓
✓
✗
Donhost (www.donhost.co.uk)
Designer
0845 226 5566
£119.99
1GB
2GB
250
✓
✗
✓
✓
✓
✓
✓
✗
Donhost (www.donhost.co.uk)
Developer
0845 226 5566
£259.99
2GB
5GB
500
✓
✗
✓
✓
✓
✓
✓
✗
DEVELOPER
0800 061 2801
£32.98
1GB
Unlimited 500
✓
✓
✓
✓
✓
✓
✓
✓
ONE
0800 061 2801
£109.99 5GB
Unlimited 1,000
✓
✓
✓
✓
✓
✓
✓
✓
RESELLER
0800 061 2801
£274.89 Unlimited Unlimited 1,000
✓
✓
✓
✓
✓
✓
✓
✓
VM500 Server
0800 061 2801
£300
20GB
Unlimited Unlimited
✓
✓
✓
✓
✓
✓
✓
✓
2200DC Server
0800 061 2801
£720
160GB
Unlimited Unlimited
✓
✓
✓
✓
✓
✓
✓
✓
3000DC Server)
0800 061 2801
£1,200
2 x 500GB Unlimited Unlimited
✓
✓
✓
✓
✓
✓
✓
✓
2600QC Server
0800 061 2801
£1,800
2 x 500GB Unlimited Unlimited
✓
✓
✓
✓
✓
✓
✓
✓
Netcetera
www.netcetera.co.uk eHosting (www.ehosting.com)
Starter
0844 999 4100
£23.88
1GB
25GB
10
✗
✗
✗
✗
✗
✓
✓
✓
eHosting (www.ehosting.com)
Personal
0844 999 4100
£59.88
2.5GB
Unlimited
50
✓
✗
✗
✗
✗
✓
✓
✓
eHosting (www.ehosting.com)
Expert
0844 999 4100
£95.88
5GB
Unlimited
250
✓
✗
✗
✗
✗
✓
✓
✓
eHosting (www.ehosting.com)
Virtual
0844 999 4100
£227.88
50GB
Unlimited
Unlimited
✓
✗
✗
✗
✓
✓
✓
✓
Equiphase (www.equiphase.net)
Bronze
0121 314 4865
£30
200MB
2GB
10
✓
✓
✗
✓
✗
✓
✓
✓
Equiphase (www.equiphase.net)
Silver
0121 314 4865
£42
400MB
5GB
20
✓
✓
✗
✓
✗
✓
✓
✓
Equiphase (www.equiphase.net)
Gold
0121 314 4865
£72
800MB
10GB
100
✓
✓
✗
✓
✗
✓
✓
✓
Equiphase (www.equiphase.net)
Platinum
0121 314 4865
£114
1,200MB
40GB
200
✓
✓
✓
✓
✓
✓
✓
✓
Eurofasthost.com (www.eurofasthost.com)
Email Only
02380 249 823
£40
1GB
2GB
10
✗
✗
✓
✓
✓
✓
✓
✓
Eurofasthost.com (www.eurofasthost.com)
Essential
02380 249 823
£75
2GB
5GB
10
✗
✗
✓
✓
✓
✓
✓
✓
Eurofasthost.com (www.eurofasthost.com)
Superior
02380 249 823
£140
5GB
10GB
25
✓
✓
✓
✓
✓
✓
✓
✓
Eurofasthost.com (www.eurofasthost.com)
Premium
02380 249 823
£250
10GB
25GB
100
✓
✓
✓
✓
✓
✓
✓
✓
Evohosting (www.evohosting.co.uk)
Starter
N/A
£29.99
500MB
1GB
3
✓
✓
✓
✓
✗
✓
✓
✓
Evohosting (www.evohosting.co.uk)
Home
N/A
£54.99
2.5GB
30GB
50
✓
✓
✓
✓
✗
✓
✓
✓
Evohosting (www.evohosting.co.uk)
Business
N/A
£79.99
6.5GB
Unlimited
Unlimited
✓
✓
✓
✓
✗
✓
✓
✓
Evohosting (www.evohosting.co.uk)
eCommerce
N/A
£159.99
30GB
Unlimited
Unlimited
✓
✓
✓
✓
✗
✓
✓
✓
Personal
0808 168 6777
£32.87
5GB
Unlimited 50
✓
✗
✓
✓
✓
✓
✓
✗
Business Bronze
0808 168 6777
£58.38
50GB
Unlimited 500
✓
O
✓
✓
✓
✓
✓
✗
Business Silver
0808 168 6777
£76.39
Unlimited Unlimited Unlimited
✓
O
✓
✓
✓
✓
✓
✗
Business Gold
0808 168 6777
£101.89 Unlimited Unlimited Unlimited
✓
✓
✓
✓
✓
✓
✓
✗
WD Starter
0808 168 6777
£149.99 20GB
Unlimited Unlimited
✓
O
O
✓
✓
✓
✓
✗
WD Advanced
0808 168 6777
£199.99 Unlimited Unlimited Unlimited
✓
O
O
✓
✓
✓
✓
✗
Fasthosts
www.fasthosts.co.uk Giacom (www.giacom.com)
Business Pro
0800 542 7500
£199
100MB
2GB
100
✓
✓
✓
✓
✓
✓
✓
✓
Heart Internet (www.heartinternet.co.uk)
Starter Professional
0845 644 7750
£29.80
2.5GB
10GB
1,000
✗
✗
✗
✓
✗
✓
✓
✓
Heart Internet (www.heartinternet.co.uk)
Home Professional
0845 644 7750
£89.99
10GB
50GB
10,000
✓
✓
✗
✓
✗
✓
✓
✓
Heart Internet (www.heartinternet.co.uk)
Business Professional
0845 644 7750
£129.99
Unlimited
Unlimited
Unlimited
✓
✓
✗
✓
✗
✓
✓
✓
Heart Internet (www.heartinternet.co.uk)
Reseller Professional
0845 644 7750
£299.99
Unlimited
Unlimited
Unlimited
✓
✓
✗
✓
✗
✓
✓
✓
Hostway (www.hostway.co.uk)
Silver
0808 180 1880
£79.50
150MG
3GB
5
✗
O
✓
✓
✗
✓
✓
✗
O = Option
93 www.linuxuser.co.uk
Your view
Your source of Linux news and views Contact us…
Register and post your comments… www.linuxuser.co.uk/forum/
YOUR VIEW
Email us directly…
[email protected]
■ Coming to Android at some point, but in what form?
Linux User Letters Your opinions about the
magazine, Linux and open source
Touch the button
I recently read the interview you had with Michael Meeks from the Document Foundation a while back, and I had an issue with something he said re touch-screen interoperability. It’s a completely different issue to Android platform compatibility – LibreOffice would best be ported to Android and there should also be a project to provide a touchscreen UI to LO, regardless of platform. Yes, Windows 8 is touch oriented. Ubuntu has been moving towards touch friendliness for some time. iOS is a touch platform. That is not to suggest
all users on any particular platform will want a touch interface. Given Android is making inroads into smart TVs, we can expect those to have highdefinition mouse wands, or actual mice attached – not touch. We can expect some Android users will want the standard windowed LO interface. Not all platforms do support mice and physical keyboards, so we shouldn’t presume a UI based on platform. We really need LO to have a touchfriendly UI available on all platforms, but at the same time, keep the standard UI available. Nick Hill
THREAD BARE
That’s what happened to the Hurd
Right before Christmas, we posted Richard Hillesley’s in-depth feature on the fate of GNU Hurd, the microkernel OS championed by Richard Stallman some time ago. It quickly became one of our most read articles ever, and sparked a little debate on the blog. You can see more at: http://bit.ly/12ItLWz
Don Brown said: Good article. I had many “Heh… I didn’t know that…” moments. I enjoy reading these types of stories. Even if they make me keep looking things up. I never wrote an OS or a compiler – I never wanted to, but I sure do appreciate the people who do. God bless them all. They helped me become the Engineer/IT Guy/Teacher that I am today.
Michael Engel said: This may seem like nitpicking, but mentioning that “Rashid’s work [at Carnegie Mellon] had suggested that this problem was not so terribly significant after all” in relation to microkernel performance problems does not tell the whole story. Performance problems were IMHO one of the reasons for the slow acceptance of Mach – this still shows today in Apple’s OS X kernel, which is based on Mach 3, where for performance reasons the idea of a clearly separated microkernel was given up and a hybrid kernel was developed that again ran the BSD emulation layer (among other things) in kernel space to avoid context
94 www.linuxuser.co.uk
You’re brushing next to a much wider problem than touch for Android ports, and we totally agree. Even the desktop interfaces you’ve pointed out still primarily use a mouse and keyboard, which is why LibreOffice is using it with them in the first place. While we’re not sure how much use people will get out of an office suite on their TV with a limited remote control, Android phone manufacturers keep trying to break the desktop market by using docked Android phones – which also use a mouse and keyboard. Of course with Android, though, it is primarily touch, and there are space considerations to keep in mind.
switch overheads. People interested in this specific topic might want to read Amit Singh’s excellent book Mac OS X Internals. In the context of microkernel performance, the work of Jochen Liedtke and the numerous people working on L4 should not be underestimated. For a discussion of microkernel performance, I would recommend Liedtke’s paper ‘µ-Kernels Must And Can Be Small’. In this paper, he discussed why microkernels have to be small and why this in turn is required for developing a fast microkernel. Nevertheless, thanks for the interesting story on the Hurd!
DrunkButHappy said: Listen, the Stallman/GNU defence is: “oh, it was too hard [to take the Mach kernel and DO something with it”. And yet, Apple took it and – together with the FreeBSD userland stuff – made the best UNIX out there for the end user. It’s clear to me Stallman did not have the chops for his lofty goals. When GNU wrote GCC, the standard book was the Dragon book. ANYONE, today, can probably write the early GNU stuff. And Linux is the OS, it’s not GNU. Here I’ll prove it: even before LLVM came along, I saw people use other compilers (Intel, for example). The userland NEVER had to be GNU tools. So that leaves you… Linux as the fundamental part.
Nymphus said: Oh please. OS X is BSD-for-noobs. FreeBSD is too busy sucking up to OS X these days. OpenBSD is where it’s at! ;)
dos said: DrunkButHappy please. RMS is a beast. The Dragon book is a great book.
Your view
LibreOffice, GNU Hurd, Linux security
LETTERS
Utmost security
I’ve noticed a couple of reviews where you comment on the lack of users on login. A display manager that requires entry of the username increases system security, which can only be a good thing. Installations that either encourage automatic login or whose login managers list the username go against good security practice. When I regularly hear about people losing their laptop/netbook that contains all their personal data, important photographs etc, I can feel reassured that by having an encrypted and password-protected installation, and all my valuable data backed up in triplicate on encrypted external hard drives (and nothing of great importance or value on my netbook’s hard drive), my data is fairly safe. Of course, I could encrypt each folder and file, as well. Pierre Millien Security is very important, of course. However, that’s why we explain in our reviews what we do and do not like. If you don’t agree with a particular point, like the above, then you can
use that to make your own decision whether to try out a distro or not. Although, people can learn a thing or two about backing up data to the degree you do!
■ It’s your choice to decide between userfriendliness and security
Become a fan on
Android Magazine
With more and more Android features being merged back into the Linux kernel, it’s becoming easier to develop for one of the most popular mobile operating systems around. With over 25 billion app downloads, and over 500 million Android devices worldwide, there’s a wide audience of folks ready and willing to consume apps. For a more Android-driven editorial, you can look to our sister mag Android Magazine, the only publication dedicated to the platform. Along with news and reviews to keep you up to date on everything Android, there are also tutorials and advice on developing and hacking your hardware. Find out more at www.littlegreenrobot.co.uk.
Contact us @linuxusermag
Linux User & Developer
The website for the GNU Generation
The ultimate resource for open source enthusiasts and professionals • Latest news • Reviews • Tutorials • Opinion Never miss an update Subscribe to our RSS feed today!
✓iPad ✓iPhone ✓Android phone ✓Android tablet ✓Apple Mac ✓Windows PC
No Disc. No Problem Many of the files you’re looking for can be found on the magazine’s website
Imagine digital editions are a new and exciting way to experience our world-leading magazines and bookazines.
To buy more Imagine digital editions and for the latest issues and best offers, please go to
To get the most out of your digital editions, be sure to enjoy all of our fantastic features, including:
• Zoomable text and pictures • In-app browsing • Searchable text • Take your collection with you • Read offline
www.GreatDigitalMags.com
Next issue
What’s coming up…
Look out for issue 124 on sale 14 March Want it sooner?
Subscribe today!
COMING IN THE NEXT ISSUE
THE MAGAZINE FOR THE GNU GENERATION
Imagine Publishing Ltd Richmond House, 33 Richmond Hill Bournemouth, Dorset, BH2 6EZ ☎ +44 (0) 1202 586200 Web: www.imagine-publishing.co.uk www.linuxuser.co.uk www.greatdigitalmags.com
Magazine team
Editor Russell Barnes
[email protected] ☎ 01202 586272 Editor in Chief Dave Harfield Staff Writer Rob Zwetsloot Designer Stephen Mathews Head of Publishing Aaron Asadi Photographer James Sheppard Head of Design Ross Andrews
Build your own
cloud service Ditch Dropbox and drop Google’s Drive. Build it better yourself next issue!
Contributors
Phil King, Simon Brew, Jon Masters, Liam Fraser, Gareth Halfacree, Richard Hillesley, Rory MacDonald, Joey Bernard, Michael Reed, Kunal Deo, Dr. Karl Beecher, David Crookes & Sandra Vogel
Advertising Digital or printed media packs are available on request. Head of Sales Hang Deretz ☎ 01202 586442
[email protected] Advertising Manager Jennifer Farrell ☎ 01202 586430
[email protected] Account Manager Rhian Carter ☎ 01202 586421
[email protected]
Cover disc Head of Digital Mat Toor Digital Products Co-ordinator Steven Litton
[email protected]
International Linux User & Developer is available for licensing. Contact the International department to learn more. Head of International Licensing Cathy Blackman ☎ +44 (0) 1202 586401
[email protected]
Subscriptions Head of Subscriptions Lucy Nash
[email protected] For all subscriptions enquiries ☎ 0844 249 0282 (UK) ☎ +44 (0) 1795 418661 (Overseas) Email:
[email protected] 6 issue subscription (UK) – £25.15 13 issue subscription (Europe) – £70 13 issue subscription (ROW) – £80
Circulation Head of Circulation Darren Pearce ☎ 01202 586200
Production Production Director Jane Hawkins ☎ 01202 586200
Founders
Create a virtual keyboard with Raspberry Pi Take the pain out of touch-screen typing
Get started with Arduino
The first in a new series of beginner Arduino tutorials
Create your own NAS
Master network-attached storage using GlusterFS
ALSO INSIDE:
>> Mark Shuttleworth exclusive >> ISO to USB super-test >> Jon Masters’ kernel column >> 20+ pages of reviews
Group Managing Director Damian Butt Group Finance & Commercial Director Steven Boyd Group Creative Director Mark Kendrick
Printing & Distribution
Printed by William Gibbons, 26 Planetary Road, Willenhall, West Midlands, WV13 3XT Distributed in the UK & Eire by Seymour Distribution, 2 East Poultry Avenue, London, EC1A 9PT. ☎ 0207 429 4000 Distributed in Australia by Gordon & Gotch, Equinox Centre, 18 Rodborough Road, Frenchs Forest, NSW 2086. ☎ + 61 2 9972 8800 Distributed in the Rest of the World by Marketforce, Blue Fin Building, 110 Southwark Street, London, SE1 0SU. ☎ 0203 148 8105
Disclaimer
The publisher cannot accept responsibility for any unsolicited material lost or damaged in the post. All text and layout is the copyright of Imagine Publishing Ltd. Nothing in this magazine may be reproduced in whole or part without the written permission of the publisher. All copyrights are recognised and used specifically for the purpose of criticism and review. Although the magazine has endeavoured to ensure all information is correct at time of print, prices and availability may change. This magazine is fully independent and not affiliated in any way with the companies mentioned herein. © Imagine Publishing Ltd 2013 ISSN 2041-3270
98 www.linuxuser.co.uk
S P V R U O Y N R U T UP TO THE
MAX
MAX
Get MORE power when you need it! With a fully scalable 123-reg VPS and our powerful new add-ons. PLESK ADD-ONS ON
OFF
Super charge Plesk with the latest add-ons including Plesk’s Power Pack, Language packs and Anti-virus software.
ADDITIONAL IP’s ON
OFF
FROM ONLY
Add extra IP addresses to your VPS so you can use multiple SSL certificates on the same server.
£14.99
Power up your business at www.123-reg.co.uk/VPS Terms and conditions apply. Prices quoted are exclusive of VAT and are subject to change. Additional charges apply for Plesk Add-Ons, Additional IPs and FTP Backup Storage.
BACKUP STORAGE ON
OFF
Keep your valuable data safe from error or hardware malfunction with our FTP backup storage add-on.
a month
The Pi Hut is a trading name of Mann Enterprises Ltd. Raspberry Pi is a trademark of the Raspberry Pi Foundation
Preinstalled SD Cards Cases Power Supplies Wifi Adapters Heatsinks ... and much, much more
5% off ALL orders with promotional code “LINUXUSER”
www.ThePiHut.com “Here at The Pi Hut, we believe that the Raspberry Pi is one of the most exciting things to happen in computing for many years. Our aim is to help Raspberry Pi owners get the most out of their Rpi experience.” - Jamie Mann, Company Director
www.twitter.com/ThePiHut www.facebook.com/The.Pi.Hut
[email protected]