Linux Format 204 (TR Sampler)

Page 1



Pages of tutorials and features

Get the best new desktop Printing made simple Blender 3D in Hollywood

File sync services to +Roundup: backup, copy and transfer files

Get into Linux today!

STREAM IT! Build the best Ubuntu media centre Easy to follow step-by-step guide Build a perfect media library Record and enjoy live TV On Android, Pi and more!

Saving the web

Liberating government docs that should be free in the first place

Alexi Rossi on the Internet Archive p40 BOINC on Linux

GTK interfaces

Donate your PC’s unused CPU cycles to science

Build beautiful user interfaces for your apps

Network processing

Python Glade

Plus: Pi User

8-page Raspberry Pi companion

Astro Pi: get started now! Create a Pi print server Raspberry Pi displays

Home media


Put away all the DVDs and CDs – it’s time to put your entire media library in easy reach. Nick Peers builds the ultimate media server.


ou need a media server, if you’re fanatical about your media – movies, TV, music, photos or whatever else takes your fancy. This is a central file server that puts you in total control of all your media, making it easy to watch and listen from any device that has access to the internet – you’re no longer tied to your living room or even your house. And better still, there’s no faffing about swapping DVDs and CDs, or having to sit through unwanted trailers. All you need for your media server is a suitably powered Linux machine. While you can add a media server to your main PC, a more convenient option is to allocate a dedicated PC exclusively to the task. Your

biggest headache is choosing which media server to run, but don’t worry, we’ve done the hard work for you to find a solution that’s both open source and easy to use while stunning to look at and easy to navigate. We’ll show you how to get it up and running,

set up multiple users, allowing you to give your kids access to their favourites while keeping them away from yours. Once your server is up, running and delivering everything you want it to, we’ll then focus on accessing it from other devices. You’ll be glad to know that your server doesn’t support just other computers, but also mobiles, tablets, smart TVs, set-top boxes and other devices too. In most cases you’ll even enjoy the same visually rich and informative experience. One thing’s for certain: once you’ve experienced your media through your Linuxpowered server, you’ll never want to consume it in the same old way again. Read on to learn how to start the media revolution…

“A media server puts you in control. Enjoy music, movies or TV on any device, anywhere.”

32     LXF204 November 2015

with all your media in place, then reveal how you can extend its functionality – for example, you can add live TV, stream music to wireless speakers throughout your home, access your media from outside your local network, and share it remotely with others. You can even

Media server

Choose your server First, what hardware and software will you use to share your media?


hile it’s perfectly possible to add a media server to your existing desktop, its demands can interfere with your day-to-day running. Also, you may want to leave it on 24-7 to give you (and others) access without having to boot it up specially. So it’s a good idea to consider pressing a dedicated machine into service. A media server’s requirements can be quite onerous, depending on whether or not it will need to transcode files to other devices. Transcoding means converting a media file from its native format into one compatible with the device you’re trying to play it on. As a rule of thumb, if media files are not in a universal format like MP4 (with H.264 video codec and AAC or MP3 audio codec), then it’s likely that some transcoding will be required on certain playback devices. If you won’t need transcoding capabilities, then quite a modest machine will fit the bill (see the Raspberry Pi media server box below). However, if you’d like maximum flexibility and minimum hassle accessing your media from elsewhere, then look for a machine (possibly an older one you don’t use now) with a reasonable core spec: a 2GHz dual-core processor is ideal, and will allow you to get away with a lesser graphics card. If the processor doesn’t hit the mark, then make sure your graphics chipset supports hardware-accelerated video decoding. All Nvidia cards from GeForce 8 onwards will do the job, as will AMD Radeon R700 (HD4000) and Intel GMA X4500HD. You should also look to pack your server with 4GB RAM if possible, and if you plan to shut down your server rather than leaving it on 24-7, consider investing in SSD boot media, or a fast SD card or USB flash drive – 32GB should cover your needs. That’s obviously not

Once your media is in place, you can browse it direct from the Emby web interface.

enough space to store your media on, so store this separately: internally via a separate HDD drive, or externally via USB or NAS. If your server can’t be directly connected to your router, then use 500Mbps or faster HomePlugs to ensure that maximum transfer speeds can be delivered between the two, particularly for HD content.

Choose your media server There are many media servers to choose from – in the past we’ve focussed on Kodi, but its main weakness is that its server capabilities are rudimentary. The most obvious alternative for those looking for a slick, attractive user experience across a wide range of devices is Plex ( – it works well, but its main issue is that large portions of it are proprietary. Thankfully, Plex has a rival that offers a similar experience but is open source. That rival is Emby (,

which was formerly known as Media Browser (see what they’ve done there?). Emby offers the same polished user experience as Plex and is accessible across a wide range of platforms. It even has certain advantages over its rival: support for live TV, plus the ability to set up different users, allowing members of your family and friends to set up their own customised access to your library. Like Plex it offers a paid-for subscription option offering extra features, but its pricing is more competitive. We’ll be focussing on the free features here, but will touch on what advantages a subscription can bring later on. Unlike XBMC, there are no dedicated Emby distros yet available, so you’ll need to install it over your choice of Linux distro. For the purposes of this feature, we’re going with Ubuntu 14.04.3 LTS – it’s the most stable and supported distro for Emby users.

Raspberry Pi media server The quad-core Raspberry Pi 2 is powerful enough to run a decent media server – albeit with some restrictions, chiefly that it’s not powerful enough to transcode between formats, so it will work best if your media is in a format compatible with the devices you plan to run it on. In most cases, using MP4 video with H.264/ MP3 codecs plus MP3 music files will fit the bill. The Pi 2 can perform limited transcoding when prepping a file for streaming, meaning that you should be able to access your media even outside your local network, but expect

significant delays – over a minute – while the transcoding takes place. You’ll also notice some lags when accessing the server, but it’s not too bad; we’ve happily run a Pi 2 Plex media server for six months with few issues. If you’d like to go down this route, then see TechRadar’s guide at pimediaserver, which explains all you need to set up the server using a customised Minibian image by HTPC Guides ( This is probably the simplest way to get a feature-rich media server using the Pi 2, and

Plex is a better supported solution than Emby, but if you’re taken with Emby then it is possible, albeit a lot more complicated. There’s a how-to guide to using it alongside the OSMC distro at, which has the bonus of providing you with a media centre as well as server, but the author concedes that many of its features – such as streaming and integration into Kodi – are untested, so there may be issues. Several people have reported success with Emby using Arch Linux – one guide is here:

November 2015 LXF204     33

Media server

Set up and configuration Let’s get Emby installed and your media libraries set up.


efore you begin, make sure you’ve allocated your server a static IP address. This gives you the same IP address each time you access your server via a web browser or SSH. To do this in Ubuntu, open System Settings and select Network. If you’re connected via Ethernet cable, select Wired, click Options and set a static address via the IPv4 Settings tab. Next, visit downloads/linux-server for distro-specific installation instructions. During installation you’ll be asked to confirm the creation of a user called emby – if necessary, grant this user read/write access to your media folders. Once this is done, Emby will start running. Once Emby’s in place, it’s time to review how your media files are organised. You can store your media anywhere you like – so long as the drive is accessible to your media server and mounts automatically at startup. Go to (and see p33 if you need help with this step). Emby searches the internet for artwork and information about movies, TV shows and music. For accurate matches, files must be named and structured correctly. Start by creating separate folders for your media: Music, Movies, TV, Photos, Music Video and so on. Next, use the naming conventions in the table (although if you’ve named files for rival media servers like Kodi or Plex, they should work fine here too). If you want to speed up file renaming, then take a look at Filebot. Ubuntu users can install a native version for $9.95 through the Software Centre; otherwise you’ll need to install Java 8 (use the ppa:webupd8team/java repos if JRE 8 is missing from the Ubuntu Software Center) and then download and install the appropriate Deb package from www.filebot. net. To launch it for the first time, open a Terminal window, type filebot and hit Enter (subsequent launches can be done using the launcher shortcut). Start by setting your naming format to match Emby’s requirements: click ‘Match’ and select ‘Edit Format’. Verify that Episode Format is set to {n} - {s00e00} - {t} for TV shows, then click the button in the bottom left-hand corner of the window to switch to Movies. Change this to {n} ({y}) and click ‘Use Format’. Choose Match > Edit Format again, and click the button again to switch to Music. Verify it’s {artist} - {t} or change it to

34     LXF204 November 2015


Folder Structure





00. track name or track name

Music\a-ha\Cast In Steel\01. cast in steel.mp3



title (year)

Movies\star trek (2009).mkv

TV shows

TV\Show Title\ Season

tvshow – s01e01

TV\Silicon Valley\Season 2\silicon valley - s02e10.mkv

{t} if you’d prefer the file recorded just the title either is fine by Emby. Click ‘Use Format’ to end. Now click ‘Match’ again, but this time select one of the supplied databases according to the media you’re renaming – we recommend TheTVDB for TV and TheMovieDB for movies, and try AcoustID for unknown music files. You’ll see the suggested name for each file shown in the right-hand pane; if you’re happy, click ‘Rename’ to change the filenames.

Configure your media server With your media properly named and Emby installed and running, it’s time to introduce the two to each other. Open your browser and type localhost:8096 to access Emby’s web-based interface. Start by making your way through the setup wizard – it’s simple enough: choose your country, then set up your own personal account. Emby supports multiple users, allowing you to set parental controls while giving individuals access to their own user preferences. You’ll also be invited to set up an Emby Connect account – a must if you plan to access your media outside your local network. Next, set up your media libraries. Each library contains a specific type of content: music, movies, TV, other types of video or photo. The setup wizard allows you to add one library for now: click ‘Add media folder’ when prompted and choose content type – movies, music, TV, books, games, home videos, music videos, photos and a special mixed content option are all provided. Give your library a suitably descriptive name and click ‘OK’. Next, choose the folder inside which your content is stored – Emby allows you to add multiple folders to your library, but if you’ve followed our advice it’ll all be consolidated in a single location. Click ‘+1’ to browse and select it. Next you configure various metadata settings – this is the information and artwork Emby uses to help you identify your media. You can choose to save the information directly to your media folders or keep it all centralised on your server – choose whichever option works best for you and your server’s available storage.

You’ll next be prompted to set up live TV – we cover this overleaf – so click ‘Skip’ for now. Accept the T&Cs and your initial setup is done. Now get your Emby server up and running by following the step-by-step guide (see right). Return to the Server tab of the dashboard to monitor the adding of files to your media library via the Running Tasks section. When it’s complete – which could take hours if you’ve got a large media library – your media is ready to browse. Click the ‘Home’ link at the top of the screen to return to the main interface. The My Media section lists all your libraries as well as live TV options if you’ve set it up (see p36). Click a section to browse its contents. Click the headings at the top of the page to change views, including Collections, Genres and more. There’s also the standard Show or Movie view if you want to browse by title. Once you start watching shows, Emby will start lining up the next episode for you (look under Suggestions). Select an episode, movie or music track, and Emby provides artwork plus a wealth of information about that item. Not only does it look great, it also helps you identify what you’re about to watch. Take the time to properly explore Emby’s web-based interface – you’ll find useful shortcuts and options galore, such as the ability to edit the information and artwork stored for each show. For more tips on doing more with your media server, turn the page.

Need to rename a batch of media files to a format that Emby can recognise? There’s no need to do it the hard, labour-intensive way, manually – you need Filebot.

Media server

Manage your media library with Emby


Tweak user settings


The Users section of the Emby dashboard is where you manage user profiles – including your own. If you plan to share your server with other users (see p37 for more details), start by password-protecting your own user account from here: to do so, click your user profile badge and click ‘Edit this user’s profile…’ followed by Profile (you can also upload a photo of yourself if you wish).


Edit libraries


Click the ‘+’ sign next to an existing library to make changes to it: add more folders, change its media type, rename it or even remove it completely. Switch to the Path Substitution tab if your media is stored on auto-mounted network drives and you want clients to direct play it rather than force the server to transcode – configure it to point directly to the file on your network.


Set up playback

Configure metadata

Next, select ‘Metadata’ in the left-hand pane. Switch to the Services tab to see what online scrapers Emby employs. In most cases these can be left alone. Next, switch to the Subtitles tab if you want to download subtitles for movies and TV shows (either for hearingimpaired users or to provide subtitles for different languages). Use the Advanced tab for downloading extra info.


The Playback section contains useful settings for optimising how your server performs. Cinema Mode allows you to play trailers for supported shows and movies, while the Streaming tab allows you to set a bitrate limit for clients – most useful for slower connections. Finally, select ‘Transcoding’ if you’ve got a low-powered PC and   can’t afford to dedicate all of its resources to streaming.

Add more libraries

Switch to Libraries in the dashboard and click ‘Add media folder’ to add other media to your collection. The process is identical to the one you encountered during the setup wizard: choose type and name, select a folder (or folders), then save your library and create more as needed. Emby will start scanning for content based on your chosen criteria – this can take some time with large libraries.

Set up auto-organise

Simplify adding new TV episode files to your library by switching on Auto-Organise from its own section in the dashboard. Switch to the TV tab and tick ‘Enable new episode organisation’. Pick a folder into which all new TV episodes will be dropped and tweak the ‘Episode file pattern’ to match your current naming convention. Other settings are self-explanatory. Click ‘Save’ when done.

November 2015 LXF204     35

Media server

Do more with your media With the basics in place, discover what else Emby can do for you.


hile one of the key reasons for setting up a media server is to have on-demand access to your personal media collection, don’t stop now. Emby is packed with useful tools and features that can make your media server an even better experience. Imagine being able to watch live or recorded TV from wherever you are. If you have a compatible TV tuner and back-end installed, then you can integrate into Emby, enabling you to watch television as well as access your media through your media server.

Watch and record live TV Emby’s Live TV supports one type of tuner natively, HDHomeRun, so if you’re in the market for a new TV tuner, first visit to learn more. Alternatively, Emby supports third-party Live

TV solutions via plugins, so if you’ve already got TV set up – either on your main media server box or elsewhere on your network – then you may be able to integrate the two together. Most supported plug-ins are for Windows solutions, but one Linux option has been implemented in the form of TVheadend, and more will follow – eg expect to see MythTV supported in the not-too-distant future. At the time of writing Emby supports an older release of TVheadend (3.4), but check to see if the newer (4.x) branch is supported before setting up your TVheadend server for the first time. Full instructions for adding TVheadend to your media server can be found in the Download section at First, verify which version of TVheadend (4.x or 3.x) the plug-in supports, and add the relevant stable repos. Once this is done, install TVheadend by typing sudo apt-get install tvheadend and hitting Enter.

You’ll be prompted to enter a username and password – any will do. Once installation completes, open your browser and go to localhost:9981. Log in, then switch to the Configuration tab and select DVB Inputs underneath it. Your USB TV stick should be listed here, so select it and click ‘Add DVB Network by location…’ Select your country and transmitter (if you’re in the UK, use maps/freeview to identify yours on a map, if necessary) and click ‘Add DVB network’. Now untick ‘Autodetect muxes’ and tick ‘Enabled’ under ‘Adapter configuration’. Click ‘Save’, and the initial scan will start – you can keep an eye on it under Information and capabilities or switch to the Services tab to review which channels have been found. Once complete, click ‘Map DVB services to channels…’. You can monitor the mapping from the Services tab by keeping an eye on the Channel Name column. When it’s complete, you should technically have access. The easiest way to test if your tuner is working is to install Kodi (see p38) followed by the TVheadend PVR plugin, then see if you can watch TV through that. Once verified, follow the step-by-step guide to set up the required Emby plugin. Look for the green tick next to External Services, which should indicate that the plugin is configured correctly. Open the slide-out menu and then select Live TV. Explore the various sections to verify that you’ve got access from your tuner. If you run into trouble, check out the Live TV section of the Emby forums (http://emby. media/community) for additional help.

Manage metadata Fill in missing or incorrect metadata with Emby’s comprehensive Metadata Manager tool.

Emby should – in most cases – have no problems identifying your music, TV shows or movies. You may occasionally come across a

Access away from home You don’t need to be connected to your local network to access your Emby hosted media – you can configure Emby to allow you to stream over the internet too, so you can enjoy your media just about anywhere you can get an internet connection. It pays to have a fast connection at home, ideally fibre-optic with a minimum 5Mbps upload speed – and don’t forget that streaming will quickly burn through any capped broadband allowance. If your router has UPnP switched on then Emby should work over the internet with no

36     LXF204 November 2015

additional configuration; otherwise, you’ll need to manually configure port forwarding and make sure you’ve assigned a static IP address to your server PC. The settings you need to look at – and tweak – can be found under Advanced > Hosting in the Manage Server section of Emby. There are two ways to access your server remotely. First, you can do it manually by inputting your server’s public IP address (the one assigned to you by your ISP). This can change, though, so if you have a dynamic DNS host set up with the likes of, then

enter that into the ‘External WAN Address’ field under Advanced > Hosting, which gives you the ability to remotely configure your server via The second method is easier: simply sign up for a free Emby Connect account at http://app. Once you’ve done this, just log into your Emby Connect account through your device’s app and you can access your media on the road. Better still, if you log in at http://app. through a web browser then you can administer your server remotely, too.

Media server

glitch, or you may have other media – such as home movies, photos or even music video – that Emby doesn’t recognise or can’t process. This is where the Metadata Manager comes in – access it from Admin section of the slide-out Emby menu. The Metadata Manager lets you browse your media by folder – expand it to reveal toplevel information like TV show, movie or music artist. Click this to edit that information. You can manually enter data or click Identify to search the relevant database to see if the application can find a correct match. Click ‘Save’ to enable your choices, or ‘Refresh’ to try to download missing data – an ‘Advanced’ option lets you control how metadata and images are updated. You’ll also see an Images section where you can manage existing images or upload your own. You can wield the same level of control on music albums and tracks as well as individual episodes for TV shows, too – just click the > next to a name to drill down to the next level. And where metadata isn’t available for downloading from the internet – music videos are a typical case in point – Emby still tries to be helpful, providing appropriate fields for you to fill in depending on the type of media you picked for that section.

Set up multi-user access One of Emby’s great strengths is that it allows you to give everyone their own customised level of access to the server. This is administered from the Users section under Manage Server. Click ‘+’ next to users and first enter your user’s name. Untick ‘Enable access to all libraries’ if you want to give them limited access to your media, and click ‘Save’. Once a user is set up, use the Profile tab to link them to an Emby Connected account, if

Want to share your server with younger family members? Configure multi-user access.

necessary, as well as restrict what control and access they have to various parts of your server. The Access tab enables you not only to restrict access by library, but also to limit their access to specific devices. Parental Control lets you set a maximum age rating such as GB-PG for that user, plus block unrated content by type (and tags). Click ‘Access Schedule’ and you can limit their access by day and time too. Finally, Password allows them to protect their account with a password. Once set up, users can log into Emby through the web or on a supported device and get a customised view of your server’s content. If they click their user photo and choose ‘Settings’ they can then tweak personal preferences such as what the home screen displays, playback settings and more. It’s a great way to give everyone in your home their own access to your server. You can also go further and set up special guest access too, emailing an invitation to other users with

Emby Connect accounts and giving them access to one or more of your libraries.

Headless access If you plan to put your server away in a corner somewhere, it also pays to configure it for headless access using SSH. This enables you to securely access and control it via the command line from another PC or device on your network using a suitable app or program (eg one such as Putty on Windows or Serverauditor on an iPad). The recommended server is OpenSSH (, but Ubuntu users should visit community/SSH for a guide to installing and configuring it. If you’d prefer access to the desktop, then configure access via VNC – install the VNC Server ( sudo apt-get install x11vnc ) on your server, then access it via a suitable VNC client (eg Remmina is included with Ubuntu 14.04.3).

Configure live TV support in Emby


Set up TV server

Unless you have an HDHomeRun TV tuner, you’ll need to first install a supported third-party TV package. At time of writing is the only major Linux server that’s supported, so follow the main text to install and configure it alongside Emby. To test that it’s working, install Kodi and enable the TVheadend PVR plugin.


Add plugin

Open a browser and go to localhost:8096 to access Emby’s interface. In the slide-out menu click ‘Manage Server’. Select Live TV in the left-hand pane, switch to the External Services tab, click the plugin you wish to add (Tvheadend here), then Install. Restart the server when prompted – you may have to return manually to the External Services tab.


Configure plugin

The plugin should appear under ‘Installed Services’. Click the vertical three dots next to its name, select ‘Settings’ and enter the info required – you may need to get this via your TV’s back-end. With TVheadend, you’ll need the username and password you set up. Save and switch back to the Tuners tab. You should see your tuner and the plugin listed.

November 2015 LXF204     37

Media server

Watch on your other devices With your media server set up, enjoy your media on many devices.


nce Emby is up and running, as we’ve seen, you can access your media through a web browser on any computer: type 192.168.x.y:8096 into the browser (replacing 192.168.x.y with your server’s IP address), then log in to access your server remotely. The web interface is more for managing than viewing your media, though, so what other options are there, and how do you access your media on other devices?

Desktops and laptops Windows users can install Emby Theater ( – as its name implies, it’s a front-end optimised for Emby servers, and by far the best way to experience Emby on Windows. An alternative on other platforms – including Macs – is to install Kodi and add the Emby for Kodi add-on (see below). You could even set up a dedicated media centre by pairing the OpenElec (http://openelec. tv) distro with the Emby for Kodi add-on. Emby also fully supports the DLNA protocol, so any DLNA-compatible media player or distro can access your library, albeit without the fancy posters and extra metadata.

Raspberry Pi Any model of Raspberry Pi makes a great under-the-TV media player, although the more powerful and recent Pi 2 is really

recommended. For best results, pair it with OSMC (, a Kodi-based distro that supports the Kodi for Emby add-on too. Browse to to download the device installer tool, which will create bootable media for you to install it on your Pi – in order to create this, you’ll need a class 10 8GB SD card, plus an SD card reader on your PC.

Android phones and tablets You’ll find a wide range of UPnP-compatible media players for Android, but the obvious choice is the official Emby app. It’s polished, and it works with MB Connect, which gives you access to your media server even when you’re out and about. The official app is free to Emby Supporters (see http;// and £3.53 for everyone else, although you can trial it before you buy. Alternatively, if your phone or tablet has enough grunt, then you can also get the functionality for free by installing the full Kodi app for free from the Google Play store. Once you’ve done this, follow our step-by-step guide below to adding the required repository to Kodi on your Android device, enabling you to add the Emby add-on. Another option is to take your media with you – the VidOn Player HD app is free, plays a wide range of media and even allows you to download content from your Emby server to your mobile for watching offline while you’re

away. Downside? The current version doesn’t work with Android Lollipop 5.1 or later.

Windows Phone Not only does Emby provide a dedicated app for Windows Phone users (search for ‘Emby’ in your Store), it’s the only phone app that’s currently free for all users. There’s a Windows 8.1/10 Store app available for tablets too, but that costs £3.89.

Apple iPhone and iPad At time of writing, the Emby iOS app is ‘almost finished’ – when it’s released, expect to pay around £3-£4 for it. In the meantime, an unofficial MediaBrowser app offers a similarly slick experience, at a cost of £2.99. If you don’t want to pay for access, you could connect through the Safari web browser using localhost:8096 at home or when out use Or – if you’re happy with a less polished (but still detailed) interface, then install the free VLC for iOS app instead. Open the main menu and select Local Network – after a short pause, Emby should appear as an option under Universal Plug ‘n’ Play, allowing you to browse and access your media.

Apple TV Previously you needed a jailbroken Apple TV to run a media player capable of playing UPnP streams like those offered by Emby. The newly announced Apple TV 4, however, will come with

Access your Emby server through Kodi


Install Emby add-on

In a browser, go to downloads/emby-for-kodi and click the ‘repository’ link to save the ZIP file to your drive. Now open Kodi, navigate to System > Settings > Add-ons > ‘Install from zip file’ to locate the Emby repos. Select it and choose ‘Install from repository’ > Kodi Emby AddOns > Video add-ons > Emby to install the add-on.

38     LXF204 November 2015


Configure add-on

Click Install. When it’s done, Emby will try to detect your server – if you wish, tap ‘Yes’ and select your user. Choose whether or not to enable music, and tap ‘Yes’ to enable direct streaming for access away from home. Enter your password. Once done, click the add-on and choose ‘Configure’ to fine-tune settings – Sync Options is a good place to start.


Add skin

While the add-on syncs your library, tap ‘OK’ followed by the ‘Home’ button. Browse your Emby libraries via the Video or Music Add-ons menu – tap ‘Emby’ to browse and access your media. Don’t like the look? Go back to Add-ons > Install from repository > Kodi Emby Addons > Skin and try the Arctic Zephyr: Exploded skin.

Media server

Set-top boxes There’s a dedicated Emby app for Roku settop boxes, and if you’ve purchased a £10 or £15 NowTV box you can sideload the app via Developer Mode. (See the step-by-step guide below, which explains how). Dedicated Emby apps for both Android TV and Amazon Fire TV stick have also recently been released – you can download a free trial through the relevant store, and then the full app costs £3.95 as a one-off purchase or is free for Emby Supporters.

Google Chromecast

LVM snapshot of your system first, though, just in case things go awry.

Chromecast supports only WebM and MP4/ H264 video, so it’s likely your server will be doing some heavy transcoding to route media through it. Nevertheless, support for Chromecast is built in to the iOS and Android apps, while if you install the Google Cast extension in Chrome or Chromium on your server (or other PC) you can then cast the tab containing your media to your Chromecast for watching on the big screen.

Smart TVs / Blu-ray Players

Games consoles

Most Smart TVs and Blu-ray players offer some means of watching streaming media from a DLNA/UPnP server like Emby’s – format support may be an issue, but if your server is powerful enough to transcode, it shouldn’t be insurmountable. Try to make sure your media is encoded using the x264/H.264 codec, wrapped in an MP4 file with MP3 audio and you should be fine. If you’ve a Samsung TV with the Smart Hub D series (2011 or later), then you’ll find a community-built Emby app is available: go to, select ‘Samsung Smart TV’, then click the link for instructions on obtaining and installing the app.

There’s a dedicated plugin for the Xbox 360, which you can add to Windows Media Center via the download page. Things are trickier with Xbox One, but the upcoming release of a Windows 10-powered dashboard should see an Emby app appear sooner rather than later – for the latest updates, check the Emby forums. The Playstation 3 can access Emby using its DLNA server (make sure you enable DLNA on the PS3 via Settings > Network Settings > Media Center), while PS4 users should make sure they’ve got the latest firmware installed. LXF

If your device supports it, then the official Emby app offers the best experience.

an app store and Emby is likely to be developed for it at some point. In the meantime, you can stream content to your Apple TV via AirPlay, but that requires using your iPad or iPhone as an intermediary. If you’re using Android, you can still stream to Apple TV: VidOn Player HD supports AirPlay via Settings > AirPlay. Choose ‘Compatibility Mode’ for best results.

Stream music over Airplay Speaking of which, do you want to stream music direct from your server to AirPlayenabled speakers without having to use your mobile? Visit and you’ll find a guide to installing and configuring Pulseaudio-raop2, an experimental fork of PulseAudio that supports newer AirPlay enabled devices. It’s a lengthy process, but the result is worth it – we recommend taking an

Access your Emby media through a NowTV box


Access Developer mode

On your NowTV remote, press the Home key three times, then up twice, then right, left, right, left and finally right again. You’ll see a screen like the above. Select ‘Enable installer and restart’, read the T&Cs, click ‘I agree’, then select ‘Enable installer and restart’ again. After rebooting, choose a password to prevent unauthorised access to your box.


Download and install

Open a browser window and enter your NowTV box’s IP address. Enter ‘rokudev’ as the username and your password to log on. Now open a separate tab, browse to http://, click the link > ‘Raw’ and save it to your Downloads folder. Switch back to the original tab, click ‘Browse’, select the ZIP file and click Install.


Enjoy your media

When done, click ‘Next‘ on your Now TV box. Make a note of the PIN, switch back to your browser, go to and enter this, and your Emby Connect username and password, then click ‘Submit’. Once the PIN is confirmed you’ll be able to browse and access your Emby hosted media direct from your Now TV box – all for free.

November 2015 LXF204     39

Alexis Rossi

Internet Archivist

Jonni Bidwell interviews digital librarian par-excellence, Alexis Rossi director of the Internet Archive. 40     LXF204 November 2015

Alexis Rossi

was much easier to dump hundreds of gigabytes onto – they even provide torrent files, so we link to those from our own archive and everything works seamlessly. Someone even set up a dedicated collection for us. So we’re very grateful for all of that. AR: Great, are you using the S3-like API that we have?

on internet archive’s growth

“We’ve expanded, so we have about 425 billion things in the Wayback Machine.” decided to switch from book publishing to Internet publishing and I worked for, I think the first official news aggregator on the web, ClariNet. They don’t exist anymore, but they were founded in 1989 so when I started there in 1996 they were still publishing news in newsgroups, but very quickly thereafter started publishing on the web. So I guess I got sucked into technology because of my love for being able to communicate and share. LXF: What do you do at the Internet Archive? AR: I’m a director there and basically what I do is I’m in charge of all the digital media in the archive, whether it’s stuff from the Wayback Machine or movies or whatever. I’m also in charge of access projects. We just recently finished redoing the website, we’re still working on some improvements for that, but everything switched over big time around May. That’s been about a year and a half in the makings. I also do a lot of speaking to people about the Archive in particular. I’ve been working with them off and on since 2000 – a long time.

Alexis Rossi is a director at the Internet Archive, dubbed the Library of Alexandria 2.0, but which she jocosely describes as the biggest website no one’s ever heard of. We caught up with her to talk about big data, APIs, clay figures and to confess that we’ve been using the Archive to store our DVD images.


Linux Format: Tell us what led you to starting work at the Internet Archive? Alexis Rossi: When I was in college I wanted to be a book editor; I used to edit cookbooks and event guides and things like that. I used to work for a non-fiction publisher. I kind of fell in love with the Internet in 1994 – just the idea of being able to find other people who were interested in the same things as I was, because I came from a pretty small place, being able to communicate with friends who’d moved halfway round the world and not having to pay money for it. So I

LXF: Tell me a bit about the Internet Archive. How long has it been archiving the internet? AR: Sure. The IA was estabilshed in 1996 and we started out by archiving the Internet. We are a non-profit digital library, and we are recognised as a library by the state of California. The first service we came out with was the Wayback Machine in 2001. In 2002 we started hosting music and some videos as well. Since then we’ve really expanded, so we have about 425 billion things in the Wayback Machine. LXF: Yikes. AR: Yikes indeed: We have about 8 million texts, about 2 million movies, 2.5 million audio items and we archive about 60 channels of television 24 hours a day. We also archive software, that’s one of the things a lot of people know us for these days.

LXF: No, I just push the big friendly upload button. Tell me of this API. AR: We have a bunch of APIs available at where you’ll see pointers to a lot of different things. One of those things is an upload API that is very similar to Amazon’s S3, so anyone who’s ever used S3 will be able to use this right out of the box. It’s really good for bulk uploading. You can also use it to get data out, but it’s more designed for the other direction. So if you have large collections of things we can create a collection for you so you have your own place in the archive. Then you can upload as much stuff as you want into it. Hopefully in about a year or so you’ll be able to create your own collections, but right now we do it. We provide a lot of guidance around metadata – it’s kind of pointless to put things in the archive without metadata because then nobody else can find them. LXF: What are some interesting ways that people are using some of the new Internet Archive APIs? AR: My favourite one is called the RECAP archive, which allows people access to PACER documents (PACER is a paywall controlled system for accessing federal court records in the US). The RECAP software was developed jointly at Princeton and Harvard. What the RECAP people did was make a browser plugin for people who are paying for PACER records to automatically upload them to the Internet

LXF: Ha, ha. Our magazine has started piggy-backing off that a wee bit. AR: Really, how so? LXF: We used to seed torrents of our cover disc images on our own server, but disk space started to become limiting factor. It

Long-serving Archive members are honoured with a three-foot ceramic statue by sculptor Nuala Creed. Image credit: Jason Scott (CC BY 2.0)

November 2015 LXF204     41

Tutorial Xxxx Learn how to donate your CPU’s BOINC

unused power to scientific projects

BOINC: Power science projects

Alex Campbell covers how to use your PC’s spare CPU and GPU resources to do things like looking for little green men and finding a cure for cancer.

it on a server that doesn’t need X (such as the ubiquitous Raspberry Pi). You’ll also want to check in with how much power you’re willing to use, and how much your electricity is costing you. You can limit BOINC’s CPU (and GPU) usage, and schedule when it runs. You can set this from within the BOINC project website (, or you will find that if you’ve got a high-end CPU powering your Linux box, power consumption and cooling will become an issue. Finally, some projects have more demanding requirements than BOINC itself does. Some may require OpenGL-capable video processing or other software.

Our expert Alex Campbell

is a tech journalist who spent much of his childhood learning to build PCs and breaking things. He still loves learning new things about Linux, and he’s still breaking things a lot.

BOINC on Linux


ne of the great things about Linux is the fact that people contribute their time, passion and money to different projects. That’s what makes free and opensource software so strong. The spirit of contribution to causes bigger than yourself is at the heart of Linux and free software. Unfortunately, not everyone can donate to software projects with money and not everyone can code, while others have different projects they’d like to donate their resources to. Luckily, those with philanthropic tendencies can donate something while doing absolutely nothing. Well, almost. The Berkeley Open Infrastructure for Network Computing (BOINC) is a piece of software that enables users to donate their CPU and GPU power to projects, such as the Search for Extraterrestrial Intelligence (SETI). We’ll walk you through the steps so you too can help answer the biggest questions in science while you sleep. Yes, really. For this tutorial, we’re going to be using Ubuntu GNOME 14.04. BOINC is available in the Ubuntu repository so there’s no need to add a PPA. BOINC’s graphical user interface runs on GTK 2, so if you’re running a pure KDE setup, you’ll have to grab the GTK libraries. You can use BOINC without a GUI, if you want to run

76     LXF204 November 2015

The first thing to do is grab the two BOINC packages from Ubuntu’s repo. Simply type in sudo apt-get install boincclient boinc-manager . From there, Ubuntu will grab the dependencies and install the client and GUI. Easy peasy. If for some reason you can’t or don’t want to go the package manager route, you can download a shell script from the website ( that will install BOINC for you. The project does state the script installer can’t use Linux’s built-in security features, uses more memory, and can’t install BOINC as a daemon. Basically, unless you have a really good reason to do otherwise, just use your package manager. To start the BOINC manager, just hit the Super key and search for ‘boinc’. If you need to start from the command line, simply use the command boincmgr . This will generate a

BOINC’s advanced configuration options enable you to define the schedule and resource allocation.

BOINC Tutorial

Brilliant BOINC projects While the Berkeley Space Sciences Laboratory’s SETI@home is the most famous BOINC project, there are other many great projects as well: CERN’s ATLAS@home This project calculates the data from the ATLAS experiment at the Large Hadron Collider in Geneva.

University of Washington’s Rosetta@ home This project computes protein geometry

to fight such crippling diseases as HIV, cancer and malaria. The University of Oxford runs the www. project that computes global climate models. By adjusting BOINC’s settings, you won’t have to choose between one project or another, either. BOINC can switch between projects at

pop-up window prompting you to add a new project or use the account manager. The quick route is to use the ‘Add Project’ option. If you choose this road, the next screen will prompt you to choose a project to work on. Once you choose a project, BOINC will talk to the project server to see what to do next. Some projects will show a terms of use screen, listing requirements or other information. When we tried adding the ATLAS experiment from the Large Hadron Collider (ATLAS@home), the terms of use warned us that we needed VirtualBox to participate. If you agree to terms of use, or the project doesn’t present any, you’ll see a login screen for the project. Each project requires its own login and password. Once you enter your credentials, BOINC will download some data and get to work. It can get tedious adding each project manually. Using an account manager, you can use a single login when you start BOINC, and keep track of progress on different projects. To choose an account manager, simply click one of the options on the dialog or enter a URL. BOINC ships with two account manager sites, BAM! (BOINC Account Manager) and GridRepublic. You can visit either of the URLs in a browser to see what service strikes your fancy. For this example, we’ll continue on with BAM!

BOINC? BAM! Much like the individual projects, BAM! requires you to log in with a username and password. To create a username and password, visit the BAM! website and create an account. All the website needs is a username, email address and password. Make sure it’s a legitimate email address, because you will need to activate your account with a URL sent in the email. Once you’ve logged into the website with your account credentials, use the website to add projects by clicking ‘Signup for projects’ and then clicking the paperclip icon to the right of the project name that you want to join. You can choose as many or few projects as you’d like. But just know that there’s a gotcha when it comes to adding projects: If you add a project manually through the BOINC manager, your progress and login details then won’t be available to your account manager. Once you’re all done, you can log into BAM! from within BOINC. You can also use what BOINC calls a ‘weak authenticator’, which can be used in lieu of a username. If you use a weak authenticator, you just need to supply a short random string as a password. This allows other computers or people to compute on your account’s behalf without needing your password. Be careful if you change your BAM! password,

regular intervals, ensuring that each project gets its own labour and love. Any researcher who needs a lot of computing power to solve a problem can create a BOINC server and host a project for relatively little cost. However, there is some LAMP stack and XML know-how required to set up a server and host a project (

though; the weak authenticator changes when the password does. Once you’ve got BOINC connected to your BAM! account, open up the BAM! web page again. You need to attach a machine to a project BAM! to give it work. To do that, click ‘My projects’ in the left column on the BAM! website. Next, click the computer icon under the ‘Show hosts’ column. From there, select the PC you want to use for the project and check ‘attach’. You can also set the project to exclude use of the GPU if you like. Once you’ve done that, go back to the BOINC manager again. Click the ‘Synchronise’ button and BOINC will start work according to your preferences, which you’ll set next.

Automating awesome Setting your preferences in BOINC is pretty simple, yet powerful. In the BOINC manager, open up the advanced view by clicking View > Advanced View. From there, select Tools > Computing Preferences. The Computing Preferences dialog lets you set CPU, GPU, network, disk and memory usage. It also enables you to set a work schedule, and determine how soon after the computer is idle (you stop giving input) it will begin working. You can also set these values on a project’s website or on your account manager’s website. Any setting set in BOINC will override the settings pulled from the internet. Once you’ve set your PC’s new work schedule your involvement is over; your PC will do science while you’re away. You probably won’t get a Nobel Prize for donating your PC’s resources, but you can certainly feel good about keeping the box on all night. LXF

BAM!’s web interface enables you to set options for many different machines or projects from one centralised control panel.

We’re #1 for Linux! Subscribe and save at

November 2015 LXF204    77

Tutorial Xxxx Crouton Get the full Linux experience

running on your new shiny Chromebook

Crouton: Linux on a Chromebook Looking for something clever to do with your fancy new Chromebook?   Neil Mohr takes the latest Asus Flip through a Linux overhaul.


Our expert Neil Mohr

has been scaring T3 magazine all week by running Linux terminals on his Chromebook and telling them the darkness is coming to consume all of their MacBooks – that lot will believe anything.

Quick tip You can switch between Chrome OS and Ubuntu on ARM by using: Ctrl+Alt+Shift+ Back and Ctrl+Alt+ Shift+Forward (on x86-based Chromebooks, the keyboard shortcuts are: Ctrl+Alt+Back or Ctrl+Alt+ Forward and then also press Ctrl+Alt+ Refresh).

e’ve seen a lot of Chromebooks in the pages of Linux Format recently and as much as we appreciate the Linux-powered Chrome OS, we often want something with more software power like a fully-featured Linux distribution (distro). If you’re considering buying a new Chromebook then consider this: you can easily run Ubuntu on top of Chrome OS within a virtual chroot through the Crouton system. We covered this back in LXF185 [Tutorials, p50] and being honest not much has changed, but we’re going through the latest revision that runs Ubuntu 14.04 (rather than the ageing 12.04 LTS) and we’ll take a look at how you can run this off any available SD card (or USB stick) – so no internal storage is lost – while also looking at dualboot options for running Arch. So who said Chromebooks were limited? They don’t sound too limited with this many GNU/Linux install options available, do they? For this install we’re using the new Asus Flip C100P. It’s interesting as it uses an ARM Rockchip SoC, has a touchscreen and retails for around £250 for the version with 4GB of memory, which means it’s perfectly qualified to run a full distro. We’ve chosen this model as the ARM element can cause issues, which we’ll cover in the Arch boxout (see p83), but otherwise for crouton it’s a solid choice. Most Chromebooks tend to opt for the vanilla Intel Celeron processor of the day, currently that’s the Intel Celeron 3205U. It’s a safe bet with good processing power, reasonable battery life, the tested and stable Intel architecture, plus the knowledge all that x86-64 software will work and be available for you. So choosing an ARM-based Chromebook would be madness, right? Wrong! Let’s quickly see why…

Using the Chrome OS extension enables you to run Linux in a window, just the way God intended.

82     LXF204 November 2015

First off Ubuntu and Debian have ARM builds. There’s not quite as much available in the repositories (repos), but you’ll find most big-name programs waiting for you and all the usual tools are available. It’s true the ARM processor isn’t as powerful, our tests in the Chromebook Roundup [see Roundup, p24, LXF202] showed the ARM Asus Flip was about half the speed of the Intel Celeron Acer Chromebook 15, but how much speed do you really need? The major issue for these ARM SoC is that the open source drivers can be terrible, especially lacking 3D acceleration. As we discovered with the Arch build, it’s simply next to impossible to get a desktop environment up and running at the moment with the supplied drivers. Even long-time Arch user and fan-boy Jonni had no luck getting even a basic startx working on it, never mind. Running through Crouton is a different story but there are still limiting issues as you’ll discover. Certainly if you want the best hardware support opting for an Intel Chromebook is the most sensible move, however through Crouton we had Ubuntu 14.04 Xfce up and running with touch support without issue. Happy Days!

Crunching croutons Before we start we’ll want to enable Developer mode, which if you don’t already have on, will wipe everything off your Chromebook. So back up everything or be happy to have a forcibly cleaned system. To begin, power off your Chromebook, press and hold the Esc and Refresh keys on the top row of the keyboard, then tap the power button. This fires up a scary message, ignore it, and press Ctrl+d, then press Enter to allow it to wipe and reinstall Chrome OS – this takes about ten minutes. From now on you’ll need to press Ctrl+d to boot your Chromebook (it will self-boot after 30 seconds but who can wait that long), as we’ll see you can press Ctrl+u to boot off an external USB storage device. Once back into Chrome OS, download the Crouton script using: to your Download folder. Press Ctrl+Alt+t to open a basic terminal, use the shell command to switch to a full shell. Crouton normally stores chroots within the /usr/local folder, what we’ll do is create a symbolic link from this to a folder on the SD card, so we’re able to create the Crouton chroot as usual, but with everything stored on the external storage. We’re lucky that we have a 32GB microSD card, so we’re going to be installing any operating systems on to this, which’ll give us plenty of space to play with. Let’s change directory to where the chroot’s live with cd /usr/local then

Crouton Tutorial Through the Arch You’re able to run Arch Linux directly on a dualboot system, though currently driver issues prevent a graphical interface. Once Developer Mode is on dive into a shell and type sudo su then enable USB booting with: crossystem dev_boot_usb=1 dev_boot_signed_ only=0 Reboot and we can format, partition and install Arch onto the SD card. This works on USB drives too, just replace mmcblk1 with sda for the USB drive. We need to unmount, format, partition, download, extract, configure and boot Arch, like so. Use unmount mmcblk1 to unmount everything. To create a new GPT partition use fdisk /dev/mmcblk1 and type g and w to create and write the GPT table. To partition it use: cgpt create /dev/mmcblk1

cgpt add -i 1 -t kernel -b 8192 -s 32768 -l Kernel -S 1 -T 5 -P 10 /dev/mmcblk1 To add a root partition we need to calculate its size, use cgpt show /dev/mmcblk1 to list the devices size. Under the start column use the second to last figure (the larger one) and deduct 40960, use this in place of the XXXX: cgpt add -i 2 -t data -b 40960 -s XXXX -l Root / dev/mmcblk1 We need to refresh then format the new partition with: sfdisk -R /dev/mmcblk1 mkfs.ext4 /dev/mmcblk1p2 We’re now going to download and extract the Arch build, cd /tmp and download with wget (if you get a failed download or corrupt archive use the -c switch to resume) use mkdir root and mount /dev/mmcblk1p2

use lsblk to list the devices and partitions on your device. Look for sda1 on a USB stick/drive or mmcblk1p1 with a SD card and make a note of the name after the /media/ removable/ part. Create a new chroot folder with: $ sudo mkdir /media/removable/<NAME>/chroots Then create the symbolic link using: $ sudo ln -s /media/removable/<NAME>/chroots/ chroots You’re now ready to use Crouton to install Ubuntu to the new symbolic linked folder. We’re able to use Ubuntu Trusty Tar 14.04, but there’s no 3D acceleration so we need the Xfce interface and can take advantage of touch features on the Asus Flip. You can add encryption with a -e switch just after the sh but you might want to just test things out without it: $ sudo sh ~/Downloads/crouton -r trusty -t touch,xfce After downloading Ubuntu you’re able to enter the chroot and start it with these two commands: $ sudo enter-chroot $ startxfce4 Once in just log out to drop back to Chrome OS. You can flick between Ubuntu and Chrome OS using the shortcuts in the Quick Tip (left), we’ll also look at how you’re able to extend the chroot to run it in a Chrome OS window as well as switch between full screen and windowed mode. You’re able to delete the chroot with sudo delete-chroot <chrootname> the default name is the release name ie trusty. You’re able to get a list of available releases (different distros) and a list of available targets (desktops) using the commands below. One thing to keep in mind: with ARM devices like the Flip Unity 2D is only available under Ubuntu 12.04 as the SoC lacks EGL support. $ sh ~/Downloads/crouton -r list $ sh ~/Downloads/crouton -t help How do you keep Crouton and your chroot up to date? To check for updates, download the latest version, and see what’s new by running croutonversion -u -d -c from within the chroot (run croutonversion -h to see what those parameters actually do). Exit out of the chroot and run sudo sh ~/Downloads/crouton -u -n <chrootname> to update all the installed targets.

root then extract the archive with: tar -xf ArchLinuxARM-veyron-latest.tar.gz -C root Finally we’ll flash this to the partition, unmount and reboot using: dd if=root/boot/vmlinux.kpart of=/dev/ mmcblk1p1 umount root sync Reboot and use Ctrl+u to boot off the SD card. Log in as root, password root and use wifi-menu to get online. So that you have a base installation of Arch Linux, run an update using pacman -Syu but currently you’re unable to get a graphical desktop due to driver issues, which means that you will need to install both the driver and Mali EGL with pacman -S xf86-video-armsocrockchip veyron-libgl but from here you are on your own!

Find yourself using your chroot a lot? Then you might want to back it up, edit-chroot offers an easy backup and restore feature. It defaults to the ~/Download folder but using the -f switch enables you to add a path, like so: $ sudo edit-chroot -f /media/removable/<card name> -b <name of chroot> To restore just replace the -b with a -r switch. Finally, you can also add an extension to Chrome OS from here that enables shared clipboards and accelerated windowed use. Once added to Chrome OS itself, use this command to update your existing Trusty chroot with the extension and xiwi targets with: $ sudo sh ~/Downloads/crouton -r trusty -u -t extension,xiwi To then implement the shared clipboard get the Chromium browser installed in the chroot version of Ubuntu and use the same link above to add the same extension within it. Once that’s all done restart the Chromebook and you’ll find the chroot can be run within a Chrome OS window and utilises a shared clipboard. Handy! LXF

You may only be able to run Xfce but it makes us so happy and you get access to a whole world of Linux programs that aren’t on Chrome OS.

Get the best mag deals Subscribe now at

November 2015 LXF204    83

Get into Linux today!

Continue reading Start a free trial and get your first 2 issues Absolutely FREE!

2 sues


! E E R F

Download Linux Format and get your first 2 issues FREE Select your app store below...