Page 1

wayland

Get the next-gen display tech today!

PLUS!

Bluetooth speaker offer inside

FREE 4.7GB

DOWNLOAD

ready to boot ubuntu 18.04 + 3 desktops fedora 28 & more

The #1 open source mag

PERFECT YOUR

DESKTOP

Build the best Linux for you Discover the secrets of KDE Enhance your Gnome settings

Pi User get smart with google tensorflow

Yoshi Kobayashi on building the Linux civil infrastructure platform photo editors

blockchain storage

Pro-level software to improve your images

Interplanetary fileystem sounds out of this world!

Power up your Pi with the wind store and graph physical data


Welcome

FREE GIFT

Subscribe & save!

who we are This issue we asked our experts: What’s your favourite desktop and do you have a tweak everyone should know about?

Jonni Bidwell I’ve revived my netbook with Arch 32 and the Wayland-powered Sway desktop. It only has a 2GB SSD so I only use terminal applications: Midnight Commander for file management, ncmpcpp to control my Pi jukebox, and the awesome coinget utility to lament my declining crypto worth.

Shashank Sharma I’m running a customised Budgie with a disappearing panel at the bottom. My longterm love however is Gnome, but I dislike the Activities overview. Instead, my Gnome desktop features several Shell Extensions, including a categorised menu, to make it beautiful and efficient.

Bobby Moss I’m a fan of MATE because it’s responsive and easy to use. I particularly like MATE’s appearance and layout in Trisquel and Mint, but you can customise these by rightclicking panels and editing their properties. Custom shortcuts are created with the Add to Panel option.

Les Pounder I love Openbox. It’s not a bright and flashy desktop, but it runs on anything and breathes new life into older machines. I used to use it with the original Asus EEE PC, and Mrs P still uses it on her 10-year-old Dell laptop.

Mayank Sharma Not really a tweak, rather a tip – spend some time learning the keyboard shortcuts for your desktop. This will help you quickly access functions without navigating the ins and outs of its Settings panel. Some desktops will also enable you to define custom keyboard shortcuts, which ensures consistency across desktops.

www.techradar.com/pro/linux

On digital and print – see p24

Getting to Gnome you Are you enjoying the Bionic Beaver yet? After two years of a faultless 16.04 LTS install, my work PC sailed smoothly along with an error-free upgrade to 18.04 LTS. So long Unity, hello Gnome. Was it Gnome sweet Gnome for you, or more a case of here today, Gnome tomorrow? Ok, Gnome more bad puns… But that’s one of the points of choosing Linux and open source: you have a choice. Don’t like the desktop? Then dump it for something you do like or why not enhance it, so it is something you like. In certain quarters there certainly seems to be a underlying distaste for the Gnome project. It’s not one we agree with, but if you don’t like those design choices, there’s no lack of alternatives to choose from, but I guess we all like a good whinge online, right? As a prime example, this very issue we have a DVD that offers three full-fat desktops: Gnome, Budgie and Cinnamon. Just fire it up and select the desktop of your choice to try. If you want to take things much further, follow our main feature this issue on how you can tweak, customise or build your own desktop (almost) from scratch. It’s just one of the many ways you can make Linux feel like home, ensure that it’s more fun to use and generally boost your productivity. As always we’re packing the rest of the issue with the best that the FOSS world has to offer. We Roundup the best-in-class image-editing tools, talk with the brains at the Linux Critical Infrastructure Platform, explain how to get more from the latest builds of Wine, make our Pis smarter with TensorFlow, create better presentations with Impress, switch over to Wayland, experiment with the InterPlanetary File System and loads more. Enjoy!

Neil Mohr Editor neil.mohr@futurenet.com

July 2018 LXF238     3


Contents Reviews

Samsung 970 EVO SSD 

17

The market- and performance-leading M.2 SSD gets an update. Should you be throwing all your cash at this drive or is there something better on the market?

FREE GIFT

Subscribe now! page 24

Perfect your

desktop If you have strong aversions for factory settings, join Mayank Sharma as he sets about reshaping his default desktop – page 32

AMD Ryzen 7 2700X 

18

What’s that Ryzen in the distance? It’s the second-generation processor shoring up AMD’s top-end performance range.

Intel SSD DC P4510 

19

Hands up who’s running a data centre? Then grab this U.2 SSD from Intel, packing insane endurance and performance.

Gallium OS

20

Is this the OS you should be running on your Chromebook? It is if you want a full Linux distro experience, says John Knight.

Bliss OS

21

Still mourning the demise of Remix OS, John Knight explores what else the world of desktop Android might have to offer…

Rise of the Tomb Raider 

roundup

Interview

22

Phil Savage demands more than simple button pushing from his women, but that’s all the Linux Format team has to offer.

Image editing

26

Want to remove some red eye, organise your photos or do some serious manipulation? Then Shashank Sharma has the photoediting power programs you need.

4     LXF238 July 2018

Jonni Bidwell really believes that Linux can change the world, especially with the Linux Foundations Civil Infrastructure Platform  40

www.linuxformat.com


Newsdesk

This ISSUE: Microsoft loves Linux German government goes open source French government picks FOSS BBC and Linux

Operating systems

Plenty of Linux love at Microsoft Build 2018 Microsoft’s passion for Linux is real, judging by its recent developer conference. icrosoft has softened its stance on Linux in recent years, and has even been going so far as to announce that it ‘loves’ the open source operating system. While some people have been cynical about the Redmond company’s affection for the FOSS alternative to its Windows, the company appears keen for its services to work with Linux. This was particularly evident at Microsoft’s Build 2018 developer conference. The company announced it had overhauled its simple Windows Notepad text editor so that it would now cope with the line endings used in Unix, Linux and macOS, correctly displaying text files created on those platforms. Traditionally, Notepad has only supported text files that use Windows End of Line characters, and if these are missing – Unix, Linux and macOS text files don’t use them – then everything comes out in a completely unmanageable lump of text. Microsoft goes into more detail about the change in a blog post that can be read at http://bit.ly/notepad-line-end. Microsoft also revealed that its most popular SQL Server product runs on Linux. This news comes in an interview that The Register held with JG “John” Chirapurath, general manager of Azure Data, at the Build conference. You can read the full interview at https://bit.ly/2wtWxmW. According to JG, the SQL Server that runs Linux, along with embedded R and Python, is “the most successful server product we’ve ever released, in terms of downloads…Our typical download volumes are in the hundreds of thousands. We’re looking at seven million downloads.” With this

M

6     LXF238 July 2018

insight, Microsoft’s love of Linux starts to make more sense… All of this follows the announcement of Azure Sphere, a new platform that runs on a custom version of Linux developed by Microsoft, and which is designed to interact with a huge range of smart and internetconnected devices. The impact of this reveal was underscored by Microsoft’s president, Brad Smith, who said that, “After 43 years, this is the first day that we are announcing — and will be distributing — a custom Linux kernel.” Microsoft has designed Azure Sphere as a platform that uses hardware, software and the

Microsoft’s Notepad text editor now supports line endings used in Unix, Linux and macOS..

Microsoft also revealed that its most popular SQL Server product runs on Linux… cloud to bring better security to smart devices. As Business Insider reports (http://bit.ly/ ms-azure-sphere), Microsoft has designed a new, more powerful, CPU that the company will make available to chip manufacturers (initially) for free. Alongside this, there will the Linux-based Azure Sphere operating system, which will be smaller and lighter than Windows, and able to be run on these devices, and this hardware and software combination will be integrated with an Azure Sphere cloud security service, which will provide security patches for at least 10 years.

Azure Sphere OS will be Microsoft’s first custom Linux kernel.

www.linuxformat.com


Mailserver

Mailserver

Get your free portable Bluetooth speaker!

Subscribe today See page 24

Write to us at Linux Format, Future Publishing, Quay House, The Ambury, Bath BA1 1UA or lxf.letters@futurenet.com. Your supercomputer Kudos on the good supercomputing news for Linux. But, you did not mention how many of the server implementations are subscription or purchased based? I mention this because many things come and go quickly in the Linux environment. For example, Unity desktop is no longer supported on an Ubuntu release higher than 17.04, and Systemback isn’t supported after Ubuntu 16.04 LTS. I have used a Linux platform in my work for over 10 years (network vulnerability assessments and forensics). However, I haven’t converted my home computer to Linux. I recently retired and was evaluating which OS to use for all my personal needs. I require security, stability, longevity, and support. The OS must work seamlessly on a mobile device such as a laptop. A touchscreen is not important. I have an issue with Linux OS platforms and user data recoverability and restoration (from one laptop to another similar but not identical laptop) in Linux. Ubuntu 16.04 LTS was fair. However, Systemback is no longer supported and

Neil says Let’s not forget Déjà Dap, now known more simply as Backup. It might be a little basic for your tastes but it’ll do the job of keeping your /home backed up and isn’t that what we’re really about? If rsync seemed to be more your thing there’s a framework called Back in Time that utilises rsync, which could be worth a look. We should do a backup feature… Those supercomputer complexes cost multi-millions to build and typically tend to be running their own builds of Linux. The current fastest Sunway TaihuLight (93 petaflops) is a Chinese project to demonstrate Chinese engineering excellence utilising its own SW26010 260core manycore RISC processor and Sunway RaiseOS Linux. Another example is the sixth ranked IBM Sequoia (17.1 petaflops) running a Power Architecture processor and uses RHEL, so likely will have some sort of service agreement with Red Hat. All of this is way above my paygrade, but I’m hoping to have a feature on Linux use in high-performance computing centres soon.

Never look back First of all, thank you for the fantastic magazine. I really enjoy it. In fact, I’ve been a subscriber since

shane_collinge@yahoo.com

Helpdex

There’s a supercomputing arms race and China is definitely winning.

Pinguy really was a step back. Rsync never really did work for me. I’m willing to pay a subscription fee or purchase amount for that which meets the aforementioned requirements. I may sound like a heretic now, but if you want the same success in the home market as in the server market you may wish to go the route of (dare I say it) Apple and Microsoft. As for me, I will continue to play with Linux, but that’s all I’ll do with it until something changes. Tim Bever, via email

10     LXF238 July 2018

www.linuxformat.com


Answers

Answers

Got a burning question about open source or the kernel? Whatever your level, email it to lxf.answers@futurenet.com box drops Dropbox Q Debian I installed Dropbox on Debian a

while back. Now I’m seeing a message saying it’s old and an upgrade is available. However, Synaptic tells me that it’s up to date. I’m using the Debian repos provided by Dropbox (at http:// linux.dropbox.com/debian), but it looks like Dropbox doesn’t support them anymore – its website only mentions Ubuntu and Fedora. Synaptic wants to install dropbox_2015.10.28 , which seems awfully old. There are a couple of other versions on the directory listing for their repo (1.6.* and 2.1.*), but they all have the same date, which is confusing. I’m using MATE on Debian Jessie. Guy, via the forums

A

Hello Guy, the Dropbox packages work much the same way as Steam packages do. The package itself just provides an installer, which in turn installs the software per-user. In Dropbox’s case, the daemon itself gets installed to the ~/dropbox-dist directory. Googling around, it seems sometimes things go wrong with the update process and the solution is to just rm -rf this directory. Don’t worry about losing your files – they’re stored in ~/Dropbox (as well as on Dropbox’s infrastructure). Next time you try and start the daemon it’ll tell you to reinstall with dropbox -i . This should install the latest version, which at the time of writing is the palendromic 47.4.74.

The legend of Zorin Q

My problem concerns the use of my printer, the HP OfficeJet Pro 6970 on Ubuntu 16.04. The printer won’t work properly until I run sh hplip3.17.11.run . This involves a dialog requiring the right answers from myself. When I get the answers right the printer works correctly using a USB cable. I’m unable to print by wireless even though the printer has that facility. I’ve found that HP printers in general work well with Linux. However, my main problem is that for no apparent reason the printer stops working and the hplip program has to be run all over again. Strangely enough, I ran Zorin from LXF226’s DVD, which identified the printer, found drivers and printed a file from LibreOffice Writer. All apparently without any involvement from hplib. Bryan, via email

A

Printing in Linux has always confused me, but it seems like the situation is slowly improving. We used to get lots of complaints about the .DEBs provided by Epson, which insisted on depending on outdated (or

14     LXF238 July 2018

non-existant) versions of lsb . But Hplip seems to be quite well supported, it’s actually already included in both Ubuntu 16.04 and Zorin, although that version is older than the one you mention. Rather than downloading and running the script each time, you may have some joy just running the GUI set up, which it runs after it asks you all those questions. Try running it with   hplip-gui , you may need to apt install it first, and possibly remove the downloaded Hplip and reinstall the one from the repos. To add to the confusion there’s also a new version (3.18.4) available from the HP website, which may do a better job of remembering your printer settings. A lot of work went into improving printer support in the past couple of Ubuntu releases, and probably the answer is that some of this “driverless printing” magic made it into Zorin. Still, you may not be willing to upgrade your OS just to fix this. You’ll be automatically offered the upgrade to 18.04 when the first point release comes out, by which time there shouldn’t be any nasty surprises.

Dr. Jonni Bidwell Attempts to fix your Tuxbased faults.

As you can gather, versions of the software and installer don’t correspond in any way. Ubuntu and Fedora both use the _2015.10.28 version of the installer, so I don’t think we need to worry about it being outdated. However, going by the post at http://bit.ly/dropbox-installers it does appear that support for Debian has been phased out, so we shouldn’t count on that repo being around forever. That’s not the end of the world, because once installed Dropbox should take care of itself from now on (and you can delete ~/.dropbox-dist again if it doesn’t). There’s also Debian-maintained package, nautilus-dropbox in their nonfree repository. This installs the Nautilus Dropbox extension, and also deals with fetching the Dropbox daemon. This probably is only useful for people using Nautilus (i.e. Gnome or Unity), but the command line daemon will always be available following the instructions at www.dropbox.com/install-linux. For MATE users there’s an extension to the Caja file manager available. You’ll find the sources at https://github.com/matedesktop/caja-dropbox. I just installed it on Ubuntu MATE 18.04, which worked fine after several hundred megabytes of dependencies were sorted. Then I discovered it’s in the Software Boutique. Unfortunately, this won’t be useful on Debian Jessie, because that uses a very old version of MATE. It won’t even work out of the box with Debian Stretch, but using MATE from the backports repository there should work.

The best way to install the Dropbox extension for Caja is through MATE’s Software Boutique.

www.linuxformat.com


Reviews Adventure game

Rise of the Tomb Raider Phil Savage demands more than simple button pushing from his women, but unfortunately that’s all the Linux Format team has to offer.

he opening minutes of Rise of the Tomb Raider had us worried. It starts with Lara Minimum trudging slowly through the snow, the OS: Ubuntu only requirement being to press W as 17.10 64-bit the game plays itself for you. All of a CPU: Intel Core sudden, we’re having flashbacks to i3 4130T or 2013’s Tomb Raider reboot and its AMD equivalent Mem: 8GB interminable, set-piece heavy HDD: 28GB introduction. At one point during a GPU: AMD R9 cutscene-laden climbing tutorial, we 285 (GCN 3rd miss a prompt, fall and die. Redoing Gen), Nvidia the section, we hit the prompt, climb GTX 680, a few feet higher, and watch another 2GB Vram cutscene in which Lara falls but is Lara’s trusty bow still remains N/B: Requires fine. Here we go again? Actually, no. the weapon that brings the fun. Vulkan, Nvidia The opener is frustrating, but driver 396.18+, exciting and over quickly. From then AMD Mesa on, Rise of the Tomb Raider sticks to a mostly consistent – and that’s just if you were playing well. In RotTR, Lara 17.3.5+. Intel level of interactivity. There’s still plenty of set-piece can fall foul to a number of fatal traps, but in regular play graphics not spectacle, but these pace-breaking action segments trust she no longer feels like a victim of her environment. That’s supported. CPU you to read the visual clues of the environment and react not to say the story isn’t clumsy in places. There are times requires SSE2 using the appropriate controls. There’s a level of artifice to when the it all goes a little bit Avatar. Lara stumbles across these sequences, but they operate within the framework a tribe called the Remnant, and – despite their having Recommended of established interactions. This is emblematic of RotTR lived in this Siberian wilderness for generations – she CPU: Intel Core as a whole. It’s not that Tomb Raider’s missteps have been quickly proves to be the best at hunting, climbing and i7 3770K gunning down an entire army. eradicated, but they’ve been dramatically reduced. There Mem: 12GB are fewer slow-mo QTE sequences, fewer awkward GPU: Nvidia conversations, fewer by-the-numbers mini-boss fights. Silent but deadly… if you choose to be GTX 980Ti Lara’s latest adventure opens in Siberia, and – aside Other elements of the story work much better. This is still Storage: 28GB from an early sojourn in Syria – that’s where it stays. Lara Lara’s origin, but while she hasn’t yet embraced her role available space is on the hunt for the Divine Source, an artefact that her as a globe-trotting murderess, she is at least more father had obsessed over before his death. There’s an accepting of it. There’s a resolve that didn’t exist before, important difference in the plots of RotTR and its and that means there’s no clumsy disconnect between the story of a woman traumatised by her actions and the predecessor. Here, Lara has initiated her quest. While gleeful feeling of killing off a camp full of bad guys. It’s just things quickly spiral out of control, particularly after the as well, because the combat remains enjoyable. Rise of appearance of militaristic cult Trinity, she’s no longer an unwilling participant in events. the Tomb Raider – like its predecessor – deftly blends That’s crucial to how the game treats Lara. In Tomb stealth and action. Most enemies begin unaware of Lara’s presence, giving you the scope to creep through bushes Raider, she was frequently battered, bruised and impaled and behind cover. With patience it’s possible to systematically and silently clear out most enemy patrols. Lara zip-lines over certain death. Just another day for Ms Croft. Often, it’s more fun to take out a couple of guys and then choose to initiate a firefight. Lara has access to a small selection of weapon types (pistol, rifle and shotgun) with a variety of styles available in each category. Most feel good to fire, the panicked inaccuracy of the automatic rifle being the only real exception. Pistols feel lightweight and clinical, while the pump-action shotgun is a chunky and gratifyingly deadly option. Once again, though, the bow is star of the show. Having to draw back and charge shots provides a nice rhythm to the combat, especially in conjunction with some of the skill upgrades available as Lara levels up. New for this outing is Lara’s ability to craft combat tools on-the-fly. Arrows and special ammo can be created

SPECS

22     LXF238 July 2018

T

www.linuxformat.com


subscribe Save money today!

Subscribe! Sign up today and get your FREE Bluetooth speaker!

FREE GIFT Worth £40 Don’t miss out,   subscribe now!

Enjoy music on the move with the Juicebar portable Bluetooth speaker, which delivers up to eight hours of audio entertainment thanks to its built-in Li-ion battery. Speaker details: 2 x 3w output, Bluetooth 4.1 EDR, 1,500mAh battery and 3.5mm aux input.

IT’S EASY TO SUBSCRIBE!

Click: myfavouritemagazines.co.uk/lfjuicebar Call: 0344 848 2852 24     LXF238 July 2018

www.linuxformat.com


Overseas subs on p67

PLUS: Exclusive access to the Linux Format subs area! 1

CHOOSE YOUR PACKAGE! print edition

digital edition

FREE GIFT

print + digital

FREE GIFT The cheapest way to get Linux Format. Instant access on your iPad, iPhone and Android device.

Get both the print & digital  editions for one low price.  Plus your free Juicebar speaker!

Only £36

Only £11.25

Only £43

Every 6 months by Direct Debit

Every 3 months by Direct Debit

Every 6 months by Direct Debit

Every issue comes with a 4GB DVD packed full of the hottest distros.  Plus your free Juicebar speaker!

*Terms and conditions: This offer is only available for new UK subscribers. Gift is subject to availability. Please allow up to 60 days for the delivery of your gift. In the event of stocks being exhausted we reserve the right to replace with items of similar value. Prices and savings quoted are compared to buying full-priced print issues. You will receive 13 issues in a year. You can write to us or call us to cancel your subscription within 14 days of purchase. Payment is non-refundable after the 14 day cancellation period unless exceptional circumstances apply.   UK calls will cost the same as other standard fixed line numbers (starting 01 or 02) or are included as part of any inclusive or free minutes allowances (if offered by your phone tariff). For full terms and conditions please visit www.bit.ly/magterms. Offer ends 31 August 2018.   

www.techradar.com/pro/linux

July 2018 LXF238     25

1) Only available to MyFavouriteMagazines.co.uk subscribers.

1,000s of DRM-free  PDF back issues!  Get instant access back to issue 66 (May 2005) with tutorials, interviews, features and reviews.  At linuxformat.com


roundup Image editors We compare tons of stuff so you don’t have to!

Roundup Darktable DigiKam Fotoxx Lightzone Photivo

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

Image editors Shashank Sharma first discovered the power of image editors when he could turn even a hazy image of the Taj Mahal into one full of details…

how we tested… Many of the tools featured in this Roundup pushed out a new releases back in March/April of 2018. As such, these new releases aren’t yet available in the software repositories for most distributions, which still feature older versions. With this in mind, we’ve installed the latest releases of all the packages using Appimage packages, where available, or via PPA repositories on top of Ubuntu 17.10. Image editors can work with the Raw file format that pro photographers use, as well as a variety of more commonly recognised formats, and boast a vast set of features. We want a tool that doesn’t hinder workflow with a complicated interface by including many features out of the box. We’ll test these tools to see if they offer any assistance to users by providing aids such as red eye removal and batch processing of images. Also important is the documentation and support you can find, and whether or not the tools can be customised and tweaked to your liking.

26     LXF238 July 2018

erhaps because of the pervasive reach of social media platforms in our everyday life and cheap internet connectivity, photography has become an integral part of our everyday life. Once thought of as the domain of professionals mucking about with ISO settings and aperture on their rugged Canons and Nikons, many cellphones now offer the same features, and even enable you to shoot images in the pro Raw format. Not only must one use a cataloguing software to make sense of all these photographs, but occasionally also an image editor. You can use the image editors featured

P

in this Roundup to enhance your images, and even colourise a black and white photo! GIMP is a beloved image editor with a vast array of features, and is one of the most popular open source tools. Its popularity is the reason why we haven’t included it in our list. This isn’t intended as a slight to GIMP or an attempt to suggest that it’s in any way inferior to the tools featured, but merely to bring attention to the other projects. This Roundup is intended for everyday enthusiasts who perhaps haven’t used an image editor beyond cropping or rotating images, and will hopefully help them take the next step towards adjusting their images.

www.linuxformat.com


Image editors roundup

Range of features What makes them special?

he majority of image editors can do much more than crop and rotate images. Indeed, the tools featured in this Roundup can help you turn even the dullest of photographs into images sparkling with clarity and detail. Of course, you have a better chance of enhancing images when working with Raw files, because they retain more details that are otherwise sacrificed when storing images as a jpeg, for example. The tools in our list can all perform a variety of functions, but we don’t have enough space in these pages to cover them all. Broadly speaking, these image-editing features can be categorised under different sections such as toning, which includes fiddling the contrast and lighting. Then you have colour operations, such as transforming images into monochrome, or otherwise change the colours. The most commonly used features, however, fall under the image correction section, and includes sharpening and haze/spot removal. While the others will only work with image files, Fotoxx and DigiKam can also be used to play video files. But note that you would need to use a dedicated video editor such as Kdenlive if you wish to edit them. With the exception of Photivo, which doesn’t enable you to import directories, all the other tools can import files from a directory, and even some supported cameras. The exif and other metadata information can then be used to sort the images, and quickly find the ones you’re looking for. The reason why darktable has been able to generate a strong and passionate user community is because its developers are avid photographers, and understand the common challenges

T

Fotoxx and DigiKam make it possible for you to add artistic effects, such as creating borders, or adding raindrops on to an image.

faced by users when editing images. This is why darktable performs non-destructive editing, which leaves your original images untouched, giving you the option to perform different set of operations on them later to create a new look. It even makes it possible for you to upload files directly to the configured Flickr account, or create web albums for your website. Even though these projects don’t make such recommendations, you should consider upgrading to at least 8GB of RAM if you plan on working with images that weigh in at over 100MB in size, or have thousands of images languishing on your computer’s hard drive.

VERDICT darktable 10/10 Lightzone 10/10 DigiKam 10/10 Photivo 8/10 Fotoxx 9/10 Photivo isn’t as feature rich as the others but shouldn’t be dismissed outright.

Supported devices

Will they work on different platforms? ith the exception of Fotoxx that can only be installed on Linux, the other projects all provide installable binaries for Windows as well as Mac OS X. But none of these projects can be installed on mobile devices such as tablets or phones. Of all the tools featured in this Roundup, darktable supports the largest number of platforms. You’ll find it in the software repositories of most popular distributions such as Ubuntu, Fedora, Gentoo, Arch Linux, Debian and OpenSUSE. Apart from Windows and Mac, also offers packages for Solaris and BSD. You’ll also find a list of dependencies and instructions on installing it from source if your distribution isn’t supported. Along with GIMP, DigiKam is one of the oldest projects and part of the KDE stable, but can run on any desktop environment with the requisite libraries installed. You’ll find it in the software repositories of most distributions. The project’s GitHub page is also an excellent resource and ideal for those who are on an esoteric system which doesn’t feature DigiKam in the software repositories. You can alternatively just grab the 380MB Appimage package, which doesn’t require installation and provides a working instance of DigiKam without hassles. Unlike the other tools that provide downloadable packages or links to repositories, LightZone compulsorily requires users to

W

www.techradar.com/pro/linux

The PPA for Photivo, named ‘Highly explosive!’ features various tools popular with photographers and artists, so you can explore them as well

register an account on the website, and doesn’t provide download information until you do. But don’t worry, the registration is free and asks nothing beyond a username and email address. Along with repositories for Debian and OpenSUSE. Photivo has a list of dependencies if you decide to install it from source.

VERDICT darktable 10/10 Lightzone 10/10 DigiKam 10/10 Photivo 8/10 Fotoxx 9/10 Fotoxx provides rpm and deb packages for many recent distributions.

July 2018 LXF238     27


PERFECT YOUR

DESKTOP Mayank Sharma says it’s time to shake up those factory settings! Refashion and replace your default Linux desktop now!

e’re big fans of the distribution development process. The effort that goes into collating the myriad pieces of software and libraries into a functional operating system deserves a lot of praise. Yet in their effort to ship with a product that’s good enough to please the majority of users, the out-of-the-box experience of virtually all distributions leaves a lot to be desired. Unlike proprietary operating systems, Linux users have greater control over their installations and don’t have to stick with the default options. In fact, the first thing

W

32     LXF238 July 2018

you probably do post-installation is swap out the default applications with ones you’re more comfortable with. But you can just as easily replace your desktop environment (DE) without having to install a different Linux distro. Simply install a pre-defined group of packages and select your preferred desktop on the login screen. Switching desktops is just one way to make your installation wear a new look. The mainstream DEs are all just shells that ship as a collection of components, which users can customise and tweak. However, a more involved and hands-on approach is

to swap out the individual components, or even move to a new DE. In this feature we’ll familiarise you with the available avenues for modifying the mainstream DEs and use them to help you personalise your Linux installations. We’ll also look at some of the other DEs on offer and guide you to pick one that suits your workflow and minimise any learning curve. And if your displeasure at the default DE setup can’t be cured by the tweaks, we’ll also help you pick the different components and tie them together to create your own custom desktop.

www.linuxformat.com


Perfect your desktop

Switch your desktop Replace the distro’s default desktop with one of these alternatives. Follow the instructions on extensions.gnome. org to first install a browser plugin and then a host connector before you can install the extensions.

he thought of a desktop environment as a separate entity from the operating system sounds foreign to most mainstream users coming from Windows or Mac OS. But that’s just another example of the dexterity of the Linux desktop. A desktop environment is just another piece of software, albeit a complicated one. You can install it just as you would any other piece of software. Moreover, many desktop developers ensure you can easily drape their creations over your existing distribution. Besides the mainstream ones such as Gnome, KDE, Cinnamon, Mate, Xfce and LXDE that have been doing the rounds for quite some time, here are some of the interesting ones that you might not have heard about…

T

Budgie

DeepinDE

Developed and used by the Solus distro, Budgie is written from scratch using components from the Gnome stack. It uses a unified notification and customisation centre called Raven, which also gives you quick access to the calendar, media player controls, system settings and power options. The desktop is also easy to customise and extend, and offers granular control over individual applet settings. While it doesn’t offer as many widgets as you’d find on established desktops such as Gnome, the project is continuing to improve and the developers provide an intelligent and fun experience, with a lot of focus on improving Raven. There are Ubuntu and Manjaro spins based on Budgie, and Fedora users can fetch it from COPR.

The Deepin desktop is part of the Deepin distro. It’s based on HTML5 and WebKit, and uses a mix of QML and Go for its components. Besides the desktop itself, notable homebrewed Deepin components include the application launcher, dock and control centre. The Deepin desktop tries to replicate the Mac OS X, and has a clean and clutter-free interface with nothing except the dock at the bottom of the screen. Deepin has configurable hot corners that by default enable you to access the applications menu and the control panel. From here, you can manage all aspects of the desktop including the boot manager. It isn’t yet officially supported   by any other distribution, but you can fetch it via thirdparty repositories for your distribution.

Enlightenment

Pantheon

One of the oldest Linux desktop environments was built to be one of the prettier ones available, and over the years Enlightenment has carved a niche for itself. It’s a lightweight desktop that still provides a very appealing end-user experience. Technically speaking, Enlightenment is just a window manager, but when coupled with the Enlightenment Foundation Libraries and the official set of apps it can be considered as a desktop environment. Enlightenment is a little quirky in that you’ll have to spend some time setting it up as per your liking. Configuring the desktop requires patience and willingness to try the different options and learn what each does. You can find it in the official repositories of all major distributions.

Elementary OS’ Pantheon desktop is another minimalist but stylish desktop that is seen as an elegant and user-friendly choice. The desktop uses its own Mutter-based window manager called Gala and takes cues from the Mac OS X desktop for a pleasant user experience. The desktop integrates the various elements, such as the Plank dock, the top panel (called Wingpanel) and the Slingshot application launcher. Nearly all actions on the desktop are animated, but the desktop strikes a balance between form and function. You can use the Elementary Tweaks tool to customise the desktop. Like Deepin, Pantheon isn’t supported on   any other distro, but   it can be installed on   top of Arch, Ubuntu, OpenSUSE and Fedora.

www.techradar.com/pro/linux

July 2018 LXF238     33


Interview Yoshitake Kobayashi & Urs Gleim

Civilisation runs on Linux

Jonni Bidwell always suspected Linux would save the world. Industry experts Yoshitake Kobayashi and Urs Gleim   all but confirmed his hunch… 40     LXF238 July 2018

www.linuxformat.com


Yoshitake Kobayashi & Urs Gleim Interview Yoshi and Urs’s CIP talk attracted a crowd, presumably due to interest in preserving civilisation.

he Civil Infrastructure Platform (CIP) is a Linux Foundation initiative. It aims to establish a base layer of industrial-grade software to power critical services such as energy, water, transportation and communications – the lifeblood of today’s civilisation. Many of these projects run on open source software, and many more will do so in the future. Yet it’s completely unfeasible to update the software running these things every five years (the current lifespan of LTS distros), and many of these systems are looking at life-spans beyond 50 years. So the CIP introduces the idea of a super long-term support (SLTS) kernel. Linux Format’s Jonni Bidwell caught up with Toshiba’s Yoshi Kobayashi and Urs Gleim, head of the Central Smart Embedded Systems Group at Siemens AG at the Linux Foundation’s Open Source Summit in Prague in October 2017. There, he got the lowdown on how the CIP hopes to keep its kernel and base layer “industrial-grade”. Since then, there have been a number of key developments, so we’ve summarised those, too.

T

Linux Format: Linux is running in all kinds of places, and lives depend on some of those applications. What is the Civil Infrastructure Platform and how is it going to help civilisation going forward? Yoshi Kobayashi (YK) and Urs Gleim: (UG): Yes, early on in our presentation we have a slide entitled Our Civilization is Run by

Linux, and it’s not an exaggeration. Things like railway infrastructure, healthcare and industrial automation, these all have longrunning systems. We’re talking between 10 and 40 years, maybe even longer. So we can’t afford to change the software, say, every two years (as a cautious desktop user might). This is especially the case where safety certifications are involved − transport networks and power generation for example. Here, it can take close to two decades just to put a new system into service. So a better strategy is to apply security patches and small updates. For CIP the idea is to stick with one version of the Linux kernel and maintain it for as long as we can. The CIP kernel is much more focused on embedded devices than other long-term initiatives. So we have support for all the embedded

board ports, but in most cases don’t support desktop PCs or servers. The systems we’re dealing with all run on dedicated hardware and embedded chipsets, so that’s what we support. Many of these kind of systems have already been using Linux for some time, and individual companies have already been working on their own super longterm maintenance. What we want is everyone working on the same platform, which will avoid some duplication of effort. But most importantly, we want this work to be done collaboratively with the upstream communities, not locally. LXF: When did the project start and who were the initial industrial backers? YK: CIP started in April 2016 and the initial supporters were Hitachi, Siemens and Toshiba. Since then, a number of other

What’s new?

Yoshi demonstrates a compact server full of environmental sensors running the CIP kernel.

www.techradar.com/pro/linux

This interview happened in October 2017, so here’s a summary of some developments that have happened since then… A new company, Moxa, joined the CIP in January. It’s an edge-to-cloud connectivity provider that provides solutions for factory automation, smart cities and monitoring. Also in January you’ll probably remember the Spectre and Meltdown attacks − which affect embedded ARM and Intel hardware as well as desktop CPUs − were disclosed. So the relevant patches are being backported to the CIP SLTS kernel. Some hardening features from the Kernel Self-Protection Project have been added, too.

We’ve also had a few CIP kernel releases. In April Ben Hutchings released the latest one: 4.4.126-cip22. Kernel 4.4 was released in January 2016, and was initially earmarked for long-term support until February 2018. That was extended in September 2017 to February 2022. It’s possible that someone else will maintain it after this period (as happened with Ben Hutchings’ tour de force support of the 3.2 kernel, which after six years came to an end in May). This would in some sense make the CIP team’s lives easier, but is far from a free ride. Keep up with developments at the Linux Civil Infrastructure Platform by visiting www.cip-project.org.

July 2018 LXF238     41


in-depth Run programs in Wine

Liberate Windows programs with Wine Jonni Bidwell can’t afford to buy Central Otago Pinot Noirs, but Wine at least enables him to run programs from the other side.

inux is a perfectly adequate replacement for Windows. We’d go further and say it’s vastly superior, in almost every way. Yet sometimes some people have just cause to run Windows applications. This might be because Karen from accounts has sent a Word document full of macros and tables and oddly named fonts that needs to be returned, along with accompanying TPS reports, by the end of the day. Some people want to play games not available on Linux, whether they’re classics from that have long been abandoned, or triple A releases that may never make it to the penguin side. Many people have a dual-boot arrangement or a separate Windows machine altogether, but rebooting or moving to another room is a chore. Wine can also be useful helping people migrate to Linux,

L

44     LXF238 July 2018

enabling them to use Windows tools until they get used to their Linux equivalents. For nearly 25 years Wine has made it possible for Linux users to run Windows programs from their OS of choice. The results weren’t always pretty, but if you haven’t checked it out for a while you may be pleasantly surprised. In the beginning there were just a handful of coders working on the project, but today hundreds of contributors (both volunteers and sponsored) contribute to this most unique of FLOSS projects. It’s rapid fortnightly release cycle means that bugs are squashed quickly, but also that your distro might have trouble keeping up. We’ll show you how to get the latest versions, or even try out some extra patches. And we’ll guide you through setting up DXVK, so you can leverage the power of Vulkan to play DirectX 11 games.

www.linuxformat.com


Run programs in Wine in-depth hroughout history, wine has been used as a salve to heal one’s wordly woes. Wine has also been linked with confusion, headaches and regrets. Its namesake in the free software world is in many ways similar: it enables Linux users to run Windows programs, but can lead the user to places they’d rather not be, and confront them with errors they’d rather not see. Wine was formerly a recursive acronym for Wine Isn’t aN Emulator, but that has fallen out of fashion. From far enough away it certainly behaves like an emulator, though what it actually does is translate win32 API calls to Linux ones; there’s no machine-level emulation involved. Once you’ve got it installed (see below), you can − in theory − run a Windows program with a simple $ wine program.exe Before we hit the proverbial bottle, we should explain how Wine operates. Wine maintains its own virtual Windows install (called a Wine prefix or sometimes a Wine bottle, so the start of this paragraph was apt) in the ~/.wine directory. There’s a virtual drive_c/ subdirectory inside the Wine prefix replete with the familiar Program Files/ and windows/ directories, and interred in the latter you’ll find a bunch of .DLL libraries. These haven’t been ripped from a Windows install (which would be a lawsuit waiting to happen); rather, these libraries have been reverse-engineered or coded based on API documentation to function as closely as possible to the Windows ones. This isn’t an exact process though, and some applications will need native Windows DLLs to function correctly. Native DLLs can be manually copied from an existing Windows install to the windows/system32 directory, though some require Registry keys and such to be set up (Wine actually stores its own settings, as well as Windows ones in databases that can be viewed with its own RegEdit). Most programs will install all the DLLs they need automagically, and installers are generally available for those that don’t. Animals like the Visual C runtimes, for example, are best installed by running (with Wine) the installers available from Microsoft’s website. This process can be automated with the popular Winetricks utility (see below). In the case where we want to use a native DLL that we have installed, as opposed to one of Wine’s built-ins, we can use Winecfg, Wine’s GUI configuration utility, or let Winetricks to it for us. Besides DLL marshalling, Winecfg can manage lots of other things (including

T

Steam knows that it’s being run under Wine, but it doesn’t seem to mind. The real challenge is getting new games to run.

www.techradar.com/pro/linux

audio, graphics and virtual drives) from the comfort of a Windows-like dialog. You can also choose which Windows version to imitate from here. By default, the root filesystem is mapped to a virtual Windows drive Z: so any program you run with Wine can access anything that your user can. This means we need to take care what we run. A dodgy executable containing malware could encrypt, or even delete, anything our user has write access to. Even if you change the virtual drive settings, Wine doesn’t provide anywhere near the same amount of isolation as a virtual machine, so it shouldn’t be used for running anything of uncertain provenance.

Sipping the Wine

When you first run Wine, depending on your distro, it’ll offer to install its own Mono and Gecko libraries. These are used for running .NET applications and rendering HTML respectively. Ubuntu used to provide its own packages for these (called wine-mono and winegecko and other distros still do. If your distros provides these packages you should use them, and if not let Wine install them for you. Forgetting they’re not installed can lead to some lengthy pursuits of wild geese. By default, Wine sets up a 64-bit prefix, which is fine (Wine implements Windows’ WoW64 subsystem) until you run into a 32-bit application that tries to install some other libraries. Said application will detect its 64-bit environment and duly install libraries with too many bits, which won’t work. We hit this problem with the GoG Galaxy client (detailed at https://bugs.winehq.

Installing Wine If you’re using Ubuntu 18.04, then you’ll find two versions of Wine in the Software application: the standard version and the development version. These refer to the packages wine-stable and winedevelopment if you’d rather install them with apt install . If you’re using an older version of Ubuntu these will be much older, but newer versions are available from the winehq.org PPA, and you’ll find instructions for enabling it at https://wiki.winehq.org/Download. These packages provide three different branches: winehq-stable , winehq-devel and winehq-staging (in order of stability). The ever-so-handy Winetricks script is available in most repos too, but users of Debian and older versions of Ubuntu may want to grab it directly from https://github.com/Winetricks/winetricks. Wine has a rapid release cycle, with a new development release every two weeks. It’s worth noting that the WineHQ packages won’t have enjoyed the same level of testing as distros’ own packages, but such is the price of life on the edge.

Winetricks even has its own GUI these days. Just run it from the command line with no arguments.

July 2018 LXF238     45


Reviews Portable power supply

Pi Supply PiJuice Les Pounder takes us out into the garden with a portable power solution for the Raspberry Pi. Now he can find out how his garden grows… in brief An alternative power management system designed for powering all models of Raspberry Pi. It can be used with solar, wind and other renewable energy sources to top up a standard phone battery. It enables easy access to the GPIO despite being placed on top of the Pi. Board functions and actions can be programmed by the user in Python using its own library.

he Raspberry Pi has powered a generation of makers, but what powers a Pi? Typically, it’s the power supply plugged into the mains, with only a small number of projects being powered from other means. In 2015 English company Pi Supply started the PiJuice crowdfunding campaign, and in April this year PiJuice was fully delivered to backers and placed for sale on the company’s website. PiJuice is an alternative power system for all models of Raspberry Pi, including the Pi 3 B+. PiJuice has been designed as a HAT compliant board and fits on top of all of the GPIO pins with a pass through that enables access to the pins for further add-on boards and projects. One slight issue we found was that access to the camera (CSI) and display (DSI) ports was quite tricky and required a little “origami” to route the ribbon cable. PiJuice has a large space in the centre of the board and this is for an 1,820mAh LiOn battery, which is charged via a micro USB port on the PiJuice. Both Lithium Ion (LiOn) and Lithium Polymer (LiPo) batteries can be used with PiJuice. Batteries are hot-swappable as long as there’s a power supply for the Raspberry Pi and by connecting the power via the PiJuice it’ll also power the Raspberry Pi. Speaking of power, PiJuice is compatible with input voltages between 4.2V and 10V, so small solar panels or wind turbines can be used as “off the grid” power sources.

T

Separating basic and advanced options Software for PiJuice comes in the form of a Python 2 library and graphical user interface, both of which have been added to the Raspbian repositories meaning they are only an apt install away. The GUI is easy to use, keeping the key information in plain sight, but hiding a few options for the more advanced users. One of the most useful sections is how we can trigger PiJuice to react given a system event. For example, we can force the system to shut down gracefully, or call a user script to send a message to alert us to a dying machine. In another tab in the GUI we can find a section to enable

PiJuice is a solidly made board that fits neatly on top of 40-pin models of Raspberry Pi.

user scripts to be launched at the push of one of the three configurable buttons. Scripts can be in any language as long as they’re executable. In the Configure HAT section of the GUI we can tinker with the I2C settings used by PiJuice to communicate with the Pi, alter the parameters of the buttons, change LED colours for certain events, and update the board firmware for the Cortex M0 used as the brains of the board. What can we use PiJuice for? Well, initially we think of off-grid Raspberry Pi projects. Wildlife cameras, data collection using sensors, and weather stations. But we can use PiJuice as a UPS for our most critical Pi applications, and this is one of its greatest strengths. Intelligent power management for the Raspberry Pi is nothing new, but with PiJuice we have a well-rounded product that’s cast off the gremlins it faced over three years in crowdfunding purgatory. So is PiJuice any good? The answer is yes: it works remarkably well and it’s easy to use. For basic use all the user needs to do is attach the board, power up and install the software – the board will do the rest. But for the advanced users, there are many layers of configuration that can be explored to meet their needs. Despite the high price, the PiJuice comes thoroughly recommended.

VERDICT Developer: Pi Supply Web: http://bit.ly/pijuicehat Price: £58

Running PiJuice with your favourite add-on board is possible, thanks to the GPIO pass through and HAT-compatible screw mounts.

50     LXF238 July 2018

Features 9/10 Performance 9/10

Ease of use 9/10 Value 8/10

Simple to install and use. Advanced users can tinker to get the best results, but basic users can just plug in and go.

Rating 9/10

www.linuxformat.com


Image recognition TutorialS

Tensorflow

Image recognition on the Raspberry Pi Dan Frost introduces the concepts of machine learning using Google’s TensorFlow framework, retraining neural networks all on a Raspberry Pi! ant to build something clever using machine learning and some fairly serious tools? Good. We’re going to use Google’s TensorFlow to construct a neural network that can identify images seen by a PiCamera. You don’t need to know anything about machine learning and along the way you’ll learn some key concepts and start getting under the hood. We’ll be using a PiCamera, but you can still do most of the tutorial even if you don’t have one. TensorFlow is Google’s machine learning framework and is used by engineers for research and to build production systems. This is a powerful tool and there’s an unlimited number of ways of explore it. To use TensorFlow, you need to have a huge amount of data and a lot of computing power, neither of which we have. So we’re going to cheat by using an existing network that’s been trained on lots of data, by then chopping off the last layer of the network and training it on our own data. This tutorial is based in part on TensorFlow for Poets (https://tinyurl.com/tensorflowfp 1) because it provides some good resources if you get stuck or want to take it forward. However, we’ll build on top of this to give you an idea of what you can explore.

W

our expert Dan Frost leads R&D projects in edtech, writes about emerging tech and blogs about tech and business at blog. thebaseline.co.

Let the tensor flow To install TensorFlow, we need to upgrade the framework and get the latest packages: sudo apt-get update sudo apt-get upgrade sudo pip3 install --upgrade pip

At the time of writing, TensorFlow isn’t available as a Raspbian package so we’re going to install this using a pre-built binary. This will cause problems with version conflicts so it’s advisable to regularly check on Google for “install tensorflow raspberry pi”. Let’s grab and install the binary: wget https://github.com/samjabrahams/tensorflowon-raspberry-pi/releases/download/v1.1.0/tensorflow1.1.0-cp34-cp34m-linux_armv7l.whl sudo pip3 install tensorflow-1.1.0-cp34-cp34m-linux_ armv7l.whl sudo pip3 uninstall mock

With that installed, let’s run a simple script to check that TensorFlow is installed and can be run:

The retraining script reports on progress throughout and it’s useful to read this so you get a sense of what’s happening.

import tensorflow as tf hello = tf.constant(“Hello, TensorFlow!”) sess = tf.Session() print(sess.run(hello))

Run it with python3 test-tf.py which, on our Raspberry Pi 3 B took a few seconds to run. With TensorFlow installed, let’s crack on with learning some machine learning...

A poet’s life We’re going to clone the popular TensorFlow for Poets repository because this provides a great starting point and enables you to dip your toe into some real machine learning code and data. First, clone the repo, move into the directory and grab a tarball of image files with which we’re going to retrain the network. This is achieved with the following: git clone https://github.com/googlecodelabs/ tensorflow-for-poets-2.git cd tensorflow-for-poets-2 curl http://download.tensorflow.org/example_images/ flower_photos.tgz | tar xz -C tf_files

Next, we retrain using the command that’s over the page, which downloads the mobilenet network. This is an existing machine learning model that’s been trained

1) https://codelabs.developers.google.com/codelabs/tensorflow-for-poets

www.techradar.com/pro/linux

July 2018 LXF238    55


Tutorials Tutorial Prey

Byzanz

Easy screencasts If a picture’s worth a thousand words, are moving pictures worth exponentially more, wonders a philosophical Shashank Sharma… technologically challenged friend called to say they couldn’t get Opera’s VPN feature to work. To suggest desktop sharing was out of the question. Thankfully, Byzanz offered an easy solution – creating a GIF screencast showing the exact steps to using VPN on Opera. With Byzanz, you can create a screencast of either the entire desktop or of the specified area. You can even set the duration for the screencast and have the nifty little tool save the output as either a GIF image, or as OGG Theora or FLV flash file, if you also want to record audio with the screencast. Another reason why screencasting may be preferred over desktop sharing as a teaching tool is that the latter requires both users to be at their respective machines at the same time. On the other hand, a screencast can be used at one’s convenience. More importantly, whereas desktop sharing can be a drain on the

A

our expert Shashank Sharma is of the view that there’s no such thing as too many Terminator series/stories.

Use scripts to enhance Byzanz To extend the functionality of Byzanz without involving a graphical interface, go to http://bit.ly/byzanz-scripts and download the zip archive. The scripts inside (byzanz-region.sh and byzanz-window.sh) are based on ones provided by Rob W to the Ubuntu forums. The byzanz-region.sh scripts requires the xrectsel tool, which is used to identify the dimensions of the rectangular region you wish to record. This tool isn’t available in the software repositories of any distribution and must be installed from its Git repository. Before you install xrectsel, make sure you have all its dependencies installed – autogen , autoconf , libx11 and libx11-dev . Thankfully, these are offering the software repositories for most popular distributions. Now, you can install xrectsel by running the following commands: $ git clone https://github.com/lolilolicon/xrectsel.git $ cd xrectsel/ $ ./bootstrap $ ./configure $ sudo make install

With xrectsel installed, you can run the byzanz-region.sh script with ./byzanz-region.sh . By default, the script stores the output as a gif file in the ~/Pictures directory. You can tweak these settings by modifying the script to you liking. For instance, if you wish to record a flv screencast, with audio, edit the byzanz-record --cursor --verbose --delay=0 --duration=$D ${ARGUMENTS} “$FOLDER/GIFrecord_$TIME.gif” line in the script and add the -a command switch.

60     LXF238 July 2018

Using the xwininfo command, you can quickly ascertain the dimensions of a window, if you don’t wish to screencast the entire desktop.

bandwidth, a 60-second GIF screencast made with Byzanz adds up to only a few MBs.

Getting started

You’ll find Byzanz in the software repositories for most distributions such as OpenSUSE, Fedora, Ubuntu and others. It also doesn’t have a difficult dependency tree and once again the software repositories will provide whatever few packages that are needed. Once installed, you can use the byzanz-record command to create the screencast. For each screencast, you must specify the name of the output file, as well as the duration for the screencast, in seconds. To create a 60-second screencast of the entire desktop you must run the byzanz-record -d 60 filename.gif . The output files are stored in the current working directory by default. You must either provide the absolute path and filename, if you want to store them elsewhere or switch to such directory before running the byzanz-record command. By default, the tool will record the entire desktop, but you can also restrict the recording to a specified portion of the screen. Should you choose the second option, you’ll have to employ trial and error to measure the portion of the screen you wish to record. Tools like Byzanz can only record either the entire screen, or a rectangular portion of it. The dimensions of the rectangle can be specified using the --height and --width command options. You can also do the same using -h and -w respectively: byzanz-record -d 60 -x 70 -y 0 -w 850 -h 800 limited-size-screencast.gif . Here, we’ve used various command options to respectively specify the X and Y coordinates of the

www.linuxformat.com


Tutorials The way to Wayland

Display protocol

The way to Wayland Turns out that X no longer exclusively marks the spot. Jonni Bidwell goes treasure-hunting in Wayland and finds compositors aplenty. ayland, apart from being a small town in New England, is a next-gen display protocol. It will eventually replace the venerable X server, which has been at the heart of *nix graphics since way back in the 1980s. You may have heard about Wayland already, because there’s roughly equal measures of excitement and consternation surrounding it. Ubuntu 17.10 shipped with Wayland as the default graphical session on hardware that supported it (which at the time was almost everything except Nvidia devices using its proprietary drivers). Ubuntu 18.04 also ships with a Wayland session, but because it’s an LTS release and users are still reporting Wayland issues, this is no longer the default. Fedora, being an adventurous sort of distro, has used Wayland by default since version 25, which was released in November 2016. It’s common for critics in the Linux sphere to decry new technologies “not ready for prime time”, and Wayland is no exception to these scurrilous libels. But Wayland itself is a mature technology. It’s been nigh on ten years since its initial release, and it’s already being used in embedded hardware (see our interview with Igalia’s Juan José Sanchez in LXF235). The main reason why we’re not all using it already is because many X applications still need to be rewritten to support it.

W

our expert Jonni Bidwell is enthralled by the new error messages that all these Wayland compositors enable, but still slightly sad about his fancy graphics card that conflagrated.

Besides Sway, another tiling window manager is Way Cooler. Check it out at http:// way-cooler. org. There’s also the Qt5and Westonpowered Orbital. See https:// github.com/ giucam/orbital for more details.

Try the “Ubuntu on Wayland” session from the login screen if you’re running 18.04. Weston and Sway will add sessions here, too.

68     LXF238 July 2018

Let’s talk about X, baby The Linux display stack is a complicated beast. Actually it’s a whole stack of complicated beasts and we won’t attempt to explain it here. One of many good reasons for starting over is that the X.org server (which you’ll find somewhere in the middle of this beastly stack) itself is such a tangled mess of code that it’s very difficult for new developers to understand it.

Gnome’s Looking Glass informs you about running applications and open windows. You can run JavaScript queries from it, too.

In order to implement the X protocol completely, an X server needs to have all kinds of functionality: memory management, graphics primitives that are more inline with drawing on a plotter than rendering on screen, support for old style fonts… the list goes on. This made sense back in the day, but now much of this functionality is redundant. The kernel handles all memory management and display mode setting and we have a battery of libraries (cairo, pixman, freetype, fontconfig, pango and so on) that handle text and graphics primitives in a manner much more suited to how applications use them. X has been extended to cope with today’s graphics needs, most notably by the XrandR (for dynamic resolution changes) and Xrender (for image compositing) extensions. In theory, it could be extended further, but according to the Wayland FAQ (https://wayland.freedesktop.org/faq.html), a new approach is better. The current implementation of the X server used on Linux, X.org (which replaced X11R6 in 2004), finally saw a new release, 1.20, in May 2018. A great deal of the work involved with that release was concerned with the XWayland compatibility layer – a rootless X server that proxies its output via Wayland. This enables legacy X applications to run seamlessly on Wayland. At first glance it seems odd, or inefficient, to re-implement what we’re trying to replace here, but XWayland is an optional code path; it only runs when it’s called upon. So we’re not necessarily running two display systems all the time. And as we’ll see, it’s quite a

www.linuxformat.com


Tutorials IPFS

Next-gen networks

Explore interplanetary file systems today! Linux Towers’ very own space cadet, Mats Tage Axelsson, boldly explores interplanetary file systems, the web tech that’s so hot right now… he interplanetary file system (IPFS) isn’t for colonising Mars, but rather to create a freer, robust system for the web. Indeed, its developers refer to IPFS as the permanent web. Let’s find out more about this blockchain technology… The web’s IP protocol was designed to work without a central server. This was partly due to the risks of nuclear war. By design, anyone can connect a computer to the net and add a server. There is a caveat though: most communication goes over a small number of services owned by large corporations. While these are not evil by default, they represent a central point in the system and, as such, can be exploited. Take Egypt during the Arab spring. The government shut down international connections, so the populous had major problems spreading ideas and organising protests. The lockout was possible because they were using specific servers, like Twitter, making it easy for the government to block services from a specific host. If the protesting groups had used IPFS or any decentralised system, they could have kept on using Twitter. IPFS works on any kind of active network, even if there’s no contact with the rest of the internet. Take a scenario where a group of people are working together need to share data. In this case, you can host your data within the conference and have it update afterwards. Using current technologies, organisers would have to manually upload all data after the conference. With IPFS, the data and indexing will go to the blockchain and update when it’s possible. All participants can choose to keep the data and let it update on its own later. The point is that organisers can choose to publish to the web even without a connection.

T

our expert Mats Tage Axelsson still tries to squeeze the maximum out of ageing hardware, the cheapskate…

Although this article was written with version 4.14, the latest version of the IPFS binary, 4.15, has just become available at the project’s index page: https:// dist.ipfs.io/ #go-ipfs.

This is the webui with the IPFS Station extension open. The information in the Station extension shows how many peers you have and other basic information.

72     LXF238 July 2018

The aim of the project is to replace HTTP as a means of transferring content over the web. Another reason is that HTTP requires a web page to be stored on one computer. If that computer goes down, the page is gone. Of course, backups exist and most people and organisations use them. But when a server goes down for any reason, content just disappears.

No more 404 messages! There are many solutions to this problem, but with a distributed network the copies are everywhere. Often, users can automatically download from a source that’s close to them. This saves on global bandwidth. Currently, a request that happens on another continent will always transfer all the content through many routers across the plane – even static content. With a distributed solution, most of the transfers will be local. IPFS enables you to transfer a web page from more than one place. Where you take it from will depend on which is the closest and fastest for the receiver. A user may also store a cached copy on their own machine and offer it to others. IPFS will improve access for people with unreliable links. If you publish resources – files, web pages, media and more – to IPFS, then the viewer won’t be as dependant on a reliable link, which is the case with regular web pages. The project has many aspects, IPLD (InterPlanetary Linked Data) is a major part of it. It defines the protocol that transports the hashes. Services like git are already using hashes to keep track of changes. It also verifies that any change aren’t tampered with. Most work on IPFS is to make it compatible with these and other web technology systems. Since the idea is to decentralise the whole web, IPFS uses technologies such as Bitcoin, Git and Ethereum. In fact, the IPLD protocol supports Ethereum for smart contracts in IPFS context. To go through how it works you need to know the basics of the protocol stack: IPLD This is the protocol that binds it all together. It describes how to identify and address your data. This is where the protocol adds support for other systems. Implemented standards are Bitcoin, Git and Ethereum. Libp2p The network layer is a separate project that others can use. It started life in IPFS, but then the project’s developers found a need for it elsewhere. One

www.linuxformat.com


Tutorial Administeria

Administeria

Safer browsing and memory management When it comes to web browsers, Valentine Sinitsyn experiences the usual sense of nostalgia, then remembers the latest security measures are key. he way we used the internet has changed drastically over the past 20 years. Back then, nobody cared too much about encrypted communications, As e-commerce and similar web sites started to grow, the need for encryption became evident. So Netscape designed a protocol called Secure Sockets Layer (SSL). The idea was to add encryption at the transport layer so any application-level protocol, be it HTTP, email (POP3/IMAP/SMTP) and now DNS (see https://bit.ly/2JQzxRC), can leverage it easily. The original SSL was a proprietary protocol, but IETF took over newer versions that became standards. SSL 3.0 was the last one, and future improvements over the protocol were called TLS (Transport Layer Security). TLS 1.0 is what you’d call SSL 3.1. Over time, numerous vulnerabilities were discovered in both SSL and TLS. These attacks used design flaws, weak ciphers and protocol downgrades to reveal encrypted data.

T

our expert Dr Sinitsyn is a lapsed KDE committer. He likes building Linux clouds and writing articles.

Mozilla turns 20 You might be surprised to know that I’ve stayed with Netscape since 1997. I think the first version we had in high school was 3.x, but I don’t remember for sure. I stuck with Netscape when it lost the battle for the web to Microsoft. While people around me were switching to Internet Explorer 4, I discovered Mozilla. More specifically, it was an open-source codebase of the thencancelled Netscape Navigator 5. Around 2000, it was a bit bloated and buggy, yet beautiful: imagine a blueish, smooth rounded interface in a world of grey rectangular buttons. And all of this was “self-hosted” using web technologies, such as now-deprecated XUL, RDF and JavaScript – so many years before Electron became pervasive… I remember how Phoenix (now Firefox) was born as an attempt to make Mozilla more lightweight and modular. At first, many of us (myself included) were reluctant to switch. So Mozilla decided to crowd-source (this word didn’t even exist yet!) a marketing campaign in the New York Times. I still have a copy of that newspaper’s edition! You may wonder why I’m telling you this. Not because I’m old (hopefully not) or sentimental. But as I’m writing these words, Mozilla has just turned 20. That’s a bit more than I was myself when I first installed Netscape on my own PC back in 1998. Now, in 2018, I’m typing this in an open source web editor running inside Firefox 59. Not bad for a program designed to display HTML pages!

76     LXF238 July 2018

In the modern world, TLS isn’t limited to e-commerce sites. Privacy is always a concern, given how much data about ourselves the internet already has. And of course, TLS is a de-facto companion to HTTP/2: it makes the latter not only safe, but also more robust. So TLS receives updates from time to time. The last one took place in March with TLS 1.3. The process took 28 drafts and the new standard was approved unanimously. TLS 1.3 is already supported on modern web browsers (Firefox 49, Chrome 63 and so on), and OpenSSL will implement it in 1.1.1 (hopefully, by the time you read this). TLS 1.3 drops cryptographic primitives that were proved to be insecure, such as RC4, MD5 and SHA-224, and adds some new ones, for example, ChaCha2020 stream cipher and the Poly1305 message authentication code. It also deprecates underused or unsafe features: compression, re-negotiation, static RSA handshake and so on – some of these were attack vectors in the past. Another slightly controversial change is Perfect Forward Secrecy (PFS): TLS 1.3 employs the Ephemeral Diffie-Hellman key exchange protocol, so an attacker can’t use a compromised key to decrypt previously recorded sessions. This breaks some legitimate scenarios, such as passive monitoring. Last but not least, TLS 1.3 makes connection faster because it remembers data, thus saving a round-trip between a client and a server.

Firefox, perhaps the most widely known product from the nowtwenty-years-old Mozilla project, already sports TLS 1.3 support.

www.linuxformat.com


The best new open source software on the planet

HotPicks

Alexander Tolstoy shuns the rays of the summer sun for a cool, leafy glade where he can explore some of the best open source apps for you.

Gimp CMake Peek Pragha Smilla Enlarger ReactOS XDM F3 PIP Quantum Game Bombermaaan Image editor

Gimp

Version: 2.10 Web: https://github. com/GNOME/gimp/releases he Gimp development team has finally delivered Gimp 2.10 to the FOSS community. After spending some time exploring it, we’re happy to say that there’s a raft of great new tools and features on offer. Although this comes as no real surprise considering that we’ve been using version 2.8 since 2012. A lot can happen in six years… Once you get past the cute artistic splash screen, a lot of the new additions quickly make themselves evident. To start with, the main toolbar now features the new icon set, while several extra icon sets can be added via Gimp’s preferences dialog. The most noticeable new addition is the Warp tool, which enables you to apply a range of impressive distortions to your imagery, especially if you choose the right size of brush. As you might know, most of Gimp’s panels have always been dockable, and this makes it possible to customise their placement to your liking. And this includes the very cool and brand new Dashboard, which measures how the program manages resources. Initially, it was designed to be used by developers who needed to estimate the performance of GEGL, a graphic library that powers image transformations and many other effects. But it soon became clear that the Dashboard would be useful for everyone who processes large images in Gimp. At least now you can be sure that you won’t run out of RAM without having to launch a separate system resources monitoring tool. Among numerous other changes, we ought to mention highlights (and shadows). Although Gimp previously had great colour adjustment tools, there were no dedicated sliders for fixing areas of an image that were either too bright or too dark. This will apply to all photographs taken with cameras that can’t carry out instant HDR correction. So if you have any photos that were taken against the source of light, you can now try the latest version of Gimp and fix them. Last but not least is the new image recovery feature that attempts to restore previously opened files after a crash. We didn’t experience any instability with version

T

www.techradar.com/pro/linux

2.10 and it never crashed, so we emulated it with a brutal (Russian style) system restart. We’re pleased to report that the recovery feature worked flawlessly a few moments later!

The Shadows and Highlights tool is just one of many new additions to Gimp.

What’s new in the latest version of Gimp?

1

2

4

3

5 New tools and new icon themes Compared to Gimp 2.8 there’s now a range of new tools for transforming, distorting and adding creative touches to your images.

1

Better colour precision Gimp enters the professional graphics market with 16- and 32-bit colour precision. This has been a long time coming… . GEGL-based filters 3 GEGL is now more deeply integrated with

2

Gimp, with many of the program’s filters now based on this powerful graphics library. Dashboard tab Lots of new tabs have been added, with Dashboard being perhaps the most useful. It shows how Gimp is using the cache and swap space as you work in the program.

4

Faster features for canvas Filters can now show on-canvas changes with optional split preview. It’s also very fast!

5

July 2018 LXF238     81


Coding academy coding academy Visualise your data

Vega and Vega Lite

Visualise your data using graph grammars Don’t let your data sit in a lowly spreadsheet. Mihalis Tsoukalos reveals how to use Vega and Vega Lite to create impressive graphs and plots. et’s take a look at Vega and its lighter version, Vega Lite. Both are grammars that are used for visualisation tasks. Strictly speaking, Vega Lite is a grammar that’s based on Vega, just as LaTeX is based on TeX. The main advantage of using Vega Lite is that it involves writing less code than Vega. Using a grammar for visualisation has both its advantages and disadvantages. The biggest disadvantage is that you’ll have to learn the rules and the restrictions of that grammar before you can use it. On the other hand, once you learn the grammar, you’ll work faster and be more productive because you’ll only need to use the relevant elements of the grammar to describe your plots. Additionally, the use of a grammar makes code modifications much easier because changing a single line can alter the look of the entire output. Finally, the use of a grammar means that it’ll be easier to identify mistakes in your code. Because the code of the Vega Lite grammar is more compact, most of the examples of this tutorial will be based on the grammar of Vega Lite. So, with that in mind, let’s get started!

L

our expert Mihalis Tsoukalos is the author of Go Systems Programming and Mastering Go. You can reach him at www. mtsoukalos.eu and @mactsouk.

Viva Las Vega!

You can learn more about Vega and Vega Lite at https:// vega.github.io/ and at https:// github.com/ vega/vega, respectively. And you can find some sample data sets at https:// github.com/ vega/vegadatasets.

88     LXF238 July 2018

Both Vega and Vega Lite are written in JavaScript and both of them implement a grammar that offers a convenient way for creating graphs and plots, which also means that you should follow certain rules and use certain keywords on your Vega files. Both grammars are better for visualising tabular data and can be used as a file format for creating and sharing data and

The left bar chart was created with the Vega grammar; the right with Vega Lite. The code of the Vega Lite files is much simpler and smaller.

This shows the output from the barChart.html HTML file and illustrates a way for creating a chart that has two bars in each category.

visualisations. Moreover, both Vega types use the JSON file format for storing their code, but as you’ll soon see, you can embed Vega code in HTML pages. A document in either one of the two grammars specifies the data source, which is the place to find the data and optionally any data transformations. It then specifies the type of the output and the mappings between the data and the encoding channels, which is the encoding of the data. This is when you can add colour, grids, legends and so on in your graphs. Note that all files for this tutorial can be downloaded so you won’t have to install anything on your Linux machine. However, it’s also possible to download the Vega grammar files locally and use them from there. Bear in mind that Vega is not meant to be a replacement for the famous D3 JavaScript library (https://d3js.org), which is a lower-level library. In addition, Vega and Vega Lite use D3 in their implementations. D3 is more capable for visualising novel ideas whereas Vega might be more convenient for

www.linuxformat.com


On the disc Distros, apps, games, books, miscellany and more… special edition

Ubuntu 18.04 LTS I can’t remember the last time we had only two distros on the Linux Format DVD, but that is the case this month. The DVDs aren’t getting any smaller, of course − it’s the distros that are definitely bulking up. While this size increase is evident in all areas, from the kernel to the desktop, it’s definitely the latter that’s noticeably growing. Ubuntu 18.04 is 300MB larger than the last LTS release, 16.04. You may think this is because of the switch from Unity to Gnome, but Unity still ran on Gnome Shell. Furthermore, Fedora has grown by the same amount in just one release and that’s still using Gnome. Yes, we could have found room for a third distro had we used a vanilla Ubuntu, but the desktop remixes are popular and this one has only two additional desktops. Previous remixes also included KDE, which is large in itself because it makes use of a different graphical toolkit for the other choices. So Gnome (in this instance) is getting bigger − a lot bigger, as it turns out. The question that we have to ask ourselves is: is a larger distro worth the effort? Only you can answer that, by looking at the latest Gnome release and deciding if you want the new features and if they are worth the hard drive real-estate price. Or is there a price at all? After all, hard drives are bigger and cheaper then ever, so what does the odd 100MB here and there matter?

96     LXF238 July 2018

ast month’s Linux Format went to press too early for us to include the full release of Ubuntu 18.04 so we are making up for it here. Not only do we have the newest LTS Ubuntu, but we’ve built one of our desktop remixes for you. In addition to the default Gnome desktop you can also choose either Budgie or Cinnamon. You can switch between desktops by logging out, selecting the live user at the login screen, and then press the gear icon next to the sign in button to select a different desktop. Alternatively, you can choose a desktop when you boot from the DVD. Three desktops may seem a little mean to regular readers − after all, we usually include more than that. However, both Ubuntu and Fedora have grown since their previous releases, leaving us with around half a gigabyte less disc space to play with. Part of that growth has been the desktops themselves, so that’s a double whammy as far as available space is concerned. Still, both Ubuntu and Fedora are popular distros with our readers and so we couldn’t consider excluding either. Because of the way we have to create the remix nowadays (to comply with Ubuntu’s

L

Perhaps we should rename this release Bionic Budgie, because here is the Budgie desktop as one of the remix choices.

Ignore this warning at your peril. Installing from the remixed desktops is likely to fail at the point that causes maximum frustration.

redistribution restrictions) it’s not possible to install Ubuntu from the remixed desktop. Most inconveniently, the installation proceeds almost to the end before failing. Don’t worry, though − you can still install Ubuntu from the Linux Format DVD by choosing the bottom option from the Ubuntu boot menu. This gives you a standard Gnome desktop, after which you can install the Synaptic package manager, add the universe and multiverse repositories in its settings and then install either ubuntu-budgiedesktop or cinnamon-desktop-environment (or both) to install the respective desktop and all of its dependencies. While we ran out of space on the DVD − remember when 4.7GB was a lot of space? − your hard disk will be considerably larger, so you can still try some other desktops post-install. Our esteemed editor nearly wept when I told him there was not the space for MATE, but you can add it simply by installing mate-desktopenvironment . Similarly you can install kubuntudesktop , lubuntu-desktop or xubuntu-desktop to try one of those flavours without a complete separate distro installation. Login details: username ubuntu, no password.

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

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

Neil Bothwick

64-bit


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 238 (Sampler)  

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

Linux Format 238 (Sampler)  

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