Linux & Open Source Genius Guide Vol 5
Total Page:16
File Type:pdf, Size:1020Kb
A comprehensive masterclass to becoming an instant expert Welcome to Linux & Open Source Despite heavy competition from other operating systems, Linux has not only managed to survive but it has thrived. The recent success of the Raspberry Pi has provided an added impetus for coders, developers and everyday users to take advantage of the many customisable services and utilities that the platform offers. Linux & Open Source Genius Guide Volume 5 is guaranteed to keep any ardent Linux user busy for weeks with the number of useful tutorials, masterclasses and guides on offer. We’ve covered a wide range of fun and useful tips & tricks from creaing your own Windows 8.1 VM to taking pictures and video with the Raspberry Pi Camera. You’ll find tons of useful guides that include dual-booting Linux on any device and an ultimate Qt masterclass. We’ve even featured the essential Linux software for your everyday needs. So, fire up your machine, turn the page, and follow our experts as they guide you through all areas of using and developing Linux. Linux & Open Source Imagine Publishing Ltd Richmond House 33 Richmond Hill Bournemouth Dorset BH2 6EZ +44 (0) 1202 586200 Website: www.imagine-publishing.co.uk Twitter: @Books_Imagine Facebook: www.facebook.com/ImagineBookazines Publishing Director Aaron Asadi Head of Design Ross Andrews Production Editor Hannah Kelly Senior Art Editor Greg Whitaker Designer Abbi Denney Photographer James Sheppard Printed by William Gibbons, 26 Planetary Road, Willenhall, West Midlands, WV13 3XT Distributed in the UK, Eire & the Rest of the World by: Marketforce, Blue Fin Building, 110 Southwark Street, London, SE1 0SU Tel 0203 148 3300 www.marketforce.co.uk Distributed in Australia by: Network Services (a division of Bauer Media Group), Level 21 Civic Tower, 66-68 Goulburn Street, Sydney, New South Wales 2000, Australia Tel +61 2 8667 5288 Disclaimer The publisher cannot accept responsibility for any unsolicited material lost or damaged in the post. All text and layout is the copyright of Imagine Publishing Ltd. Nothing in this bookazine may be reproduced in whole or part without the written permission of the publisher. All copyrights are recognised and used specifically for the purpose of criticism and review. Although the bookazine has endeavoured to ensure all information is correct at time of print, prices and availability may change. This bookazine is fully independent and not affiliated in any way with the companies mentioned herein. Linux & Open Source Genius Guide Volume 5 © 2014 Imagine Publishing Ltd Part of the bookazine series Contents Your guide to what’s inside Tips & Tricks 18 Host your own webmail server 60 SSH from a web browser 22 Network scanning using Nmap 64 Master version control with Git 26 Create the perfect Windows 8.1 68 Take pictures and video with the virtual machine Raspberry Pi Camera 30 Understand regular expressions 70 Record slow-motion videos with the Raspberry Pi 34 Use TeX and LaTex to create beautiful documents 72 Browse privately with Onion Pi 38 Set up a wireless access point with a Raspberry Pi 40 Configure your PC for remote maintenance Masterclass 78 Dual-boot Linux on any device 44 Build your own private cloud with ownCloud 88 Get started with Android Studio 48 Monitor network traffic 96 Get to grips with Go Program! 52 Access your network anywhere with a VPN 100 Qt masterclass 56 Use gnuplot for drawing 112 Program with Erlang Page 8 Build your own distro 6 Linux & Open Source Genius Guide Linux & Open Source Genius Guide Developer guide Essential software 120 Write once, use anywhere 160 Presentation software with Qt 164 Music players 124 Answer real-world questions with Gt 168 Cloud storage services 128 Handle Twitter’s three-legged 172 Integrated development oAuth process 176 Ultimate IRC client 132 Create dynamic templates with Flask, Jinja2 and Twitter 180 System recovery 136 Build a blog with Django 184 Video editors 142 Create a real-time CPU 188 Photo managers meter with Node.js and Duino 146 Build tic-tac-toe with Kivy 150 Get started with Gulp.js 154 Master Vim in easy steps Page 78 Dual-boot Linux on any device Linux & Open Source Genius Guide 7 Build your own distro Discover the different methods available for creating your own customised distro and have everything working your way in no time here a few reasons why you There are other, niche reasons for wanting to might want to build your own build your own distribution too. You might need to distribution. You might want to put something small and lightweight together for an build a custom install CD to match older computer. You might need to build a live media the policy of your organisation. For ISO that you are able to carry around with you and example, a GNOME desktop with to bring your favourite set of tools to bear when you TChrome as the web browser might be the standard need them. You have the fl exibility to create your desktop where you work. That touches on another own distro whatever your needs. motivation for wanting to create a customised The methods of creating a custom installer: if the creator of the distribution makes a distribution are varied, but they can be divided decision that you don't like. Canonical's decision to into two main categories: you can modify a switch to its own UI, Unity, ranks amongst its most running distribution and then distribute it, or controversial decisions. However, by using some of you can modify the installation ISO (called the methods that we explore here, you could 'remixing') so that it installs your modifi ed create a distribution that is standard distribution in the way you have specifi ed. Ubuntu, but with a traditional desktop We're going to take a look at four different that you are more comfortable with. approaches. 8 Linux & Open Source Genius Guide Linux & Open Source Genius Guide Remastersys Remastersys is a tool that extracts the confi guration from a running Ubuntu Pros or Debian installation and then turns You can use the this into an installable ISO image. This standard tools to confi gure a means that you carry out the customisation using distribution the standard tools that you normally use, such as the package management system and GUI Cons Needs the confi guration tools. When you have everything set expertise to up the way you want it, you can clone the system and carry out the customisations, deploy it. Additionally, you can use Remastersys to doesn't work on make a clone of a working system. all distros, has an uncertain future Fetch Remastersys The development status of Remastersys is currently in transition. At time of writing, the best policy is to visit the Remastersys website and to cut and paste the repository details from there. For example, if you are using Ubuntu 13.10, download the GPG key and add it from the command line with: Tip wget -O - http://www.remastersys.com/ubuntu/ The 'Start the installer remastersys.gpg.key directly' option on the sudo apt-key add remastersys.gpg.key GRUB menu is more then add… dependable than deb http://www.remastersys.com/ubuntu installing via the live precise main CD option …to the end of /etc/apt/sources.lst by invoking a text Q Booting from the installation ISO editor as root. Following that, type sudo apt-get install remastersys remastersys-gui in order to install Remastersys and its GUI. “The future of the GUI portion of the Using Remastersys project seems less certain” When you have the installation set up the way you want it, launch Remastersys by typing sudo you skip this stage, new users will simply have the remastersys-gui. The fi rst option we need to visit is default settings for the distribution. the customisation page which is reached by clicking Finally, build the installation ISO simply by clicking The future of on the Customise button. From here, you can change on the Distribution button on the main menu page. branding options such as the various splash images. The ISO is deposited into the /home/remastersys/ Remastersys From within this page, click on Copy Settings. This folder. Use networking to transfer the ISO fi le to the The long-time developer of Remastersys takes you to a further page on which you can select outside of the VM. We usually install Filezilla and recently decided to give up development. the user whose settings will be copied to /etc/skel/. In transfer to a local FTP server. You can now boot the Fortunately, he has chosen to release the other words, these are the settings that will become ISO on the target machine and carry out a regular source code so that other developers can the defaults for all new users on the new system. If Ubuntu installation. take up the mantle. The future of the GUI portion of the project seems less certain, but Remastersys is also fully functional from the command line. For the moment, the binaries of Remastersys are still freely available from the developer's web site (www.remastersys.com). The situation is constantly in fl ux, so search around for the latest forks. The System Imager project, which uses Remastersys, is a good source of up-to- date information, and can be found here: http://system-imaging.blogspot.co.uk. Q Copying the skeleton information for new users Q Building the ISO Linux & Open Source Genius Guide 9 Build your own distro SUSE Studio SUSE Studio allows you to build a customised SUSE Linux installation Pros using a web interface.