Page 1

Go faster 12 Projects Get into quantum computing today!

Back up to the cloud, create flexible notes

FREE 4.7GB

DOWNLOAD

ready to boot

ubuntu 18.04 zorin os slax & more

The #1 open source mag

Full install and upgrade guide Customise the new desktop Get started in minutes!

Pi User run a fully blown atari st get started with the arduino

Thomas Sigdestad on using browsers as operating systems better websites

docker made easy

The best open source to build your next site

Containers make releasing and using software a snap!

enjoy windows apps on your pi


Welcome

Subscribe FREE GIFT & save! On digital and print – see p22

who we are This issue we asked our experts: Ubuntu 18.04 has arrived! Are you going to upgrade? Are you not? Tell the readers your thoughts – and show your working! Jonni Bidwell I risked my work machine’s health and my own continued productivity/sanity by installing the daily image we used on our disc. These are the sacrifices I’m willing to make to ensure you glorious readers have a smooth cover disc experience. I’ve been keeping the image up to date and actually really like the new Ubuntu. But I still prefer Arch…

Nick Peers Despite the name (Bionic Beaver? Really?), I shall be updating to Ubuntu 18.04. I’ll also be taking a fresh backup before doing so, because borked upgrades never end well and I’d prefer the security of a flawless roll-back option rather than having to unpick or reinstall from scratch.

Les Pounder Ubuntu 18.04 is out and will I be upgrading? Well, yes. My trusty Lenovo X220 has been rocking 16.04 since release and I’m ready to embrace the new. I’m most looking forward to the new-look Nautilus file manager because I spend so much time in there.

Mayank Sharma Since Neil hasn’t asked me to review it, I’m going to give this one a pass. The new desktop theme has been pushed to the autumn release, so it’ll just be more of the same on the desktop front.

Shashank Sharma I find more and more distributions pandering only to their existing user base. Sometimes, barely at that. I see no reason to crowd my Arch installation with Ubuntu 18.04. That said, should the need arise, I can always make room for another virtual machine. But it’s unlikely for said VM to last as long as the typical Ubuntu release cycle.

www.techradar.com/pro/linux

Paint the town orange I for one am genuinely excited by the latest release of Ubuntu. Canonical is no stranger to controversial decisions, but it feels recent moves – switching back to Gnome, abandoning convergence devices – have enabled it to focus on the core job of making Ubuntu as good as possible. Despite its comical Bionic Beaver codename, Ubuntu 18.04 will stand as the foundational basis for a plethora of Linux distros with support reaching out for five years. An untold number of servers will rely on its stability and support, while this release delivers the smallest footprint yet from its minimal install. On page 30 Linux Format’s own Bionic Bidwell will guide you through a smooth upgrade from older versions, a smooth install from scratch and a smooth guide around the all-important new features. In the background the kernel moves to 4.15 (so including the essential Spectre and Meltdown patches), the new Gnome desktop is now the default new look, Wayland is an experimental option and there’s a host of updated programs. The rest of 2018 will see all the Ubuntubased distro updated in turn: we’re expecting Linux Mint 19 to be the next big update and as you’d expect, we’ll be covering that in-depth when it happens. Of course, there’s a vast world of open source outside of the Ubuntu world and we’re covering as much of it as we possibly can in the rest of the issue. If you’re thinking of building a new PC, we test the new budget AMD Ryzen 3 2200G with its integrated graphics capable of 1080p gaming at a bargain price. Don’t miss our look at how you can try quantum computing now, from the comfort of your own home. We explore open source content management systems, create multiple Wordpress sites, explore container technology, run classic Atari St systems, sort out your tasks and loads more, so enjoy!

Neil Mohr Editor neil.mohr@futurenet.com

June 2018 LXF237     3


Newsdesk

This ISSUE: Google vs Oracle EU copyright reforms Symantec busted! Valve commits to Linux New Mintbox Nvidia kills 32-bit

Software APIs

Google vs Oracle: the struggle is real! Recent court ruling sides with Oracle, but there are far wider implications and we’ve not seen the last of this fight. he battle between Google and Oracle over whether Google used Oracle’s intellectual property when using Java to build the Android platform has added a new chapter to the sorry tale, with an appeals court recently siding with Oracle. If you’ve missed this back and forth over the past eight years, Oracle claims that Google’s Android operating system infringes on two patents that relate to its Java language, while Google maintains that it should have been able to use Java for free considering that the 11,500 lines of code that are claimed to have been copied are insignificant compared to the millions of lines of code that makes up Android. In 2012 a jury decided that Java isn’t protected under copyright law, but in 2014 an appeals court rejected that decision, suggesting that Google’s use of the API was in violation of copyright law. In 2016 a jury decided that Google’s use of Oracle’s APIs was protected by fair use, which Oracle appealed against, and which a judge has just ruled in Oracle’s favour. While this latest ruling looks like it could cost Google a lot of money, there are more worrying implications for people who aren’t too concerned about the search giant’s bank balance. Since the latest ruling, a number of people have shown their concern about what this means when it comes to using open source software when developing their own software. As CNN reports, Christopher Carani, a partner with McAndrews, Held & Malloy and a professor at Northwestern’s law school suggests that, “The

T

6     LXF237 June 2018

decision is going to create a significant shift in how software is developed worldwide… It really means that copyright in this context has teeth… Sometimes free is not really free.” Google wasn’t happy with the ruling and said in a statement emailed to The Register: “We are disappointed the court reversed the jury finding that Java is open and free for everyone… This type of ruling will make apps and online services more expensive for users.” So, for developers who rely on fair use when using existing code to help write their own software, the ramifications of this change in the relationship between fair use and copyright could be severe. It’s even more troubling because it

Google’s use of Java in Android has caused an ongoing feud.

“developers may shy away from compatibility, leading to less interoperability and innovation” could impact on compatibility between platforms. In the past, many developers would attempt to make their software compatible with other existing programs and platforms, which is what Google claimed it was doing with Java. With this ruling, developers may shy away from that, leading to less interoperability and innovation, or it could even stop them creating the software at all, due to fears of a copyright lawsuit. It’s a worrying development, but as this longrunning case has constantly proved, the fight’s not over yet.

Oracle purchased Sun Microsystems in 2010, and it’s been at loggerheads with Google ever since.

www.linuxformat.com


Mailserver

Get your cable drops!

Subscribe today and get 6 cable drops

Mailserver

See page 22

Write to us at Linux Format, Future Publishing, Quay House, The Ambury, Bath BA1 1UA or lxf.letters@futurenet.com.

Most Linux distros are frankly easier to install these days than Windows.

Windows Mate

Neil says

I’ve been running Linux for some time. I usually buy your magazine at my local bookstore. Most of my current computers are a few years old and I’m pretty comfortable installing Linux on a Windows 7 box. But I really need to update my desktop and all of the new computers are running Windows 10. I’d like to see an article on any problems one might encounter buying a Windows 10 desktop and installing Linux on it. I don’t want to brick a perfectly good computer. I’m going to replace Windows since I normally use my desktop as a Samba and MySQL server. I’m running a Mint Mate box, but am open to moving to one of the other Mate distros. Terry Haimann

We started running an “Escape Windows” issue a few years back, which seemed to be popular with readers. If Microsoft attempts to roll out new versions of Windows we tend to try and pump out an updated version to help people install Linux alongside it or replace Windows entirely. The reality is that on a new Windows system, installing most SecureBoot supporting distros (Ubuntu, Fedora, openSUSE, RHEL) is no harder than freeing up 30GB or so on the Windows partition. The main headache is when people decide that they’re going to start playing with more obscure distros that don’t support SecureBoot, don’t play nicely with UEFI boot partitions, or they install Windows afterwards and cross their fingers that it all works. Narrator: It didn’t.

Red Les Many thanks to Les Pounder for his great tutorial on Node-Red (LXF231). I struggled initially because I couldn’t access the GPIO from my Pi. It took many hours to get to the bottom of it, which turned out to be a /dev/gpiomem privilege problem. I’m running physical computing classes with some pupils at my local high school. This gives an IOT option that’s remarkably quick to get going. Should you say Raspbian “Jessie or Stretch” rather than the latest release? I thought I was up to date with “Wheezy”, but trying to install node-red made me realise that I wasn’t supported and needed to upgrade my system. Stuart Gordon

Neil says

shane_collinge@yahoo.com

Helpdex

Glad to hear you both enjoyed Les’ work and that you managed to get over your problem. Really, half the real learning is getting problems solved, don’t you think?

10     LXF237 June 2018

www.linuxformat.com


LUGS!

Linux user groups The intrepid Les Pounder brings you the latest community and LUG news.

Leeds Hackspace

Alpinux, le LUG de Savoie Meets on the first and third Thursday of the month at the Maison des Associations de Chambéry, France. www.alpinux.org Build Brighton Thursday evenings is open night. www.buildbrighton.com Sandbox Sandbox Digital, 5 Brasenose Road, Liverpool L20 8HL. Open maker night is Tuesday 6-9. Kids clubs are Monday (six to eight years) and Wednesday (eight to 12 years). www.sandboxdigital.co.uk Leeds Hackspace Open night every Tuesday 7pm-late, open day second Saturday of the month, 11am-4pm. www.leedshackspace.org.uk Horsham Raspberry Jam Park side, Chart Way, Horsham. www.facebook.com/hackhorsham rLab Reading Hackspace Unit C1, Weldale Street, Reading. Open sessions held on Wednesdays from 7pm. http://rlab.org.uk Huddersfield Raspberry Jam Meet every month at Huddersfield Library, typically the fourth Saturday of each month. www.huddersfieldraspberryjam.co.uk Medway Makers 12 Dunlin Drive, St Mary’s Island, Chatham, ME2 3JE. www.medwaymakers.com Cornwall Tech Jam Second Saturday of the month, alternating between Bodmin and Camborne. www.cornwalltechjam.uk

Lasers, 3D printers and pizza a-go go! ack in March I was working in Leeds city centre, helping a local outreach centre to deliver micro:bit sessions. As usual I tweeted about where I was, and I got a message from a member of Leeds Hackspace: “Come over tonight, it’s open night.” So I walked over to their space and in a dark yard just outside of the city centre I was greeted with a steel door. To the right of the door was an intercom, a window looking into the space, and a sign… Leeds Hackspace. Now in its third iteration, Leeds Hackspace is a well-established space for makers, hackers and artists. Indeed, the space caters for many different users. A large communal space offers the group the chance to move around and team up to discuss project ideas, and importantly eat their dinner because when I arrived a huge pizza order was being compiled. The communal space also offers space for lots of equipment. Oscilloscopes and 3D printers rub shoulders with classic computers from the 1980s and 1990s. Moving further inside the space and we reach the “dirty” part of the hackspace. Here we see industrial machines used for laser

B

cutting, drilling and working with wood and metal. Remember a hackspace is not just for hacking electronics, and at Leeds Hackspace we see a great dirty space that feels like a working studio. Moving even further back into the hackspace and we see vinyl cutters, used for creating window displays and bold graphics for artwork. Finally, there’s the beginnings of a photographic dark room for the budding photographer. Leeds Hackspace makes for a great evening’s experience. If you’re in the area then pop in on their open night. Check its website for more details: https://leedshackspace.org.uk.

Photo credit: Les Pounder

Find and join a LUG

A nice big social space greeted me as I walked in to Leeds Hackspace. So much knowledge from the helpful makers!

Community events news schools, workplaces and homes. There’s more information at: https://ep2018.europython.eu.

EuroPython Edinburgh plays host to EuroPython 2018 between 23 July and 29. Join them for a week of Python-related workshops, training sessions and sprints, attend the excellent talks and keynotes, and speak to the many exhibitors who will be there supporting the use of Python in our

www.techradar.com/pro/linux

Glasgow Mini Maker Faire Glasgow has its first Maker Faire! The Tall Ship Riverside plays host to a day of makers, stalls and exciting projects. Going to a Maker Faire is a feast for the senses. Your mind will be blown by the interesting projects, and stories that each maker has. Learn to solder, laser cut and build junk bots and so much more! The event takes place on 29 July and more details can be found on the website: https://glasgow.makerfaire.com.

Linux Presentation Day Bristol and Bath LUG is hosting a drop-in event at the Ye Shakespeare Pub, Victoria Street, Bristol on 9 June. The team will be on hand between 1pm and 6pm to show anyone how versatile and useful Linux is on a range of devices, from mobile phones to desktops. There’ll be time to talk to the gurus and even take home a free USB/DVD. These event are great to share the knowledge and enthusiasm for Linux in the community. So if you’re in the area, drop in, grab a drink and lean how you can do more with your computer. For more details visit: www.linux-presentation-day.org.uk.

June 2018 LXF237     13


Answers

Answers

Got a burning question about open source or the kernel? Whatever your level, email it to lxf.answers@futurenet.com two-step Q Ubuntu I have a laptop that I use offline

with Windows 7 and Ubuntu 14.04 on it. Besides those two OS partitions, I have two other NTFS ones (for data and VMs). My 14.04 install hasn’t been updated since 2016. Am I right in thinking I can’t apt upgrade my 14.04 install after 18.04 is released? How can I upgrade smoothly to 18.04? I’m a newbie and don’t really want to have to format the Linux partition and reinstall everything. My Wi-Fi seems to

have stopped working with the captive portal at my library – could this be because the distro hasn’t been updated in such a long time? Oliver, via the LXF forums

A

Good news, Oliver. Ubuntu 14.04 will be supported until April 2019– the LTS releases come with five years of support. So you have a year to sort this out. That doesn’t mean you shouldn’t do anything, and at the very least you should find a wired Ethernet connection and

The C (aka POSIX) locale is for computers, that don’t need spellchecking; the others are for humans that do.

Ball and (key) chain Q

Last year I was looking at the features of various Linux distributions and I heard somewhere (DistroWatch, Linux Format or maybe even YouTube) of a distribution that had the equivalent of Apple’s Mac OS Keychain built in, but unfortunately   I can’t remember which one it was.   Can you help? Charles Keane, via email

A

I don’t recall ever seeing such a distribution, or indeed why a distro would seek to emulate Apple’s

14     LXF237 June 2018

tool on Linux. The Seahorse (also known as Passwords and Keys) utility for Gnome does an excellent job of managing keys (GPG and SSH), passwords and certificates. Maybe this is what you saw? KDE Plasma has its own Kwallet, which does a similar task, but this has a habit of being slightly buggy and also has a tendency of forgetting to auto unlock on login, in my experience. Both of these integrate with Chromium out of the box, and add-ons are available for Firefox too.

Dr. Jonni Bidwell Attempts to fix your Tuxbased faults.

update your 14.04 install. It’s very unlikely to break anything, and it might even fix your wireless connection. I can’t help with that one any more, not without knowledge of the hardware involved anyway, but I will say without hesitation that captive portal Wi-Fi is terrible and you should avoid it wherever possible. You are quite correct: if you were to do a clean install of 18.04, you would need to reinstall all your programs (beyond things like LibreOffice and Firefox that are installed by default). It’s also very likely that some of those programs are no longer present in the repositories, so you’d need to either compile and install these manually, or find some alternatives. If you do want to upgrade to 18.04, then a clean install is probably the best way to go here, provided all the applications you need are still around. All you’d need to do would be to back up any documents you need from your home folder (or anywhere else on the target disk, an external hard drive is useful if you have a lot of data), do the install (your NTFS partitions can be left untouched), restore your backed up files, and install all the required programs. Even on an old laptop (as long as there’s space) this shouldn’t take more than a couple of hours. However, things rarely go according to plan, so it makes sense to allocate more time to the task. An alternative route, one which doesn’t involve wiping your hard drive, would be to upgrade first to 16.04. You may run into some difficulties here, or it may go smoothly. From here you could either stick with 16.04 (which will be supported until 2021) or upgrade to 18.04. Again the upgrade may or may not go smoothly, and you would be left with a few relics of not one but two Ubuntus. However, you may not want to upgrade to 18.04, at least not right away. It uses the Gnome desktop which, coming from Unity in 14.04, will require some getting used to. You can get the lowdown in our awesomely written cover feature. It may also not run nicely on old hardware. Upgrading to 16.04 may be the best option – it’s cosmetically similar to 14.04.

www.linuxformat.com


roundup CMStons of stuff so you don’t have to! We compare

Roundup CMS Made Simple Concrete5 Drupal Exponent CMS Joomla

Shashank Sharma By day Shashank is a New Delhi trial lawyer, but by night he’s an open source vigilante!

Content Management Ready to carve your own space online, but can’t decide on which content management system to use? Shashank Sharma has some suggestions.

how we tested… A CMS doesn’t require much more than a properly configured web server and database. You have many choices nowadays depending on the type of website that you wish to create. For this month’s Roundup we’re only interested in CMS options that can help you create a complete website, rather than the specialised ones that are dedicated to blogs and wikis. The choice of database, web server and scripting language makes little different to end users, but we’ve selected only PHP-based CMSs for this Roundup. Along with Apache web server, we’re using MySQL for our database. We’ll test the projects on the number of features that they offer out of the box, ease of installation and whether or not they support add-ons to extend their functionality. With everincreasing number of people and businesses getting online, proper documentation is also necessary to help novices deploy and configure their CMS. Just as important is the customisation options that each service offers.

24     LXF237 June 2018

or many years now, starting a blog has required little more than setting up an account on one of the free services. But if you decide to create a more complex and content-rich website, you have to make one yourself. This, too, is a straightforward process – if you’re willing to spend a little time creating the proper environment. But after you’ve settled on a web server and created the database and user to manage it, you still have to decide what content management system (CMS) you wish to use for your website. Depending on your preference for scripting language, you can find a CMS built using

F

Ruby, Python, Java and others; however, PHP remains the most popular choice. As much as we would have liked to give representation to the different languages that are available, the self-imposed limitation of a fully-featured CMS that recently pushed out a new release left us with little choice. With more users connecting to the web using various devices of varying form factors, your website should render perfectly on all the different devices. More often than not, modern CMSs are even optimised for mobile devices. The ideal CMS is one that’s easy to deploy and allows for extensive tweaking such that you can mould it to your liking.

www.linuxformat.com


CMS roundup

Ease of deployment Can you install them without help? ith an ever-increasing number of forks and alternatives popping up, users have the choice of several web servers and DBMS software to choose from. Most of the CMSs are quite happy if you provide them with the supported instances of Apache web server, MySQL database and PHP. Although you don’t have to master any of these to install and use a CMS, you must be familiar with a few key concepts so as to prepare the environment for installation. In addition to the software, most CMSs also require specific libraries to be installed and enabled on PHP. At a minimum, you’re required to create a database and a user for managing the said database, because you’re asked to provide this information during the installation. All the CMSs in our list feature a web-based installation wizard that will guide you through the different steps involved in setting up your own website. As its name suggests, CMS Made Simple is incredibly easy to setup. The best part about the project is its thorough documentation, which ensures even a novice who’s never worked with a database or web server can set up a website. Exponent CMS requires a special tweaking of MySQL, without which the installation fails. Unfortunately, the documentation doesn’t provide a workaround, or even lists this potential problem. If you decide on Exponent CMS, make sure to look up how to disable Strict mode in MySQL before you begin the installation. Although the installer suggests that you tweak the MySQL settings to proceed with the installation when it fails,

W

All the projects run a pre-install check, which informs you if any additional libraries are needed or if you should tweak any settings.

there’s no way to make the changes and continue with the installation. The only option is to start the installation afresh. Worse still, the project won’t enable you to reuse the database you’ve already created for it, and you must first either empty the database or create a new one. In addition to the web-based installation wizard, Concrete5, Drupal and Joomla can also be installed using Composer, which is a dependency manager for PHP. Unless you’ve worked with it before, the easier option is to opt for the web-based installation wizard. The reason for this is that the use of Composer for installing these projects isn’t well documented and if you get stuck, you’ll have to resort to a web search for a solution.

VERDICT CMS Made Simple 10/10 Exponent CMS 7/10 Concrete5 9/10 Joomla 9/10 Drupal 9/10 Apart from CMSMS, the other projects don’t provide basic installation details.

Device support Reaching to the masses. uring his keynote speech at Drupalcon Chicago in 2011, Dries Buytaert, the founder of Drupal, best summarised the importance of mobile devices for CMSs by observing that if he were to “start Drupal from scratch today, I’d build it for mobile experiences first, and desktop experience second.” This makes even more sense now that several recent studies have shown that upwards of 60 per cent users are relying on their mobile devices to access websites instead of desktops and laptops. Responsive web design ensures that websites render well on a variety of devices. Since April 2015, Google now penalises nonmobile-friendly websites and pages. Thankfully, all the CMSs on our list enable you to create responsive websites. This means that they support the different elements such as responsive themes and images. The latter is important as otherwise the images won’t automatically scale to the screen size of the devices. The CMS Made Simple project hosts several mobile-ready themes and customisations. Community members also share their own custom responsive themes and configurations. Exponent CMS similarly provides a number of themes designed for mobile devices. The project offers the Twitter Bootstrap Theme and also provides several modules that you can use to make your website mobile ready.

D

www.techradar.com/pro/linux

There are several responsive themes available for CMS Made Simple, Concrete 5 and other projects as well.

All the other projects featured here are conscious of the importance of mobile devices. Apart from free modules and themes, Joomla and Concrete5 both make available several commercial add-ons as well, to help you tweak your website for mobile platforms.

VERDICT CMS Made Simple 10/10 Exponent CMS Concrete5 10/10 Joomla Drupal 10/10 Mobile friendliness is a virtue for all the projects on our list.

10/10 10/10

June 2018 LXF237     25


There’s a new Ubuntu LTS in town, with a whole new desktop to entice and amaze you. Jonni Bidwell rolls out the orange carpet…

uiet your busy mind for just a moment, dear reader, and tell us what you hear. The sound of swallows, swifts and wheatears returning to their northern breeding grounds? No, listen more closely. There’s a vaguely mechanical gnawing sound from the trees over yonder. That’s the sound of a bionic beaver, and possibly some gnomes too, and it can mean only one thing: the latest Ubuntu LTS release is here. As is tradition, our cover has been emblazoned orange, our disc editor has been kept up for days testing the daily builds, and Jonni won’t stop wittering on about Walpurgisnacht. But things have changed since the last LTS two years ago.

Q

30     LXF237 June 2018

Back then, there was excitement about Canonical’s bold desktop projects: Unity 8, Mir and convergence. Those have all been bequeathed to the community now and Ubuntu, after seven years going its own way, has returned to the Gnome desktop. A controversial move, but a pragmatic one too. Canonical is heading towards an IPO, and ambitious desktop projects that generate no revenue don’t attract investors. Furthermore, Gnome 3 has matured and ripened and is no longer the scary desktop beast that it used to be, and Canonical has done a great job of customising it to be as friendly as possibly to Unity ex-pats. Gnome is also leading the charge towards Wayland, the successor to

the aging X.org display server, so Ubuntu 18.04 is a great distro for brave souls and early adopters to experiment with the future display stack (don’t worry it’s not the default yet). Of course, if Gnome’s still not your thing there’s no shortage of other desktop flavours to try. We’ll cover the most interesting ones, and of course all the exciting changes under the hood, too – the new kernel, snap packages, not to mention Ubuntu’s server, cloud and IoT offerings. Plus, we haven’t forgotten about the crazy die-hards still running 32-bit hardware. There may be no 32-bit install medium, but that doesn’t mean you can’t reap the benefits of the new Ubuntu!

www.linuxformat.com


Ubuntu 18.04 LTS

Eager beavers There’s a lot of hype surrounding the latest release of Ubuntu, codenamed Bionic Beaver. But what’s new? Let’s find out… The Ubiquity installer is as smooth as ever, and we liked the artwork, too – a beaver circumscribed by intersecting circles.

fter 14 years of Ubuntu releases, you might think they weren’t such a big deal anymore. But make no mistake, this is big news. For one thing, it’s an LTS release so will very likely be many people’s daily driver for a good few of the next five years. Furthermore, a number of those other popular desktop distros are based on Ubuntu LTS, so this release crystallises their foundations too. And finally, this release sees Ubuntu return to the Gnome desktop after seven years of going their own way with Unity.

A

Install with caution Installing Ubuntu is as easy as it’s ever been. However, this is a new release and so shouldn’t be used on systems you’re depending on day to day. You should make sure everything works from the live environment before you install it. And back up any important data before you think about hitting the install button. Also, don’t use our install disc. Get an up-to-date ISO from www.ubuntu.com/download/desktop. This might seem like strange advice, especially given all the superlatives on the wallet, but within the confines of the covers we can at least be sensible about this. Thanks to the lugubriousness of getting a magazine printed, this is not the final release, it’s a daily image from mid-April. We’ve tested it as best we can, but we can’t say if you’ll be stricken by some heretofore undiscovered bug that

takes out your BIOS (as happened in 17.10), or other operating systems. You can use the zsync utility to update the ISO with minimal data transfer here (see below). This will download only the bits that have changed, which should only be a few megabytes. Once that’s done, write the refreshed ISO to a disc using your favourite burning utility or to USB using dd or Etcher. When you begin the install, you may be pleased to find the option of a minimal install. This doesn’t save a huge amount of space (around 500MB), but does away with most of the bulky applications, leaving only a web browser and core tools. From here you can add whatever you like, so it’s great if you have different application proclivities to the Ubuntu defaults.

Install Ubuntu

1

Download the official ISO

If you’re short on bandwidth and already running Linux, copy the ISO from our disc (it’s in the Ubuntu/ directory), install zsync and update the ISO:

2

Boot the live medium

Insert your disc or USB drive into the appropriate place and then boot your machine. The official image will work with secure boot (note that our disc will not), but finding the magic key to summon the $ chmod 755 bionic-desktop-amd64.iso boot menu or UEFI settings may take $ mv bionic-desktop-amd64.iso ubuntusome trial and error on your part. F2, F10 18.04-desktop-amd64.iso and Del are common options. Mac users $ zsync http://releases.ubuntu. com/18.04/ubuntu-18.04-desktop-amd64. should hold down C. Select the optical drive or USB and then choose ‘Try Ubuntu iso.zsync without installing’. Now write the new image to disc or USB.

www.techradar.com/pro/linux

3

Test and install

Check as much of your hardware as possible from the live environment (extra displays, wireless and printers). In addition, make sure you like it, because there’s no point risking your system if   you don’t. If all’s well then press the   install icon on the desktop, the installer   will happily install alongside (or atop) Windows or other Linuxes. If you have a more exotic setup then choose the ‘Something else’ option.

June 2018 LXF237     31


Interview Thomas Sigdestad

Progressive sessions Jonni Bidwell talks progressive web apps with Enonic’s co-founder Thomas Sigdestad

38     LXF237 June 2018

www.linuxformat.com


Thomas Sigdestad Interview

homas Sigdestad is CTO and co-founder of Enonic, a company that’s grown from humble beginnings in a garage in downtown Oslo to one of Norway’s most successful open source companies. It had the bold idea of providing people with something useful and usable during the dotcom boom, and that remains very much part of its strategy today. We caught up with him at the O’Reilly Software Architecture 2017 conference in London to talk about the future of cross platform applications: progressive web apps. You may not have heard of them, but the chances are, if you’ve gone anywhere near a major website recently, that you’ve already used one. New technologies enable web browsers to do all kinds of things – things that hitherto were strictly the preserve of native applications. This could mean many exciting developments: truly cross-platform applications, an end to the scourge of app stores, perhaps even Linux becoming a viable option for people bound by application requirements on proprietary OSes. A brave new world awaits, so read on…

T

Linux Format: Hi… Thomas Sigdestad: So, you’re the same people that made Amiga Format? I still remember looking forward to the disks and the first review of the latest game. It was pretty expensive in Norway though – £7 or £8 I guess. LXF: That’s us… well, not us personally, but our company. I loved that mag though. My mum used to go mental that I’d spend £3 on a magazine. She didn’t understand the amazing value that represented. It wasn’t just the quality journalism – the cover disk was a big deal: 880K of PD games and demos that would keep me occupied for, well four weeks. Ahh, nostalgia, best not get me started. How did you get into Linux? TS: When I was studying I bought a Red Hat box set from the university bookshop. I spent a lot of time investigating that. I remember thinking what was really cool, and what I still think is really cool, is network booting. You just start the machine, and it goes off and fetches an image. This was amazing in 1997. LXF: I used Red Hat in the early 2000s. As soon as I had a computer capable of running Windows XP, I discovered that I

www.techradar.com/pro/linux

Thomas co-launched Enomic back in 2000.

didn’t like it. Not one bit. I’m less militant now, but Linux has been my primary OS ever since then. TS: That’s funny. Our product is called Enonic XP. The XP is short for eXperience Platform, but it’s nothing to do with Windows XP. When we released it two years ago we referred to it as a “web operating system.” If you’re building an Android app, then you know how to write to disk and how the graphics work and

up with some interesting customers. We’ve used Linux for various purposes and in various guises from day one. We’ve always used Linux for our hosting. What we did that made us unique was that we built everything using Java. We had an idea – sort of inspired by Bill Gates – that Microsoft’s success came from piggybacking off IBM. We more or less did the same thing with our application server and database. We basically got customers

if it worked for microsoft… “We had an idea – inspired by Bill Gates – that Microsoft’s success came from piggybacking off IBM. We more or less did the same thing with our application server and database.” things like that. There aren’t any other dependencies, just an Android version. We had the same idea for servers: when you’re building an Enonic app, you only had to specify which version of XP you were using. So this is an operating system concept at a much higher level – a server distributed approach. We went with the XP name for marketing reasons, but maybe in a few years “web operating systems” will catch on. LXF: Tell me about your company, Enonic. TS: We started back in 2000. We wanted to be a software company, so we worked for a year making our web portal, and then we launched and surprisingly quickly ended

that had invested in those architectures who wanted our solutions. So stone by stone we built our business over five years. We made a neat CMS, and saw that things were changing in many ways. We had application teams working on one stack, database teams working on another stack and website teams working on yet another stack. But they were all ultimately working to create some user experience and would have to wire these stacks together somehow. We then realised that this can be done differently. When you invest in a CMS you have to have a full stack, including the database and everything else. So we built everything from the ground up, in a single piece of

June 2018 LXF237     39


Image credit: Getty images

in-depth Quantum Computing

Quantum Computing Mats Tage Axelsson introduces you to quantum computing, the coolest tech around. Learn how it works and how you can get started. uantum computing has caught the attention of large companies, academics and hobbyists. This article will cover the history, the different ways to make a quantum computer and the logic behind programming. You’ll also learn about some programming toolkits that you can use to get started. To run a quantum computer, the physics has to be understood so programmers can then manipulate and measure the final results. Scientists have observed quantum effects in photons, electrons and isotopes of many materials. This means engineers use superconducting materials such as niobium and aluminium to construct workable quantum computing systems. The logic gates are made of silicon wafers and are controlled using microwave emitters. These solutions may not be the best in the long run, but they’re the ones that are running now. To use quantum computers, you need

Q

44     LXF237 June 2018

logic that takes advantage of the two core concepts: superposition and entanglement. When you start exploring these concepts, the Bloch sphere will help visualise what to do with different gates. Programmers can use classical bit gates together with quantum gates to create the algorithms needed. The mainstream media hails quantum computers as significantly faster than current models. It turns out they’re only fast in specific areas: cryptography, optimisation, simulation and database searches. In cryptography, many algorithms are safe because factorising large prime numbers with classical computers will take far too long for practical use. Shor’s quantum algorithm can do it in minutes. Optimisation and simulations can benefit from a quantum computer’s ability to test many solutions at once. Database searches are faster by a factor of four. And with faster database searches, machine learning also becomes much faster.

www.linuxformat.com


Quantum Computing in-depth

he history of quantum computers begins with quantum physics. In 1900 Max Planck first proposed that light comes in discrete packets called quanta. This discovery later led Einstein to show that Planck was right. When measuring the photoelectric effect scientists could observe packet behaviour. These two discoveries later led to quantum physics. Yet the deeper scientists dove into the quantum nature of things, the harder it got to explain how it works. For quantum computing, the most interesting developments are entanglement and superposition. Superposition is the phenomenon where a particle exists in many positions at the same time. Considering this, scientists concluded that a quantum computer should be possible to build. A quantum computer is one that can do many calculations per operation.

T

The cat in the box The famous physicist Schrödinger created a thought experiment. In it, he describes a cat and a gas container inside a box. The gas will poison the cat after the radioactive decay of an atom that releases the gas. The process is random so observers won’t know if the cat is dead or alive until they open the box. In quantum physics, this means that the cat is both alive and dead before anyone observes it. In the case of the cat, this is absurd but in quantum physics it’s normal. What Schrödinger was saying was that there must be another explanation – one as yet undiscovered. Another phenomenon is entanglement, where two particles can have intertwined states. This means that the state of one particle will always be opposite of the other even when they are apart. In quantum computers the software creates entanglement, a CNOT gate creates this state. To make use of all the phenomena demonstrated in quantum physics, scientists needed a way to describe what happens on a small scale. To program a computer, it needs logical operations, described as logical gates. Quantum gates and classical logic gates are the same only up to a point. Quantum gates add features for changing states and entanglement. It took until the 1970s for the first attempt at a theory to use quantum effects for computers. Shannon information theory describes classical gates and other aspects of data processing. For quantum computers, this is insufficient because it doesn’t specifically describe quantum effects. Quantum information theory was first attempted in 1976. During the 1980s scientists made more progress, in part thanks to quantum computing conferences organised by MIT and IBM. Other interesting developments included quantum cryptography and the first universal quantum computer. To make use of all the states of the particle you measure, programmers need a formal language. Quantum information theory needed to improve. The different gates are the foundation for such a scheme. Keeping track of what the different quantum states are is confusing. First of all, the way it works is counterintuitive at best. Second, there are many different spin axles to keep track of. The system isn’t complicated, but it involves atypical approaches that are tricky to grasp.

www.techradar.com/pro/linux

To make sense of all the state transitions, physicist created the Bloch sphere. Peter Shor discovered Shor’s Algorithm in 1994. This algorithm solves the problem of finding the prime factors of large numbers. The basis of all encryption is that you can’t, in a reasonable time, solve this problem. Quantum

Programmers use the Bloch sphere to illustrate how quantum gates manipulate the qubits.

Schrödinger was a cat person “The process is random so observers won’t know if the cat is dead or alive until they open the box. In quantum physics, the cat is both alive and dead” computers may solve this problem in minutes. Interest in quantum computers subsequently sky-rocketed. Shortly after Shor’s discovery, Lov Grover invented the Grover algorithm. This is best known as the database search algorithm, but it’s also useful for other tasks.

Encryption may be at risk One big question is whether encryption systems are at risk with quantum computers. The major concern is the RSA encryption scheme. The scheme is secure because it relies on the condition that factoring a large number into its primes is too time-consuming. When trying to find the prime numbers, there are many strategies, so the simplest one is to guess and try. A trial and error approach isn’t practical, though, since a 2,048 bit number will have millions of solutions. Some strategies can reduce the number of possible solutions, but even the most powerful methods will take years or millions of years. With the right algorithms, a quantum computer could reduce that time to a practical level. Efforts are underway to create other algorithms that aren’t breakable this way. While this is prudent, the risk that a quantum computer can do this within 15 years is low. The quantum computers that are available today are both small and hard to program. The frameworks available for programming are few and far between. As you can see in other parts of this article, you’ll still be setting a few qubit states and twisting the states. Converting that to a fine-tuned encryption cracker is, more than likely, a far-off prospect for now.

June 2018 LXF237     45


Pi User See what crops up in Raspberry Fields

Paul Beech is the co-founder of Pimoroni, which designs and sells products for makers, educators and creatives.

Join the Raspberry Pi Foundation and other makers for a celebration of making and learning.

spreading the word

www.techradar.com/pro/linux

unning over the weekend of the 30 June, Raspberry Fields is a new annual event organised by the Raspberry Pi Foundation at Cambridge Junction. With tickets free to under 16 (you’ll

R

CREDIT: Raspberry Pi Foundation

It’s a weird joy when someone says “Raspberry Pi? Never heard of it”. You get to show them what’s possible, what people are doing, all the projects, the joy. It’s rare to find someone who can’t suddenly see a way it can make a positive difference. From simple servers, old-skool arcade machines and media centres to providing education and science where it’s needed most, but hasn’t been delivered before because it was too hard or too expensive. But hey, not everyone learns the way you do, or may like the way you do things. That’s okay, because somewhere in the fluffy clouds of the Raspberry Pi community are 10 people doing things 10 different ways, just itching to tell people all about the things they can make and how to do it. Behind the enthusiasm, behind the caring and sharing, is a steely-eyed resolve that this is how geekiness should be, and we don’t want the insular, dismissive knowledge-sharing that we grew up with. It’s a testament to Pi that Googling “Raspberry Pi + Something” usually gets you a good result (Try “Cat Flap” or “Vegetation Monitoring”), and that people are still growing, enthusing and sharing anew six years on, from under the ground (Google “Raspberry Pi SoilCam”) up to Earth’s Orbit (Search for “Astro Pi”). Maybe the next six years will see a flurry of Raspberry Pi on their way to do science around another planet? It’s about time we had a decent space programme that everyone can join in with.

still need to book, mind) and £5 to any humans older than this, it’s sure to be a hit with the community! It’s being described as a chance for people of all ages to have a go at getting creative with technology, and celebrate all that the UK’s makers have already achieved and learnt, through the many Code Clubs, CoderDojos, Raspberry Jams or just tinkering at home. There’ll be chances to learn about the many maker projects being worked on around the country, get hands-on with activities, participate in science and technology talks and enjoy musical performances. Add a dash of free food, face painting, fun performances and more there’s something for all ages! Find out more and get tickets at www.raspberrypi.org/raspberry-fields. We’re not sure there’s that much of a field.

Box museum

Mmmm, JAM

Build a mini museum.

Get your fill of maker fun.

ringing the wonders of museums to children who can’t experience their collections, Museum in a Box uses 3D-printed models and figures, combined with NFC markers and a Pi-powered box, to bring alive collections that otherwise might never be seen. This is a fabulous example of how the Pi can enrich lives. You can learn more about the project at www.museuminabox.org.

9 May Cotswold JAM..................Waterworth Building, Cheltenham 20 May Marlborough Jamming......................Town Hall 21 May York JAM........................Acomb Explore Library 4 June Preston JAM....Media Innovation Studio 4th flr 6 June Leeds JAM.......................... Swallow Hill College For more JAMs near you check out www.raspberrypi.org/jam/calendar.

B

Open the box! Ooh, it’s a head.

Look out for this logo!

June 2018 LXF237     49


TutorialS Process serial data

Arduino

Team up an Arduino with the Raspberry Pi Les Pounder shows us that the Raspberry Pi and Arduino can be best friends and work together on a project that involves serial data. he Arduino and Raspberry Pi are fantastic machines, and here we’ll be using an Arduino to read a TMP36 temperature sensor. We’ll send the data via a USB serial connection to a Raspberry Pi running Python code that will read and interpret the data, then act upon it. This project will show that the two machines can co-exist, and that the Arduino can be used to augment the features of a Pi.

T

our expert Les Pounder is a freelance maker who works with organisations such as the Raspberry Pi Foundation to promote maker skills. You can find his blog at www.bigl.es.

Setting up the Arduino

To install the Arduino IDE go to www.arduino.cc/en/ Main/Software and select the version for Linux ARM. Download the software and then extract the archive to your home directory (/home/pi/) Next, open a Terminal window. There should now be a directory called arduino-1.8.5 in your home directory. In the Terminal change directory so that we’re inside the Arduino directory. $ cd arduino-1.8.5

There should be a file called install.sh in the directory, which will install the Arduino IDE on to the Pi. To run the file type the following:

You need An Arduino Uno or compatible Any model of Raspberry Pi with the latest Raspbian OS A TMP36 sensor breadboard Three maleto-male jumper wires All of the code and a diagram can be downloaded from http:// bit.ly/LXF237serial-project

52     LXF237 June 2018

$ sudo ./install.sh

After a few moments the install will be completed. The next step is to enable the Pi to access the Arduino device and send code to it, by adding the user Pi to the group dialout using the usermod command: $ sudo usermod -a -G dialout pi

Finally, reboot the Raspberry Pi.

Building the hardware The TMP36 sensor only has three pins, and when looking at it face-on (the flat side) they go Vcc, Vout and GND. The TMP36 can work with voltages between 2.7V and 5.5V, so the 5V supply on our Arduino will provide the power to the TMP36, while the GND pin connects to GND on the Arduino. Lastly, the Vout pin (centre) connects to A0 on the Arduino. For more details download the diagram for this project. Using the maleto-male jumper wires, make these connections and then connect the Arduino to your Raspberry Pi’s USB port.

Writing the Arduino code

To open the Arduino IDE, go to the main menu, click Programming>Arduino and after a few seconds the

This code can be used to read serial data from any serial device connected to the Pi.

application will load and present a template for our code. Delete the template (press Ctrl+A and then the Delete key) to start fresh. On an Arduino we write the code in the application, compile it and then write the code to the Arduino. This is called flashing. Our first line of code creates a variable. This is a data storage object that enables us to reference an object by a name and show the contents of the object. In this case we create a variable called sensorPin, which is really the connection of our TMP36 Vout to the A0 pin of the Arduino. We have to tell the Arduino what data type the variable will contain. In this case it’s an integer value, 0. int sensorPin = 0;

Next, we create a section of code that will be used to set up the Arduino for the task. This code is run once at the start. Here we tell the Arduino that we wish to use a Serial connection at a speed of 9600 baud. void setup() { Serial.begin(9600); }

For the Arduino to continually run the following code, we need to place it inside a loop. In the following step we create another variable that will read the raw data from the analog pin A) and then save it as an integer inside the rawdata variable: void loop() { int rawdata = analogRead(sensorPin);

www.linuxformat.com


Tutorials Tutorial Prey

Moreutils

Command-line gems A lesser-known collection of useful Unix tools to increase productivity on the terminal sounds like an exciting prospect, says Shashank Sharma. ne of the reasons for the soaring popularity of Unix back in the day was its rock-solid design philosophy, which comprises a set of rules that shaped how Unix and its myriad tools were developed. Among these principles is one that continues to inspire budding developers: do one thing and do it well. As stated, the idea was to create tools and utilities that provided a single useful functionality, but did it well. Many of the popular command-line tools used routinely by Linux users are all descendants of the original tools written for Unix based on this design principle. Taking a cue from the simplicity and effectiveness of these original utilities, Joey Hess (https://joeyh.name) decided to create and collect a variety of such simple tools. You can find a complete list on the project’s website, and even nominate your favourite tools for inclusion in the moreutils package.

O

our expert Shashank Sharma is a trial lawyer in Delhi and an avid Arch Linux user. He’s always on the look-out for geeky memorabilia.

The more in moreutils Here’s a quick introduction to some of the others moreutils packages that make working with the shell fun: ts Use this tool to add a timestamp to the beginning of each line of the stdout output. This can help you monitor how long it takes for a command to run, before passing control to the next command. You can even use the ts tool to timestamp the logs produced by a server. zrun Text editors are incapable of making sense of compressed files, but zrun can decompress archives given to it on the fly and currently works with various formats including gzip, bzaip2 and xz. By default, zrun deletes the decompressed temporary file once you’re done. This means that all the changes you made in the editor will be lost, unless you manually save the content to a new file. ifdata There are many tools that you can use to find out information about network interfaces, the number of input/output packets and so on. One of the most popular of these is ifconfig, but it often produces data that’s unsuitable for most users, especially if you want to use it in a script. With ifdata, you can easily determine all this information and more. Refer to the man page for the many different command options that can be invoked with ifdata. One of the most basic is the ifdata -p wlp4s0 command, which will display the configuration of the specified interface.

58     LXF237 June 2018

Each of the tools included in moreutils feature a dedicated man page, but not all are as detailed as the one for ifdata.

You can find the moreutils package in the software repository of most Linux distributions. Run the sudo apt install moreutils command for installing it on Debian or Ubuntu and derivative distributions. The su -c ‘dnf install moreutils’ command can similarly be used to install it on Fedora. The most recent version of moreutils is 0.62; however, most distributions still carry version 0.60 or older in their software repositories. If you want the latest release, you must grab the source from the project’s Git repository and compile it yourself. Open a terminal and run the git clone git://git.joeyh. name/moreutils command. Next, install the xsltproc and the docbook-xsl packages using the software repositories. With that done, navigate into the moreutils directory created by the Git command and run the make and make install commands. As of writing, moreutils comprises 15 different tools across four different categories: Category

Tools

Working with

pipesmispipe, pee, vipe, sponge

Error handling

errno, ifdata, isutf8, mispipe

Editing text files

combine, isutf8, ts, vidir

Launch programs

chronic, ifne, lckdo, parallel, zrun

Thankfully, the simplicity of these programs is such that you only need a little time with any of them to understand the purpose and function. As we don’t have room enough to cover each of these tools in detail, we’ll take a look at several, starting with the editing tools.

www.linuxformat.com


Tutorials Virtualise an app

Docker

Deploy your first virtualised app lt took a lot of convincing for a lethargic Mayank Sharma to power down his virtual machines and learn to virtualise apps instead. ven if you’re totally disconnected with the realm of mortal beings, you’d still surely have heard of Docker and how it can solve all your IT problems. If you have somehow managed to isolate yourself from experiencing the fruits of Docker’s goodness, here’s your chance to absolve yourself. Traditional virtualisation technologies provide full hardware virtualisation. This is to say that the virtual machine or hypervisor takes chunks of physical resources such as CPU, storage, RAM and then slices them into virtual versions like virtual CPUs and virtual RAM. It then uses these virtual peripherals to build virtual machines that behave like regular physical computers. The isolated virtual environment is useful for testing a new distro, but is an overkill when all you need to virtualise is a single program. This is where Linux containers, through Docker, offer an attractive alternative. Docker enables you to bundle any Linux app with all its dependencies and its own environment. You can then run multiple instances of the containerised app, each as a completely isolated and separated process, with near native runtime performance. That’s because unlike VMs, containers share the same host system kernel. This also means that you can host more containers than VMs on any given hardware, because of its lighter footprint.

E

our expert Mayank Sharma is a technical author who spends much of his time playing Linux games like there’s no tomorrow.

The language of Docker

To use Docker as a non-root user, add your user to the docker group with something like sudo usermod -aG docker bodhi

66     LXF237 June 2018

Docker is a container runtime engine that makes it easy to package applications and push them to a remote repository, from where other users can download and use them. Let’s get familiar with some Docker terminology. Docker containers package software in a complete filesystem that includes everything an application needs to run. This ensures the app will always run the same way – irrespective of the environment Docker is running on. A Docker image is the definition of a container. It’s a collection of all the required executables, files, environment settings and more, that make up an application along with its dependencies. The image is a read-only version of your application that’s often compared to an ISO file. To run this image, Docker creates a container out of it by cloning the image. This is what then actually executes. This arrangement makes

Each command in the Dockerfile spins up a new container and commits a new image layer before moving to the next command.

Docker very scalable and enables you to run multiple containers from the same image. While Docker is available as a package in the official repositories of all popular distributions, it’s best to fetch the latest version from the official Docker repository. Fire up a terminal and fetch the official download script and execute it with curl -sSL https://get.docker.com/ | sh to install Docker. Once it’s installed, start the Docker service with sudo systemctl start docker and make sure it starts on subsequent boots with sudo systemctl enable docker . Now type docker run hello-world to test the installation. The command downloads a special image from the official Docker registry that will greet you if all goes well and explain the steps it took to test your Docker installation. Now’s let’s jump straight in and start a new Docker container with the following command: $ docker run -it --name alpha-silo ubuntu /bin/bash

With this command, we asked Docker to start a new container with an image called Ubuntu. The -i makes the session interactive and the -t allocates a terminal. The container is named alpha-silo and runs the /bin/ bash command once it’s started. When we issue the command, the Docker daemon will search for Ubuntu images in the local cache. When it doesn’t find one it then downloads the image from Docker Hub. It’ll take some time to download and extract all the layers of the images. Docker maintains container images in the form of multiple layers. The

www.linuxformat.com


The best new open source software on the planet

HotPicks

Alexander Tolstoy is still recovering after the many hours spent playing Tower game (see page 85). We can certainly see the appeal.

Gnome Amarok Shotwell RawTherapee Krita Krunner-translator Dementia Stacer Qsoundrec Tower game Battle for Wesnoth Desktop environment

Gnome Version: 3.28 Web: www.gnome.org

he Gnome team releases a new build every six months or so. This means you can expect each new 3.x version on a fairly regular basis. For this month’s Hotpicks we’ve decided to highlight the latest and greatest Gnome 3.28 version for two reasons. First, because there’s a lot to enjoy there, and second, due to the inescapable fact that Gnome has steadily become one of the most popular desktop environments lately. It’s certainly the default choice for Ubuntu and Fedora, which are, of course, the two main heavyweights in the Linux world. The list of new and changed features is pretty extensive. Some of these features will be noticed immediately, while for others it’s more likely that they’ll make their presence known over time. The distinctive Cantarell font has received a bit of a spring clean and now looks neater thanks to tweaks in spacing. There are also two extra weights for the font. A much more radical change is the removal of desktop objects. While most Gnome users already ditched the habit of placing icons on their desktops, it was still possible to enable this feature back in Dconf, but now it’s gone (use Nemo instead of Nautilus if you’re missing desktop icons). So from now all file management is centred around the Nautilus window. We really liked the new tagging capability in Nautilus, which can now mark files and folders with stars. These can later help in sorting and searching tasks. Moving on, there are few more pleasant surprises in Gnome 3.28, including Boxes and Photos. Boxes can now automatically download ISO images of various operating systems for you, while Gnome Photos is now capable of importing files from SD cards and USB drives, and then group them into albums. It means that in certain scenarios you no longer need to install thirdparty software in order to get things done. Specifically, Photos now offers the basic features of Rapid Photo Downloader (www.damonlynch.net/rapid) and using Boxes is sometimes more convenient than some classic virtualisation solutions, such as Virtualbox.

T

www.techradar.com/pro/linux

The upshot is that if you love Gnome and the way that the distribution does things, then you’ll definitely be happy with this release. Impatient readers will be glad to know that before updated packages are released for your distribution, you can test them immediately via live images. These are based on openSUSE Tumbleweed or daily Ubuntu builds.

The app grid in Gnome features large and detailed icons that will please your eyes

Get to know the Gnome interface... 1

2

3

4

5 Perfectly clean desktop The Nautilus file manager doesn’t support desktop icons any more, and so your system’s wallpaper will be on show for all to see.

1

A smarter way to close tabs Apart from various fixes in the underlying codebase, Nautilus now enables you to close tabs with the middle click of your mouse . Rank your files! 3 Now you can assign stars to your files and

2

folders, and use this rating system to quickly find your favourite elements. Even better photos This simple app features decent editing capabilities, including a useful shadow/highlight enhancement tool.

4

Metered bandwidth Use this to disable background network usage. For now it just prevents Gnome from checking for updates.

5

June 2018 LXF237     81


hotpicks The left panel in Amarok can do virtually everything and even includes a file manager.

Music player

Amarok Version: 2.9 Web: https://amarok.kde.org marok has finally seen a new release after nearly three years of silence. Those following the trends in classic Linux desktop music players might already know that the aging Qt4-based Amarok had been superceded by Clementine (a fork of the older Amarok 1.4) years ago, whereas lately some extra fuss was devoted to the brand new Babe player, which we reviewed in LXF230. The player’s most distinctive feature has always been (and still is) its integration of numerous features into one mission control-like window. In fact, using Amarok made us want to maximise the window in order to give each panel and frame enough space to fit all the content. The central area in Amarok is a QtWebkitpowered browser part that displays song lyrics and the artist’s page in Wikipedia. We thought this approach assumes that a user won’t be leaving the player minimised, but instead wants to find out more information about the track that’s ‘now playing’. This trend of encouraging you to do more with your music continues elsewhere. Amarok also asks you to fix

A

tags of your music files (select one more tracks and find the tag editor in the context menu), and discover online media sources, such as Last.fm or Magnatune. Beside the fact that there’s nothing Amarok can’t do that, say, Clementine can’t, we really liked the familiar, bold Amarok progress bar, the unusual volume control spinner and the visually pleasing analyser animations. Version 2.9 fixes dozens of bugs that have built up since 2015, and also brings the player into the modern world, making it possible to compile and build, and to co-exist with other music players. For instance, Amarok is now fully compatible with Ffmpeg 3 and supports music library synchronisation with Rhythmbox, Clementine, Banshee and even Apple’s iTunes. With such great compatibility, why not giving Amarok a try on your desktop?

Here, we’ve made the roses brighter without losing the subtle details that are present in the gerberas.

photo editor

RawTherapee Version: 5.4 Web: www.rawtherapee.com awTherapee is designed for the processing of RAW files captured by D-SLR cameras. Within the settings of such cameras there’ll be an option to specify the format of the saved files, and instead of the standard JPEG you can select RAW. These files take up more disk space, but contain significantly more information taken from the sensor of the camera. In short, it’s like a negative of a photograph, only in digital form. RawTherapee is able to make sense of the data within RAW files: adjust colour levels, fix exposure problems, save details in shadows and highlights, remove noise and some other common photo defects. It’s widely thought that in the hands of someone who knows what they’re doing, a manually processed RAW file will have a better quality than the JPEG that’s baked by a camera in automatic mode. RawTherapee interface is dark (like a darkroom for working with film) and full of numerous sliders, tabs and buttons. But once you become used to it you’ll see that the application works in two main modes: as an image browser and an editor.

R

82     LXF237 June 2018

Double-click an image in the browser and wait a second while it’s loaded. RAW images are usually pale and you’ll need to apply manual colour correction to make it look more vivid and bright. Luckily, RawTherapee has the magic Auto levels button right on the Exposure tab that you start with by default (see the right-hand side panel next to the image). Other tabs have their own sets of controls for fine-tuning details such as sharpness, white balance, retinex, geometry and much more. It certainly takes some time and skill to start producing good results. But it’s worth doing because all the best and award-winning images that we all admire on the many online photography contests are made in RAW processing software. RawTherapee supports most proprietary RAW formats, including Pentax and Sony’s Pixel Shift, and Canon’s Dual-Pixel. If you’re unsure, you can always try to open files from your camera with RawTherapee and see if it works (it should!).

www.linuxformat.com


Coding academy coding academy Hugo

hugo

Build a static site with support for themes Mihalis Tsoukalos uses the Hugo framework to create secure web sites with static files. You’ll be up and running before you know it! o is a popular systems programming language that can be used for much more than simply working with systems software. One such example is Hugo. The official description of Hugo is that it’s a configurable static site generator. It can help you develop a web site that’s composed of static files without the need to have a database in place or other types of resources that are used when creating dynamic web pages.

G

our expert Mihalis Tsoukalos is a technical author, a UNIX administrator, a programmer and a mathematician. He is the author of Go Systems Programming and is writing Mastering Go.

Go Go, Golang So, Hugo is a tool written in Go that enables you to create web sites which are composed of static files. Although Hugo is written in Go, you don’t need any Go knowledge to use Hugo. Please note that when you’re searching for the Go programming language, you should use the keyword Golang instead of just Go, because Go is a common word and you might not end up with the kind of information you want. Put simply, you’ll have better luck finding what you want by Googling for Golang Hugo instead of just Go Hugo. At the time of writing the latest Hugo version is 0.37.1, which is built with Go version 1.10, and this is the latest Go version. You can install Hugo on a Debian or Ubuntu Linux system by executing the first of the following three commands:

of Hugo you’re using by executing hugo version . The next section will explain how you can use Hugo to develop web sites.

The Hugo process Hugo requires that you execute certain commands for starting a project for a new web site, adding one or more web pages to it, download and use a theme, and so on. As a result, you’ll need to execute hugo new site followed by a name for creating the structure for a new web site, and hugo new followed by other arguments to create a new page or a new theme. The philosophy of Hugo commands is based on the way the Go compiler operates. After creating some basic content, you’ll need to edit the main configuration file of a Hugo web site in order to make changes to the naive default version of it. You’ll also need to edit the text files of the pages of the web site you’ve created, so that you can add data to them. After you’re done configuring and adding data, you’ll need to test your web site before deploying it to an external web server and making it available to your

$ sudo apt-get install hugo $ which hugo /usr/bin/hugo $ ls -l /usr/bin/hugo -rwxr-xr-x 1 root root 12980032 Feb 6 2016 /usr/bin/ hugo Hugo enables you to create menus in you web sites. You can learn more at https:// gohugo.io/ contentmanagement/ menus.

88     LXF237 June 2018

The last two commands verify that the Hugo binary file, which is called hugo, can be found on your Linux system. However, because your Linux distribution might not have a ready-to-install package for Hugo or the latest version of Hugo, you might need to visit https:// gohugo.io/getting-started/installing and install Hugo manually. A reliable and quick approach would be to fetch Hugo from GitHub as described in the preceding Web page, instead of downloading a tar file. After a successful installation, you can see the version

This shows the structure of a Hugo site, and how to add new posts and start the Hugo web server to test the operation of a Hugo web site.

www.linuxformat.com


coding academy Clone your sites

Wordpress

Quickly create and clone your websites If you need the tools to create cloned, multiple sites into subfolders for easy management, then Kent Elchuk will get you over all the obstacles. he purpose of this tutorial is to guide you through the process of using the Wordpress feature known as multisite. First, let’s make sure we know what that is. A Wordpress multisite is an aspect of Wordpress that enables you to run multiple Wordpress sites all on a single installation using a single database. Think of it as various sites located in subdomains or subfolders. We can log into a site at cat. example.com and dogs.example.com and manage them separately as if they were separate installations. Multisites have many possibilities for usage: imagine a website with various categories and locations. A multisite will enable the admin to make it unique to each category or location. In addition to it being practical, it can be beneficial for SEO (search engine optimisation) because the parent site could link to the sub-sites and be the start of linking something that will pick up from viewers in various locales. When a multisite is used, there will be a master admin that can log into the main installations of plugins and run any multisite. Meanwhile, the master admin can create new multisites and create admins for any multisite. Now, a quick briefing on cloning. Wordpress has several plugins that can clone any one of the sites. This makes it simple and easy to make carbon copies of sites that other people can manage. Although a new clone will retain all the original text and images, any new content and images will be specific to that particular multisite instance. Now that we have the gist of how a multisite functions and why it’s useful, let’s go through the steps to getting our own up and running. Note, however, that we’re not just limited to using multisite with new sites. Yes, we can take our Wordpress site that’s already up and running and convert it use multisite. To make this article useful for everyone, this article will cover how it’s done from an installation from scratch.

T

our expert Kent Elchuk is a full-time web developer and Linux enthusiast whose spare time includes programming and hydroponic food production.

Backing up a database is easy with phpMyAdmin or mySQL console. Files can easily be zipped and saved in a secure place.

92     LXF237 June 2018

Create a new multisite We can install the basic Wordpress after we download it and set up the database. Once Wordpress is working, we can open wp-config.php and make some subtle changes. We add the following code above the line that

From the master Dashboard the Network Admin has full control and can do everything from making new clones to installing plugins.

reads /* That’s all, stop editing! Happy blogging. */ as follows: /* Multisite */ define( ‘WP_ALLOW_MULTISITE’, true ); /* That’s all, stop editing! Happy blogging. */

After that, in the Wordpress admin located at http:// localhost/wordpress-multisite/wp-admin, we go to Tools>Network Setup. After that, we click Install. After the click, we will see two pieces of code that we can add to the .htaccess and wp-config.php files. In our root folder on an Apache server, we change the .htaccess file to resemble the line below. If it’s not there, we can create it and add the following lines: RewriteEngine On RewriteBase /wordpress-multisite/ RewriteRule ^index\.php$ - [L] # add a trailing slash to /wp-admin RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(wp(content|admin|includes).*) $2 [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L] RewriteRule . index.php [L]

Meanwhile, below is the relevant code for the wp-config.php file. define(‘MULTISITE’, true);

www.linuxformat.com


On the disc Distros, apps, games, books, miscellany and more… tiny and portable

Slax 9.4.0 Neil Bothwick The transition from Windows or MacOS to the initially mysterious yet eventually fulfilling world of Linux can be a difficult one, as can choosing the best distribution for it. Creating a distro for that situation is even more fraught with obstacles. Allow me to explain… I think we’re all agreed that there’s no point in a distro trying to pretend it’s something it isn’t. Linux and Windows are fundamentally different computing beasts and a new user has to come to terms with that. Equally, there’s no point in trying to make a distro behave like a Windows clone because that would be a dead end. The user still doesn’t know Linux, except to think that it’s like Windows, and would have just as much of a shock trying any other distro as the shock we were trying to avoid initially. The ideal situation is a friend who knows Linux to guide the new user into the different environment (although that can be a way of losing friends… just sayin’). In such a case, the ideal distro is the that one the experienced friend knows and uses regularly. The next best thing is a distro that does its best to ease the transition while still making that transition, so the new user isn’t in a permanent newbie state but becomes a more experienced user. Hopefully, they’ll be one who’s able to help other friends cross the great divide between Windows and Linux.

96     LXF237 June 2018

lax is a lightweight, portable distro designed to be run from a USB stick. We know what you’re thinking: that doesn’t seem unusual as almost all of the distros on our DVDs can be copied to a USB stick with dd or Etcher. And so yes, you can do the same with Slax, but the disadvantage of this method is that it takes over the entire USB stick – no matter how compact the distro or capacious the USB stick. If you use the Slax method to install it on a USB stick, the rest of the stick remains usable, and in a very useful way, too. Slax can use a persistence file or directory to store files and settings. This means that the next time you boot from the stick you’ll have everything you saved last time, even if last time was on a different computer. All you need to do it boot Slax from the DVD, or a copy on a USB stick, insert a separate USB stick and navigate to the /run/initramfs/ memory/iso directory on the live Slax system. Here you’ll find a directory called slax – copy

32- and 64-bit

S

Copy one folder and run this script, and you’ll have a Slax live USB stick that will save files and settings between runs.

Lightweight and portable, but with all the essentials – Slax is a computer in your pocket.

this directory to the root of your target USB stick. Then open a terminal and change directory to your new slax directory. From here run the following code: $ cd boot $ sh bootinst.sh

This will make the USB stick bootable; you can now reboot and select the USB option from your computer’s boot menu. If you formatted the USB stick with the FAT filesystem (or did not format it because it was supplied this way) your changes will be saved to a file called slax/ changes/changes.dat. Because of the limits of the FAT filesystem, this file cannot exceed 4GB in size, so you’re limited to saving that much data. If you format the USB stick with a native Linux filesystem, such as ext4 (although some argue that ext2 is better for flash drives) the changes will be saved to the directory slax/changes and the only limit on what you can store is the capacity of your USB stick. A welcome side effect of the small size of Slax is that we were able to fit both 32- and 64 bit versions of it on the DVD.

Important Notice!

Defective discs: For basic help on running the disc or in the unlikely event of your Linux Format coverdisc being in any way defective, please visit our support site at www.linuxformat.com/dvdsupport. Unfortunately, we’re unable to offer advice on using the applications, your hardware or the operating system itself.

www.linuxformat.com


AND MORE!

ideal for windows and macos users

Zorin OS 12.3 irst-time Linux users can find it a bewildering experience, because so much is different (of course it is, that’s the point). so Zorin OS tries to make the transition as painless as possible. It’s not a distro pretending to be a different OS, just trying to make migration easier. This is an important distinction because it means Zorin is still a “proper” Linux distro, one that you can use when new to the OS and continue using as you become more confident, and maybe more demanding, too – a distro suitable for both grannies and geeks!

64-bit

Easier to come to terms with for Windows users, but still a proper Linux OS, Zorin OS tries to give the best of both worlds.

Ubuntu is a trademark of Canonical Limited. We are not endorsed by or affiliated with Canonical Limited or the Ubuntu project.

the bionic beaver of distros

64-bit

Ubuntu 18.04 ‘RC’ I

I’ll now risk alienating half of our readership by stating that I use Emacs to edit text, then risk upsetting most of the remainder by saying I only use it to edit text. Emacs is an incredibly powerful platform based around a text editor that can do so much more than edit text. That’s why it has a 600+ page manual. If you’ve ever wondered what all the fuss is about, you can find out. From the arcane, but quite logical, keyboard commands to the use of macros and even reading email – it’s all in here.

Book of the Month

F

t’s time for everybody’s (well almost) favourite distro again. Unfortunately, Ubuntu’s production cycle and ours were rather put of sync this time around and the final release was just too late for the DVD so we used the release-candidate kernel freeze period. We don’t normally do this, but this one is very close to the final version, and all that’s likely to differ between this version are some translation updates and possibly the odd late bug fix. Naturally, any of these will be available as updates so after the first update you’ll have the full release version.

GNU Emacs Manual

Reading matter  dvanced Bash A Scripting Guide   Go further with shell scripting.

Ubuntu 18.04 is an LTS (Long Term Support) release. Normal releases are only supported for nine months, so updates stop appearing soon after the next version comes out, but LTS releases have five years of support. This means that you will receive bug fixes and security updates until 2023. However, it doesn’t mean you’ll receive upgrades to the latest software, because the LTS is meant to be a stable release. This is the Debian definition of stable, in that things stay much the same with no surprises. This does not make the other releases unstable! As close as possible to the final release of Ubuntu 18.04, this is the second release to use a Gnome desktop as the default.

Bash Guide for Beginners   Get to grips with the basics   of Bash scripting.  ourne Shell Scripting B First steps in shell scripting. The Cathedral and the Bazaar Eric S Raymond’s classic text explains the advantages of open development. The Debian Book   Essential guide for sysadmins.  ive Into Python   D Everything you need to know. I ntroduction to Linux A handy guide full of pointers for new Linux users.  inux Dictionary   L The A-Z of everything to do with Linux.  inux Kernel in a Nutshell   L An introduction to the kernel written by master hacker   Greg Kroah-Hartman.  he Linux System T Administrator’s Guide   Take control of your system.  ools Summary   T Overview of GNU tools.  NU Emacs Manual G Six hundred pages of info!

New to Linux? Start here

We answer your questions, insert the DVD and open index.html What is Linux? How do I install it? Is there an equivalent of MS Office? What’s this command line all about?

www.techradar.com/pro/linux

Download your dvd imageS!

Get code and DVD images at: www.linuxformat.com /archives

 roducing Open Source P Software Everything you need to know.  rogramming from the P Ground Up Take your first steps.

June 2018 LXF237     97


SPECIALS & GUIDES

myfavouritemagazines has over 100 one-off guides and specials which celebrate your favourite subjects. There’s something for everyone treat yourself or give gift.

DELIVERY INCLUDED

https://www.myfavouritemagazines.co.uk/guides

Or call now – UK: 0344 848 2852 Overseas: +44 344 848 2852 MyFavouriteMagazines is the official magazine subscription store of Future. You can save up to 74% on a huge range of popular magazine titles. Every magazine subscription will be delivered direct to your door, and includes free UK delivery; guaranteeing you don’t miss a copy of your favourite magazine.

Linux Format 237 (Sampler)  

You can subscribe to this magazine @ www.myfavouritemagazines.co.uk

Linux Format 237 (Sampler)  

You can subscribe to this magazine @ www.myfavouritemagazines.co.uk