ebook img

Linux User & Developer 157 - Build Your Own System Tools PDF

100 Pages·2015·24.146 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Linux User & Developer 157 - Build Your Own System Tools

EXCLUSIVE PROJECT CODE, VIDEOS & SOFTWARE www.linuxuser.co.uk L IN U X U S E R & D 1Omm E V E L O P E R TTHHEE EESSSSEENNTTIIAALL MMAAGGAAZZIINNEE ISIS SS FFOORR TTHHEE GGNNUU GGEENNEERRAATTIIOONN UU EE 1 1 55 77 RUN WINDOWS MASTCEARL SLYSSTEM APPS IN LINUX UUUPPPNNNRRRDDDOOOEEECCCRRREEESSSTTTSSSAAASSSEEENNNSSSDDD m m 0 3 B U IL D Y m O m U 8 R 1 O W N SY WORK ST WITH C EM FUNCTIONS 14mm T USE OO MULTIPLE LS mm mm LLAANNGGUUAAGGEESS 8 0 4 3 HARNESS LINUX SYSTEM CALLS TTOO DDEEVVEELLOOPP NNEEWW UUTTIILLIITTIIEESS GET STARTED VVIISSUUAALLIISSEE DOCKER PPII WITH MMUUSSIICC WWIITTHH Launch your first container now BBBBrrrriiiinnnngggg ttttuuuunnnneeeessss ttttoooo lllliiiiffffeeee wwwwiiiitttthhhh aaaannnn LLLLEEEEDDDD ssssttttrrrriiiipppp PPLLAASSMMAA w w w MOBILE ISSUE 157 £5.99 .lin ISSN 2041-3270 57 > u x u s Sebastian Kügler e 9 772041 327002 r.c reveals the new OS o .uk PLUS OSMC|ENCRYPTR|D3.JS|TWILIO|AWS 001_LUD_157 Week3.indd 1 08/09/2015 17:51 Full Page.indd 1 02/09/2015 16:07 Welcome Get Linux User to issue 157 of Linux User & Developer cheaper every issue This issue … Jon Masters is a Linux kernel hacker who has been working on Linux for some Page 34 19 years, since he fi rst attended s university at the age of 13. Jon lives » Launch a Docker container in Cambridge, Massachusetts, t and works for a large enterprise » Run Windows software in Wine r Linux vendor. You can fi nd his e brilliant Kernel Column on pages » Discover systems programming 16-17 this month. p » Build a Raspberry Pi music visualiser Richard Smedley has been helping businesses x and community organisations of all e sizes to move to GNU/Linux since Welcome to the latest issue of Linux User & the 1990s, and doesn’t expect those Developer, the UK and America’s favourite Linux x he works with to share his love of Emacs. Well, maybe a little. This and open source magazine. u month he dives deep into Wine to This month we’re focusing on the developers show us how we can run essential n Windows software natively (p.28). among you: starting with a big guide to systems programming in C that we’re going to follow with a Li Liam Fraser is the creator of the run of tutorials over the coming months (page 20), we RaspberryPiTutorials YouTube series and volunteers as a Linux have some excellent guides that will get you started with C# f server administrator for the o programming, Docker containers, automation and security Raspberry Pi Foundation. Liam combines his love of electronics on AWS, and a pair of tutorials on R and D3.js to help you m and music in this issue, explaining manipulate and visualise data. We’ll be revisiting some of how to map audio to an LED strip for real-time visualisation (p.62). these before the year is out, so stay tuned. a With Windows 10 raising all sorts of privacy concerns, it e Mihalis Tsoukalos is a UNIX system administrator with expertise in was also time to complement the guides to virtualisation and t programming, databases and multibooting that we ran in previous issues with a third option maths. He has been using Linux r since 1993. Mihalis has been busy for giving you access to software that doesn’t play nicely on u this month, creating some excellent Linux: Wine. Using this and PlayOnLinux, we show you how guides to systems programming o (p.20), R (p.36), D3.js (40), as well as to run things such as Photoshop and your PC games on your Y this month’s Coding Column (p.11). favourite distro (page 28), so you can wash your hands of Dan Aldred is a Raspberry Pi Certifi ed Educator Windows altogether and help your friends do the same. and a Lead School teacher for CAS. As for the Ras Pi section, we’ve got something really special He is passionate about creating and for you. Remember the LED strip you used a couple months hacking projects, and uses projects like this to engage the students that back? Well, we’re turning it into a music visualiser (page 62). he teaches. Turn to page 76 to fi nd Plus, we show you how to text and tweet from your Pi – enjoy! his simple guide to setting up Twilio with your Raspberry Pi, so you can Gavin Thomas, Editor send an SMS from the terminal. Get in touch with the team: Gareth Halfacree is our resident news reporter and brings us the latest developments from all over the [email protected] open source world, starting over on page 6. This month Gareth also reviews the new Encryptr software, Buy online which protects passwords and card Facebook: Twitter: details using the zero-knowledge Linux User & Developer @linuxusermag Crypton framework (p.86). Visit us online for more news, opinion, tutorials and reviews: www.linuxuser.co.uk www.linuxuser.co.uk 3 003_LUD_157.indd 3 09/09/2015 19:33 Contents Reviews 81 GTD software Find the best programs to support a Getting Things Done methodology Subscribe & save! Todo.txt Freeplane GTD+ 34s csu Suhbasosvtpoce mr p3ibr0eiec%r es .oc Uann Sth e via page 60 mGSD Org-mode 20 Build your own system tools Discover the power of systems programming 86 Encryptr Zero-knowledge cloud storage for all of your passwords, card details and notes OpenSource Tutorials 06 News 36 Manipulate and convert data in R T he biggest stories from the Transform your stored data sets easily open source world 40 Visualise your data using D3.js 08 Free software column Create impressive, interactive displays with Expert insights into open the Data-Driven Documents library source and free software 44 Launch your first Docker container 11 Coding column Join the containers revolution today 88 Bodhi Linux 3.1.0 Learn problem solving and The Enlightened distribution moves systems programming in C 48 Automate Linux on AWS across to the new Moksha desktop Simplify your Amazon Web Services 12 Interview administration by setting up Spot Instances Sebastian Kügler speaks about Plasma Mobile 52 Secure access to your AWS resources 16 Kernel column Keep data safe and your service operational The latest on the Linux kernel with Jon Masters 56 Start programming in C# Learn to work with the MonoDevelop IDE 94 Letters and begin writing C# software Your questions and views FFiilleeSSiilloo..ccoo..uukk Features 20 Build system tools Five utilities to make now 61 Practical Raspberry Pi 28 Windows with Wine Build the ultimate party piece, explore the No VMs, no dual-booting ElectroSuper tunnel, set up a Samba hard 99996666 FFFrrreeeeee dddooowwwnnnllloooaaadddsss drive for OSMC, learn to use the 1-Wire bus, 62 Pi music visualiser Find out what we’ve uploaded to our digital plus send texts and tweet from your Pi Control LEDs with sound content hub FileSilo for you this month Join us online for more Linux news, opinion and reviews www.linuxuser.co.uk 4 004_LUD_157.indd 4 09/09/2015 16:02 Full Page.indd 1 02/09/2015 16:07 06 News & Opinion | 12 Interview | 90 Q&A | 94 Your Letters ENTERPRISE Linux Foundation announces the Open Mainframe Project Brings together industry and academic partners The Linux Foundation has announced a project “Linux today is the fastest-growing operating The Open Mainframe Project is an offi cial Linux in partnership with industry giants to advance system in the world. As mobile and cloud Foundation Collaborative Project and aims to an enterprise-grade platform for Linux on computing become globally pervasive, new leverage the strengths of Linux in order to take mainframe devices, unsurprisingly dubbed the levels of speed and efficiency are required in advantage of the unique features of mainframe Open Mainframe Project. the enterprise and Linux on the mainframe is hardware. This includes the LinuxONE family, The project brings together industry giants poised to deliver,” claimed Jim Zemlin, executive announced the same day by IBM and Canonical. ADP, CA Technologies, IBM and SUSE as founding director at the Linux Foundation, at the project’s As well as industry members, several academic platinum members, while BMC, Compuware, LC3, announcement. “The Open Mainframe Project will institutions have confirmed membership of the RSM Partners and Vicom Infi nity join as silver- bring the best technology leaders together to work project, including the University of Bedfordshire. level members. Its formation comes as industry on Linux and advanced technologies from across “This is an exciting time to be involved in demand for mainframe systems resurges thanks the IT industry and academia to advance the most enterprise technologies. The potential benefits ttoo iinntteerreesstt iinn cclloouudd ccoommppuuttiinngg aanndd bbiigg ddaattaa ttooppiiccss.. ccoommpplleexx eenntteerrpprriissee ooppeerraattiioonnss ooff oouurr ttiimmee..”” of open source systems optimised to run on the mainframe’s highly scalable and reliable architecture are very significant,” claimed Herbert Daly, senior lecturer in computer science and technology at the University. “The Open Mainframe Project offers our staff and students a fantastic opportunity to collaborate with an outstanding field of talent, dedicated to shaping the future of business-critical enterprise computing.” One of the fi rst tasks for the Open Mainframe Project is the establishment of a neutral home for community meetings, events and collaborative discussions, providing structure around the business and technical governance of the project. On a technical level, the group aims to broaden the tools and resources that are intended to drive development and collaboration of mainframe Linux, while also coordinating mainframe improvements to upstream projects. This is in order to increase the quality of these code submissions and ease upstream collaboration. “Demand has grown among academic, corporate and government partners for furthering the mainframe’s expansion into the open ecosystem,” claimed Ross Mauri from IBM. “IBM looks forward to contributing our expertise to the community and learning from others to fi nd innovative ways to combine the fl exibility of open- source software with the world-class speed, security and scalability of the mainframe.” Left Mainframes such as IBM’s z Systems drive enterprise platforms and big data computing 006-011_LUD157.indd 6 09/09/2015 16:03 MAINFRAME TOP FIVE Features in KDE Plasma 5.4.0 1 Application Dashboard A new full-screen menu, the Application Dashboard, takes over from the Application Menu with a focus on making full use of high-resolution screens. This is in order to fi nd you your software and fi les as quickly as possible, while including easy keyboard navigation and type-to-search functionality for the mouse-averse. 2 Wayland preview The latest Plasma release brings the new kwayland- integration repo, giving those who like to live on the cutting edge a chance to play with the new Wayland windowing system, without having to give up on their existing KDE framework integration. IBM and Canonical 3 Network applet graph If you would like to keep an eye on historical network traffi c, you will be pleased to know that a new graph launch LinuxONE is set to appear in the network applet. The applet also gains SSH and SSTP VPN support via two new default plugins. 4 Easy monitor calibration Mainframe includes custom Ubuntu distribution The gamma monitor calibration tool is new to KDE Plasma 5.4.0 and offers an easy way to adjust how IBM and Canonical have jointly announced the capabilities of commodity servers that are colours are reproduced on your display, providing launch of a new Linux-powered mainframe not designed for security and performance at either print colour matching or simple adjustments family, the IBM LinuxONE, featuring a variant of extreme scale.” to your personal preference. Canonical’s Ubuntu Linux distribution. IBM has also pledged to provide open access 5 New icons galore! Announced on the same day that IBM joined the to the LinuxONE platform with the launch of a Open Mainframe Project as a founding member, developer cloud platform. Hosted at academic For those who like a bit of eye candy, the news the LinuxONE family is based on IBM’s z Systems institutions as well as IBM facilities in Dallas, that KDE Plasma 5.4.0 includes 1,400 new icons platform and launches in two flavours. Firstly, Beijing and Böblingen, instances will enable free providing Breeze-themed artwork, covering a range of applications and services, will be the top-end IBM z13-based LinuxONE Emperor, trials and educational access at no charge. welcomed. These include such apps as Inkscape, offering a claimed ability to run up to 8,000 virtual “The largest enterprises in the world count Firefox and LibreOffi ce. machines simultaneously. Secondly, a scaled- on Ubuntu as their platform for scale-out down variant dubbed the LinuxONE Rockhopper, applications, private and public clouds. With the designed for entry-level mainframe users. expansion of Ubuntu support to IBM z Systems “Fifteen years ago, IBM surprised the industry and LinuxONE, IBM mainframe customers will by putting Linux on the mainframe, and today benefi t from Ubuntu’s ecosystem of scale-out more than a third of IBM mainframe clients are and cloud solutions,” boasted Canonical’s Jane running Linux,” claimed Tom Rosamilia, enior Silber of the partnership. “IBM and Canonical vice president of IBM’s Systems division. “We teaming to bring Ubuntu to z Systems allows are deepening our commitment to the open customers to leverage the speed and security of z source community by combining the best of the Systems, and the open source software and tools open world with the most advanced system in of Ubuntu, to enhance the IT operations for a new the world, in order to help clients embrace new universe of customers.” mobile and hybrid cloud workloads. Building Both LinuxONE mainframe models are Above The Visual Design Group is working to on the success of Linux on the mainframe, available to order from IBM now, with pricing expand the standard icon set to integrate the we continue to push the limits beyond the provided by the company upon request. Breeze, Breeze Dark and Oxygen variants www.linuxuser.co.uk 7 006-011_LUD157.indd 7 09/09/2015 16:03 OpenSource Your source of Linux news & views OpiniOn frEE SOfTWArE Software communes The contribution of the free software movement, both in ideas and hard code, to the rise of Linux isn’t always given its due recognition October is the 30th anniversary of reassign the rights to the user. The irst tangible version the founding of the Free Software of such a licensing regime was ‘the GNU Emacs copying Foundation, a moment that was permission notice’ in 1985, although the GPL as we know barely noticed in its time but can be said to have it irst appeared in 1989. The GPL and its preamble were transformed the development of software. The the most complete expression of the principles of free concepts that deine free software grew out of richard software, but the moment that made free software a Stallman’s experiences at the AI Labs at MIT, his concept to be reckoned with was the release of the Linux personal history with the development of the LISP kernel. Linux had been developed using the GNU tools machine and his disputes with James Gosling over the and was licensed under the GPL. licensing of Emacs. As early as October 1981, Stallman Linus Torvalds later said that “making Linux GPL’d had written: “Emacs does not cost anything; instead, was deinitely the best thing I ever did”. The informality you are joining the Emacs software-sharing commune. of the model that grew around GNU/Linux and the The conditions of membership are that you must send GPL gave everybody the chance to take part and back any improvements you make to Emacs, including make a difference. You could do anything with Linux, any libraries you write…”, which could be seen as an bash it to pieces, install it on your virtual fridge or early attempt to deine copyleft and the irst principles washing machine, shake it or break it, create your own Richard Hillesley of the free software movement. distribution and share it with the world. If you couldn’t James Gosling, who was later famous for the writes about art, music, digital write code, you could write documentation, host rights, Linux and free software for development of Java, wrote a version of Emacs, derived a variety of publications websites, make friends or sell t-shirts. from Stallman’s original concept of Emacs, in C for Unix. This surprising effect extended to the commercial According to Stallman, he “seemed to be inluenced world. Once more, as one hardware company had by the same spirit of sharing and cooperation of the formed a commitment to Linux, it became obvious that original Emacs… He wrote in a manual that he called the there was a mutual advantage in contributing back to program Emacs hoping that others in the community The informality the project and they did. The framework that made this would improve it until it was worthy of that name.” possible was the GPL. The release of core chunks of of the model Gosling initially enabled free distribution of the source corporate code accelerated the development of Linux code, to which others had contributed, and Stallman that grew around and ensured its success in the enterprise, enhanced incorporated some of the code in early versions of GNU by its portability across a wide range of hardware. GNU/Linux and Emacs, but in April 1983, according to Stallman, “he The GPL encouraged commoditisation, and at the stabbed everyone in the back by putting copyrights on the GPL gave system level, commoditisation reduced the costs and it, making people promise not to redistribute it, and then subsequently beneitted everybody. everybody the selling it to a software-house.” Commoditisation of the operating system ensures Gosling had sold GOSMACS, his version of Emacs, to chance to take commoditisation of standards. This makes it easier UniPress and quasi-legal threats were made against to port software between different machines and Stallman. When GNU Emacs was released in the year part and make a architectures, and makes it easier to design hardware 1985, Unipress announced that “portions of the GNU difference itself. Companies don’t use GNU/Linux because of Emacs program are most deinitely not public domain, sentimental attachment to Linux or the GPL, or “open and that use and/or distribution of the GNU Emacs source”. They use GNU/Linux and free software program is not necessarily proper.” because it makes business sense. And free software, Stallman rewrote the offending sections of GNU guaranteed by the GPL, gave assurance of the Emacs, but the confrontations with Gosling and continued freedom and commonality of the code. The Unipress had convinced him that public domain was contribution of the free software movement, both in not suficient to protect the rights of free software. ideas and hard code, to the rise of Linux isn’t always Stallman’s solution was to invert copyright law and given the recognition it deserves. 8 006-011_LUD157.indd 8 09/09/2015 16:03 ROUTERS FCC threatens to block custom router fi rmware New software-defi ned radio rules could spell trouble for enthusiasts The ease with which wireless network routers Replacing the stock firmware of Linux-based Above Devices like the Linksys WRT1900AC can be modified with a third-party firmware is networking hardware with more powerful third- could become illegal under new FCC rules set to take a hit thanks to new rules from the party alternatives, such as OpenWRT, is popular US Federal Communications Commission that enough that there are router models designed with he claimed, “this change does not only affect promise to block firmware modifications. this specifically in mind. However, under the new routers in the US, but also Europe, and this will also Under rules that became effective this year, set FCC Part 15 rules, they could become illegal in the affect wireless communities.” to be fully enforced for all devices on the market in US over fears that they could be used to operate in As well as unlocking new features, third-party June 2016, the FCC is to require all licensed devices unlicensed spectrum, or at illegal power levels. firmware is often used to breathe new life into – a requirement for sale in the US – to “implement Speaking at the Wireless Battle of the Mesh devices that manufacturers have ceased to software security to ensure that the devices event in Slovenia, Simon Wunderlich argued that support. This means that under the new rules, operate as authorised and cannot be modified,” this was likely to have a global impact. “Since the consumers could be left running insecure devices seemingly to lock out third-party modifications. same types of devices are often sold worldwide,” on their network due to the new restrictions. STORAGE Kinetic is now an open Linux project Seagate’s enterprise-grade storage platform, Kinetic, is now an official Linux Foundation Collaborative project, with companies including Western Digital, Toshiba, Dell and Cisco joining the development effort. Kinetic combines storage devices featuring integrated Ethernet connectivity with a key/value store paradigm claimed to improve the effi ciency, scalability and fl exibility of enterprise storage. Using open source software and a standardised set of application ADD A REMOTE programming interfaces (APIs), storage developers can use a Kinetic DBA TO YOUR TEAM system to reduce the overheads of storage area network (SAN) implementations, taking advantage of features like direct drive-to-drive data transfer via Ethernet, without needing an intermediate host device. Although billed as the Kinetic Open Storage platform, the standard remained under Seagate’s control until the formation of the Linux Remote DBA from 2ndQuadrant is Foundation Collaborative Project. Now truly open, network and storage the ideal solution for organisations vendors have joined and pledged their support, but none have offered a release date for Kinetic-compatible, Ethernet-enabled storage devices. needing extra help to manage their According to documentation, Kinetic enables an increase in rack PostgreSQL database – with our density, a reduction in power draw and cooling, easy data sharing, and expert knowledge of the core code, the removal of what the company calls “superfl uous layers of legacy you couldn't be in safer hands software and hardware” associated with traditional SAN platforms. “The Seagate Kinetic Storage platform… delivers the new paradigm necessary to enable us collectively, as an industry, not only to meet this Remote DBA is offered as a service extension to our mandate, but to do so optimally and in the most cost-effi cient manner Gold and Platinum Production Support service plans required,” a company spokesman claimed at the announcement. UK +44 (0)870 766 7756 US +1 650 378 1218 2ndquadrant.com/rdba 006-011_LUD157.indd 9 09/09/2015 16:03 OpenSource Your source of Linux news & views DISTRO FEED Top 10 (Average hits per day, 5 August - 3 September) Linux Mint 1. 3,096 Debian 2. 2,062 Ubuntu 3. 1,569 GAMING openSUSE 4. - 1,175 5. Fedora 1,148 Unity game Manjaro 6. 1,123 CentOS 7. 981 engine hits Linux Mageia 8. 945 Kali Linux 9. 925 Zorin OS 10. 800 Future support for the platform is not guaranteed This month The game engine specialist Unity has call an experimental build; future support is announced the release of an experimental not yet guaranteed,” warned Unity’s Na’Tosha ■ Stable releases (24) ■ In development (13) build of its software for Linux, making good on Bard. “Your adoption and feedback will help us its roadmap promise to support the operating determine if this is something we can sustain While Linux Mint has system in future releases. alongside our Mac and Windows builds.” Bard taken a hit, it remains A popular engine for both games and general- did not indicate what usage and feedback levels number one. Meanwhile, purpose 3D rendering, Unity has previously been would constitute enough for the company to Kali’s rise to the top ten is rare for an application- restricted to use on only proprietary platforms. adopt Linux as a fully supported platform for all specifi c distro This month’s release changes that, bringing future releases, following in the footsteps of rivals offi cial support for running the software on including Epic’s Unreal Engine. Highlights Ubuntu 12.04 or newer, plus unoffi cial support for Interest from developers in Linux as a gaming other 64-bit Linux distributions. platform is higher than ever, thanks in no small The release is a test for the company, part to game developer and publishing giant Ubuntu 15.10 Beta 1 however, and Unity has not committed to a full Valve basing its gaming-centric operating system Released ahead of the full launch and formal release. “Today’s build is what we SteamOS on the Debian Linux distribution. in October, the latest Ubuntu ‘Wily Werewolf’ beta comes in standard, Kubuntu, FEDORA Lubuntu, Ubuntu GNOME, Ubuntu MATE, Ubuntu Kylin, Xubuntu and Ubuntu Cloud fl avours for testers of every type to enjoy. Support for 32-bit x86 demoted Zorin OS 10 Featuring an Ubuntu 15.04 base, the latest Fedora makes 64-bit x86 the gold standard Zorin OS includes a new media player and a neat activity journal that displays files and documents you have worked on throughout the day. The Fedora project has demoted support for 32- After some discussion, the committee bit x86 architectures from its Linux distribution, agreed to change the vote away from a total Kali 2.0 following a vote by the Fedora Engineering abandonment of i686 support, to making it a The release of Kali 2.0 has brought a shift Steering Committee (FESCo). non-blocking deliverable. This means that its to a rolling-release model. It is designed In its late August meeting, FESCo raised a absence (should work not be complete in time) to make it easier to keep the penetration testing and vote on removing support for the i686 32-bit would not prevent the general launch of Fedora security distribution updated. x86 instruction set architecture from Fedora 24, effectively demoting the architecture support. 24. “From my PoV [point of view], nobody wants The 64-bit x86 architecture, backwards- Latest distros to support the i686 image,” Haïkel Guémar told compatible with the traditional 32-bit variant, was available: attendees. “I’m completely +1 for [in favour of] launched in 2003 by AMD as AMD64 and picked dropping all of the i686 images/media in f24 up by Intel a year later. Today, the majority of both fi lesilo.co.uk [Fedora 24],” added Kevin Fenzi. company’s chips are 64-bit. 10 006-011_LUD157.indd 10 09/09/2015 16:03

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.