Linux User 26 Developer Issue 125 2C 2013

Embed Size (px)

Citation preview

  • 7/30/2019 Linux User 26 Developer Issue 125 2C 2013

    1/100

    InstallUbuntu on

    your Nexus 7Hack your tabletwith Ubuntu Touch

    www.linuxuser.co.uk

    FOR THE GNU GENERATIONTHE MONTHLY MAGAZINE

    Plus every RasPi distro tested!

    SERVER

    BUILD A

    Remote backupswith DuplicitySecure your files via FTP & SSH

    LINUX

    GetyourappsontheRaspberryPiStore!

    Share & back up your data Host your own website

    22 pagesof reviews

    PLUS openSUSE 12.3 reviewed Create charts with Gantt Build web apps with Python

    nside AmahiBehind the scenes withthe ultimate home server

    Amazing RasPiapps and tools

    20

    RASPBERRY PI DISTRO SUPERTEST

    ISSUE 125

  • 7/30/2019 Linux User 26 Developer Issue 125 2C 2013

    2/100

  • 7/30/2019 Linux User 26 Developer Issue 125 2C 2013

    3/100

    Richard Hillesley writes about art,music, digital rights, Linux andfree software for a variety ofpublications and is a previouseditor of Linux User. As well asproviding his usual monthlycolumn (page 17), this monthRichard shares the downfall ofMono starting on page 42.

    Kunal Deo is a veteran open source developerleading multiple open sourceprojects. He is also a KDEdeveloper and has contributedto many projects including KDE-Solaris, Belenix and Openmoko.This month Kunal shows us howto write web apps in Python in hisdeveloper tutorial on pages 52-55.

    Liam Fraser is the creator of the hugely popularRaspberryPiTutorials YouTubeseries and is a Linux server adminfor the Raspberry Pi Foundation.This month Liam shows buddingdevelopers how to share theircreations with fellow RasPi fans onthe Raspberry Pi Store. You can findhis tutorial on pages 48-51.

    Joey Bernardhas been using Linux at homefor almost 20 years and hesnow getting paid for it asa computational researchconsultant with ACEnet. Thismonth Joey shows us how tomanage a project using Gannt andPlanner (pages 38-41).

    Rory MacDonald is our resident opensource reporter with a keen nose fora story and a good eye for detail. Youcan find his latest stories startingon page 6, including details aboutGoogles new Pixel Chromebooks,developments with Firefox OS andthe big news (not) coming out of this

    years Mobile World Congress.

    Rob Zwetsloot studied aerospace engineeringat university, using Python tomodel complex simulations inclass while configuring LinuxHTPCs at home. In this issue Robspeaks exclusively to the makersof Amahi and takes us through theprocess of installing Ubuntu Touchon an Android device (p34-37).

    Issue 1253

    Yourtea

    mofLinuxex

    perts

    Get in touch with the team:[email protected]

    Welcometo issue 125 of Linux User & Developer

    Welcome to the latest edition of Linux User &Developer, the UK and Americas favouritehigh-end open source and Linux magazine.

    Since theres no sign of your insatiable demandfor the Raspberry Pi subsiding any time soon, weveput together a couple of special features celebratingsome of the best software and distros on offer. Every

    issue were inundated with emails asking for RaspberryPi-related articles and this month weve taken on the mostregularly requested a group test made up of all the mostpopular distributions.

    In his eight-page super-test starting on page 68, Rob

    Zwetsloot tests six of the best and ruthlessly whittles themdown to name the one worthy of the prestigious Group TestWinner badge. The results might not be terribly surprising,but were pretty sure the growing list of options available arelikely to raise a few eyebrows.

    If youre aiming for a bit more power than the 700MHz ARMCPU for your next project, why not build your own PC? Thatswhat we did for this months cover feature and were ratherhappy with the results. While its designed as a home server,it packs quite a punch for numerous other uses too.

    Enjoy the issue!

    Russell Barnes,Editor

    Buy online

    GetLinux User

    for 4.19per issue

    Page 18

    Build your own server Secure remote backups Install Touch on your Android Make web apps with Python

    This issue

    Visit us online for more news, opinion, tutorials and reviews:

    www.linuxuser.co.uk

  • 7/30/2019 Linux User 26 Developer Issue 125 2C 2013

    4/100

    Contents

    Join us online for more Linux news, opinion and reviews www.linuxuser.co.uk

    www.linuxuser.co.uk4

    06 News The biggest stories from the

    open source world

    14 OpinionsThe latest from your favouritefree software columnists

    94 LettersYour views on the magazineand the open source scene

    OpenSource

    96 Cover discThe very latest distros on one DVD

    On your free disc

    Fedora 18 Remix

    Raspbian

    Puppy 5.5

    Arch ARM

    Tutorials30 Secure remote backups

    Use Duplicity to protect your files

    34 Install Ubuntu Touch to yourAndroid deviceTest the latest beta of Canonicals Touch OSwithout losing all your data

    40 Plan your projects with GanntSort your schedule with Gannt and Planner

    Developer tutorialsFeatures10 Inside Amahi

    Whats happening with thisopen source server solution?

    20 Build your own serverPCs are easier than Lego getstarted today!

    42 Mono lost intranslationIts downfall investigated

    56 The university of LinuxNo degree? No problem

    76 20 amazing RasPiapps & toolsMust-have software

    86 Q & AYour problems solved!

    FEATURE

    10 Inside AmahiThis month we get together with Amahisfounder and lead developer, Carlos Puchol,to see how its innovative home server is

    doing and where its heading in version 7

    48 Get your apps on the RasPi Store Built an app or tool for RasPi? Heres how to

    make it available to the whole community

    52 Build web apps with Python Theres nothing you cant achieve with Python

    conquering the web included

    Reviews

    20. Backup files andshare your media

    Build your ownLinux server

    62 Huawei Ascend G330Has the Ascend G300 justbecome a whole 30 better?

    64 Popcorn Hour A-400 Latest open sourced-based

    media streamer

    66 Gizmo Explorer KitThe Pis 64-bit x86 cousin - for

    when raw power is required

    68 Raspberry Pi distrosuper-testWhich distro should you installon your $25 computer?

    80 openSUSE 12.3No big surprises for the latestpoint release, but some polish

    82 Sabayon 11

    We see how the latest build ofthis Gentoo-spin shapes up

    84 Porteus 2Portable computing receives aboost with the newest Porteus

    Subscribetoday!

    18 Save at least 30%on the shop price.

    US customerscan subscribe viapage 86

  • 7/30/2019 Linux User 26 Developer Issue 125 2C 2013

    5/100

    MAX

    Get MORE power when you need it!With a fully scalable 123-reg VPS and our powerful new add-ons.

    TURNYOUR

    VPS

    UPTOTHE

    FROMONLYamonth

    Power up your business at www.123-reg.co.uk/VPS

    PLESKADD-ONS ADDITIONALIPs BACKUPSTORAGE

    Super charge Plesk with the

    latest add-ons including

    Plesks Power Pack,

    Language packs and

    Anti-virus software.

    Add extra IP addresses to

    your VPS so you can use

    multiple SSL certificates on

    the same server.

    Keep your valuable data

    safe from error or hardware

    malfunction with our FTP

    backup storage add-on.

    ON

    OFF

    ON

    OFF

    ON

    OFF

    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. Plesk not available on Starter package.

    NEWANDUPDATED!

    START NOW with our new Starter package!

    NEWANDUPDATED!

    NEWANDUPDATED!

  • 7/30/2019 Linux User 26 Developer Issue 125 2C 2013

    6/100

    06News | 14Opinion | 94Letters

    Chromebook Pixel puts Google head-to-headwith Apple in the laptop market

    The chrome-plated Android on Googles

    Mountain View Campus is it a hint?

    www.linuxuser.co.uk6

    The Chromebook Pixel is the first notebook to

    truly challenge the Apple MacBook in terms

    of looks and build quality. Praise for a Linux-

    based device does not come any higher than

    from Linus Torvalds himself: Hey, Ive joined all

    the cool kids in having one of the new Google

    Pixel laptops (aka Chromebooks). And it is abeautiful screen, to the point where I suspect

    Ill make this my primary laptop, Torvalds wrote

    on his Google Plus account. Praising the Pixels

    3:2 screen format, and announcing his disdain

    for widescreen laptops, he commented: Im still

    running Chrome OS on this thing, which is good

    enough for testing out some of my normal work

    habits (ie reading and writing email), but I expect

    to install a real distro on this soon enough

    One thing that the Chromebook Pixel really

    brings home is how crap normal laptops have

    become, Torvalds continued. Why do PC

    manufacturers even bother any more? No

    wonder the PC business isnt doing well, when

    they stick to just churning out more crappy stuff

    and think that full HD (aka 1080p) is somehow

    the epitome of greatness.

    Torvalds is certainly not the only one rejecting

    PC hardware. Take yourself to any open source

    conference and you will tend to see an awful lot

    of people working on Apple MacBook laptops.Why? Because if you spend half your life working

    on any device, there is an undeniable emotional

    attachment. Working on a beautiful notebook

    makes a difference.

    Machined from anodised aluminium, the

    new Chromebooks most important feature is

    arguably its lightbar, which delivers an ambient

    coloured display from the back of the screen just

    because it looks cool. A single finger opens the

    finely tuned piano hinge to reveal a 12.85-inch

    display, whose 4.3 million indivisible pixels give

    the Pixel the highest resolution of any notebook

    on the market.

    The Gorilla Glass screen also offers full

    touch with tap, pinch and swipe in parallel to

    the trackpad and backlit keyboard. Inside, the

    Chromebook Pixel houses a dual-core 1.8GHz

    Intel Core i5 Processor with integrated Intel HD

    Graphics 4000 GPU and 4GB DDR3 RAM.

    Storage is where Pixel ties you to Googles

    vision of the Chromebook, with services delivered

    through the cloud. In the US, Google advertises

    two versions of the Pixel with either 32 or 64GB

    of internal solid-state storage. Currently, in the

    UK, the Google Play store only offers the 32GB

    version, and a call to the support staff sadly

    delivered no results on how we Brits can double

    the internal capacity. What the Pixel does offer is

    1TB of Google Drive cloud storage for three years.

    I suspect Illmake this myprimary laptop- Linus Torvalds

    On the operating system side, the Chromebook

    delivers all your common programs as appsthrough the Chrome browser. This is where

    many reviews have criticised the apps available

    for what, at 1,049, is an undeniably high-end

    device. With HTML5, apps work offline and sync

    automatically when they find a new connection;

    and for users of Google Docs, Gmail, Google+,

    Hangouts and other Google cloud services, the

    device delivers all you need. However, Chrome

    is not a primary target platform for most of the

    third-party app community.

    But this is where it gets interesting. As long

    ago as 2009, the then Google co-founder Sergey

    Brin stated that the companys long-term

    plan was to merge its Chrome OS and Android

    into a single ecosystem. Google also has a

    habit of using the companys visual branding

    to hint at future product announcements.

    Interesting then that just as Google launches

    the Chromebook Pixel, a chrome-plated Android

    figure has appeared on Googles Mountain View

    Campus in California.

    The ability to run Android apps offline through

    the Chrome browser would instantly turn the

    Chromebook Pixel from a truly beautiful cloud-

    focused device, with limited availability of HTML5

    applications, into a notebook with access to

    an ecosystem of over 700,000 apps. It seems

    unlikely then that this opportunity has escaped

    Googles attention.

    HARDWARE

    Google springsgroundbreakingnew hardware

    ImagecourtesyofGoogle

    employeePaulWilcoxonG+

  • 7/30/2019 Linux User 26 Developer Issue 125 2C 2013

    7/100

    The latest in the Linux community

    News

    OPEN SOURCE

    www.linuxuser.co.uk7 www.linuxuser.co.uk7

    Linuxcalendar

    17-18April2013 Open Source Data

    Center ConferenceHoliday Inn, Nuremberg

    Germany

    www.netways.de/en/osdc/osdc2013/overview/

    This conference offers a uniqueopportunity to meet with opensource professionals and insiders,gather and share expertise over two

    days of presentations, hands-onworkshops and social networking.

    LinuxFestNorthwest 2013 Bellingham Technical College,

    Bellingham, WA

    USA

    linuxfestnorthwest.orgLinuxFest Northwest is an annualevent produced by the Bellingham

    Linux Users Group, and featuresLinux and open source expertsand aficionados sharing theirexperience and enthusiasm witha wide variety of free and opensource technologies.

    18April2

    013 Android Magazine

    issue 24 www.littlegreenrobot.co.ukAndroid Magazine, your best andonly print source for everythingAndroid, is coming out today. Checkout whats in store over on page 60.

    27-28Ap

    ril2013

    Host of major firms also

    launch new HTML5 appsfor Firefox MarketplaceBig news from the Mobile World Congress

    was the advance of Mozillas Firefox OS and

    the announcement that 17 key operators

    across Europe, Asia and Latin America have

    signed up to ship new devices loaded with the

    new operating system. In addition, Mozilla

    announced Firefox Marketplace, a new vendor-

    independent store for HTML5 apps that can be

    used across multiple platforms.

    Firefox OS is a smartphone platform built

    on elements of the Linux kernel, using open

    web standards. The phones hardware andfunctionality are exposed through open APIs,

    with all of the features delivered through

    HTML5 apps.

    Mozillas focus on delivering a phone through

    web technologies and standards has proved

    highly attractive to mobile operators looking

    to provide a more cost-effective smartphone,

    especially for use in emerging markets. With

    Android now subject to an effective licence fee

    through patent settlements demanded from

    manufacturers by Microsoft and others, this

    strategy is even stronger.

    Our goal is to level the playing field and

    usher in an explosion of content and services

    that will meet the diverse needs of the next

    MOBILE

    two billion people online, explained Mozilla CEO

    Gary Kovacs.

    Firefox OS has also garnered support from

    significant smartphone vendors looking for

    lower-cost devices to bring new customers in

    developing economies online. The first wave of

    Firefox OS devices will be built by Alcatel One

    Touch, LG and ZTE, with Huawei expected to

    announce further devices later in the year.

    Closely related to Mozillas plans for Firefox

    OS, Firefox Marketplace also has a broader

    focus on HTML5 apps that can be used acrossmultiple platforms. Like other app stores,

    Firefox Marketplace will offer a range of apps

    across categories like gaming, news and media,

    business and productivity. However, with

    apps built on web standards and tied to online

    identity, users will be able to transfer their

    purchases across devices and platforms.

    The list of apps and developers for the new

    marketplace already includes AccuWeather,

    Airbnb, Box, Cut The Rope, Disney Mobile

    Games, EA Games, Facebook, Nokia HERE,

    MTV Brasil, Pulse News, SoundCloud, SporTV,

    Terra, Time Out and Twitter, alongside personally

    tailored and local apps relevant to users in their

    respective regions. However, Mozillas key aim is

    to open up the world of app development to a far

    broader spectrum of developers.

    Firefox OS will break down the walls between

    apps and the web because Firefox OS apps

    are built using web technologies, like HTML5,

    commented Jay Sullivan, Mozillas senior vice

    president of products. We expect to see lots of

    amazing apps built for Firefox OS because more

    developers are already creating for the web than

    for any other platform.

    Firefox Marketplace can currently be

    previewed on Firefox for Android Aurora and will

    be offered with the first Firefox OS phones to

    launch later this year.Screenshots from Firefox OS

    Developer previews of upcoming

    Firefox-based phones

    Firefox OSattracts 17key mobileoperators

  • 7/30/2019 Linux User 26 Developer Issue 125 2C 2013

    8/100

    Your source of Linux news and viewsOpenSourceContact usRegister and post your commentswww.linuxuser.co.uk/forum/

    Email us [email protected]

    www.linuxuser.co.uk8

    Last month, Barcelona played host to the

    mobile industrys annual European fiesta,Mobile World Congress (MWC). However,this year many vendors chose to release their

    flagship phones in separate launches rather

    than battling for the limelight at the show.

    Samsung launched the Galaxy Note 8, an

    8-inch version of the tablet. But those hoping

    for a first look at the Galaxy S4 had to wait for a

    mid-March launch event in New York. Likewise,

    there was no sign of the Motorola X-phone,

    which has been eagerly awaited as the first real

    showcase product following Googles buyout of

    the company last year.

    Sony was showing off its waterproof Xperia Z

    that was first announced at CES. This 5-inchsmartphone packs a quad-core 1.5GHz

    Snapdragon S4 processor and an impressive

    13-megapixel camera. Importantly, the phone

    marks a notable improvement in build quality

    from previous Xperia releases.

    New for the show, Sony also released the

    Xperia Tablet Z, a 10.1-inch device, packing

    the same processor as the phone into a class-

    leading 6.9mm (0.27-inch) thick case. All of

    Sonys Android devices use a heavily modified

    version of the user interface. There is a focus on

    integrating with other devices such as TVs, as

    well as pushing the user towards content from

    Sonys own media and gaming empire.

    Although launched before the show, Asus,

    LG and HTC were all showing off their latest

    ANDROID

    Mobile World Congress2013 loses headlineAndroid announcementsMajor vendors launch flagship handsetsbefore and after in separate events

    devices to incorporate the new Qualcomm

    600 processor. This quad-core, ARM-basedCPU can be clocked at up to 1.9GHz. However,

    the initial wave of phones seem to be released

    running at 1.7GHz.

    The 5-inch Asus PadFone gives users the

    option of plugging the device into the back

    of a 10.1-inch docking station, turning the

    phone into a 1920x1200 tablet with full cellular

    networking capability. LG, meanwhile, has

    opted for a slightly larger 5.5-inch form on its

    Optimus G Pro. Both devices have a 1920x1080

    pixel display and pack a 13-megapixel camera.

    The HTC One was launched slightly before

    the show. However, MWC was the first chance

    for most people to play with the firms newflagship device. HTC has focused on the

    phones design and a truly stunning aluminium

    unibody. HTC is the first phone manufacturer

    to reject the more megapixels bandwagon

    (something that hardcore camera enthusiasts

    have long known to be a poor indication of

    real quality). The camera on the HTC One uses

    4 million ultrapixels which, the company says,

    let in around four times as much light, giving far

    better results for motion capture as well as in

    low-light conditions.

    The Beats Audio sound system, found on

    most HTC phones, has been supplemented

    on the One with a Boom Sound amp and the

    addition of two front-facing speakers on the

    device. This allows the phone to be used as a

    micro hi-fi in hotel rooms. The Sense TV feature

    also enables the HTC One to be used as auniversal infrared remote for home electronics.

    With the increasing similarity in hardware

    specs for most high-end Android handsets,

    many of the vendors have chosen to

    differentiate themselves through increasingly

    heavy customisation of the Android user

    interface and addition of new software

    features. Android still remains a unified

    environment for app developers; however,

    outside of the physical hardware design,

    the user experience is the most significant

    difference between phones. The addition of

    QSlide on LGs Optimus G Pro is one example.

    QSlide allows you to take full advantage of thephones multitasking capabilities by leaving one

    app, typically video, running in a window with

    adjustable transparency, while you carry on

    using a second app.

    HTC has customised the Android home

    screen beyond recognition with Blink Feed. At

    first glance you could be forgiven for thinking

    the new HTC One was running either MeeGo

    or Windows 8. The home screen is filled with

    interactive tiles that can be configured to show

    live info from social media, favourite websites

    and news feeds in place of static icons. Again

    this is a clever use of multitasking to show off

    the phones capabilities, and early reviews

    suggest that the concept has been executed

    far more effectively than by Microsoft.

    Wafer-thin Xperia Tablet Z Sleek HTC OneLG Optimus G ProAsus PadFone hybrid

  • 7/30/2019 Linux User 26 Developer Issue 125 2C 2013

    9/100

    The latest in the Linux communityNews

    OPEN SOURCE

    Canonical, corporate sponsor of Ubuntu, has

    been criticised for its decision to build Mir,

    its own alternative successor to the X Window

    System. In addition, Canonicals founder Mark

    Shuttleworth has been engaging in a separate

    war of words with what he terms the 1337

    [LEET] crowd within the Ubuntu community.

    X.Org Server, the X Window implementationused to manage desktop environments on top

    of Linux, is long overdue for an upgrade. Until

    now, most of the desktop Linux community

    had focused efforts to create a successor

    around the Wayland project. But Canonical

    has suddenly decided to drop its support for

    Wayland, claiming that the project does not

    fulfil its requirements completely.

    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 Users offerings on Zinio and

    Newsstand, allowing you to enjoy your favourite mag on yourMac, PC, iPad, Android and a host of other devices.

    There are some incredible subscription incentives upfor grabs too not just for Linux User but for all ImaginePublishing titles.

    To find these amazing deals, point your web browser atwww.greatdigitalmags.com , where you can find links to backissues, subscriptions and more, across almost every platform.Its all available in just one place, and there are massivesavings to be had!

    Grab Linux User digitally at

    greatdigitalmags.com

    UBUNTU

    Mark Shuttleworth challenges Ubuntus

    LEET crowd

    Canonical drops Wayland and goes it aloneWill Shuttleworths unwavering vision destroy community at Ubuntu?

    There are no technical reasons Ubuntu

    cannot use Wayland in principle, wrote Taigo

    Vignatti, Waylands project manager, in an

    angry response. What they wrote there is

    a very, very mean excuse instead.

    Canonical has often followed its own

    divergent path from its initial decision to fork

    the Debian code base, through to droppingGNOME Shell in favour of its own Unity UI.

    Mark Shuttleworth has also spoken out

    against the more cantankerous members of

    the Ubuntu community on his blog. I simply

    have zero interest in the crowd who wants to be

    different. Leet. Linux is supposed to be hard so

    its exclusive is just the dumbest thing that a

    smart person could say, he commented.

  • 7/30/2019 Linux User 26 Developer Issue 125 2C 2013

    10/100

    Inside AmahiInterview

    www.linuxuser.co.uk10

    Inside

    Rob Zwetslootmodels complex systemsand is a web developerproficient in Python,Django and PHP. He loves toexperiment with computing

    INTERVIEWERLinux User talks to Amahis original founder andlead developer, Carlos Puchol, about the currentstrengths and future uses of the server software

    Puchol is the original founder and lead developer of the Amahi project

    Amahi

  • 7/30/2019 Linux User 26 Developer Issue 125 2C 2013

    11/100

    IIwA chat with Amahi founder Carlos Puchol

    Inside Amahi

    www.linuxuser.co.uk11

    One of Linuxs undeniable strengths for

    individuals is its use in home servers. The

    popularity of using spare, old or hand-me-

    down parts to create the central hub of yourhome network has a lot of appeal, and with the

    help of a Linux distribution you can keep the

    entire thing very inexpensive. It doesnt even

    have to be a cheap job either, with top-of-the-

    line parts coupled with Linux allowing you to

    ofoad resource-intensive tasks onto one

    machine, keeping any laptop or desktop free to

    continue doing other tasks.

    While this denitely sounds great, novice

    Linux users may nd it difcult to get such a

    system set up. This is where Amahi comes in.

    Either distributed as a distro, or installable on

    another, Amahi lets you quickly set up a fully

    featured, centralised server. Not only does it

    cover the basics for home use, allowing you to

    stream media or keep it as a NAS, but it can

    also grow with you, allowing you to congure it

    to use even for enterprise.

    We talk to Carlos Puchol from Amahi to

    discuss how advanced the software actually is,

    and the big changes coming to it in the future.

    Typically we have been slotted as a home

    server, but really its a general-purpose

    server, Puchol begins, describing the features

    available in Amahi. Its suitable for media

    apps, web apps and generally anything that

    centralises digital life in the home. We know

    of some people who use it a little bit for home

    automation, others use it for backups, and

    nAmahis web interface lets you control your server from anywhere nThe applications allow you to extend the servers functions easily

    nRaspberry Pi servers are not a new thing,

    but Amahi could open it up to more people

    more still use it as a front-end. Users have

    actually connected it to their TV and then they

    have all their data in there so they can watch

    videos from it.One of Amahis biggest draws is that its

    easily extendible by installing apps from

    the Amahi marketplace. These integrate

    into the system after downloading, allowing

    you to congure them directly for the server

    afterwards. Puchol describes the process of

    getting apps approved for Amahi:

    Overall, we have more than 400 apps.

    However, right now because of the new Ubuntu

    release, just over 150 of those are packaged.

    As were a small team, we have to be careful

    how much we test the apps and how many of

    them we actually put live. Essentially, on every

    new release we start with zero apps packaged,

    basically the way it comes out of the box,

    and then slowly add more and more apps to

    the marketplace.

    Theres a development hierarchy to the apps,

    with some packages available in alpha or beta

    states for testing. Some apps apparently never

    make it out alpha, though, while other apps

    may leave beta but will still not be up to the

    standard needed for making live.

    The main priority is how condent we are

    that the app is working reliably and working

    well, Puchol says. So the last thing we want

    is people to have a bad experience with it,

    whether theyre installing an app or if the app

    just doesnt quite work. Thats just not a great

    Amahi on the Raspberry Pi will become

    a reality. When discussing the hardware

    Amahi can utilise, Carlos Puchol mentions

    that the team is currently at work on a

    Raspberry Pi version:

    Although its not fully maintained,

    Amahi did used to be able to run onARM computers. The current release is

    just about working on Raspberry Pi, but we

    havent made an ofcial release yet as its

    not nished. We are going to release

    Amahi 7 on x86 and x64 rst, then after

    that were going to try for the Raspberry Pi.

    Weve begun to test on the Raspberry Pi,

    and we already know that the base code

    that we already have running on Amahi 7 is

    90 per cent there. Most of it runs on ARM,

    and it would just be a matter of time, say a

    few weeks or couple of months after

    release, before nishing it.

    Amahi PiThe next version, Amahi 7,is a lot faster and safer

  • 7/30/2019 Linux User 26 Developer Issue 125 2C 2013

    12/100

    www.linuxuser.co.uk12

    experience, and it essentially all comes back

    to us. People complain, they say its not ready,

    and typically they want to have it now, which

    basically means that we have to put a lot

    resources into support.

    Community mattersThe community also plays a part in which apps

    are chosen, as Puchol explains:

    What we do is we base priorities on the

    popularity of the app, and we base it on

    how much expertise that we have on hand

    to package the app. If somebody in the

    community is very interested in having anapp packaged that is well rounded, then that

    basically means it has higher priority because

    we are more confident that we can package it

    in a way that is solid for people to try out. And

    so there are some apps that are super-solid

    and some apps that are not as well maintained,

    and we struggle a little bit with them. So we try

    to find a balance between going too fast and

    not doing a good job, above all else [to] make

    sure we have an app ready to go before we

    take it live.

    The community aspect of the server is very

    important to the Amahi team, which is why

    theyve stayed open source as Puchol explains:So, one of the great things with Amahi is

    that anybody in the community can essentially

    package apps, and the apps can be, and are

    mostly, open source. Some of them are not,

    Inside AmahiInterview

    Theres plenty of storage information to access so you know

    exactly how much space you have

    Amahis detailed settings pages make it easy to monitor the

    current state of servers

    Anybody in the communitycan package apps

    but essentially anyone in the community can

    come and contribute, and our source code is

    also in GitHub for the code that runs Amahi

    itself, with the installer and everything. One

    of the things that we do is try to work hard

    to empower people to express themselves

    through the forums, through the wiki and

    through various other outlets. We tried to make

    it a friendly environment for people to come in

    and contribute, because thats how we grow.

    DistributionIn fact, it was because of the community

    feedback that Amahi 6 was brought to Ubuntu.Theres always been a demand for having

    Amahi on Ubuntu, Puchol tells us. We were

    originally based on Fedora, but theres always

    been that demand for Ubuntu. From our point of

    view, it almost doesnt matter what runs behind

    the engine of Amahi, and it shouldnt really

    matter for users. The community was split on

    this, and there were people who were interested

    in what happened behind the scenes. We found

    we had a small number of people who wanted to

    develop Amahi for Ubuntu, but most of the time

    we underestimated the effort that would take.

    Eventually though, we found one person, Frans.

    Frans Meulenbroeks helped port the projectonto Ubuntu, and is now not only the Ubuntu

    lead, but also works on implementing Amahi on

    ARM. Puchol goes on to talk about how this has

    changed their release schedule:

    Secure your files on your Amahi box by

    storing them on the cloud. With people

    using centralised servers to store a lot of

    files on these days, you can never be too

    careful backing up your important data.

    In the long term, people worry about

    hardware failures, natural disasters,

    vandalism or theft, says Puchol. So westarted getting requests for some way

    to automatically sync up shares to the

    cloud in a way that was easy. This led us to

    implement Amahi Sync. You can think of it

    as a one-way Dropbox.

    Amahi Sync allows you to upload

    important data to the cloud automatically.

    These files are then browsable from

    the web, and links can be distributed to

    access the content.

    Each user also gets a free

    subdomain, where they can host

    (static) web sites or otherwise any file they

    want, continues Puchol. Amahi Sync is

    included with our two premium plans

    Pro and Ninja. The Pro plan includes 50GB

    of cloud storage and the Ninja plan

    provides 150GB of storage.

    Amahi Sync comes integrated with

    every installation of Amahi. We will

    be expanding the use of Amahi Sync in the

    next release of Amahi to make it easier.

    Amahi Sync

  • 7/30/2019 Linux User 26 Developer Issue 125 2C 2013

    13/100

    www.liuxus.co.uk13

    We ask Puchol if there are protocols in

    place to allow for users to port to other

    distributions themselves:

    It depends on how many developers are

    willing to chip in, he responds. Somebodycan come in and say and they want to run on

    Debian, and that probably wouldnt be too

    hard as were already running on Ubuntu. So

    we would denitely take the patches for that

    and we already kind of have some support for

    a bit of that. If somebody wanted to run Amahi

    on, lets say, Arch, again we would take patches

    for that and welcome the contributions.

    Essentially its a community-based project,

    so all contributions are welcome. So we dont

    discourage that, but were also realistic. Justhaving some patches that can make it work

    is not going to cut it; we want users to have a

    good experience. So if the developers are not

    committed and we dont see the community

    actually making it work in the long run, testing

    applications and so forth, we would take the

    patches but wouldnt necessarily make an

    ofcial release.

    Fuu ambiiosTheres more in store for Amahi users as well,

    old and new, as Puchol tells us about the

    upcoming update to Amahi:

    The next version, Amahi 7, is right around

    the corner, which is very exciting. We have a

    space on Fedora 18, and it has a lot of new

    features, [a] little bit better performance than

    previous releases, new versions of Ruby and

    Ruby on Rails and so forth. Its a lot faster and

    safer. We also have a plug-in system that weve

    developed to make it easy to develop thinner

    and lighter apps, basically apps that behave

    like they are built in as part of Amahi, but can be

    installed and uninstalled at will. Theres going

    to be a lot of utilities that will appear with this

    plug-in system, so were excited about it.

    Now, we essentially build enough that we

    can actually run Amahi on both Ubuntu and

    Fedora. Were going to try and keep on the

    Ubuntu LTS releases, then hop onto whatever

    the next Fedora edition is available when wereready to release the following version of Amahi.

    Right now, after this one, which will probably

    be Fedora 18, well basically hop on to the next

    LTS release of Ubuntu. Were going to try and

    support both, and we have hooks so we can do

    that for both distributions.

    A chat with Amahi founder Carlos PucholInside Amahi

    IntervIew

    Amahi has a smart drive pooling feature, which is only getting better.

    Having large amounts of storage can get complicated, especially

    when dealing with different RAID levels. Amahi makes it easier by

    pooling all the drives together so they can act as one. However, there

    are some caveats when adding extra drives, as Puchol explains:

    Amahi Sync allows you to upload important data to the cloud

    automatically. These are then browsable from the web, and

    links can be distributed to access the content. Its not very plug and

    play just yet. There is one command-line script that we package that

    you run to recognise and mount the hard drives, and then you need to

    do some editing of Linux les to get them added to the pool. Wedeveloped that aspect rst by hand, and it does require that little

    bit of command-line interaction. Unfortunately, that limits the

    usability of what we have in terms of adding storage, as not all our

    users are technically savvy enough to do it easily. Were trying to

    get rid of that, though: we have specced out a project for creating a

    wizard that can more easily mount hard drives and incorporate them

    into the structure.

    no JBOD

    nParts of the storage pool are still under development

    nYou can even have it act as your DHCP

  • 7/30/2019 Linux User 26 Developer Issue 125 2C 2013

    14/100

    www.linuxuser.co.uk14

    Your source of Linux news and viewsOpenSource

    Jon Masters summarises the latest happenings in theLinux kernel community

    Jon MastersTHE KERNEL COLUMN

    Linus Torvalds has announced the first several3.9 kernel release candidates, following the

    closing of the 3.9 merge window (period of time

    during which disruptive changes to the kernel

    and new features are merged). Merge windows

    are typically up to two weeks in duration (and

    seldom longer), though Linus has gone to great

    pains over the past few years to push developers

    not to post patches for inclusion at the very end

    of the window. Features merged into the kernel

    should instead have received heavy testing in

    the linux-next kernel and elsewhere, be largely

    complete, and posted for inclusion as early as

    possible during the two-week window of frantic

    development for a given release cycle. This is the

    theory, at any rate.

    In his mail simultaneously closing the

    merge window, and also announcing 3.9-rc1,

    Linus said, I dont know if its just me, but this

    merge window had more Uhhuh moments

    than Im used to. I stopped merging a couple

    of times, because we had bugs that looked

    really scary, but thankfully each time people

    were on them like paparazzi on Justin Bieber.

    Those features that made it into 3.9 include

    support for Synopsyss 32-bit ARC architecture

    (following a third posting of reviewed patches

    from Vineet Gupta), which is designed for use in

    embedded and DSP applications, particularly

    those wherein the ability to extend the CPU

    pipeline with custom instructions is beneficial

    (though this author notes that butchering a

    CPU pipeline comes with its own hidden costs

    and so isnt something recommended for non-

    embedded applications).

    Another very interesting new feature in the 3.9

    kernel is support for Intels PowerClamp driver.

    PowerClamp aims to constrain the maximum

    amount of power used by the system by forcing

    the CPUs to enter an idle state for a certain

    percentage of their operating time. At first

    glance, this may seem to be less than useless.

    After all, having paid good money for a powerfulmodern CPU (with multiple cores), most users

    expect to get all the oomph they can out of it.

    There are some users, however, where this

    desire is balanced by overall power constraints

    in particular in data centres where there is a

    hard limit (often 10 or 15kW) of available power

    for a given rack of server equipment. Exceeding

    the power available to a rack can cause all of the

    servers in it to shut down, which is generally not

    what data centre users want. Google and others

    have encountered such problems over the past

    few years, and have used their own custom

    solutions to (presumably) good effect.

    PowerClamp helps to generally solve

    the problem of hard-limits at the rack level

    by allowing an administrator or software

    management tool (agent) to configure the

    system such that it will inject a certain number

    of idle states onto a given CPU. Typically, the

    kernels idle thread (idle task or idle process) will

    run only when there is nothing else to do. It calls

    a special machine instruction that will efficiently

    transition the processor into a lower power state

    from which it can be woken when there is work

    to do (usually through an external interrupt). In

    the case of PowerClamp, additional kidle_inject

    threads are created to run at specific times

    when there is a need to inject additional idle

    states (over and above the regular idle thread)

    Jon Masters is aLinux kernel hacker whohas been working onLinux for some 18 years,since he first attendeduniversity at the age of 13.Jon lives in Cambridge,Massachusetts, and worksfor a large enterprise Linuxvendor. He publishesa daily Linux kernelmailing list summary atkernelpodcast.org

  • 7/30/2019 Linux User 26 Developer Issue 125 2C 2013

    15/100

    www.lix.co.uk15

    The kernel column Jon MastersOpinion

    en surce

    in order to remain overall idle or the percentage

    o time confgured by the user. Typically,

    PowerClamp will be used with some higher-level

    management sotware that looks to the whole

    rack and dynamically tunes many dierent

    systems or optimal overall power use.

    goig dvlopmtDavid Howells announced that The end is nigh!

    or his ongoing UAPI work. UAPI is a near year-

    long eort by David to clean up the kernels

    internal header fles (source code containing

    defnitions and small inline code unctions

    typically included into kernel or applicationcode), splitting out those parts that pertain only

    to the API (application programming interace)

    used by non-kernel user space applications,

    such as the Bash shell or Fireox web browser. A

    typical Linux system includes many such header

    fles within the /usr/include/linux directory.

    These are installed as part o compiling the

    kernel, during the make kernel-headers stage.

    Until now, the process o building user

    application usable header fles involved

    selective copying o a limited number o kernel

    headers (most are not intended to be used by

    application code) and judicious use o special

    conditionals within those fles to ensure the rightthing would happen when they were used by

    non-kernel code. Ater Davids work, the user-

    space API is more clearly defned and these

    pieces are separated out into fles specifcally

    intended or direct use by non-kernel code.

    Davids latest email suggests that only a ew

    changes pertaining to video ramebuers

    remain now that the SCSI stu has gone in.

    Miklos Szeredi posted patches implementing

    a new overlays fle system. Overlay and Union

    fle systems have been a topic o much debate

    or many years, particularly because they never

    seem to work quite right. The problem they

    generally attempt to solve is one o allowing

    several distinct fle systems to be joined

    together, with the net result being a virtual fle

    system (only existing as a whole at runtime)

    that contains selective pieces o each o its

    constituent parts. A typical use case is one o

    embedded routers or live CDs. Both contain

    some storage (ash memory or optical media)

    that is read-only, and some storage (on a RAM

    disk or a separate piece o storage a USB

    stick, another ash etc) that can be written to.

    A special fle system is then used to present

    what appears to be a selection o the content

    o both o these underlying stores. As fles rom

    the read-only media are modifed or deleted,

    deltas are written to the separate writable

    storage instead (including special markers

    that indicate a fle has actually been deleted).

    Unlike other eorts to do overlays, Mikloss

    code tries to be as small as possible by generally

    passing through operations on open fles to the

    underlying fle systems as quickly as possible. It

    will be interesting to see where this goes.

    John Stultz (o Linaro) has posted an RFC

    patch-in-progress that would pull support

    or Androids sync driver into the staging tree.

    Staging is a part o the kernel source tree where

    experimental and not-quite-baked drivers

    can sit inside the kernel source while they are

    being cleaned up. These drivers are available

    only i specifcally confgured or use. The sync

    driver provides a collection o synchronisation

    primitives (code routines that can be used by

    other code to ensure operations happen in the

    correct order) or use with drivers that provide

    dierent parts o the graphics pipeline used with

    the Android SuraceFlinger compositor.

    Anton Vorontsov posted the latest version

    o a memory control groups (memcg) patch

    implementing memory-pressure-level event

    support. With this patch, applications that

    want to maintain the interactivity/memory

    I stopped merging a couple o

    times, because we had bugs thatlooked really scaryLinus Torvaldsallocation cost can use the new pressure-level

    notifcations. What this means is that it is

    possible or an application to be aware o the

    overall pressure a system is under or memory.

    When Linux runs low on available ree memory, it

    will do one o several things. This includes ailing

    new memory allocations, swapping out certain

    parts o applications to disk, and reeing up

    internal caches. All o these have a cost in terms

    o overall system perormance (particularly

    when the system hits a point o swapping large

    amounts o data out to slow rotational disks and

    is said to enter a state o thrashing) that has not

    historically been easily visible to end sotware.

    Now, applications can easily monitor a special

    event fle descriptor within a memory control

    group and be made aware o low, medium

    and critical levels o memory as well as set

    specifc limits at which a notifcation will be

    given. This allows an application to take steps to

    release unneeded in-memory caches (such as

    web browser pages) beore the system grinds to

    a crawl.

    CC;TheLinuxFoundation

    nLinus Torvalds making a rare public appearance at LinuxCon Europe

  • 7/30/2019 Linux User 26 Developer Issue 125 2C 2013

    16/100

    www.linuxuser.co.uk16

    Your source of Linux news and viewsOpenSource

    Simon Brew is a technologywriter and editor,working across theLinux, Windows andMac OS X platforms

    It was in the very early 1980s that a fledgling

    company by the name of Hudson Soft came

    up with a title by the wonderful name of Eric

    And The Floaters. The core concept was that

    you ran around a maze, planting bombs. Said

    bombs could blow away the walls, blow away your

    opponents, or blow away one of your lives. It was

    a wonderful idea, wonderfully executed. Hudson

    Soft went on to expand upon it, with the likesof ve-player Dyna Blaster on the Commodore

    Amiga, Atomic Bomberman on the PC, and

    numerous other versions of the game for lots of

    different formats. The key factor though is that

    Hudson Soft caught what made the game special

    with its rst attempt. Everything else has been

    some form of derivative.

    Which made me surprised to see a massively

    multiplayer online version of Bomberman spring

    up online. At rst glance, it doesnt seem ofcial.

    But the graphics pay more than a tip of the hat to

    Bombermanof old, while its now acknowledged

    on the requisite website that the Bomberman

    name is a trademark of Konami.However, the game lives on. As such,

    Bombermine which you can nd at

    bombermine.com has been attracting up to

    1,000 people at a time on the same map. The

    game is so compact that its playable via your

    web browser, and I cant be the only person

    whos lost many hours to something so well

    thought through, that stands on the shoulders

    of proverbial giants, and builds to something

    unthinkable a decade ago.My overriding thought, however, is this: well

    played Konami. Assuming that Konami is the

    rights holder for this now, it could have pulled

    the project down within hours, sent off lawyers

    letters, or billed the creators of Bombermine a

    hefty sum. It seemingly didnt. Instead, it got the

    spirit of what they were trying to do right and, at

    worst, has turned a blind eye.

    Back when emulators for older computers

    appeared on the PC in great quantities just over

    a decade or go, this was the prevailing attitude.

    The majority of people, knowing that nobody

    was getting rich off their work, were happy for

    old games to be effectively released into thepublic domain. If anything, lots of programmers

    were delighted that their earlier efforts were

    being rediscovered.

    In any form of human development, it is this

    kind of ethos that has accelerated progress. In

    cinema, its often said that Pixar came in and

    revolutionised animation, but it didnt. It advanced

    it, it stood on the shoulders of those who came

    before, and it made intelligent advances. Now,

    others are doing the same to Pixar.

    The grey area would be if something like

    Bombermine started to charge to play, which is

    when Konamis spider senses would presumably

    start tingling. But then this whole unwritten

    agreement is a two-sided one. It relies on rms

    playing nice, and the people behind whatever

    project in question doing the same. But as

    Bomberminehas shown, thats entirely possible.

    In fact, the emulation scene is testament to what

    can happen if everyone adopts such an ethos.

    Its refreshing in a time of software

    as big business to report on a project of

    Bombermines ilk. Hopefully, lots more big

    companies can follow the lead set here. Id

    recommend blocking the game from their

    organisations servers, though

    THE OE SOE OL

    nBombermineis so addictive youve been warned!

    Bombermine shows just whats possible wheneveryone plays together nicely, argues Simon...

    laying nicely together

  • 7/30/2019 Linux User 26 Developer Issue 125 2C 2013

    17/100

    www.ix.co.uk17

    The ree sotware columnOpinion

    pen surce

    he Free sFre clumn

    F oftwa i abot oity, o it i

    otig. Being ree also makes the sotware

    vulnerable to those looking or a ast buck and

    a way round the rules, Everyone wants a slice o

    the action, even when this means reshaping the

    tools and principles o ree sotware. The game

    is to take advantage o loopholes in the licence

    packaging the sotware, adding proprietary

    code and marketing the result, thereby ulflling

    the objective o a dual strategy o proprietary

    products and low-end open source.

    Some licences encourage this type o

    behaviour. I you have signed up to a liberal

    licence on the model o the BSD one, you may

    Mir offers the prospect of more unintended consequences for theLinux graphics stack and the graphics stack should not be in theownership of one company, says Richard Hillesley

    yo lix a bog to

    have thought the consequences through, and

    may not care. You have put your sotware out inthe world, and those who use it can do as they

    like. Users o the GPL will take a dierent view.

    There is nothing new in this. The earliest

    attempt to grab a proft rom Linux was also

    the crudest. On 15 August 1994, William R Della

    Croce Jr o Boston saw a business opportunity

    in the rise o Linux and fled or the US rights

    to the Linux trademark. The frst encounter o

    Linux users with Della Croce was in March 1995,

    when Yggdrasil Computing fled or a trademark

    on The Linux Bible and had it rejected on the

    grounds that the Linux trademark was the sole

    property o Della Croce. During the ollowing year

    a number o Linux frms received demands romDella Croce or payment o 25 per cent o royalties

    on products that used the name Linux. This

    resulted in a long legal battle in which Yggdrasil

    had to prove prior use o the name. The case

    wasnt resolved until August 1997, when the Linux

    trademark was fnally assigned to Linus Torvalds.

    This was the irst o many claims on the

    ownership o the rights to the code, or portions

    o it, that constitutes a GNU/Linux distribution,

    many o which were designed to disrupt the way

    Linux and other ree sotware is developed, and

    to interrupt the success that GNU/Linux has

    achieved. Some claims have been more absurd

    than others, ranging rom the suit iled against the

    Free Sotware Foundation in Indiana in May 2005

    by Daniel Wallace which claimed that the GPL was

    an illegal attempt to ix prices at zero, to The SCO

    Groups claim or $6 billion rom IBM, or making

    Linux ready or enterprise use with technologies

    that had been misappropriated rom UNIX, to

    which SCO claimed the rights wrongly.

    One o the more pernicious means o

    subverting the purpose o the licensing is

    copyright assignment. The GPL, or any other

    sotware licence, depends upon the ramework

    o copyright law. Copylet puts the rights and

    responsibilities back into the hands o the user,

    but copyright depends upon the ownership and

    assignment o the code and these can change.

    riad hiy writes aboutart, music, digital rights,

    Linux and free software fora variety of publications

    Copyright assignment asks the developer

    to assign ownership o the code to a parentorganisation or frm, which means the ownership

    and the licence can be reassigned at a uture

    date. The motives or demanding assignment

    o copyright arent always bad, but the best o

    motives can lead to unintended consequences.

    The way around this may be to assign the code to

    an independent non-proft organisation such as

    the FSF or the Linux Foundation.

    This is one o the more serious objections to

    Canonicals decision to develop the Mir display

    server in competition to Wayland and Weston.

    Mir code will be licensed under Canonicals CLA,

    which assigns rights o ownership to Canonical.

    Mir isnt an application, but aims to be theessential underpinning o the graphics stack on

    the most popular Linux distro and, as such, may

    not only take resources away rom Wayland but

    create uture incompatibilities in the graphics

    stack. Removing the ambivalences, incongruities

    and incompatibilities in the code is one o the

    reasons why so much eort has been poured

    into Wayland. One doesnt have to doubt the

    intentions or motives o Canonical and Ubuntu

    to know that Mir oers the prospect o more

    unintended consequences or the Linux graphics

    stack, and the graphics stack should not be in the

    ownership o one company.

    But the worst aspect o the story has been

    Canonicals ailure to talk through the issues

    and proposed remedies with the community. It

    is the contention o the Wayland developers that

    the issues given by Christopher Halse Rogers

    (bit.ly/WfXhBG) have already been fxed, or can

    be resolved by Wayland and Weston. Nobody

    is accusing Canonical o being in search o a

    quick buck, but rom the outside Mir looks like

    a solution in search o problem, and the eeling

    remains that Ubuntu has either rushed into a

    gap that was already being flled, or is looking or

    dierentiation at the expense o the community.nMir is named after

    the space station Mark

    Shuttleworth visited

  • 7/30/2019 Linux User 26 Developer Issue 125 2C 2013

    18/100

    Subscribe today and getyour first three issuesfor 1 (and save 13.00) Pay only 4.19 for every

    future issue a 30% saving

    on the store price Free UK delivery to your door Never miss an issue Money-back guarantee

    FANTASTICSUBSCRIBER

    OFFER

    SUBSCRIPTION VOUCHER YES I would like to subscribe to Linux User & Developer

    YOUR DETAILSTitle First nameSurname

    Address

    Postcode Country

    Telephone number

    Mobile number

    Email address

    DIRECT DEBIT PAYMENT UK Direct Debit Payment

    I will receive my first three issues for just 1, I will then pay only 25.15 every six issues thereafter. If,however, I do not love what I see, I can cancel at any time.

    PAYMENT DETAILSYOUR 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 MasterCard Amex Maestro

    Card number Expiry date

    Security number (last three digits on the strip at the back of the card)

    Issue number (if Maestro)

    Signed

    Date

    Code: PCG125 Tick this box if you do not wish to receive any promotional material from Imagine Publishing LtdTick 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

    Please complete your email address to receive news and special offers from us

    Terms & ConditionsThis offer entitles new UK direct debit subscribers to receivetheir first three issues for 1. After these issues, subscriberswill then pay 25.15 every six issues. Subscribers can cancelthis subscription at any time. New subscriptions will start fromthe next available issue. Offer code PCG125 must be quotedto receive this special subscription price. Details of the Direct

    Debit guarantee are available on request. Offer expires 31 July2013. Imagine Publishing reserves the right to limit this type ofoffer to one per household.Source Code PCG125Web address: www.imaginesubs.co.uk/lud. Tel: 0844 249 0282

    HURRY

    ORDERN

    OW

    Instruction to your Bank orBuilding Society to pay by Direct Debit

    Signature(s)

    Date

    Bank/Building Society account number

    Banks and Building Societies may not accept Direct Debit instructions for some types of account A6 instruction form

    Instructions to your Bank or Building SocietyPlease pay Imagine Publishing Limited Direct Debits from the account detailed in thisinstruction subject to the safeguards assured by the Direct Debit guarantee. I understandthat this instruction may remain with Imagine Publishing Limited and,if so, details will bepassed on electronically to my Bank/Building Society

    Branch sort code

    Originators Identification Number

    Name(s) of account holder(s)

    To:The Manager Bank/Building Society

    Address

    Postcode

    Reference Number

    5 0 1 8 8 4

    Name and full postal address of your Bank or Building Society

    Please fill in the form and send it to: Linux User and Developer Subscriptions Dept,800 Guillat Avenue,Kent Science Park,Sittingbourne ME9 8GU

  • 7/30/2019 Linux User 26 Developer Issue 125 2C 2013

    19/100

    1.Onlinewww.imaginesubs.co.uk/ludAnd enter PCG125

    2.Telephone

    0844 249 0282And quote PCG125

    3.Post or emailPlease complete and post the form toLinux User & DeveloperSubscriptions Department800 Guillat AvenueKent Science ParkSittingbourne

    ME9 8GUOr alternatively, you can scan and email the form to

    [email protected]

    THREE EASY WAYS TO SUBSCRIBE

    ISSUES OFLINUX USERFOR JUST

    Get your first3 issuesfor just1,thensave 30%on the shop price

    Readers inthe US see

    page 86 forexclusiveoffer

    3 1

  • 7/30/2019 Linux User 26 Developer Issue 125 2C 2013

    20/100

    Build a Linux homeserver from scratch

    Ian Jackson takes you through a step-by-stepguide on how to build your very own homeserver its easier than you might think

    www.linuxuser.co.uk20

    Building a PC, let alone a server, may at

    first seem like a daunting prospect. To the

    uninitiated the inside of a computer may look

    no more user-serviceable than a television or

    photocopier. How the PC differs from these

    devices is in its modular nature. Every part

    within a PC is designed to be upgradeable

    without the use of any specialist tools or solder

    and different components can simply be slottedinto the motherboard. In this guide we will show

    how to turn a box full of components into a fully

    operational home server.

    Whats the difference between a PC and

    a server?, you might ask. From a hardware

    perspective, the answer is not a lot; at

    least from a home server point of view. The

    difference is more to do with the definition

    of how the machine will be used. Typically

    you would use a PC to do everyday tasks like

    browsing the web and writing emails. A server

    on the other hand is usually configured as aheadless system (ie without the need for a

    monitor except during its configuration), and

    serves as a central access point from which

    all of your other devices can access your

    data. For large corporate servers, specialist

    hardware is usually used in order to increase

    remote operability or reliability; but, for a

    home or small office server, regular desktop

    components are more than sufficient.

    Compared to a Windows-based server, a

    user-friendly Linux home server distro like

    Amahi requires fewer system resources, istypically more reliable and is completely free.

    So, without any further ado, lets get this

    build started!

    1

    2

    4

    8

    9

    5

    6

    7

    You dont need a monster specificationto run an Amahi server indeed, itslightweight nature is something thatlends itself perfectly to the reuse of a

    previously retired box. Nevertheless,here is what we used for our system.

    1. CPU Intel Core i3 3220 processor2. Motherboard Asus P8B75-M LX3. Case Fractal Design Define R44. PSU Storm 700W5. Memory 4GB of DDR3 Corsair

    RAM7. Storage 1TB Seagate Barracuda

    7200.148. Optical Drive LG Blu-ray ROM9. Video Card GeForce GTX 650

    Truth be told, some of the hardware inour list is overspecified for an Amahihome server, but we have grander

    plans for it in the future!

    Shopping list

    FEATURE Build a Linux home server from scratch

  • 7/30/2019 Linux User 26 Developer Issue 125 2C 2013

    21/100

    www.linuxuser.co.uk21

    1timetaken10 mins

    Inspect the partsThe first thing to do before starting

    any kind of system build is to check

    that all of the components you have

    purchased are in perfect condition.

    Installing damaged parts could ruin

    other non-faulty parts, so its better to be safe

    than sorry. Common problems to look for include

    bent pins on the CPU socket; broken capacitors

    on motherboards, graphics cards and other

    circuit boards; and broken SATA or SATA Power

    connectors on drives. Once you have verified

    that everything looks okay, you are ready to get

    started! Building a PC is an untidy job and you

    can greatly increase the efficiency of your build

    by tidying up as you go. Once you have unpacked

    each component, neatly place its packaging

    away from the build, but do not dispose of it until

    you are sure all is well!

  • 7/30/2019 Linux User 26 Developer Issue 125 2C 2013

    22/100

    Installing the CPU cooler will either be a

    very simple or very complicated affair,

    depending on the kind of model you have

    chosen. For socket 1155 (aka LGA1155

    or socket H2) CPUs, the default cooler is

    rather easy to install. Firstly, you need to line up the

    cooler with the four motherboard mounting holes

    before pushing down firmly on each of the four pillars

    The next step is to install the CPU/

    motherboard/cooler assembly into the

    chassis. Go ahead and remove the side

    panel from the case before emptying it of

    the mounting accessories. Position the

    leads carefully out of the way of the motherboard tray

    before lining up the board with the tray to confirm

    where you need to screw in your standoffs. Standoffs

    are little hexagonal screws with both female and male

    ends. They act as spacers between the motherboard

    tray and the bottom of the board. Only install

    standoffs where you have to. Installing standoffs

    where there is not an associated mounting hole could

    result in the board shorting on the case, preventing

    it from booting or even worse, causing damage to

    the components. Always use the correct threaded

    screws from your cases accessory bag to mount

    the motherboard.

    Install motherboard4timetaken10 mins

    3timetaken15 mins

    Install the cooler

    Installing memory is one of the easiest

    upgrades to perform, and is an identical

    procedure regardless of whether you are

    installing DDR, DDR2 or DDR3. All memory

    sticks have a notch that prevents their

    installation in an incompatible memory slot, or in the

    wrong orientation. To start, release the two memory

    clips by pushing them away from the centre of the slot.

    Gently slide the memory into the guides, taking care

    that the orientation is correct. Push firmly down on

    the memory stick in a direction perpendicular to the

    orientation of the board and the two clips should snap

    closed. If using a dual-channel board (all modern PCs

    are at least dual-channel), make sure you look in the

    motherboard manual to be sure that you have the sticks

    installed in the right slots to enable dual-channel mode.

    Install the memory

    When installing a processor in an LGA (land

    grid array) based socket, the first step is to

    remove the socket protection cover. After

    this, lift up the socket lever and release the

    mounting clamp before carefully aligning the chip,

    taking special note of the notches at the side. Once the

    chip is aligned, close the clamp and re-secure the lever

    again, holding the CPU in place. The best method of

    installing thermal paste on a chip with a heat spreader

    is to squeeze out a small amount of compound (about

    the size of a grain of basmati rice) and install the coolerstraight on top. The paste will then be compressed out

    to just the right thickness. Dont worry about having

    paste on every square millimetre of the heat spreader -

    the pressure of the cooler will do this over time.

    2timetaken5 mins

    Install the CPU andapply thermal paste

    with your thumb until they lock into place. With most

    third-party coolers, however, things will be a little more

    involved. Normally you would need to fit mounting clips

    to the coolers base before pushing them through the

    four holes on the motherboard into a custom backing

    plate. These elaborate mounting systems keep a heavy

    third-party cooler more securely fastened than would

    be possible with plastic push pins. Coolers heavier

    than about 800g should be removed before moving the

    PC any distance.

    The chip willbe cut to onlygo in one way

    FEATURE Build a Linux home server from scratch

    www.linuxuser.co.uk22

    TIP

    The screws only need to be

    hand-tight, but theyre easier to

    access with a screwdriver

    Dual-channel slotsare not alwaysnext to eachother on largermotherboards

    5timetaken5 mins

  • 7/30/2019 Linux User 26 Developer Issue 125 2C 2013

    23/100

    Installing the video card is the same as

    installing any other PCI or PCI Express

    device; the only difference is the slots size

    and shape. Firstly, remove the backing

    plate aligned with the main 16x PCI-Express

    slot. Make sure that any sliding mechanism or clip

    designed to prevent the graphics card from shaking

    loose is in its open position. Line up the end of the

    graphics card backing plate with the hole in the case,

    and then line up the slot

    with the contacts. Gently

    push the card, exertingequal pressure from either

    end so that it enters the slot

    in one smooth operation.

    Once you think you have the

    card in the slot, check to see

    that it is in straight and fully

    pushed home. An unseated

    graphics card is a common

    reason for a computer to fail

    when booting.

    Even if you are building the simplest ofbudget office machines, you should really

    be installing at least one or two case fans

    within your chassis. In general, a larger case

    fan is preferable to a smaller one, as it shifts

    more air with less noise. Where possible, look for case

    fans with a 3-pin motherboard attachment rather than

    a 4-pin Molex plug, since these can take advantage

    of the rpm control offered by the motherboard. To

    install the case fan on most cases, line up the fan on

    the inside of the chassis and screw in the thick case-

    fan screws from the outside. These are normally

    self-tapping, so they can be quite stiff to screw in. If

    necessary, screw a fan guard into the other side of

    each fan. As well as protecting your fingers, they alsoprevent stray cables from interfering with the blades.

    Install the video card6timetaken10 mins

    With most cases youll be provided with two

    different kinds of Phillips-headed screws.

    One of these will have a coarse thread, and

    the other a fine thread. All hard drives are

    screwed in by coarse-threaded screws. Where you

    install your hard drives depends on the chassis you

    are using, but if installing more than one, try to make

    sure that there is as much space between drives as

    possible. This will maximise the airflow and keep drive

    temperatures low. Many of the more elaborate cases

    now available allow you to fit the drives into a slide-out

    caddy rather than screwing them to the case directly.

    This has the benefit of allowing easy access to your

    drives should you need to remove them, but also usuallyprovides some form of anti-vibration isolation.

    Install the case fans7timetaken10 mins

    For longer graphicscards, make suretheres space

    Slip the I/O panelbetween the caseand the board

    www.linuxuser.co.uk23

    TIP

    Experiment with turning thehard drive around and then

    plugging it in around the other

    side. This can aid in airflow and

    cable management

    Install the

    hard drives8timetaken20 mins

  • 7/30/2019 Linux User 26 Developer Issue 125 2C 2013

    24/100

    FEATURE Build a Linux home server from scratch

    Now you have the PSU installed, dont just

    leave the wires trailing like spaghetti within

    your case. Instead, purchase some cable-

    ties from any good DIY ship and tether

    them together. This will prevent them from

    interfering with your CPU cooler and other fans, and

    also greatly improves airflow within the case. If you

    have spare PSU cables not powering anything, tie

    these together and push them into a spare 5.25 drive

    bay out of the way if using a case with a top-mounted

    PSU, or beside the drive cage if using a modern bottom-

    mounted variant. Cases like the Fractal we are using

    have a myriad of cable management options so you can

    really go to town on making everything as neat as can

    be. As well as tidying the PSU cables, make sure case

    fan and CPU coolers are tied too.

    With all of your other devices installed,

    its time to install the PSU. Some system

    builders like to install the PSU first, but

    we think that the cables simply get in the

    way. When installing the PSU, carefully choose which

    cables you plug into each device so that you use the

    minimum number of leads. If for example you have a

    PSU lead with three SATA connectors, use this cable

    to power three hard drives, rather than giving each

    device its own cable. This will greatly ease future

    expandability, since unless you have an extremely

    stacked system, you should have spare cables left

    over at the end of the build. Be sure to remember to

    install the auxiliary 12V motherboard cable (normally

    four or eight square pins) as most boards wont boot

    without it, as well as any 6/8-pin PCI-E power cables

    required by your graphics card.

    Tidy the cables

    Install thepower supply

    11time

    taken20 mins

    Most cases come with the 5.25 optical bays

    initially populated with covers. Refer to your

    cases manual on how to remove these;

    some just need bashing out, while others will

    need the entire case fascia to be unclipped. With the

    bay exposed, slide the drive in from the front until the

    fascia is flush with the case before you start to screw

    it in. If installing more than one drive to the same case,

    repeat as required. Dont be tempted to take the easy

    way out and only screw in your optical drive on one

    side; this will cause severe vibrations that will result inan incredibly noise system whenever the PC is in use.

    Many modern cases now employ quick-release clips

    for optical drive mounting. Dont be tempted to rely on

    these alone if screw holes are also offered; again they

    can cause lots of vibrations.

    Install opticaldrives

    9timetaken20 mins

    www.linuxuser.co.uk24

    Quick Tip

    Making use of thecase to tidy helps

    with any future cable

    rearrangements

    The point oftidying cables is tohelp with airflow

    Efficient power

    usage aids in cable

    management

    Some casesmount opticaldrives from inside

    The PSUshould slot intoits own space

    10timetaken30 mins

  • 7/30/2019 Linux User 26 Developer Issue 125 2C 2013

    25/100

    All cases come with cables that need to be

    plugged into the motherboard to enable the

    power and reset switches, the LEDs and the

    system speaker to function. Front-panel

    connectors differ depending on your motherboard,

    so you should have the motherboard manual open

    for this step. The power, speaker and reset buttons

    are not positive or negative, so can be installed on the

    relevant pins in either orientation, but the LED cables

    and speaker cable must be installed with the right

    lead on the + header. The HDD activity LED cable isusually white and orange, with the orange cable being

    positive. The system power LED lead is normally green

    and white, with the green cable being positive. If all of

    your cables are covered in black insulation, look at the

    connectors for orientation.

    All of your parts should now be installed and

    your server ready for its first boot. Before

    you power up, however, take a few extra

    minutes to ensure that all is installed as it

    should be. Make sure that the CPU cooler is

    plugged into the correct motherboard header, and that

    it is securely on top of the CPU without any rocking.

    With fingers crossed, press the power

    button on the front of your case. If all has

    gone to plan, you should be greeted by

    a POST sequence on your monitor. This

    will show the amount of memory installed, a list of

    connected drives and CPU information. Press Delete or

    the relevant F key to enter the BIOS. Firstly, you should

    go into the drive settings and make sure all of your

    disks are showing up correctly. Next, take a visit to the

    hardware monitor section and ensure your processor

    temperatures are steady and within safe limits (above

    50C is a concern and may point to an unseated

    cooler). Set the boot order to your optical drive first

    (assuming you are installing from DVD rather than a

    USB stick), then save the settings and exit the BIOS

    by pressing F10.

    Fit case front-panelconnections

    Final checks

    Powering on for thefirst time

    Install front-panelUSB, FireWire andaudio cables

    12timetaken15 mins

    14timetaken10 mins

    15timetaken1 min

    13timetaken10 mins

    Give the memory modules a firm push to ensure they

    are all the way into their slots. Make sure that your

    graphics and any add-in cards are pushed fully into

    their respective slots, and that you have screwed down

    their backing plates. Secure any loose cables with ties

    and replace the side panel. Plug your keyboard and

    mouse into the USB ports, your video card cable into

    the DVI or VGA slot, and the 3-pin kettle power leadinto the PSU.

    www.linuxuser.co.uk25

    Most chassis have front-panel USB and

    audio connections; some also have eSATA,

    FireWire or USB 3.0. Most motherboard makers denote

    internal USB headers in blue and FireWire heads in red,

    but check the manual first as the pin-outs are the same

    shape. Helpfully, some cases have cables with large

    connection blocks that slide straight onto the whole

    USB header; others come with small, fiddly cables that

    must be installed individually on each pin. If using astandalone sound card, youll need to plug the FP audio

    connector into this instead. eSATA headers will need

    plugging into a spare SATA port on the motherboard.

    USB 3.0 headers are often thick and inflexible, so

    position them carefully so they cant easily pop out.

    Quick TipSome motherboards

    come with a caddy

    to attach the audio

    cables helpful

  • 7/30/2019 Linux User 26 Developer Issue 125 2C 2013

    26/100

    FEATURE Build a Linux home server from scratch

    www.linuxuser.co.uk26

    If the worst happens and thereis no POST when you press thepower button, dont panic. Ifthe system powers up, ie thefans spin, the power supply isfunctioning properly. If thereare no signs of life, first makesure that you have the powerswitch installed on the correctmotherboard header, and thenmake sure that the switch on thecase is attached to the cable andnot damaged in some way.

    If there is a standby LED

    on your board and it is notilluminated, the PSU may needreplacing. If you hear beepcodes, check your motherboardmanual for their meaning. Themost common cause for amotherboard failing to POSTwithout beep codes is that one ofthe memory sticks is faulty. Tryremoving one of the sticks if youhave two or more and see if thatcauses the machine to POST.Check that all graphics and PCIcards are fully installed intotheir slots. Disconnect any USBdevices from the machine and

    reattempt the boot.

    Troubleshooting ifthere is no POST

    5 top Amahi applications

    On another computer, head over to www.amahi.org

    and create an account and login. Once done, verify

    your account by clicking on the emailed link; you will be

    forwarded to a page asking you to create your HDA or

    Home Digital Assistant. The first screen will ask you

    for your gateway, or routers address. In our case this

    was 192.168.1.254. Next, choose a non-conflicting IP

    address for your HDA. We chose 192.168.1.50. The next

    step is to name your local DNS domain. This can be

    called anything you want, but we left it at the default of

    amahi.net. Perform the final check that all details have

    been correctly entered and take a note of your install

    Place the bootable operating system CD

    in your computers primary optical drive. If you set

    the boot order to CD-ROM first in step 15, the CD

    should begin the operating system setup sequence

    automatically. The first screen to greet you will ask

    you if you want to try or install Ubuntu choose the

    latter. Do not select and install additional packages

    while installing Ubuntu, as Amahi requires the default

    installation. During the install process you will be

    asked to create partitions and to pick a suitable

    name, computer name and password. Installationshouldnt take too long and before you know it you will

    code; you will need this later. Download the Ubuntu

    12.04 install CD if you dont already have a copy and

    burn the ISO to a blank disc.

    Install Ubuntu

    Sign up andconfigure Amahi

    Installing AmahiMany Linux distros can be used to run a homeserver, but Amahi is a particularly good choicedue to the ability to extend its functionality usingapps. Here we set it up with Ubuntu

    be on the desktop. If you are a seasoned Ubuntu user

    youll already feel at home; if not, bear with us! Click

    the dash home icon (top left) and type in Terminal to

    bring up the terminal window.

    Although Amahi itself is an incredibly useful home server, itsfunctionality can be further enhanced with applications! They alsohelp support developers and are extremely reasonably priced.

    CRASHPLAN Allows youto automate the backupof your PCs. It can be setto intelligently identifyduplicates so incrementalbackups are very quick.

    DLNA Enables DLNA/UPnP clients like Xboxes,PS3s and set-top boxesto stream media fromyour server. An invaluableaddition to Amahi!

    COUCHPOTATO Anautomatic NZB and torrentdownloader. If you downloada lot of content using theseP2P standards, you needCouchPotato in your life.

    TIME MACHINE AllowsMac OS X Time Machine orsimilar AFP-based backuptools to work with yourhome server. This results ineffortless data security foryour peace of mind.

    CLONEZILLA Allows youto fully clone completefile systems for multipledeployments or systemrestorations from scratch.Clonezilla has a myriad ofpossible applications!

    1

    2

  • 7/30/2019 Linux User 26 Developer Issue 125 2C 2013

    27/100

    www.linuxuser.co.uk27

    Amahi is a great server, but itsnot the only one out there. Hereare some alternatives you maywant to consider

    CENT OSA community-built Red HatEnterprise Linux using all theofficial sources, making it a rock-solid and reliable distro that canhandle all your server needs withsome tweaking.

    UBUNTU SERVER

    Ubuntu without X is otherwisevery similar to the desktopversion, although it does includemore software to allow it to hostemail and websites. Support isalso maintained for five years.

    TURNKEY LINUXThere are over 100 variations ofTurnKey Linux, and each one isspecialised for a specific type ofserver. While its primarily usedin the cloud, its designed to workon physical boxes as well.

    Served up

    Amahis key features

    Within your open terminal window, type

    wget http://u12.amahi.org/install-amahi and press

    Enter. Assuming you get a response, now type in

    sh install-amahi. The terminal will now ask you for

    your install code. This is the one we received in step 1.

    Type it in and press Enter. You will now be asked

    for your password. This is the one you configured

    After the next reboot, Amahi is now fully

    installed and ready to use. There should be two Amahi

    logos on your desktop. Go ahead and open the Amahi

    Dashboard. The Firefox web browser will open with

    http://hda and ask you to log in. Use your Ubuntu

    login, not your Amahi website login. The first login will

    create the first user, so take note of the details you

    enter. You can now go ahead and begin sharing your

    movies, photos and videos on your network. From

    a remote computer or media streamer device like a

    games console, you simply connect to hda and enter

    your user credentials. By default, files stored in the

    /var/hda/files folders will be shared. Creating new

    shares or changing the directories within the dashboardis very easy and there are a host of apps available for

    you to try and enjoy!

    during the installation phase in the previous step.

    Type it in and press Enter. After a few minutes

    you may receive a pop-up asking you to check for

    updates click Close. Eventually you will be asked to

    reboot to get started. Installation of Amahi may take

    minutes or hours depending on the quality of your

    hardware and internet connection. For our i3-based

    setup and with a BT Infinity fibre optic line, it took

    about 7 minutes.

    Install Amahi

    Use Amahi4 What makes it tick?

    3

    UBUNTU COREAmahi is built on Ubuntu, and as such itmeans you can set it up on a pre-existinginstall, and save a lot of time and hassle.

    ONE-CLICK ADD-ONSThe Amahi App Marketplace is comprisedof hundreds of packages that addfunctionality to Amahi with a single clickof a button.

    WEB INTERFACE

    Amahi comes preconfigured with a fully

    featured browser-based interface thatyou can access over a network or even viathe internet to control your server.

    BUNCH OF DRIVESUsing its own open source utility, Amahiis able to smartly combine your sparestorage drives into one, much moreuseful virtual hard drive.

    EXTERNAL NETWORKINGDial into your own network with the built-in VPN server, allowing you to access yourfiles and other systems directly.

    REROUTING

    Take control of your network with Amahi

    to route PCs, phones etc. It comes withDHCP and dynamic-DNS, and is morestable than some ISP-supplied routers.

  • 7/30/2019 Linux User 26 Developer Issue 125 2C 2013

    28/100

    1&1 WEB HOSTING

    Larry Ewing

    DOMAINS | E-MAIL | WEB HOSTING | eCOMMERCE | SERVERS

    1 WEB HOST, 2 OPERATING SYSTEMS ENDLESS POSSIBILITIES!

    *All 1&1 Web Hosting packages (Windows and Linux) free for the first 6 months, then 1&1 Starter 2.49/month, 1&1 Standard 4.99/month, 1&1 Unlimited