Page 1

INSIDE: SNAPPER SYSTEM BACKUPS

62

Pages of tutorials and features Secure Ubuntu with Nmap Inside the SailFish phone OS Build a cool Pi walkie-talkie Coding Academy: Play with fractals and Python SQLite

Get into Linux today!

your perfect linux install

Switch to Linux today and make your PC great again! Escape Windows now Embrace free software Discover the best apps

Mozilla Fest

Youth is at the heart of technology, they are tomorrow’s leaders, guardians and curators

Dorine Files on celebrating open source Graphics

Roundup

Take a deep dive into the next-gen X11 graphics killer

Less memory, more speed, the fastest distros

Switch to Wayland

Fast, light distros

The fastest

Linux PC!

Combine Linux and SSDs for super-speed


Welcome Get into Linux today!

What we do

We support the open source community by providing a resource of information, and a forum for debate. We help all readers get more from Linux with our tutorials section – we’ve something for everyone! We license all the source code we print in our tutorials section under the GNU GPL v3. We give you the most accurate, unbiased and up-to-date information on all things Linux.

Who we are

This issue we asked our experts: How do you get a newbie into Linux?

Jonni Bidwell Whenever they sigh because Windows Update decides that now is the best time to instigate an unfortunate series of updating and rebooting events, casually mention that not all operating systems behave this way. Also show them how to do simple terminal stuff so they can pretend to be like the hackers on Mr. Robot.

Neil Bothwick By telling them to forget about how Windows does things. The biggest cause of problems for new Linux users is trying to apply Windows methods. Linux is not “like Windows but better and free”, it’s just better (and freed). Failing that you can always break into their house and change all their systems to Linux while they sleep.

Nate Drake I first tell people who own an Android smartphone that they have been a Linux user all along and never knew it! Next, I go on YouTube and show them a particularly glitzy video on the subject of the Power of Linux, complete with a fire-drawing cursor e.g https://youtu.be/rw82sepw50E to shock them out of their complacency.

Nick Peers Most of the Linux newbies I know would be looking to switch from Windows, so my recommendation would be to install Linux Mint in a dual-boot configuration alongside an existing Windows install. Linux Mint’s Cinnamon desktop most closely resembles Windows’ own offering, which will make the transition smoother.

Les “Pi” Pounder Without wanting to sound like a broken record, the Raspberry Pi is an ideal introduction to Linux. It’s a cheap computer that can do so much, but scratch beneath the surface and we have a very capable Linux machine that can become a web server, print/file server or a thin client on a larger network.

Get into Linux! When was the last time you tried to get someone to use Linux? A family member, a friend, your workplace, heck, how about your entire government? It all starts with a simple install, but unless there’s someone there to give them a disc or the right download, it’s only the lucky few that are ever going to discover Linux for themselves. Considering it’s nearly impossible to buy a new PC preinstalled with Linux it really is down to people to get into Linux themselves or with a little help from their friends… So if you’re new to Linux we have a complete guide to get you started, it’ll hold your hand, explain how to use live discs and try Linux in a virtual machine, so you don’t even need to change a thing on any existing PCs. If you’re already sold on Linux, we look at building a reassuringly fast PC for a modest amount of cash. It’s an impressively speedy box that runs Linux like a champ. If you’re more interested in keeping your older hardware up and running, don’t miss the Roundup of lightweight distros. All of them are ideal for older systems or if you’re after a memorylight Linux option, check out our result and see if you agree, then write in and tell us why we’re wrong! We catch up with the good work of Mozilla at its MozFest 2016 event, there’s also the usual dollop of Pi fun and I hope you’ll find the collection of tutorials and coding this issue fun. The look at Wayland is especiallyu insighful, explaining how you can compile and enable the new graphical server on your system without waiting for distro support. Don’t forget to write to linuxformat@futurenet.com and let us know what you do with Linux, what you think of the magazine and what you think we should be covering. Enjoy!

Neil Mohr Editor neil.mohr@futurenet.com

Subscribe & save!

On digital and print, see p32 www.techradar.com/pro

January2017 LXF219    3


Contents

Inside Jolla Sailfish OS page 22

“Everyone thinks of changing the world, no one thinks of changing himself.” – Leo Tolstoy

Reviews OnePlus Three................... 17 The Nexus is dead, the Pixel is overrated, can the OnePlus Three take the place of the phone to have for open source hackers or is it just a nice bit of kit?

A mighty flagship killer that happens to be more open than most.

GamePad Digital................18

Your perfect Linux install Get started with Linux with our no nonsense guide to the greatest OS on the planet, jump in now on page 34.

Roundup: Lightweight distros p26

A mini-gamepad emulator that has all the style of a Nintendo DS [is that an insult? – Ed] but all the flexibility of an open source Android handheld.

Bodhi Linux 4.0..................19 Ubuntu LTS and the Elementary desktop together for the first time! Perhaps not, but a new release of the distro that almost died reaffirms it’s better than ever.

Zorin OS 12 Core.............. 20

Often confused Jonni Bidwell wonders if this distro is made by the fictional arch villain in A View to a Kill and finds it quite beautiful a bit like Christopher Walken.

How mad is Max? Not mad enough to buy an electric car, just yet.

Mad Max..............................21 Do you have a PC powerful enough to play Mad Max? Probably not, but we try the latest AAA game to land on Linux.

Jolla C Sailfish phone...... 24 We look at the new Jolla C open source phone and dig into the Sailfish OS to see if this can compete with the big boys.

4     LXF219 January 2017

Show report Our peers can be a fiveyear-old—all that matters is what’s inside their heads. We report live from MozFest 2016! p42 www.linuxformat.com


On your FREE DVD 64-bit

Fedora 25 Workstation, Bodhi Linux 4.0, antiX 16, Manjaro 16. 64-bit

32-bit

32-bit

Only the best distros every month

PLUS: Hotpicks, Roundup & more!

Subscribe p96 & save! p32

Raspberry Pi User

In-depth... Build a faster Linux PC........ 46

Pi news.................................... 60

We entrust Maximum PC with the entire Linux Format 2017 tea budget of £500 and ask it to build the fastest PC that it can.

The KingPin of Pi gets a CBE from The Queen and SUSE Linux Enterprise Server 64-bit arrives.

Ethernet and USB Hub.........61

More GHz than you can shake a big stick at.

Les Pounder learns of a community produced board for the Pi Zero, but is it worth the price?

NeoPixel control.................... 62 Les Pounder tries to dazzle you, not with his outstanding prose, but with super-bright and colourful NeoPixel strips and some Python.

Build a TalkiPi........................ 64 Nate Drake takes you through an awesome project to build your very own retro-style walkietalkie using Pis and a Mumble server. Pardon?

Coding Academy

Tutorials Terminal basics Environment variables...70

Discover fractals................... 84 Mihalis Tsoukalos gently takes you by the hand and leads you on a trip of discovery through the infinite beauty of mathematics.

Nick Peers gets to grips with environmental variables in his Linux terminal, so he can import, export and set them.

Python SQlite 3..................... 88

Graphics Inside Wayland................72

Mihalis Tsoukalos pushes you off the cliff edge into the never ending hell of database management with the incredibly useful Python SQlite 3, no really, it is!

Mats Tage Axelsson explains how you can get Wayland up and running in any distro, with a bit of compiling and a large pot of tea.

Regulars at a glance News.............................. 6 Subscriptions............32 Overseas subs...........69 2017 is looking like a security

Grab our Christmas subs offer now

nightmare, Microsoft is extending into and save in time for 2017 — go on the Linux Foundation and Lenovo adds Linux support to its silly BIOS.

Mailserver................... 10

you know it makes sense!

Sysadmin....................50 Mr. Brown struggles to come to

We ship Linux Format all around the globe, subscribe and save money!

Next month................98. The insecure-net of things needs your help! We build a secure smart

Get the DVD in digital form, print me

terms with Microsoft joining the

home infrastructure protected and

a keyboard and we’re wrong, you’re

Linux Foundation and takes solace in

run by Linux and open hardware.

wrong, everyone is wrong!

a cosy GlusterFS distributed setup.

Les Pounder explains how libraries

Alexander Tolstoy isn’t getting friendly with Trump, he’s too busy

Roundup.....................26

Krusader, Digikam, Neural Enhance,

We’ve just built the fastest PC, so

Tuxguitar, Devilspie2, Kup, Homebank, Featherpad, Spek,  

lightweight distros!

Mouse Boat, Freeciv.

Discover how you can exploit network ports and weak protocols to bust inside insecure systems with Tajinder Kalsi.

The openSUSE snapshot system can be made to work for everyone.

being friends with top FOSS like:

obviously here’s a group test of

Security Nmap scanning................ 76

File systems Snapper............................. 78

User groups................ 15 HotPicks.....................54 are becoming new Maker spaces.

Wayland promises improved speed.

Graphing Graphviz............................ 80 Our subscription team is waiting for your call.

www.techradar.com/pro

We wonder just how beautiful these graphs are but Mihalis Tsoukalos is convinced!

January 2017 LXF219    5


This ISSUE: 2016 was awful

Lenovo is ok

Microsoft is lovely

HDDs are ace!

Security news

So long 2016… After a tumultuous year filled with security breaches, what does 2017 have in store?

A

fter a year that many people would characterise as ‘eventful’, it’s time to look back and learn from the security issues that cropped up in a bid to make the new year as safe as possible. A definite theme emerged in 2016, with ransomware becoming a troublingly effective method of making money out of cybercrime. In August, research from Malwarebytes showed that nearly 40% of all businesses have experienced a ransomware attack— with the figure even higher in the UK, where 54% of businesses surveyed had been victims of an attack. One-fifth of British companies claimed they had been charged over $10,000 to unlock their files and Malwarebytes’ research suggested that over half of businesses in the UK hit by ransomware eventually pay up. The well-publicised success of these extortion schemes has meant that many criminals have stopped developing less profitable malware. It’s not just businesses that were targeted by ransomware in 2016. Criminals discovered that threats to shame individuals unless a ransom was paid was sadly very successful for them, though financially and personally devastating for their victims. Security firm, Kaspersky also noted in a retrospection of 2016’s security issues that advanced persistent threats (APTs) would decrease when it comes to persistence, but would make use of off-the-shelf malware, such as NJRat and Alienspy/Adwind. Bank attacks were also on the rise, with high-profile attacks on the SWIFT network and the recent Tesco Bank hack, which saw at least 20,000 Tesco Bank customers have their money stolen in what is thought to be the most serious reported hack to ever hit the UK banking sector.

6     LXF219 January 2017

The rapid increase of internet-connected smart appliances (Internet of Things) in our homes has also seen a corresponding rise in attacks targeting them. In the past manufacturers of these appliances haven’t been too concerned about security—let’s hope that all changes in the future. Speaking of the future, Kaspersky also looked ahead (http://bit.ly/ KasperskyPred2017) at what security issues we’re likely to see in 2017 based on current trends. One troubling prediction is the rising sophistication of APTs that are tailormade for individual victims. Not only do these bespoke instances of malware become more effective when so tightly targeted, but they are also harder to detect by general security software applications. To combat this, Kaspersky

Kaspersky is full of new year cheer with its list of malware to look for in 2017.

long-term cyber espionage campaigns against governments, with all parts of the ProjectSauron customised depending on the target. Another troubling aspect of ProjectSauron, which Kaspersky predicts we’ll see more of in 2017, is that it was a passive implant, which means it was a network-driven backdoor that’s installed and remains silent, showing little or no indication that it is an active infection, until it gets a remote instruction to ‘wake up’ and allow malicious users into the target network. Kaspersky also predicts that as many people are moving away from desktop OSes and applications to mobile alternatives, so too will malicious users to create their malware for mobile applications that will enable them to create malware on their phones and tablets. While Kaspersky’s predictions seem genuinely gloomy, it’s also good to know that security firms are looking at trends and preparing themselves for new forms of malware coming next year.

“One troubling prediction is the rising sophistication of APTs that are tailor-made for individuals.” is requesting a more robust and wider adoption of the Yara rules. Yara is an open-source tool that can identify malware-infected files, as well as malware families, using rules. Kaspersky believes that by using Yara to widen scans to inspect and identify malware family traits in binaries at rest, as well as scan memory for fragments of known attacks, could help in the fight off these APTs, such as the recent ProjectSauron APT which was a modular platform designed to enable

www.linuxformat.com


Newsdesk Linux news

Microsoft joins the Linux Foundation Solidifies commitment to open source.

W

e’ve reported previously on Microsoft’s embrace of [death?–Ed] open source, and while we’re cynical old hacks at heart, we were pleased to see such a big corporation, who used to be so hostile to open source, apparently changing its ways. Now, Microsoft has taken a big step by joining the Linux Foundation, the non-profit organisation for advancing open source projects, as a Platinum member, while John Gossman, an architect on the Microsoft Azure team, will join the Linux Foundation board of directors. Microsoft already contributes to a number of Linux Foundation projects, such as Node.js Roundation, Open API Initiative and the Open Container Initiative, so this move has not been completely surprising, though it would have been practically unthinkable a few years ago. Scott Guthrie, Executive Vice President, Microsoft Cloud and Enterprise Group, sang the Linux Foundation’s praises by stating that “the Linux Foundation is home not only to Linux, but many of the community’s most innovative open source projects. We are excited to join The Linux Foundation and partner with the community to help developers capitalise on the shift to

intelligent cloud and mobile experiences.” The love-in was reciprocated with Jim Zemlin, Executive Director of The Linux Foundation saying that “Microsoft has grown and matured in its use of and contributions to open source technology… [it] has become an enthusiastic supporter of Linux and of open source and a very active member of many important projects. Membership is an important step for Microsoft, but also for the open source community at large, which stands to benefit from the company’s expanding range of contributions.” We look forward to seeing what Microsoft will bring to the Linux Foundation and its ongoing projects. For a full list of Linux Foundation’s growing membership, check out https://www. linuxfoundation.org/members.

It’s really happened. Microsoft has now joined the Linux Foundation.

hardware news

Lenovo buckles

Backs down on its Windows-only stance for its Yoga hybrids.

A

t the end of 016, Lenovo faced a consumer backlash after it announced that the Yoga 900 and Yoga 900S hybrid laptops (which can be folded into a tablet mode), along with the IdeaPad 710 device could only support Windows. After a furious response, Lenovo has now taken the step of releasing a BIOS update that adds an AHCI SATA mode so that users can now install Linux. Lenovo had claimed that the unique designs of the Yoga laptops meant that only Windows 10 was supported, and created further confusion for a time over whether future hardware would support Linux after it emerged that new Kaby Lake chips from Intel and AMDs upcoming Zen chips, would only support Windows 10. Lenovo’s climbdown

over Linux support is welcome, but it still feels rather half hearted. Lenovo has made it clear that it will not offer support for laptops running the new BIOS and hasn’t commented on whether or not installing the update will void the laptop’s warranty. Lenovo has yet to mention the Yoga 900 or 900S in its list of Linux-supporting devices either (https://support.lenovo.com/us/en/ documents/pd031426), reinforcing the feeling that Lenovo is reluctant to support Linux on its hybrid laptops.

Newsbytes We’ve often said that storing all of your important files on a single large capacity drive is folly, and the recently-released Backblaze Hard Drive Failure rate for Q3 2016 report (which can be read at https://www. backblaze.com/blog/hard-drivefailure-rates-q3-2016/) backs up our advice by showing that the Seagate 8TB hard drive has a failure rate of 1.46%, with the Western Digital 6TB drive suffering from an unacceptable 11.31% failure rate. Meanwhile more sensible capacities, such as the HGST 2TB and HGST 3TB drives suffered from just 0.69% and 0.35% failure rates, respectively. Basically, use smaller hard drives to store your files, and avoid 3TB Seagate if possible! There’s not been much good news coming out of the US government recently, but there is a glimmer of hope with the ‘People’s Code’ project (https://code.gov/#/) encouraging open source collaboration by inviting citizens to contribute to the Code.gov platform. It has put all Federal source code online as a single repository and follows on from the Federal Source Code Policy launched in August 2016, which required any code developed for the US federal government to be released with a permissive open source licence and that the source code itself is made publicly available. Computer manufacturer Pine64 has released two new ARMbased open source laptops. Known as the Pinebook, these laptops come with an 11.6-inch display for $89 and a 14-inch display for $99, and feature a full size keyboard, multi-touch touchpad, HDMI port, microSD card slot, 2GB RAM and a 64-bit quad-core ARM Cortex A53 processor. To find out more about these laptops visit Pine64’s webstore at https://www. pine64.org/?page_id=3707.

The Pinebook is light, affordable and open source. Just $84!

Hate Windows but fancy the Lenovo Yoga 900? Put Linux on it.

www.techradar.com/pro

January 2017 LXF219    7


Newsdesk Comment

DevOps needs open source Mark Hinkle Everyone is talking about DevOps. The integration of software developers and operations personnel is one of the hottest topics in IT right now. The idea is simple: let’s break down the barriers between those who know exactly why they are building a particular piece of software and those who are maintaining the IT infrastructure, and professionals will be able to make much better judgements about how to deploy and integrate software continuously. What started as a cultural movement has grown into a central element of the modern IT landscape—and a rapidly growing career field. This overwhelming success wouldn’t have been possible without a little help from open source. It was a very organic process: the moment the DevOps community noticed a tool was missing, it set out to create it. From the beginning, open source was the natural choice for those involved in the movement—and it still is. At this stage, DevOps provides strong job security, highly competitive compensation and enormous opportunities for growth. And yet, there’s still a lack of experience and talent. Support materials such as the DevOps Handbook and easily accessible online courses such as those offered by The Linux Foundation are starting to make a difference here. Once again open source will be centre stage. There’s widespread agreement in the community that a collaborative approach is the best way to create the framework to enable individuals to better understand the concepts involved in DevOps—and keep pushing the movement forward. By advancing the technology through new open source projects. And by creating networking forums as places to develop skills and learn from one another. Wherever the DevOps movement goes next— open source looks set to continue being the force that drives innovation, and provides vital support. Mark Hinkle is the vice president of Marketing at The Linux Foundation .

10     LXF219 January 2017

Distro watch What’s behind the free software sofa?

SparkyLinux 4.5 The Debian-based SparkyLinux has been updated to version 4.5, which brings LibreOffice 5, Linux kernel 4.8.7 and system 232. It also drops the Pantheon desktop environment, with both the Deepin desktop and Common Desktop Environment (CDE) offered as replacements, alongside existing desktop environments LXDE, LXQt, KDE, Mate and Xfce. Support for the exfat file system has also been added. The Sparky MinimalGUI and Minimal CLI allow you to install SparkyLinux with a minimal set of applications to suite

your needs. For more information check out the release notes at http://bit.ly/SparkyLinux4_5.

SparkyLinux 4.5 comes with a range of desktops—but Pantheon didn’t make the cut this time.

Zentyal Server 5.0 A major new release of the Ubuntubased Zentyal distro has been released. Aimed at small business servers, Zentyal Server 5.0 is the first build to be based on Ubuntu 16.04 LTS and includes Samba 4.5.1, SOGo 3.2.1, which features a new UI and improvements on ActiveSync implementation, a switch from upstart to systemd and more.

For more information, visit http://bit.ly/Zentyal5 for the release announcement.

If you run a small business server, then the new Zentyal Server 5.0 release is worth considering.

Peppermint 7 respin Peppermint 7, the lightweight Lubuntu-based distro, has released an updated version of its installation media. This respin (known as Peppermint-7-20161129) includes a number of improvements, such as an update to the Linux kernel 4.4, improved support for Bluetooth headsets and Samba network printers, added hplip package

support for HP printers and has prevented the update manager from prompting users to upgrade to the next Ubuntu LTS version by default. For more information about this respin visit: http://bit.ly/Peppermint7.

Fedora 25 The Red Hat sponsored community project Fedora has reached version 25 and comes complete with Gnome 3.22, a new media writer that makes it easier to copy the distro to a USB stick and MP3 playback support in the official repositories. Fedora 25 is available in Workstation, Server and Cloud editions, with the workstation version including improved Flatpak support

www.linuxformat.com

that makes it easier to install, update and remove Flatpak software. For a full list of new and improved features, visit the release announcement at http://bit.ly/Fedora25.

The popular and powerful Fedora distro has reached version 25.


love your brain with this ultimate guide!

therubyracer”, “~> 0.11.4” group :development, :test do gem “rspec-rails”, “~> 2.13.0” $ gem install bundler $ gem install rails --version=3.2.12 $ rbenv re odolist --skip-test-unit respond_to do |format| if @task.update_attributes(params[:task]) format.html { redirect_to @task, notice: ‘...’ } format.json { head :no_co t.html { render action: “edit” } format.json { render json: @task.errors, status: :unprocessable_entity } $ bundle exec rails generate migration add_priori y:integer $ bundle exec rake db:migrate $ bundle exec rake db:migrate $ bundle exec rails server validate :due_at_is_in_the_past def due_at_is_in_the_ ue_at, ‘is in the past!’) if due_at < Time.zone.now #!/usr/bin/en python import pygame from random import randrange MAX_STARS = 100 pygame.ini me.display.set_mode((640, 480)) clock = pygame.time.Clock() stars = for i in range(MAX_STARS): star = [randrange(0, 639), randrange(0, 479), randrange(1 d(star) while True: clock.tick(30) for event in pygame.event.get(): if event.type == pygame.QUIT: exit(0) #!/usr/bin/perl $numstars = 100; use Time::HiRes urses; $screen = new Curses; noecho; curs_set(0); for ($i = 0; $i < $numstars ; $i++) { $star_x[$i] = rand(80); $star_y[$i] = rand(24); $star_s[$i] = rand(4) + 1; en->clear; for ($i = 0; $i < $numstars ; $i++) { $star_x[$i] -= $star_s[$i]; if ($star_x[$i] < 0) { $star_x[$i] = 80; } $screen->addch($star_y[$i], $star_x[$i], “.”); } $scree p 50000; gem “therubyracer”, “~> 0.11.4” group :development, :test do gem “rspec-rails”, “~> 2.13.0” $ gem install bundler $ gem install rails --version=3.2 h $ rails new todolist --skip-test-unit respond_to do |format| if @task.update_attributes(params[:task]) format.html { redirect_to @task, notice: ‘...’ } format. ontent } else format.html { render action: “edit” } format.json { render json: @task.errors, status: :unprocessable_entity } $ bundle exec rails generate mig y_to_tasks priority:integer $ bundle exec rake db:migrate $ bundle exec rake db:migrate $ bundle exec rails server validate :due_at_is_in_the_past def du ast errors.add(:due_at, ‘is in the past!’) if due_at < Time.zone.now #!/usr/bin/en python import pygame from random import randrange MAX_STARS = 1 creen = pygame.display.set_mode((640, 480)) clock = pygame.time.Clock() stars = for i in range(MAX_STARS): star = [randrange(0, 639), randrange(0, 479), ra ars.append(star) while True: clock.tick(30) for event in pygame.event.get(): if event.type == pygame.QUIT: exit(0) #!/usr/bin/perl $numstars = 100; use T leep); use Curses; $screen = new Curses; noecho; curs_set(0); for ($i = 0; $i < $numstars ; $i++) { $star_x[$i] = rand(80); $star_y[$i] = rand(24); $star_s[$i] = e (1) { $screen->clear; for ($i = 0; $i < $numstars ; $i++) { $star_x[$i] -= $star_s[$i]; if ($star_x[$i] < 0) { $star_x[$i] = 80; } $screen->addch($star_y[$i], $star_ en->refresh; usleep 50000; gem “therubyracer”, “~> 0.11.4” group :development, :test do gem “rspec-rails”, “~> 2.13.0” $ gem install bundler $ gem on=3.2.12 $ rbenv rehash $ rails new todolist --skip-test-unit respond_to do |format| if @task.update_attributes(params[:task]) format.html { redirect_to @t ormat.json { head :no_content } else format.html { render action: “edit” } format.json { render json: @task.errors, status: :unprocessable_entity } $ bundl ate migration add_priority_to_tasks priority:integer $ bundle exec rake db:migrate $ bundle exec rake db:migrate $ bundle exec rails server validate :due_at ef due_at_is_in_the_past errors.add(:due_at, ‘is in the past!’) if due_at < Time.zone.now #!/usr/bin/en python import pygame from random import randra S = 100 pygame.init() screen = pygame.display.set_mode((640, 480)) clock = pygame.time.Clock() stars = for i in range(MAX_STARS): star = [randran ange(0, 479), randrange(1, 16)] stars.append(star) while True: clock.tick(30) for event in pygame.event.get(): if event.type == pygame.QUIT: exit(0) #!/ stars = 100; use Time::HiRes qw(usleep); use Curses; $screen = new Curses; noecho; curs_set(0); for ($i = 0; $i < $numstars ; $i++) { $star_x[$i] = rand(80) d(24); $star_s[$i] = rand(4) + 1; } while (1) { $screen->clear; for ($i = 0; $i < $numstars ; $i++) { $star_x[$i] -= $star_s[$i]; if ($star_x[$i] < 0) { $star_x[$i] = 80 h($star_y[$i], $star_x[$i], “.”); } $screen->refresh; usleep 50000; gem “therubyracer”, “~> 0.11.4” group :development, :test do gem “rspec-rails”, “~> 2.13.0” $ er $ gem install rails --version=3.2.12 $ rbenv rehash $ rails new todolist --skip-test-unit respond_to do |format| if @task.update_attributes(params[:task]) fo ct_to @task, notice: ‘...’ } format.json { head :no_content } else format.html { render action: “edit” } format.json { render json: @task.errors, status: :unprocess ndle exec rails generate migration add_priority_to_tasks priority:integer $ bundle exec rake db:migrate $ bundle exec rake db:migrate $ bundle exec rails ser at_is_in_the_past def due_at_is_in_the_past errors.add(:due_at, ‘is in the past!’) if due_at < Time.zone.now #!/usr/bin/en python import pygame from ran ange MAX_STARS = 100 pygame.init() screen = pygame.display.set_mode((640, 480)) clock = pygame.time.Clock() stars = for i in range(MAX_STA ange(0, 639), randrange(0, 479), randrange(1, 16)] stars.append(star) while True: clock.tick(30) for event in pygame.event.get(): if event.type == pygame.Q /bin/perl $numstars = 100; use Time::HiRes qw(usleep); use Curses; $screen = new Curses; noecho; curs_set(0); for ($i = 0; $i < $numstars ; $i++) { $star_x[$i y[$i] = rand(24); $star_s[$i] = rand(4) + 1; } while (1) { $screen->clear; for ($i = 0; $i < $numstars ; $i++) { $star_x[$i] -= $star_s[$i]; if ($star_x[$i] < 0) { $star_ en->addch($star_y[$i], $star_x[$i], “.”); } $screen->refresh; usleep 50000; gem “therubyracer”, “~> 0.11.4” group :development, :test do gem “rspec-rails”, “~ nstall bundler $ gem install rails --version=3.2.12 $ rbenv rehash $ rails new todolist --skip-test-unit respond_to do |format| if @task.update_attributes(pa t.html { redirect_to @task, notice: ‘...’ } format.json { head :no_content } else format.html { render action: “edit” } format.json { render json: @task.err ocessable_entity } $ bundle exec rails generate migration add_priority_to_tasks priority:integer $ bundle exec rake db:migrate $ bundle exec rake db:migra ails server validate :due_at_is_in_the_past def due_at_is_in_the_past errors.add(:due_at, ‘is in the past!’) if due_at < Time.zone.now #!/usr/bin/en pyt me from random import randrange MAX_STARS = 100 pygame.init() screen = pygame.display.set_mode((640, 480)) clock = pygame.time.Clock() star MAX_STARS): star = [randrange(0, 639), randrange(0, 479), randrange(1, 16)] stars.append(star) while True: clock.tick(30) for event in pygame.event.get(): i game.QUIT: exit(0) #!/usr/bin/perl $numstars = 100; use Time::HiRes qw(usleep); use Curses; $screen = new Curses; noecho; curs_set(0); for ($i = 0; $i < { $star_x[$i] = rand(80); $star_y[$i] = rand(24); $star_s[$i] = rand(4) + 1; } while (1) { $screen->clear; for ($i = 0; $i < $numstars ; $i++) { $star_x[$i] -= $ _x[$i] < 0) { $star_x[$i] = 80; } $screen->addch($star_y[$i], $star_x[$i], “.”); } $screen->refresh; usleep 50000; gem “therubyracer”, “~> 0.11.4” group :develo m “rspec-rails”, “~> 2.13.0” $ gem install bundler $ gem install rails --version=3.2.12 $ rbenv rehash $ rails new todolist --skip-test-unit respond_to do |form e_attributes(params[:task]) format.html { redirect_to @task, notice: ‘...’ } format.json { head :no_content } else format.html { render action: “edit” } format.js @task.errors, status: :unprocessable_entity } $ bundle exec rails generate migration add_priority_to_tasks priority:integer $ bundle exec rake db:migrate $ b b:migrate $ bundle exec rails server validate :due_at_is_in_the_past def due_at_is_in_the_past errors.add(:due_at, ‘is in the past!’) if due_at < Time.zone.

out now! with free digital edition

delivered direct to your door

Order online at https://www.myfavouritemagazines.com or or find find us us in in your your nearest nearest supermarket, supermarket, newsagent newsagent or or bookstore! bookstore!


Write in!

lxf.letters@futurenet.com Tell us what we’re doing right and more importantly what we’re doing wrong.

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

Linux love I’ve been thinking about moving to Linux for months, but I have a two-year-old Lenovo PC with Windows 10 and don’t know if I want to partition off a bit of its hard drive to set up a dual-boot scenario or go and buy a cheap PC and go from there. My thought is that I’d make a home server, but I might set up a file, web, mail or database server. Bryce Samuelson, via email. Neil says: Does the laptop have a DVD drive? You can boot the Linux Format disc and run most of the distros ‘live’ off the disc without needing to install anything. That should give you a good flavour of Linux. The next step is you could write one of the distro ISO files to a spare 8GB+ USB stick and boot Linux off that. After that you could consider messing with partitions… An alternative is to buy a Pi 3 for around £25 that runs a version of Debian called Raspbian but Ubuntu is available too. This is an ARM-based processor – not the same as the usual Intel or AMD

If you want a system to tinker with Linux then consider grabbing a Raspberry Pi 3.

x86 processors in most PCs – so there are some limitations in terms of 3D abilities and its overall horsepower.

Discs downunder After purchasing the June 2016 issue of Linux Format magazine [LXF211], I find that the DVD doesn’t contain the stated software. It only had Bodhi Linux and the System Recovery Cd. Is there a known issue with the DVD attached to the magazine?

Ken Ibbotson, Australia. Jonni says: says: Sounds like a dodgy LXFDVD to me, there’s always a few. The menu entries for each distro are compiled from separate text files as Grub is loading. If these can’t be read then the corresponding menu would not appear. If you are able to look at the disc from another operating system, then you should be able to find the ISO files in the Ubuntu directory. If the disc is damaged this might not work, but if it does those ISO files can be burned to a disc (or USB stick) using a program such as Imgburn in Windows or Brasero in Linux.

having problems. Unfortunately everything looks OK from our end. Are you able to open the torrent (e.g. in Transmission or uTorrent or the like) and does it download a giant (4.4GB) ISO? Or does your torrent software give you an error? We don’t host the ISOs ourselves because of the huge amount of bandwidth and space it uses, but you can download the ISO directly from https://archive.org/ details/lxfdvd213 if the torrent continues to cause you problems.

Terrible torrents My DVD is broken, so I tried to download the torrent and it doesn’t work, I don’t want another DVD. Louisa, via email. Jonni says: Sorry to hear you’re

There are plenty of ways to use our lovely disks and plenty of ways to get their contents.

Letter of the month

D

Ban Ubuntu

etermining what group an article is aimed at without having to read at least half-way through, and your insistence on pushing Ubuntu is irritating. I realise that Ubuntu is currently the most popular distro, but that just makes it worse; the most popular distro needs no drumbeating. As you say, ‘apt get...’ could be replaced by any installer, so I would suggest that the large amount of columnspace wasted with installation instructions for each featured software should be reclaimed by putting at the end of the

article a box containing the components needed, making more space available to discuss the software’s features etc. Leslie T, via email. Neil says: This isn’t about promoting any one distro, it’s about providing reader support and I’d consider it bizarre not to provide tutorials for the most widely used distro among our readership, at least. On top of that point, it’s not just applicable to Ubuntu but also largely to Debian as well, and to all the Ubuntu respins including Mint and Elementary, that’s four out of the top five (according to DistroWatch) distros.

www.techradar.com/pro

You’re all probably sick of seeing this round orange logo, right?

I’m certainly not discounting your’s and others’ views here, we have been a bit woeful in covering other distros; certainly Fedora, openSUSE, Arch, Mageia (a personal favourite) and CentOS should be finding their way into these pages more often than they do. But please, do keep letting us know what we’re doing wrong and perhaps occasionally mention what we’re doing right!

January 2017 LXF219    11


Mailserver

Small fry

Credit: Booyabazooka,http://bit.ly/LXF219cube CC BY-SA 3.0

Huu-Uuh! All this bickering over such a small amount of bits, 32-bit wide. Sad, really if all that antiquity is lost from the MiddleEarthy map of freedom! As there are many 64-bit computers, which need a 32-bit kernel to resurrect their normal operations, because of buggy BIOS etc. But that’s life for hitchhikers even in the galactic botnet, right? Timo, Finland. Neil says: The 32-bit version won’t be lost, anyone that wants to can still compile their own 32-bit kernel and build their own 32-bit distro. Certainly, this is going to cause issues with badly configured hardware (like your buggy 32-bit BIOS) there’s also going to be a host of low-cost 32-bit UEFI systems that can be a pain to boot 64-bit Linux. Hopefully our feature in LXF218

[Reviving your old PCs, p46] helped explain some of the moves you can make to keep your 32-bit hardware running a wee bit longer.

Puzzling You asked for my thoughts on Linux Format; I have a few suggestions

that may seem relevant, but I doubt that I’m a typical reader. At 74 years old, a retired machinist, my hobby is my first love: mathematics and programming. The first programming language I learned was Fortran, and numerical analysis made me love computing. When I wanted to relearn the C I had mostly forgotten, I had an Indian friend advise me that Microsoft wasn’t ideal, and that I could use Cygwin to make sense out of the DOS hash. He then advised me that a new thing had come up called Linux and it was pretty good. I tried installing it on my laptop and after a few tries and much fiddling around, I got Linux to boot. I’ve not looked back. I’ve never been much of a gamer, so I’m odd for my generation. I also dislike television. I enjoy reading and writing a great deal. Aside from C, I’ve learned Python 2, Python 3, Lisp and Java, and I’m now

shane_collinge@yahoo.com

We all like a good puzzle.

The development of 64-bit processors has brought their own hardware bugs.

12     LXF219January 2017

www.linuxformat.com

taking a course in OCaml with a friend at Cal Tech. What I think would be most helpful for Linux Format would be a programmer’s puzzle page. It would be a challenge to solve a problem with good code that’s commented professionally and runs in reasonable time and space. You folks should have contacts with a number of graduate students to help with problems, here, even if some of your readers may resent being ‘graded.’ Most of us would enjoy a challenge. John Wagner, Alhambra. Neil says: I’m constantly amazed at how broad a spectrum of people Linux and our readership embrace, it’s really heartwarming. It’s also good to hear that you’ve managed to gain substantial coding skills on your own too. As much as I like your idea it’s certainly something that we’d struggle to implement in a readerfriendly way; we’d be setting the level either too high or low, due to the print nature it’d take ages for the results and answers to


Linux Format 219 (Sampler)  

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