Linux Tips, Tricks, Apps and Hacks
Linux Tips, Tricks, Apps and Hacks
OVER
5 HOURS
OF VIDEO TUTORIALS PLUS
FREE SOFTWARE PACKAGES
VOLUME 3
Welcome to
In this new volume of Linux Tips, Tricks, Apps & Hacks, you will find everything you
need to bust open your Linux systems and start making them work the way you want
them to. The free and customisable philosophy of open source software means it is
perfect for anyone who wants to delve beneath the surface and start tinkering with the
way things work. In this book, well get started with 100 ways to master the command
line so youll never be daunted by the terminal screen again. Youll discover how to
build your best ever servers, with increased speeds and functionality, and find out all
about this years best distros and which free software to use with them. With all of
these and many more expert tips, tricks and hacks, plus reviews of some of the best
Linux software available, this is the perfect guide for everyone who wants to enhance
their Linux experience.
Publishing Director
Aaron Asadi
Head of Design
Ross Andrews
Production Editor
Alex Hoskins
Senior Art Editor
Greg Whitaker
Designer
David Lewis
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 Tips, Tricks, Apps & Hacks Volume 3 2015 Imagine Publishing Ltd
ISBN 978 1785 460 869
Part of the
bookazine series
CONTENTS
Unlock the potential of open source software
TRICKS
deploy web
60 Continuously
apps
a visual
novel game
80 Make
with Python
complex
64 Generate
graphics
your Raspberry
84 Supercharge
Pi
CPU
your own
temperature
media gallery
68 Monitor
88 Host
a book in
audio
LaTeX
transcription
72 Write
92 Simplify
Secure your
agile project
Raspberry Pi
76 Implement
96
management
with Linux
08
Feature
Conquer the command
line with essential tips
TIPS
18
Build faster
and better
servers
Set up LVM
lesystems
60
a
caching DNS
38 Create
server
a
client-server
42 Program
application
network
clients and
46 Build
more
26
Switch to
control your
the btrfs le
30 Command-line
50
email with Mutt
system
your own
chat channel
34 Run
72
96
APPS
102
HACKS
Linux
security
102Total
your
own Qt5108 Build
powered
desktop
Android
apps in Linux
112 Run
Raspberry Pi
116 Tether
to an Android
device
118
a
WebKit
122 Build
browser
112
74
penetration
126 Network
testing with
Pentoo
130
Build your
own DEB
and RPM
packages
Terminal
COMMAND
Terminal
>_Conquer the
command line with
these essential
terminal tips for
controlling Linux
8 Linux Tips, Tricks, Apps & Hacks
NEED TO KNOW
>_001 ls
>_009 Up
>_002 cd
$ cd /home/user/
>_003 cp
The copy command, or cp, can be used to
copy les from one location to another. To do
this use the command below:
$ cp file /home/user/Desktop/file
$ mv file /home/user/Desktop/file
Terminal
>_004 mv
Similar to copy, mv instead moves the le to
the new location, deleting the original le:
>_013 sudo
This lets you do commands as the super user.
The super user in this case is root and you just
need to add sudo to the start of any command.
$ ls -a
>_005 rm
$ rm file
>_006 mkdir
You can create directories with the mkdir
command using something like:
$ mkdir folder
>_007 nano
Nano is one of the programs that enables you
to edit text in les its vital for working and
editing in the command line. You use it like so:
$ nano file
>_008 Tab
The Tab key lets you auto-complete
commands and le names. Double-tapping
will list all objects with a similar name. Autocompletion works for unambiguous le and
command names. For example, r gives you
refox as no other commands begin with
r. If you get multiple hits, keep typing to
narrow the selection, then hit Tab again
$ cd ~
$ ls | less
SYSTEM
ESSENTIALS
Terminal
$ ls -l
$ cd -
$ sudo reboot
$ rm -r directory
$ rm *.png
INSTALLATION
SEARCHING
WITH GREP
>_Search within
les using the grep
command to save time
and nd what you need
>_049 Search a file for a term
The basic use of grep is to search through a file
for a specific term. It will print out every line with
that term in, so its best to use it with system
files with readable content in. Use it with:
DEVELOPMENT
TIPS
>_Some terminal tricks for devs
to help your command line skills
become more efcient
$ kill 1234
$ ifconfig wlan0
$ killall -v process
Terminal
$ sudo
-l
$ unzip file.zip
$ ssh-keygen -t rsa -C
[email protected]
$ uname
$ uname -p
$ uname -a
$ md5sum file
$ touch file
FILE
PERMISSIONS
rwxr-xr-x
R stands for read, w stands for write and x
stands for execute. If theyre present instead of
a -, it means that it is present in that particular
block of permissions. Its split up over three
blocks: the first three being the user you are
currently using, the second being the group and
the third being for everyone else.
To send a
command to the
main x display,
preface it with
DISPLAY=:0
7:
6:
5:
4:
3:
2:
1:
0:
MEDIA
CONTROLS
BEST OF THE
REST
$ rhythmbox-client --pause
$ locate file
$ wget http://example.com/file.zip
$ rhythmbox-client --next
Terminal
>_080 Pause video
Terminal
TERMINAL JOKES
Terminal
>_091 Alter image settings
As well as convert theres also mogrify, which is
part of the same software package. You can use it
scale, rotate and do more to an image more easily
than with some of the convert commands. To
resize you can use something like:
$ scrot -d 5
18
26
42
38
74
46
a client-server application
42 AProgram
simple solution to create chatty apps
Build network clients, servers and more
46 Use
Netcat to accomplish several tasks
Switch to the btrfs le system
50 Set
up the features of this next-gen system
Run Linux in the AWS cloud
54 Con
gure and run a virtual Linux instance
54
R
E
W
O
P
G
IN
T
U
P
M
O
UP YOUR C
R
O
D
E
D
A
R
G
P
U
WITH AN
T
A
H
T
R
E
V
R
E
S
W
BRAND NE
F
L
E
S
R
U
O
Y
D
IL
U
B
N
YOU CA
hile big business and big data may
be utilising mainframes more of
late, the concept of servers is not
going away any time soon. Servers
are an integral part of any system, however
large your IT infrastructure is. Whether its inside
the data centre or tucked away in your (wellventilated!) cupboard at home, there are still a
lot of uses for servers in 2015.
For the ofce you may want to save a bit of
money and create something perfect for your
needs that you know exactly how to maintain.
For home you may just want to enhance your
setup and make the entire network more
efcient. For both its a great way to separate
A
O
T
G
N
I
D
A
R
G
UP
R
E
V
R
E
S
R
E
T
T
BE
If you have a server, an upgrade
may be all it needs to run better
You may already have a server, in which case instead of actually building
a better server from scratch, you may want to just upgrade your server
to be more efficiently than it was before. There are several ways of doing
this depending on how you want to improve your server, and most of them
require a hardware upgrade. If you decide to go down the hardware upgrade
route, refer overleaf to see the kind of hardware that we recommend and
learn some quick tips on how to install it if youre new to system building.
The easiest upgrade is storage space, especially for file servers. For Linux
systems you can quite simply just add an extra hard drive into the case, as long
as you have room in terms of spare SATA cables and power. Once installed,
reboot your system and you can start adding the hard drive under /etc/fstab
so that it automatically mounts to a specific location in this case, the location
on the filesystem which needs a bit more storage. Otherwise, you can create
a clone of the system using Clonezilla (clonezilla.org) and then restore it to a
larger hard drive with almost no change in the way it works.
For other system hardware, you need to ask yourself which section is
slow and perhaps needs upgrading. If its a little slow for certain operations
and computational tasks, your rst port of call should be upgrading the
CPU. Depending on how forward-thinking you were when building or buying
the original system, the motherboard may support newer processors than
the one inside it. Find out the socket information and start a search for a
new CPU. While youll need enough RAM to support the CPU and whatever
the server is being used for, youll always need more for one handling web
services than le serving. You can easily replace these kind of parts without
having to reinstall Linux.
If youre doing heavy computational tasks and can use hardware
acceleration for it, look at getting a new video card to support it although
not many servers will even require one, let alone a good one.
If youve reached the limit of your current motherboard, its time to gut the
system and get a new mobo, CPU, RAM and GPU if you need it backing up
important les and settings is a good idea before you attempt this as Linux
may not be able to work with completely new hardware without a reinstall.
Otherwise, if you need a software upgrade then refer to whatever guide is
relevant to you in this feature on how to install and setup a new distro.
E
R
A
W
D
R
A
H
G
CHOOSIN
What kind of hardware will you require to build a better server?
The hardware in a server is a very important
consideration for building your system. Servers
handle different requests to a normal desktop
machine, often handling several peoples
requests at once. This means that the resource
priorities have changed and these can even be
different between various types of servers.
Software counts as well, of course, but
without a decent hardware base, it will be tricky
to have the server work as intended. Scalability
and peak loads need to be considered as a
future-proong method, so always try and
make sure that you have a bit more power than
you need. With all that said, lets start looking at
the individual components.
There are six main components you need to
put thought into, and the four most important
ones are the motherboard, the processor, RAM
and power supply the core components on any
computer. As we mentioned, you need to think
differently about what you need componentswise because resource usage is different.
A minor concern for some will be a graphics
card of some kind, whether its so you can
directly interface with the system or do
computational work that benets from multiple
different cores instead. Youll also need a good
storage solution for your server build.
Motherboard
Motherboards for servers come in various
styles. A lot of server boards will have two ports
to connect a CPU to, which is good for servers
used for small businesses or if you expect to get
a lot of requests on a regular basis. These are
more expensive than single-CPU systems, but
the benets in the long run for a big ofce server
are more than worth it.
For home use, a single slot for a processor will
do you ne for most cases, the main exception
CPU
The most important thing for a server CPU is
the number of cores thats why dual-slots
can be quite useful. More cores allows for more
threads, essential if you plan to run VMs off
a le server or several sites at the same time.
Clock speed is not as important, but you should
at least get one that is not ridiculously slow and
comes with a decent cache.
With Intels Hyper Threading, each core can
work harder by creating multiple threads in
each core. Conversely, AMD processors will
offer more cores for a lower price, especially if
youre on a budget.
RAM
A larger amount of RAM is more important on
servers than it is on a desktop PC, enabling
you to run more operations at once. Speed and
latency is not so important, so gaming RAM
with tweaked timings will not grant you a better
system in fact, it may be slightly worse since
PSU
While its best practice to never skimp on
a power supply, its near essential when it
comes to server power. While you may need
1,000+ watts for your ridiculous 4K gaming rig
(electricity bills be damned), you can be a little
more reserved in the peak power for a home
server, depending on its intended use. Look
for power supplies with an 80 Plus rating, as
these ones have been through some level of
certication to ensure that they have a degree
of efciency this is a good idea for servers that
are on all the time as they will save on electricity
bills in the long run. Titanium and Platinum are
the highest ratings, meaning theyre at least
90 per cent efcient (95 per cent efcient for
server power supplies).
MOTHERBOARD
When we talk about slots and connections for a motherboard,
were talking about PCI slots and plenty of SATA drive slots. You
can add more SATA slots via a card, but youll need to take into
account anything else youd want to add a card for. You need
to make sure the motherboards chipset matches up with the
kind of CPU you want as well, and the CPU will also dictate the
type of RAM you get. Its a multi-layered balancing act that
may result in a sea of tabs while you compare and contrast
FIBRE CARD
CASE
Storage
Depending on your storage requirements, there
are multiple solutions that you can use. At the
very least we recommend you split up your
storage with an SSD for the operating system
and associated settings les, and use standard
hard drives for storing everything else. This way,
when the general les are not being accessed,
the operating system can still run while drawing
much less power.
Otherwise, your actual mass storage can
be congured in multiple ways. You can have
straight drives connected with JBOD for
minimal complexity. Or you can start looking
down the RAID route mirroring in case of
drive failure, striping to more efciently use the
space of two hard drives, or even going
as far as RAID 5 and 6, which increases
complexity but enables you to create
one large, consistent storage space with
redundancy failures. The more complex
you go though, the more difcult it can be
to maintain and the more catastrophic a
major failure can be.
PSU
When picking a
PSU you need to keep in mind a
few things, such as what kind of
connectors you need. This can
depend on your motherboard, the
amount of hard drives youre using,
any extras like case fans and case
I/O panels. If you want a better idea
of what kind of wattage you will
need, you can use this tool to gure
it out: bit.ly/1pjcjns
DVD DRIVE
RAM
R
E
V
R
E
S
E
L
I
F
BUILD A
Store and serve les around your network or further
File servers are very useful for both home and
business environments. For home, its a good
way to have a more low-power, dedicated solution
to storing your media and backing up your
systems, without needing to specically turn on
your desktop machine to get the les a desktop
machine that may use more power idling than a
dedicated le server.
For enterprise, it can not only be useful for
backups, but also provides for off-machine
networked storage for individual users that
can be accessed from within and outside the
network. So, lets set a server up.
For a simple server type such as this, were
going to go ahead and use Ubuntu Server to
set up the system. This means that if you have
any experience with Linux, it should be easy
to maintain and install more software on if
you need to.
If youre doing the initial setup for a home
server then installing it with a monitor attached
will be much easier. Burn the ISO to an
installable medium or boot it over the network if
you have the facilities set up, then hit return on
Install Ubuntu Server to continue.
Installation
The installation for the server edition is different
from the usual graphical installer of Ubuntu
its a command line one, albeit with fairly
straightforward options. After setting up your
location, language and keyboard settings, it
will try and detect your hardware for you. Give
your server a name, set up your username
and password, and then continue with the
installation as directed.
First steps
Above Youll need to configure Samba in order to get
shared folders working
auto eth0
iface eth0 inet static
address [Desired IP]
netmask 255.255.255.0
gateway [Router address]
If you are using a wireless connection, make sure
you switch it to wlan0 and then add in details for
the SSID and password.
With the IP youve set, or using ifcong to nd
out what the IP has been automatically set as,
you can now SSH into your machine using the
username and password that you set up. From a
machine on the same network, type:
Shared folders
Now we can create a shared folder that the rest
of the network can see and modify. First, lets
create the folder that we want to use and put it in
the normal home directory, with a usual:
$ mkdir ~/networkshare
EXTRA FILE
SERVER USES
File servers can be useful for other
things as well
VPN
Dialling in externally from a remote location to VPN into your server can have
added benets. Accessing your les remotely is one thing, but also being
able to use a more unrestricted Internet service (yours) can be handy if youre
stuck in a hotel or other location with strict browsing regulations.
Setting it up is not too difcult and requires the server to be connected to
the Internet wherever it stays. The more users you allow to VPN from it, the
more resources youll require (including RAM and processing power).
[NetworkShare]
path = /home/[username]/networkshare
available = yes
valid users = [username]
read only = no
browseable = yes
public = yes
writable = yes
Save the le and exit, then restart Samba:
Torrent server
With all the storage and possibly a connection to the Internet, you can set up
the le server to also be a torrent server. This will enable you to give back to
the community by seeding the latest distro torrents, as well as making sure
you have the latest version of certain distros for you to install and test with.
Just adding a torrent service will let you do this, and a good one for
command lines is rTorrent. Not only can you view a useful command line
interface with it, but you can also set a folder that it reads for new torrents.
R
E
V
R
E
S
B
E
W
A
BUILD
Host your web services on a dedicated server that you control
Your own web server can be a useful addition
to any system. If you dont have massive loads to
worry about you can install it to your own custombuilt server, or if you have a lot of scalable server
space then you can build it on there with a very
similar software setup.
We are going to use Ubuntu Server again for
this, so follow our advice on the previous pages
on how to get it set up and get to a point where
we can start adding Apache services. Feasibly,
you could have the server be both a le and web
server in this way.
01
Install Apache
Above Give your web server a test once youve installed Apache
02
Test server
03
Install FTP
04
Congure FTP
05
EXPAND YOUR
WEB SERVER
Tailor your web server to suit all of
your individual needs
06
Local use
07
Edit les
08
FTP Folder
Mail server
Part of the benets of this being a web server is that it enables you to
also add your own mail server to it, or even host your own webmail client
as well. Having Apache congured is the rst step to this, and it is quite
straightforward to then set up a mail server on top of that.
As for a webmail client, we recommend using RainLoop, which looks nice
and modern and also lets you add other webmail services to it, along with
your own webmail server.
Nginx server
09
Restart server
Once the cong le has been fully edited and the folder is
created, it is now time to start using it. Restart the FTP server using
sudo service vsftpd restart and you will start to be able to access
the folder. Any changes that you make to the conguration will
require this restart to become active.
Instead of using Apache for the server, you can also look into and try out
Nginx. Nginx handles processes slightly differently than Apache and can
result in a lighter load on your web server. Its available in the repos of most
distros, much like Apache is, so it can be installed in mostly the same way.
For a more complete guide to setting up an Nginx server, you can always
refer back to one of our tutorials from Mihalis its inside issue 144, if you
have it to hand, and on our website: bit.ly/1AYKkx8.
02
Graphical
partition editors
01
04
Install LVM
02
View the LV
$ sudo lvdisplay
03
05
$ sudo vgdisplay
06
06
Create an LVM
07
08
09
10
Create an
LVM
11
12
15
13
14
18
15
More complicated
set ups
16
Delete an LV
17
19
20
Resources
Mutt
mutt.org
Fetchmail
(optional)
www.fetchmail.info
Mutt manual
mutt.org/doc/manual.txt
01
Set up IMAP
04
02
Cong le
You have
mail
set
set
set
set
set
set
set
set
from = [email protected]
realname = You
imap_user = [email protected]
imap_pass = your-secret-password
folder = imaps://imap.gmail.com:993
spoolfile = +INBOX
smtp_url = smtp://[email protected]:587/
smtp_pass = your-secret-password
smtp://[email protected]@smtp.live.com:587/
03
Keep it a secret
gpg --gen-key
cd ~/.mutt/
nano pwd
set my_pwd=your_password
Now replace .muttrcs password line with:
04
Already
included
mkdir ~/.mutt
mkdir ~/.mutt/cache
mkdir ~/.mutt/cache/bodies
nano ~/.mutt/sig
Now start Mutt, type mutt and hit Enter. If youve just set
up a GPG-encrypted password, youll be asked for the
passphrase gpg-agent will take care of it on subsequent
occasions. If youre not a Zen-like practitioner of the art
of inbox zero, youll need to wait a few seconds for the
thousands of messages youve enabled Gmail to hang on to,
then be presented with a long list of your inboxs contents.
While we recommend
getting Mutts
documentation
later in Step 12 or
better still, keeping
it open while using
this tutorial most
distros will install
plenty of the docs for
you in a folder under /
usr/share/doc/mutt/
examples, where
youll also nd some
great sample muttrc
congurations,
including useful
colour schemes.
07
05
Keyed up
Mutt
in a hurry
Need to quickly
copy a le from your
server? Just issue
this at the command
line to send it to your
log le home:
Macro power
06
Send an email
08
09
09
Conduct a search
set alias_file=~/.mutt/aliases
11
Conduct
a search
Above Filtering
emails by date
and searching for
keywords really
speeds things up
set mailcap_path=~/.mutt/mailcap
The output is not properly formatted, but at least the content
is now readable.
10
Create an alias
12
Resources
Scrollback
scrollback.io
GitHub repo
bit.ly/1GlTLfP
01
03
Create
chatrooms
02
03
Social
accounts
Create chatrooms
To enable Google+
or Facebook login
for your Scrollback
installation, you
will need to create a
developer account
and generate the API
keys that enable an
application to access
the services. You will
then need to save the
keys in the server-side
conguration le.
04
Embed to
websites
06
Above Embed a
small chat window
on your site using
ready-made code
04
05
Index for
searching
You can also choose
if your chatroom is
available for room
search indexing.
To enable search
engine indexing, go
to the Room Settings
menus Search
Visibility tab and
enable the Allow
search engines to
index room option,
then click on the
Done button.
Embed to websites
WordPress websites
Use Blogger
07
08
08
Twitter integration
09
Moderation features
Twitter
integration
10
Discussions
03
The host
utility
04
01
Install BIND
# named -v
BIND 9.8.4-rpz2+rl005.12-P1
02
03
# host -t mx linuxuser.co.uk
linuxuser.co.uk mail is handled by 10
mail.imagine-publishing.co.uk.
linuxuser.co.uk mail is handled by 20
mail2.imagine-publishing.co.uk.
The numbers that you see after the handled
by are the preference values that indicate the
mail exchangers priority. A preference value by
itself is not important, what is important is its
relationship to the other values.
Mail servers should attempt to deliver to the
mail exchangers with the lowest values rst. If
the delivery fails for some reason, then the mail
exchanger with the next highest value will be
tried. If two or more mail exchangers have the
same preference value, it is up to the mail server
to decide which one to choose. The primary DNS
server is responsible for dening the email server
for a domain or a subdomain.
Used with the -t ns parameters, host shows
the DNS Servers for a domain.
$ dig co.uk. ns
Trying to perform a AXFR query with dig
fails:
$ dig @localhost co.uk. axfr
; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> @
localhost co.uk. axfr
; (2 servers found)
;; global options: +cmd
; Transfer failed.
AXFR is a mechanism for replicating DNS data
across DNS servers, but it can also be used
for evil purposes. The DNS Administrator is
responsible for allowing the access to the AXFR
protocol to specic machines and restricting it
to the rest of the world.
05
10
06
The conguration le
for the caching server
08
07
# ls -l /var/cache/bind/
total 24
-rw-r--r-- 1 bind bind 698 Oct 15 09:46
managed-keys.bind
-rw-r--r-- 1 bind bind 512 Oct 15 09:46
managed-keys.bind.jnl
-rw-r--r-- 1 bind bind 9446 Oct 15 11:17
named_dump.db
-rw-r--r-- 1 bind bind 1103 Oct 14 10:58
named.stats
10
# /etc/init.d/bind9 start
You will also need to add an access control list to
reduce trafc and increase security, and you will
learn about access control lists a little later on
in Step 14. The DNS service will usually listen to
port number 53, as you can clearly see from the
following output:
# telnet localhost 53
Trying ::1...
Connected to localhost.
11
# /etc/init.d/bind9 stop
09
The /etc/bind/db.root le
# /etc/init.d/bind9 restart
[....] Stopping domain name service...:
bind9waiting for pid 24713 to die
. ok
[ ok ] Starting domain name service...:
bind9.
14
Access control
lists (ACL)
12
14
16
17
acl OTENET {
2.86/16;
localhost;
localnets;
};
The denition of the list does not automatically
make the list active. You should add the
following line to turn on the OTENET access
control list:
allow-query { OTENET; };
As soon as the DNS server starts running, many
unknown hosts will try to connect to it; so do
not delay generating as many access lists as
needed to protect your DNS server.
13
15
Program a
client-server
application
Each operating system provides its own set
of networking APIs, but Qt gives a solution
to simplify creating chatty applications
Modern computer networks are composed
of multiple protocols. Creating well-formed
packets by hand is almost impossible the
protocol stack and its underlying network
hardware affect the format.
Engineers working on Unix solved this problem
by introducing an abstraction layer so-called
sockets acting as endpoints between two
local or remote applications. Developers use
the standardised interface in order to provide
commands to the socket, which are then
translated to the network.
When dealing with sockets, a basic
understanding of networking is benecial. For
now, it shall sufce to dene that messages
can be transmitted by two high-level protocols.
TCP short for Transmission Control Protocol
provides conrmation when data has been
delivered successfully. This is accomplished by
a relatively complex sequence of packets which
add overhead to the communication process.
However, some applications dont require this.
For them, UDP provides a sleeker communication
protocol that forgoes delivery conrmation. On
a network, computers are identied by their IP
address. Individual services are then identied by
their port numbers consider them apartment
door numbers inside a high-rise building.
Developers working on communication
software tend to face a chicken-egg situation
if no server has been written, the client cant
connect. On the other hand, the lack of a client
means that the server cant be tested.
In practical projects you should start out by
creating a rough mock-up of the messages that
the client and server will exchange. You dont
need to get this 100 per cent right on the rst try;
most protocols change as they get implemented.
QT += network
With that, it is time to create the server object.
Its declaration can be placed inside the main()
function responsible for program bring-up:
myServer=new QTcpServer();
if(myServer->listen(QHostAddress::Any,102
5)==false)
{
qDebug() << Server error <<
myServer->serverError();
return 0;
}
else
{
qDebug() << Server up <<
myServer->serverAddress() << <<
myServer->serverPort();
}
In classic Berkeley socket programming, server
and client logic are handled by instances of the
socket class. Qt provides a dedicated server
that contains helper methods for connectivity
management. After start-up, we invoke the
listen() method in order to make our QTcpServer
wait for incoming connections.
void ImagineListenerClass::connectionIn
coming()
{
else
{
qDebug()
<< myServer>serverAddress() << << myServer>serverPort();
myListener=new
ImagineListenerClass();
QObject::connect(myServer,
SIGNAL(newConnection()), myListener,
SLOT(connectionIncoming()));
}
Client time
The work on the server is completed, but only
for now. Start it up by clicking the Play button
At first, using
TCP/IP to connect
the processes
sounds like
overkill, but many
programs are
implemented in
this fashion
Connecting to servers requires the use of a
QTcpSocket. Its most basic implementation is
made up of but two lines:
QTcpSocket *mySocket;
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
mySocket=new QTcpSocket();
mySocket->connectToHost(QHostAddress
::LocalHost, 1025);
return a.exec();
}
ConnectToHost() is another asynchronous
method which takes two parameters. The rst
one designates the IP to use, while the second
species the port. Successful connections
will be indicated by the emission of a signal
which we will handle in the next step. For now,
a running instance of ImagineTCPServer will
display a connection attempted message when
our client is started.
At the rst glance, using TCP/IP to connect
two processes on the same machine sounds
like overkill. However, many programs are
implemented in this fashion handling interprocess communication via sockets provides a
safe and simple way to de-couple components
from one another.
Streams of data
Real network applications exchange data, which
is accomplished by using the data streams
embedded into the socket instances. First,
modify the constructor of ImagineListenerClass
to provide the myServer instance to the method
responsible for handling the newConnection
signal. Then adjust its body as per Fig. 01.
QTcpServer can happily handle multiple
pending connections at the same time.
NextPendingConnection returns a socket
representing the connection to the selected
client. Well wire its disconnected signal to the
deleteLater slot to ensure unneeded sockets will
be eliminated automatically. In the next step a
byte array is populated and sent to the client.
Qts underlying DataStream class gets
improved as the framework evolves. Specifying
a data format ensures that binaries built with
later versions of Qt can interpret the data
provided in the socket. Many applications use
Qt 4.0s format. If your program is limited to Qt 5
and above due to other dependencies, you can
also dene this version as baseline.
The next step involves modications
to the client. Insert a class similar to the
ImagineListener to handle the signals emitted
from the socket class. Our application has to
deal with three events we need to notify the
user of successful and failed connections and
must receive data sent from the server.
Status messages are handled by emitting the
corresponding statements to the console via
qDebug() (see Fig 02).
Receiving data is more complex. Our simple
protocol doesnt inform the client in advance
about how much data is to be transmitted. Due
to that, we simply read whatever amount of data
has been received:
void ImagineReceiver::dataReady()
{
QDataStream in(mySocket);
in.setVersion(QDataStream::Qt_4_0);
QString thatsIt;
in >> thatsIt;
qDebug() << thatsIt;
}
Each of the slots must be connected to
the socket. This should be done before the
connectToHost method is invoked. On some
operating systems the connected signal is
emitted before connectToHost returns (Fig. 03).
Run the program in its current state to display
Further interaction
Our server currently kicks out clients after
providing them with a friendly greeting message.
A polite server would stick around and wait for
a response. Even though we could keep the
sockets in our current example, this would lead
to issues once more than one client is connected
we connect all signals to one slot which makes
keeping the different connections apart difcult.
A thread is a convenient solution for this
problem. Threads are subroutines that run in
parallel to the main application code spawning
threads permits your code to do multiple things
at the same time. Adding a thread is as easy as
adding a new class whose header looks like this:
void ImagineThread::run()
{
exec(); //Start event loop
}
void ImagineThread::dataReady()
{
QDataStream in(mySocket);
in.setVersion(QDataStream::Qt_4_0);
QString thatsIt;
in >> thatsIt;
qDebug() << thatsIt;
exit();
}
ImagineThreads sole role involves staying until
a signal is emitted. We accomplish that by
invoking the exec() method which creates an
event loop. It keeps idling until exit is called from
the dataReady handler.
Our server must be modied in order to
start the thread when a new client connects
(Fig. 04).A classic beginners mistake involves
void ImagineListenerClass::connectionIncoming()
{
QTcpSocket *clientConnection = myServer>nextPendingConnection();
connect(clientConnection, SIGNAL(disconnected()),
clientConnection,
SLOT(deleteLater()));
QByteArray block;
QDataStream out(&block, QIODevice::WriteOnly);
out.setVersion(QDataStream::Qt_4_0);
void ImagineReceiver::dataReady()
{
. . .
QDataStream out(&block,
QIODevice::WriteOnly);
out.setVersion(QDataStream::Qt_4_0);
out << Qstring(Hello, server!");
mySocket->write(block);
}
Multithreaded programs can show all kinds
of odd behaviour due to a situation called race
condition. If two routines access a shared
element at the same time, havoc is guaranteed.
Qt provides a variety of methods, such as
mutexes, which can mitigate such problems.
Fig 01
Fig 02
Advanced considerations
In the beginnings of the internet, every computer
had its own public IP address. Nowadays many,
if not most, systems nd themselves behind
layers of routers providing network address
translation and/or rewall services.
The image on page 43 shows a network made
up of two local networks connected to one
another via the Internet.
If a networked application on system A
wants to connect to system B, router B must be
congured to expose the port in question. This
can usually be accomplished in the backend of
the router since every manufacturer provides
a slightly different user interface, its best to
refer to your routers (online) manual.
Conclusion
Well-versed developers can implement the most
complex of protocols. Fortunately, Qt provides
ready-made classes that implement commonlyused protocols such as HTTP. Next time, we will
use one of these to create a small RSS reader.
Multithreaded
programs can
behave oddly
Fig 03
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
mySocket=new QTcpSocket();
ImagineReceiver *myListener=new ImagineReceiver(mySocket);
mySocket->connect(mySocket, SIGNAL(connected()),myListener,SLOT(amConnected()));
mySocket->connect(mySocket, SIGNAL(readyRead()),myListener,SLOT(dataReady()));
mySocket->connect(mySocket, SIGNAL(error(QAbstractSocket::SocketError)),
myListener,SLOT(errorOccurred(QAbstractSocket::SocketError)));
mySocket->connectToHost(QHostAddress::LocalHost, 1025);
return a.exec();
}
Fig 04
void ImagineListenerClass::connectionIncoming()
{
QTcpSocket *clientConnection = myServer->nextPendingConnection();
connect(clientConnection, SIGNAL(disconnected()), clientConnection,
SLOT(deleteLater()));
clientConnection->setParent(0);
ImagineThread* myThread=new ImagineThread(clientConnection);
connect(clientConnection,SIGNAL(readyRead()), myThread,SLOT(dataReady()));
myThread->start();
QByteArray block;
QDataStream out(&block, QIODevice::WriteOnly);
out.setVersion(QDataStream::Qt_4_0);
out << QString(Hello, client!);
clientConnection->write(block);
}
Resources
Linux machine
with Netcat
Root
privileges
01
Install Netcat
02
01
Install
Netcat
Default Netcat
behaviour is similar
to a simulated
network interaction
03
Netcat as a client
$ nc linode 25
As you can guess, you can give either the host name or the IP
address of the remote host.
06
04
05
Netcat as a server
Not only you can use Netcat as a client, you can also
use it for creating a server! The next command makes Netcat
listen to port number 1234 for incoming TCP connections:
You can create a UDP server if you combine the -l option with
the -u option.
07
Finding
the problem
As you already know,
there are many
tools that can be
used for network
troubleshooting,
including netstat,
traceroute, wget,
ping, lost, nmap,
telnet, etc. If you
cannot nd and
solve the problem
you are experiencing
using this software,
you should always
have in mind that
an erroneous
network device can
sometimes cause
strange networking
problems, so you
might need to start
looking at your
hardware instead.
08
File transfer
11
Verbose output
09
Picking
your tools
Knowing more
than one tool is
extremely useful
when a network
is misbehaving.
The ultimate
troubleshooting
tool is Wireshark
and its command
line version tshark.
Their disadvantages
are that they are not
easy to use, and will
sometimes make you
feel like youre trying
to hit a mosquito with
a nuclear bomb. The
best practice is to try
the simplest tool that
can do your job rst,
before heading over
to Wireshark, tshark
or tcpdump.
13
10
$ netcat -l 4567
If you visit http://192.168.2.4:4567/ using your web browser,
you will see index.html.
14
15
15
16
17
18
02
Format a
partition
01
04
Create a RAID
02
Format a partition
03
$ mkfs.btrfs /dev/sda
05
07
Make a subvolume
$ btrfs
subvolume1
06
08
subvolume
create
btrfs/
Create a partition
17
09
Give permission
The way the drives, partitions and subvolumes have been created means you need to
access them with a root account to use them
properly. We can give them normal permissions
with the following:
RAID 1
10
RAID 1
A1
A3
A5
A7
A2
A4
A6
A8
A2
A4
A6
A8
The RAID
RAID 1
RAID 0
A1
A3
A5
A7
11
Subvolume
backup
12
13
RAID 10
14
19
15
RAID 5 and 6
16
Create snapshots
18
17
19
Set default
Set
default
20
Remedy defragmentation
21
Resources
Web browser
Phone number
Email address
Credit card number
SSH client
01
01
02
03
04
Create a new
AWS root account
Private, public
and elastic IPs
Each EC2 instance has its own private IP
(Internet Protocol). If you want this to be
accessible from the wider Internet, it also
needs to have an assigned public IP. If you
enable the option named Auto-assign
Public IP during the instance setup,
Amazon will associate a randomly selected
public IP to your instance for as long as
the instance keeps on running. Should you
later terminate the instance or even shut
down Linux, you would automatically lose
use of this IP.
If you prefer to use a persistent IP
address that you can manage yourself,
use an Elastic IP address here (EIP)
instead. An EIP is designed for dynamic
cloud computing, and is a regular public IP
address that you can reserve for use with
your account, then assign and reassign
at will.
actually need a Linux box instead, go straight
to the S3 (Simple Storage Service) section of
the Console. The simplest way to get to your
destination is by using the AWS logo in the upper
left-hand corner of the Console, as this gives you
access to the list of available services.
EBS Volumes
08
05
06
Choose an
instance type
07
08
10
Attach storage
09
11
13
12
13
Create or select
a key pair
14
15
ssh -i /path/to/yourPrivateKey.pem
[email protected]
sudo su
If you attached any additional volumes to your
instance (besides the volumes that came with the
AMI), now is the time to format them, mount them
and add them to /etc/fstab.
Passwords are
out and key pairs
are in
Linux Tips, Tricks, Apps & Hacks 57
TR CKS
Put Linux to work with expert tricks
Continuously deploy web apps
60 Transition
to deployment with Capistrano
Generate complex graphics in ggplot2
64 Create
impressive plots with R and ggplot2
Monitor CPU temperature with Dizmo
68 Turn
Raspberry Pi into an Internet of Things
Write a book in LaTeX
72 Typeset,
beautify and customise a full book
Agile project management with Taiga
76 Implement
an organised project
88
64
72
60
76
80
92
03
01
On the
server
Install Capistrano
03
On the server
02
SSH Keys
ssh-keygen -t rsa
if youve not got one already in ~/.ssh/ and
copy the ~/.ssh/id_rsa.pub to the server with:
04
Bundling gems
Capistrano will
deal with any
changes to files
and file names
Linux Tips, Tricks, Apps & Hacks 61
08
05
Prepare
to deploy
Cong/deploy
bundle exec cap install creates
08
Prepare to deploy
require bundler/capistrano
server 37.59.xx.xx, :web, :app, :db,
primary: true
06
Cong
require capistrano/rbenv
require capistrano/bundler
require capistrano/rails/migrations
07
Secrets
/config/database.yml
and make sure that the line starting Dir.glob at
the end of the above screenshot is present and
uncommented. This line ensures that all of the
RB les below lib/capistrano get loaded, including
any custom tasks in lib/capistrano/tasks that
youll want to later dene.
11
Parallel lines
09
10
Deploy
12
SSHkit
The Capistrano 3 development process gave
birth to the SSHkit library developed by Lee
Hambley who did much of the great work of
making Capistrano 3 such an improvement
over an already pretty useful piece of code.
SSHKit is a lower level toolkit that
Capistrano uses for everything such as
logging, formatting, connection management
and pooling, parallelism, and batch execution.
You too can use it for running commands in a
structured way on one or more servers.
Within Capistrano, youll nd SSHkit called
upon most of the time you use on(). To use it
yourself, start with some of the examples on
the GitHub page and adapt for your site.
Here SSHkit will build a path from the
nested directories:
on hosts do
within /var do
puts capture(:pwd)
within :log do
puts capture(:pwd)
end
end
end
Behind the scenes File.join() is taking care of
the slashes for you to build the paths and it
should return:
/var/
/var/log
Generate complex
graphics with ggplot2
Seen as the new version of S, learn how to
create truly impressive plots using R and
the ggplot2 package
Resources
R Project r-project.org
RStudio rstudio.com
ggplot2 ggplot2.org
Documentation
docs.ggplot2.org/current
RSQLite
bit.ly/1ArJvkc
03
Use
quickplot()
01
Install ggplot2
> require(ggplot2)
Loading required package: ggplot2
If its not installed, download and select:
> install.packages(ggplot2)
If you execute the library() function without
arguments, youll get a list of installed packages.
To get a detailed output, run the installed.
packages() command without any arguments.
02
03
Use quickplot()
> str(data)
data.frame: 16180 obs. of 3
variables:
$ V1: num 0 0 0 0 0 0 0.98 1 1.06 1 ...
$ V2: num 0.01 0.01 0.01 0.01 0.03 0.01
0.58 0.85 1.01 1.01 ...
$ V3: num 0.05 0.05 0.05 0.05 0.05 0.05
0.27 0.48 0.65 0.75 ...
> quickplot(data$V2, data$V2)
05
04
11
06
Visualising Chromes
history le
07
08
Create histograms
09
12
10
11
$ ./chrome.R
Loading required package: methods
Loading required package: DBI
$ ls -l Rplots.pdf
-rw-r--r--@ 1 mtsouk staff 5089 Nov 27
09:42 Rplots.pdf
The produced result is automatically stored in a
le called Rplots.pdf le.
12
13
Box
plots
Create R Scripts
14
Final thoughts
Monitor CPU
temperature with Dizmo
Turn your Raspberry Pi into an Internet of Things with
this CPU temperature gauge tutorial
Full code
FileSilo.c
o.uk
Above Dizmo is
designed to be
a multi-touch
interface
01
02
Install dizmoSpace
03
Launch issues?
04
Download node.js
05
Add framework
06
Install framework
$ cd /var
$ sudo mkdir www
$ cd www
$ sudo ln -s /usr/local/lib/node_modules/
/node_modules
Above As its
multi-touch, Dizmo
is perfect for
interactive table
displays in meetings
09
07
It will say its listening on *.3000. Start up a new terminal, ssh in,
and create the folder /public with mkdir /public to save all of the
CPU data in.
Package le
First, create the le package.json with sudo
nano
$ node app.js
Internet
of Things
Its not a very
descriptive term,
but the Internet
of Things can be
almost anything.
Any item that is or
can be connected
to the internet
or networks,
such as modern
automated lights,
can be connected
up to Dizmo and
the Raspberry Pi.
Start node.js
08
App node
10
CPU information
11
Make a cronjob
*/10 * * * * /usr/local/bin/grabsysinfo.sh
12
14
Style guide
Now well add the CSS style sheet for the Dizmo widget.
As usual, this styles up the display on the page that will become
our widget. Download it with:
wget x/style.css
$ wget x/info.plist
15
Final application
wget x/application.js
Change the IP address to the one on your Pi.
Once thats done, you can test out the widget compress the
Gauge folder to a .zip and then change the .zip to a .dzm. Launch
dizmoSpace and drag the dzm le onto it for it to start.
13
Index le
$ wget x/index.html
16
Get coding
With these building blocks, you can now start doing more
interesting IoT things controlling the GPIO ports, getting more
information, having it connect to other objects to control them
as well. Check out the Dizmo website for more details on projects
that you can do.
Execute the
latexmk Perl script
in silent mode;
Latexmk is a
handy automatic
LaTeX document
generation routine
that saves you time
Comprehensive TeX
Archive Network
www.ctan.org
Latexmk
http://users.phys.psu.edu/~collins/software/
latexmk-jcc
01
Install LaTeX
04
02
Use LaTeX
\documentclass{article}
\title{The LaTeX version of the Hello
World program}
\author{Mihalis Tsoukalos}
\date{January 2015}
\begin{document}
\maketitle
Hello world!
\end{document}
You can compile the document using the
following command:
$ latexmk helloWorld.tex
The previous command produces a DVI le that
you can convert into PDF format as follows:
$ dvipdf helloWorld.dvi
If you view the generated le you can easily
understand that the default LaTeX styles
produce high quality output. The problem is that
if everyone is using the default styles, all books
produced using LaTeX will look exactly the same!
03
04
05
\include{ch1}
\include{apA}
Here, LaTeX will search for les named ch1.tex
and apA.tex in the current working directory.
This is the most important task of the whole
process because it allows you to edit smaller
and more manageable les.
We will use four chapters and two appendices
in order to make our example book, but you can
use more or less pages on future projects if you
wish. After creating the les for all the book
chapters and appendices, and referencing them
inside book.tex, you are completely ready to
start adding content.
06
Create a bibliography
@book{Kernighan84,
author = {Brian W. Kernighan and Robert
Pike},
title = {The UNIX Programming
Environment},
year = {1984},
isbn = {013937681X},
publisher = {Prentice Hall Professional
Technical Reference},
}
The following LaTeX commands are used for
beautifying and inserting the bibliography
into this project:
\bibliographystyle{alpha}
\addcontentsline{toc}{chapter}
{Bibliography}
\bibliography{booklist}
08
\usepackage{minitoc}
\setcounter{minitocdepth}{1}
The previous commands should be combined
with the \dominitoc command that must be used
once to turn on the mini TOC functionality. Finally,
type \minitoc at the beginning of each chapter to
actually add the mini table of contents.
\cite{Kernighan84}
07
\begin{MyCode}[fontsize=\relsize{-1}]
#include <stdio.h>
int main (int argc, const char * argv[])
{
printf(Hello, World!\n);
return 0;
}
\end{MyCode}
10
Sort content
\tableofcontents
If you only want to include entries for chapters
and sections, include the next command before
the previous command in Step 6:
\setcounter{tocdepth}{1}
In order to include the list of gures you might
have in your book you can do so by inserting the
following command:
\listoffigures
If you have tables in your book, you can generate
the list of tables as follows:
\listoftables
09
Format code
\renewcommand\headrule
{{%
\color[gray]{0.5} \hrule height 1pt
width\headwidth
\vspace{-4pt}}}
\fancyhead[RO]{%
{\bfseries\S\ \thesection\ \textbar\ \
LARGE\thepage\normalsize\ \textbar}
}
\fancyhead[LE]{%
{\bfseries\textbar\ \LARGE\thepage\
normalsize\ \textbar\ \S\ \
thesection\ \textbar\ \leftmark}
}
\fancypagestyle{plain}{%
\fancyhf{}
\fancyfoot[CO]{%
{\bfseries\LARGE\thepage}
}
\renewcommand{\headrulewidth}{0pt}%
}
12
Generate
an index
14
Producing
a
more
fancy
and
professional chapter heading can be done
easily using the fncychar package:
\usepackage[Bjornstrup]{fncychap}
15
You should rst insert the following code for the
modications to work:
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\renewcommand{\chaptermark}[1]{\
markboth{#1}{}}
The last command is for resetting the existing
denition of the header and the footer.
12
Generate an index
$ wget http://tug.ctan.org/tex-archive/
macros/latex209/contrib/picins/picins.sty
\usepackage{makeidx}
The NOTE style was dened as follows:
The next LaTeX command puts the index
information into the generated le:
\printindex
\usepackage{picins}
\usepackage{amsthm}
\newcommand\NOTE{\linethickness{1mm}\
parpic(14mm,5mm)[sl]{NOTE}\noindent}
11
Format figures
\usepackage{caption}
\DeclareCaptionLabelSeparator{par}{\par}
\DeclareCaptionFormat{dashedlabel}{\
textbf{---} #1 \textbf{---}#2#3}
\captionsetup{format=dashedlabel,margin=1
cm,singlelinecheck=true, font=small,labe
lfont={sc,bf,},textfont=it,justification=ce
nterlast,labelsep=par}
Now you will be able to add a specic gure in
your book as follows:
\begin{figure}[tb]
\centering
\fbox{\scalebox{0.45}{\
includegraphics{figures/ch1/f0101.
jpg}}}
\caption{Adding a figure}
\label{ch10:fig1}
\end{figure}
\index{Knuth}
\NOTE A small note doesnt look very elegant
13
Add tables
\begin{table}[t]
\centering
\setlength\extrarowheight{2.5pt}
\setlength\extrarowheight{2.5pt}
\begin{tabular}{cccc}
\hline \addlinespace
\textbf{Name} & \textbf{Size in Kbytes} &
\textbf{\# of files} & \textbf{\# of keys
in Info.plist} \\ \addlinespace \hline
amazonsearch.wdgt & 144 & 8
& 13 \\
Tags - HTML.wdgt & 88 & 17 & 11 \\
Temperature Monitor.wdgt & 416 & 50 & 10 \\
Wikipedia.wdgt & 696 & 125 & 12 \\ \
addlinespace \hline
\end{tabular}
\caption{Statistical Information.}
\label{ch3:stats}
\end{table}%
16
How it worked
Our example book was built step-bystep: a minimal book.tex le was generated
rst, then chapter and appendix les without
any data were added to the project.
At this point it was time for us to write
the book by adding text, images, tables,
bibliography and index entries, while
experimenting with the look of the existing
LaTeX styles, making changes to them, adding
new ones and correcting errors.
This is denitely the safest procedure to
follow when writing your own book while using
LaTeX LaTeX was able to process all the les,
as well as the index and the bibliography,
without any difculties. So go on and make your
own creation!
Resources
Taiga home page taiga.io
there is a dearth of good open source, agilefocussed tools most of them are old, simply
tweaked to support agile. That was until Taiga.
Taiga is an open source, agile-based PM tool.
Named after a forest biome, it aims to be at the
centre of an ecosystem your projects and your
team with its new UI and agile-based layout.
Lets start this tutorial with its installation on
Ubuntu 14.04 and then go on to see its internals.
The installation here is for a development
server. There is a different production server
installation process on the Taiga website.
02
01
Installation
Taiga-back
installation
02
Taiga-back installation
workon taiga
python manage.py runserver
cd ~
git clone https://github.com/taigaio/taigaback.git taiga-back
cd taiga-back
git checkout stable
03
Taiga-front installation
04
Create project
and user stories
05
Compile using:
npm install
bower install
Now run gulp:
cd ~/taiga-front
gulp
If you nd that you have npm errors while
running gulp, clear the temp les and install all
dependencies again.
04
Create sprints
09
07
06
Kanban template
Issue management
08
Wiki
09
Admin
options
Admin options
10
Gamification
QChange scenes to add more depth to the story, and allow the game to have decisions and routes
Resources
Python 2:
www.python.org/
Pygame:
pygame.org/download.shtml
01
02
03
$ hg clone https://bitbucket.org/pygame/
pygame
04
05
06
07
08
09
10
11
12
13
First screen
15
14
16
17
Currently the code has the scriptspecic assets stored in the main visualnovel
le. These can be moved over to the script,
which will allow you to make the visualnovel
le signicantly more modular. This means
that you can then have multiple scripts with
different assets that will load at startup. With
the basic game done, enjoy playing!
Supercharge
your Raspberry Pi
Get the most out of your Raspberry Pi with these
performance-enhancing tips and tricks
Your Raspberry Pi is plugged in. Raspbian is installed on
the SD card and you are right in the middle of setting up a
wireless print server or building a robot to collect your mail
from your doormat.
But are you truly getting the most from your little
computer? Do the components youre using maximise the
potential of your Raspberry Pi or are they holding it back?
Perhaps you havent explored the full set of options in
Raspbian, or youre running the entire OS from SD card,
something that can reduce SD card lifespan.
Various tools and techniques can be employed to
improve performance, from choosing the right hardware
to overclocking the CPU. You might even maximise storage
space on the Raspberry Pis SD card or all but replace it with a
secondary device to help improve speed.
Use these tips and tricks to recongure your Raspberry Pi
setup and optimise software and hardware to ensure you get
the best performance for your projects.
01
02
03
05
06
04
Above Theres a
great guide to SD
cards at elinux.org/
RPi_SD_cards
Buy rated
SD cards
Its all too tempting
to boot up your
Raspberry Pi with
an image copied
to an SD card that
you just pulled
out of your DSLR
or phone. After
all, theyre all the
same, right? The
chances are that
your chosen SD
card was one that
you had lying about
when you bought
your Raspberry Pi.
It might be good
enough but if you
want the best
performance,
a high-rated
SDHC card with
plenty of space is
recommended.
Such media is
inexpensive and
can be bought
online or in
supermarkets.
Just make sure
youre buying a
known brand!
Picking
an external
USB drive
Speeding up your
Raspberry Pi by
migrating the
root lesystem to
an external USB
drive is a start,
but what sort of
device should you
use for the best
performance? With
a USB thumb drive
you can add ash
storage up to 16
GB without running
into any signicant
problems (the
larger the drive, the
greater the current
is required to read/
write). Anything
larger is expensive
and unnecessary.
If youre planning
to use an external
HDD, there are no
power issues as it
will have its own
power supply. As
ever, your choice
should suit your
project.
07
10
08
09
11
12
15
13
Overclock
with a
heatsink
14
16
17
Overclocking
is potentially
dangerous to
any computer
system, which
is why its
great that the
Raspberry Pi
developers
have included
the facility in
their approved
operating system
and allowed
its use under
warranty. If
youre using
this feature,
heatsinks and
water cooling
systems are
available for the
Raspberry Pi to
ensure you dont
bake the CPU
and RAM when
in use.
Here, you can add new les or create a collection of media les.
Files can be assigned to collections at any point of time
Update account settings here and track media les using the
Media processing panel, which shows details about uploads
Resources
MediaGoblin home page
mediagoblin.org
02
01
02
03
Set up the
database
MediaGoblin user
04
Install MediaGoblin
06
Deploy
MediaGoblin
cd /srv/mediagoblin.example.org
Now start cloning:
05
./bin/easy_install https://pypi.python.org/
pypi/flup/1.0.3.dev-20110405
./lazyserver.sh --server-name=broadcast
06
Deploy MediaGoblin
07
MediaGoblin
uses
FastCGI
for
deployment and FastCGI needs a server. So
we need Flup a FastCGI server. We already
installed Flup in step ve, so lets now see why
FastCGI is so important. Later you will learn a
FastCGI setup with an Nginx server to serve
MediaGoblin pages.
08
08
Nginx
setup
Nginx setup
ln -s /srv/mediagoblin.example.org/nginx.
conf /etc/nginx/sites-enabled/
This way, a change in one le automatically
reects in the other. You need to then add the
contents to the conguration le, as shown in
the screenshot below. Remember to change the
elds as per your local paths. Once done, restart
nginx using sudo /etc/rc.d/nginx restart. If
everything goes well, start MediaGoblin using:
cd /srv/mediagoblin.example.org/
mediagoblin/ ./lazyserver.sh --servername=fcgi fcgi_host=127.0.0.1 fcgi_
port=26543
Visit mediagoblin.com to see an example
MediaGoblin gallery in action.
09
MediaGoblin home
10
Add media
05
01
Choose an environment
02
Gather equipment
04
05
06
03
Phone tap
Check equipment
If all
else fails
Android apps
There are a few Android apps that will
record voice calls for you, however unless
youre using a rooted device you wont be
able to properly record the audio coming
down the line from the caller. What a lot of
them do is use the microphone to try and
pick up whats coming from the receiver
end of your phone. Experiment and nd
what is best for you, but otherwise you may
have to look into rooting a phone to get the
call recording to properly work.
07
In the interview
Taking notes on paper or with a notetaking application as you record can be useful
for transcribing at a later point. Make sure you
keep track of time stamps of interest so that
you can easily nd them when you are editing or
listening back later.
This enables you to fast-forward straight to
the parts of audio that you need when youre
writing your article or typing up your notes. You
can also do this in Audacity by hitting Ctrl+M
while you are recording.
10
08
Transfer to PC
10
Create a noise
prole
12
13
Mix down
09
11
Remove noise
16
14
17
18
15
Configure VLC
16
Explore options
Get set up
19
Time to transcribe
Explore
options
Machine
transcription
The state of voice recognition on Linux
is good there are APIs and workable
acoustic models that can actually parse
what youre saying into sounds and such.
The main issue right now is the lack of
open language models dictionaries
full of words and common grammatical
phrases. Unfortunately this means, for
the time being, that there are no real FOSS
solutions to machine transcribing that you
can then x later.
20
Transcribe better
Left Running a
private cloud? Make
sure no one can
break into it
01
passwd
04
With the new account set up, the next step is to set a
password. As youre not signed into the account at this stage,
you wont be using the passwd command. Instead, enter:
Use a
proximity
sensor
02
05
sudo visudo
and adding
sudo deluser pi
Then remove the home directory:
03
06
If youre genuinely
concerned about
your Raspberry
Pis physical
security, you
may consider
employing
some additional
hardware to make
it less of
a target.
Your best option
here is probably a
proximity sensor
congured
to detect an
unauthorised
presence. When
coupled with
a buzzer, this
can detect the
presence of an
intruder and
alert you. Its
even possible to
congure such
an alert as an
email message if
youre likely to be
elsewhere, and it
makes for a great
side project.
Fwbuilder has a
great quick-start
guide that handily
annotates the
entire interface
Several rewall
templates are
available for the
most common
types of setup
The objects in
this panel can be
dragged out into
the rules panel on
the right-hand side
Hiding
hardware
Putting your
hardware out
of sight and/or
out of reach is a
good option for
security, and
for something
as small as the
Raspberry Pi and
an SD card you
have quite a few
options.
For instance,
using Velcro or
some adhesive
putty you
might attach
the computer
to the back of
a cupboard or
unit, kitchen
kickboards or
even under a car
seat. The SD card,
meanwhile, is so
compact that you
could easily place
it under a carpet
or even make a
home for it in a
cushion or shelf
just dont forget
where you put it!
07
Edit cmdline.txt
init=/bin/sh
As the Raspberry Pi boots, this command will be read,
enabling us to access a screen to reset the password. Save
and eject the card.
08
passwd username
10
Revert cmdline.txt
09
sync
exec /sbin/init
The Pi will now boot Raspbian normally, enabling you to sign in
with the new password.
11
12
Lock it in a drawer
13
Add a rewall
A firewall is guaranteed to
improve your security
14
startx
In the Pis mouse-driven desktop, launch fwbuilder from
the Internet menu. Upon launching fwbuilder, follow the
given steps to set up your Raspeberry Pi rewall and save
the resulting script.
Were nearly done but some adjustments are still required
before your Pi fully connects to the network.
Pocket
your Pi
15
pre-up /home/pi/fwbuilder/firewall.fw
Next, nd the section labelled Epilog and add
16
If youre still
concerned with
your Pis safety,
put yourself in
the place of a
potential thief.
Where would you
stash it? Probably
in your pocket.
The Raspberry Pi
is small enough
to take with you,
so why leave it
lying around?
Any security
questions
relating to your
Raspberry Pi can
be addressed
by keeping it
close whenever
necessary.
KS
Lift the lid on Linux and get tinkering
Total Linux safety
102 Get
rock-solid defences for your systems
Build your own Qt5-powered desktop
108 Discover
apps to t an LxQt environment
Run Android apps in Linux
112 Enjoy
mobile apps on your Linux desktop
Tether Raspberry Pi to Android
116 Access
your Pi wirelessly on the go
102
108
112
126
Spin your own Debian
118 Make
a customised Debian system
Build a WebKit browser
122 Learn
how to get WebKit built and running
penetration testing
126 Network
A Gentoo-based utility to nd weak spots
Build your own DEB & RPM packages
130 Deliver
Linux software like a pro
116
118
Linux
has
a
well-deserved
reputation for being incredibly
secure in comparison to operating
systems like Windows and OS X.
However, that said, you cant simply
rest on your laurels and assume
that your computer is impervious
to attack especially in the wake
of security scare stories over the
course of the last few months such
as Heartbleed, Shellshock and the
Turla malware, as well as the everpresent threat of more direct system
and account intrusions.
This month were going to tackle
security on a number of fronts. First
up well go through good password
practice with a ne-tooth comb,
picking out everything that you
PASSWORD SECURITY
One of the most important steps
in keeping anything secure is to
create a very strong password that
is difficult to crack. While movies will
tell you enterprising hackers just need
to look around your office to figure out
your password (its his sons name
easy), the most common method
of password cracking is a brute force
attack on the server and the username.
Under a brute force attack, short
passwords, unmodified dictionary
words and anything on top password
lists will succumb very quickly. In terms
of length of password versus time to
crack it, the hours and days needed
to successfully discover a password
are always going down thanks to
advancements in CPU speed and
bandwidth. Using simple alphanumeric
passwords are increasingly insecure,
even if theyre as long as ten characters.
Lets start with a password then
and modify it a non-dictionary word,
reasonably long. Plucked out of the air
we have:
Creating an invincible
password is the rst step to
securing everything
Above There are a few websites that will check your password, but make sure to use something similar
DO
PASSWORD
DOS & DONTS
DONT
ONLINE SECURITY
Now we have a basic password, its
time to start implementing it online.
Security experts say you should use a
different password for every account.
Services like LastPass can offer a
convenient way of doing this with
truly unique passwords per account,
but you might not be comfortable
with them. Human beings can only
remember so many passwords; as
you most denitely should not be
making a note of these passwords,
what we suggest is to modify the
password based on what website
youre using it on.
For example, lets take Amazon. It
has your credit card details so securing
the account is extremely important.
After the Dw@n of the dwanton
base we have three characters to play
with, so we could change them for our
Amazon password. Heres our working:
Take the middle three letters of the
sites name (as Amazon is six letters
long we will choose maz), and reverse
the letters to zam. Now insert it into
our password:
TWO-FACTOR
AUTHENTICATION
Above LastPass won our password managers group test a couple of issues back
Below Controlling your visibility on platforms like Facebook is crucial to security
NETWORK SECURITY
Network monitoring
What if theres activity over your
network that you dont know of and
therefore cant immediately x? One
of the best tools in any sysadmin or
network security toolbox is Wireshark,
or more specically, the tshark
command line implementation.
Wireshark is a network package
sniffer and allows you to track all the
network trafc going on around your
LAN. This can be used to gure out
whats going on in your network that
you dont know about, stray services
and requests and data transfers that
either you didnt know about and
FIREWALLS
Your router will come with
a rewall built in and it will
be pretty good. If you have
a custom server on your
network, either at home
or around the ofce, then
you can probably make a
better one one that you
have far more control over
and that will do a better
job of protecting your
network overall.
You can do this simply
by using iptables, a
command line tool
available for any version
of Linux that lets you
set up custom rules for
IP addresses that can
access the server, custom
port forwarding and other
great changes that make
it a lot more useful to
certain people.
The Arch and Ubuntu wikis
have some great guides:
bit.ly/1yCwG4N (Arch) and
bit.ly/1gd18ul (Ubuntu).
Router maintenance
Your router, as the creator and
guardian of your network, isnt
impervious to attacks either. As well
as updating any default passwords
that may exist for the admin user, you
should always make sure to update
your routers rmware as regularly as
possible. Updates will include security
xes for any vulnerabilities that are
present and should improve security
across the routers software overall.
If your router allows it, you can
also attempt to change the default
IP addresses and range. If youre
using DHCP, this wont matter to any
connected devices, but changing the
default network addresses from the
common 192.168.x.x structure will stop
other types of attacks on the network
that specically target the router.
OFFLINE SECURITY
Online security and protection
from online attacks are excellent
deterrents for a large subsection of
people, but your point of access
your PC should be secure as well
unless you want to have people
snooping around your computer.
As before, a secure password is
essential for your user account. Its a
bit harder to brute-force this kind of
password, but its still doable. Weigh
up the importance of your files versus
your own convenience to come up with
a password that suits your needs, but
still use the password creation tips to
keep it as secure as possible.
The root password shouldnt be
the same as a normal user password.
Much like we suggested with emails,
you should most certainly have a
completely separate password for the
root account. While logged in as root (su
in the terminal) type passwd and it will
allow you to update and change your
current root password.
Some systems will also allow users
to gain root access via sudo su, using
sudoer privileges to just get into the
root. If youre serious about locking
down your system then a big priority
should be to modify sudoer access
on all accounts on your system that
can make use of it, especially for that
particular use case.
Malware
KEEPASS X
While LastPass is a
password manager for
your online accounts,
KeePass X is a password
manager for the apps and
software on your system.
Not only does it keep your
systemwide passwords
more secure, it also allows
you to encrypt information
such as URLs, user
names, attachments and
clipboard items if needed.
It has a smart database
that you can search as
long as you have the right
password, otherwise its
completely encrypted. Its
currently in Alpha release
stage for version 2.0, but
a lot of Linux users are
already integrating it into
their system and workow
due to its quality.
SECURITY RESOURCES
Linux Security
linuxsecurity.com
Linux Security is a news aggregate
for anything related to security
in Linux. Not only does it cover
vulnerabilities, bugs in security
software and other desktop and
server security concerns, it also
covers web security and think
pieces that will keep you informed on the latest security stories.
Keeping up with relevant issues in the security world can keep you ahead
of the game and enable you to lock down anything before a threat becomes
viable. Its not absolutely necessary for everyone, but even those slightly
interested in keeping secure would do well to keep up with some of the
current trends.
There are also some other resources on the site, such as a security
glossary for some of the more obscure terms and general security tips that
anyone can use.
Random.org random.org/passwords
Coming up with a password or
password base can be difficult.
While we have the example in this
issue, we implore you not to use it.
However, if youre having trouble
coming up with your own base, or
want a completely random and
secure password for your email accounts, there are lots of websites that
will enable you to securely and anonymously generate passwords that you
could then slightly modify and use yourself.
Random.org is such a website, where you can create a list of passwords
of varying character length that are all very secure. Nothing is stored on
their servers and all passwords are sent securely via SSL. The random
algorithm uses ambient noise to create the password, which makes it
slightly more difficult to decrypt using high-level cryptographic techniques.
03
01
Choose a distribution
02
Thumbnails in
PCManFM
[Thumbnailer Entry]
TryExec=convert
Exec=convert %i[0] -thumbnail %s %o
MimeType=application/pdf;application/xpdf;image/pdf;
Using this template you can add more types that
convert supports (its a part of ImageMagick).
04
03
Thumbnails in PCManFM
Living lightweight
Qt5 has been around for years and more
Qt applications are moving to use it.
Right now we can build a decent, highly
usable desktop around LxQt. Network
connections can be managed with
ConnMan and its CMST frontend, Dropbox
client is already using Qt5 and LxQt System
Settings work just as well as the samenamed KDE module. There is also a web
browser, email client and a versatile media
player available to access.
How does it compare to the KDE
desktop? Theres no easy answer. Firstly,
the hand-made LxQt desktop has less
features than either KDE4 or the new
Plasma 5 desktop, but its a lot lighter.
Pure LxQt needs less than 100 megabytes
of RAM and each extra Qt5 application
adds very few. Secondly, current Plasma
5 choices (like Kubuntu or Netrunner) are
forced to mix Qt4 and Qt5 parts so that
the resulting desktop is nonuniform and
consumes more resources.
Lastly, you have to remember that
Plasma 5 isnt quite mature yet. Though
its current state is denitely a lot nicer
than early KDE 4 releases in 2008-2009,
some core applications still remain in the
Qt4 world, unfortunately, so there will be
a transitional period from KDE4 to the
Plasma 5 desktop. However, if you stick
with it, your patience will be rewarded!
05
Get Drawpile
06
05
Get
drawpile
07
sudo add-apt-repository
ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install albert
The rst time you launch Albert youll see its
conguration window where you can change
certain settings and, whats more important,
assign a shortcut for invoking Albert. After you
08
08
10
09
11
make QMAKE=/usr/lib/x86_64-linux-gnu/
qt5/bin/qmake
Manage your
mailbox
Resources
Google Chrome
bit.ly/1tMrggU
Archon Runtime
bit.ly/1DPh5Tr
NodeJS server
with NPM
manager
01
03
02
03
Prepare your
browser
Troubleshooting
Archon not working as its supposed to? Heres
how to nd out what the trouble is and x it
From a users perspective, Archon isn't stable, so you may
encounter errors and lockups. If things went wrong from
the start, ensure that youre using the Archon of the right
architecture. After that, ensure Google Native Client is enabled
in your browser (chrome://flags/#enable-nacl flag)
Some apps may not launch and complain of a missing
message element for extName. To x it, edit the le _locales/
en/messages.json inside the extension folder and add the
missing item there. It should now look like this:
{
appNotSupported: {...},
extName: {
description: Extension name,
message: Whatever you like
}
}
Another frequent warning message is about the key
parameter. Resolve this by removing that parameter inside
the extension directory.
More xes are available on the Issues page of the Archon
project: bit.ly/1F6ezDx. If nothing helps, change your Google
Chrome version nd the Linux binaries at bit.ly/1CewlCu.
06
Package
apps yourself
Theres an app on
Google Play called
ARChon Packager
(bit.ly/1Id5kol)
that enables you to
generate Chrome
packages straight
from your phone.
Simply use this app to
browse through the
list of other apps on
your phone both the
apps youve installed
via Play and any that
you have manually
sideloaded onto
an SD card and
then select to zip
everything up into a
ChromeAPK folder on
your phones storage.
It helps speed things
up a little!
04
05
06
Convert APK to
browser extension
chromeos-apk /path/to/application.apk
The tool will create a folder, which can be installed in
Chrome as an unpacked extension. Use the Launch link to
launch it, cross your ngers and wait for a little while.
07
07
Android emulation
Why stop at running the apps when you can run
the whole operating system instead?
Archon isnt the only choice for running Android apps in Linux.
Why not deploy a whole Android OS inside your Linux host? If
that idea suits you, take a look at the Android-x86 project (www.
android-x86.org), which is an unofcial port of the Android OS
for Intel-based computers. It can run on your PC as a normal
system but its hardware support isnt perfect, so the best way
is to install it inside a virtual machine. Go ahead and prepare
the Virtualbox/QEMU/VMWare player, download the latest
Android-x86 ISO (4.4-r2 at the time of writing) and install it as
you would a regular Linux distribution.
Android-x86 shares many benets with Archon and boasts
many features. It supports OpenGL acceleration, external
storage access (SD cards and USB sticks) and can sync with
your Google account. Inside our test Virtualbox environment,
Android-x86 performed well most apps were responsive
and stable. The only minor discomfort was introduced by
applications that use landscape mode. Obviously you cant
rotate your desktop LCD screen each time you launch such an
app, so a workaround could help. Thats why well rotate the
hosts screen. Find out the name of your display output:
08
Test various
other apps
xrandr -q
Then use it to rotate to the left (HDMI1 used for the example):
xrandr --output HDMI1 --rotate left
and bring back to normal mode:
xrandr --output HDMI1 --rotate normal
For convenience, assign these commands to shortcuts and
manage your screen orientation as if you have a magic wand.
Tether Raspberry Pi to
an Android device
Need the internet on your Pi on the go? Try out a physical
tether to your Android device for instant online access
The portability of the Raspberry Pi is one of its most lauded
features and you can get many different accessories to help
aid this portability. Mini screens, mini wireless keyboard and
mouse combos, portable batteries and more can get you out
and about, but the Internet is a stumbling block that you cant
easily x with an accessory. What you do also usually have
with you is an Internet-connected magic pocket box called a
smartphone that, with a bit of know-how, you can connect the
Pi to and steal some Internet from. Over the next two pages
we will impart this know-how to get you using your Raspberry
Pi on the Internet when youre on the go.
01
02
03
Set up tether
06
Test connection
07
04
Check connection
$ ifconfig
05
08
Interface settings
Quick connect
09
Tether on the go
Mobile
data
Using your Pi
on your mobile
phone will eat up
data much faster
than browsing
on your phone
normally is. We
suggest not doing
a full software,
distribution or
rmware update
if you dont
want to spend
a fortune on
data. You can
also set limits
on the amount
of data used on
your phone to
save yourself any
problems, and a
physical tether
will allow you to
connect via the
phones Wi-Fi if
thats an option.
Resources
Debian Live
builder
live-systems.org
01
02
Above Easily create a custom Debian through your browser using the tools that are built into the distro
01
05
03
04
Find the
builder
Type of Debian
A more
manual
process
06
Architecture choice
10
Choose a
bootloader
10
Other
distro builders
Debian isnt the
only distro you can
customise Fedora
and Ubuntu have
live builders that
you can use, albeit
in various states of
maintenance. Theres
also SUSE Studio,
which is another
online builder that
uses all of the SUSE
and openSUSE
distros as a base. You
can nd that here:
susestudio.com.
07
08
Chroot lesystem
09
Choose a bootloader
11
12
ISO options
13
The ISO labelled options are all for just labelling the ISO
in your own way. You can leave these be and it wont affect
anything, or change them if you plan to distribute your version
of Debian and want some extra info to be in there. The volume
will appear on the actual ISO name, with the application being
used as the name of the distro elsewhere.
16
14
Source les
16
17
18
15
Use your
image
Resources
WebKit
webkit.org
Qt 5
bit.ly/1K5QTGD
Ubuntu 12.04
or higher
01
04
02
./Qt-opensource-linux-x86-5.4.1.run
03
$ wget http://download.Qt.io/official_releases/
Qt/5.4/5.4.1/Qt-opensource-linux-x86-5.4.1.run
Remember to take into account the latest version of Qt 5
before you download.
04
05
Setup OpenGL
Install Qt 5
$ chmod +x Qt-opensource-linux-x86-5.4.1.run
Install
Qt 5
Build
essentials
If youre on a
dedicated build
environment, you
probably already
have the G++
compiler that is
required for this
build. If you dont,
this can easily be
installed in Ubuntu
using the following:
$ sudo apt-get
install buildessentials
Youll need to do this
as soon as you can in
this tutorial to make
sure everything is
properly set up.
Qt Creator
While were building
this in a command
line environment, you
can also build it in the
graphical Qt Creator
software. It takes a
bit more to get it to
run in there, though
youll have to edit
bits of the source and
use a custom build
command for it to
actually start. You
can look into how to
do this here:
bit.ly/1IvzbM5.
06
$ export PATH=$QTDIR/bin:$PATH
07
10
11
12
RenderObject*
RenderObject*
RenderObject*
RenderObject*
08
$ webkit/Tools/Scripts/build-webkit -Qt
This will take a while, depending on your system. If there are
any other errors or missing dependencies, it will stop and you
may have to hunt down the libraries that it needs.
09
13
firstChild() const;
lastChild() const;
previousSibling() const;
nextSibling() const;
void attach()
on the DOM nodes to begin the rendering process and get it
fully underway.
14
$ Tools/Scripts/run-launcher -Qt
void detach()
This is the QtTestBrowser, which is a very quick
implementation of WebKit as a browser. You can look
through the les to get an idea of how it uses WebKit.
18
15
void setStyle(RenderStyle*)
This style can be changed on the renderer, but otherwise it will
stay the same until destroyed. Styles can be accessed using:
17
int
int
int
int
marginTop() const;
marginBottom() const;
marginLeft() const;
marginRight() const;
int
int
int
int
paddingTop() const;
paddingBottom() const;
paddingLeft() const;
paddingRight() const;
int
int
int
int
borderTop() const;
borderBottom() const;
borderLeft() const;
borderRight() const;
Create your
custom browser
18
16
Network penetration
testing with Pentoo
The Gentoo-based utility distro can nd
vulnerabilities in your network
Resources
Pentoo www.pentoo.ch
02
01
02
Explore applications
04
More options
05
Explore
applications
07
08
03
06
11
09
11
Decode differently
12
Endpoint detection
13
$ airodump-ng mon0
10
14
Decode
differently
15
19
16
Install Pentoo
17
Congure root
password
18
19
20
New Pentoo
Resources
Access to
your distros
official
repositories
set of les or a binary app in the right way neat, clean and
convenient. In this tutorial we will nd out what it takes to
create a custom DEB or RPM package and the ways in which
you can benet from maintaining everything in your system
by using packages.
The tutorial naturally breaks into two parts, as Debian
and Red Hat packaging systems are different and therefore
require learning different sets of commands. However, as
you will see a bit later, the procedure is really straightforward
and easy to follow once you have got your head around just a
few basic examples.
deb file:///path/to/debs ./
In Fedora/CentOS and various derivatives youll need to create a repo with your
RPM les. Start by installing the createrepo package (yum install createrepo)
and then create repository metadata in the directory containing your RPM
les:
01
02
03
Alien vs
DEB/RPM
rpm -i /tmp/mypackage-1.0.0-1.src.rpm
and then address the spec file directly:
04
setBadness(permissions-unauthorized-file, 0).
05
07
mkdir -p ~/src/mypackage/0.0.2
Then put your tarball into that directory and unpack it (tar
xzf mypackage-0.0.2.tar.gz). Then you will need to compile
the program using classic commands:
Left Debreate
lets you escape
the command line
and create your
DEB package with
friendly step-bystep wizard
Package maintainers
There are various tools that aid creating and maintaining highquality software packages. In the case of Ubuntu/Debian, the
ofcial policy says the synopsis line in debian/control must be
concise, not repeating the package name, but also informative.
Its also a good idea to write useful changelog entries to debian/
changelog each time you update a package.
After building the updated version of the package you may
want to nd out the difference between new and old version.
Use the debdiff command for that:
debdiff package_1-1_arch.deb package_2-1_arch.deb
Also keep in mind that both ispell and aspell have special
modes for checking debian/control les:
08
Debianise it
dpkg-buildpackage -rfakeroot
After a while, once the building process is over, move a level up
and enjoy your newly created DEB package. You can doubleclick it or use the dpkg -I mypackage-0.0.2*.deb command.
Notice the .dsc le, which can help you pull the application
sources in future. The syntax looks like this:
dpkg-source -x ./mypackage-0.0.2.dsc
ispell -d american -g debian/control
aspell -d en -D -c debian/control
In the RPM world, the most advanced helper tools have been
introduced in ROSA and OpenMandriva, where the latest RPM5
technology is being used. Install the spec-helper package
(urpmi spec-helper ) to access extra tools: spec-cleaner and
rediff_patch. The rst is useful for adapting a spec le from
different Linux distributions: it xes Buildroot and Packager
sections according to global variables, cleans the buildroot
tree, xes hard-coded %{name}, %{version} and %{release}
variable values and does minor xes. The syntax is simple:
spec-cleaner old.spec new.spec
Rediff_patch updates a patch le (.diff) to work with a new
version of a source tarball. Place the old patch, spec le and a
new tarball into a new directory and run:
rediff_patch <patch_ro_rediff> <tarball>
09
136
148
146
156
Fedora 22
150 How
did Fedora build on 21s
foundations?
elementary OS 0.3 Freya
152 An
update with over 1,1000 improvements
openSUSE 13.2
154 The
next step for all Linux users
Mint 17.1
156 Linux
Mints rst truly independent desktop
152
150
154
e
e
r
f
t
s
e
b
e
Discover th every category and
software in nes you should be using
see which o
Linux Mint
Ubuntu
Ubuntu is probably the
most popular distro in
the world, or at least the
most well-known, which
means a lot of software supports it and
not other distros. You can customise it
anyway you want off of its core base.
Elementary OS
An everyday distro is quite a broad
thing; in this context we mean
the kind of operating system you
can use for just about anything
and everything without really
specialising in one specific area.
Something thats easy to use and its supplied tools aid
your use of it.
This is exactly the point where elementaryOS comes
in. Aiming to be easy to use for people of all skill levels,
elementaryOS is a beautifully designed distro that
has had a lot of care put into it. Using an Ubuntu LTS
as a base and cribbing from a lot of existing design
decisions, elementaryOS is hardly a completely
original Linux distribution.
What makes elementaryOS unique is its use of
these design aspects and design decisions, putting
together a wholly new desktop and distro experience
Another rm favourite as
an everyday distro, Linux
Mint would have taken this
category by storm once
upon a time due to excellent design
over two fantastic desktops on top of
an excellent distro.
Mageia
9/10
7/10
6/10
8/10
10/10
9/10
9/10
7/10
LibreOffice
Firefox
Thunderbird
Cinnamon
Shotwell
Once again
the king of the
browsers, with
half a billion users
around the world, Firefox has
privacy and customisability
in mind with its design. Due to
some excellent cross-platform
tools, you can use it wherever
you want.
The email
counterpart
to Firefox has
remained a very
strong email client on any
operating system for a long
time. With a great range of addons and extensions, you can
have it work exactly as youd
want it to.
Excellent photo
management
software used
by a lot of distros
by default, it even has some
basic support for RAWs. You
can perform batch operations
to tweak colours and lighting,
or just organise photos into
specic tags.
wattOS
A very lightweight
and speedy operating
system that aims to
do two things: boot to
desktop very fast and also save you
electricity, either plugged in or on
the battery. It does both of these
exceedingly well.
Puppy Linux
Lubuntu
You can define lightweight in a
number of ways these days. While
the graphical software part of a
distro itself can be the one that is
most resource intensive, the core
kernel
and
behind-the-scenes
packages can also take power away from CPU
cycles. While Lubuntu and other normal Linux distros
running LXDE dont do much to the core of their
operation, merely running the desktop itself can be a
huge relief on some systems.
Thats why were awarding Lubuntu this prestigious
prize. While were not the biggest fans of Unity, the
distribution underneath the desktop environment is
an incredibly solid and relatively easy-to-use system
that a good desktop environment can really make
Porteus
8/10
7/10
9/10
6/10
10/10
10/10
9/10
9/10
Audacious
Midori
CMPlayer
Geany
Enlightenment
Very lightweight
and very fast,
Audacious is the
denitely the
best audio player for those on
a resource budget. It hooks
into notication centres
of most major desktops as
well, allowing you to control
it better.
Midori teeters
on the edge of
being just a bit
too lightweight
to be as useful as some of
its peers, but it managed
to maintain a number of
excellent features to make
browsing the Internet with it
acceptable in 2015.
A lightweight
video player that
still has a fairly
decent interface
and no need for mucking
around in the command
line, it will play all the media
you need as long as you
have the right codecs and
backends installed.
A window manager
or full desktop
environment,
Enlightenment
is an incredible exible and
lightweight framework loved
by hardcore users. Its rarely
used as a default desktop, but
give it a go if youre on the hunt
for something different.
GeeXbox
OpenELEC
When it comes to media and
other forms of entertainment
consumption via computers, one
of the most recognisable names
in existence is XBMC. Very likely
because of its quite redundant legacy
naming, its unfortunately dropping the well-known
branding in favour of new name Kodi. Whats this all
got to do with entertainment distros though?
Well the devs behind Kodi also make the excellent
OpenELEC, a Linux distro optimised for a number of
different hardware types to offer the best possible
Kodi experience.
Not only does it work on specialist hardware
such as the Raspberry Pi, Apple TV and some other
hardware ideal as HTPCs, but you can also get
generic PC builds for x86 and x64 systems.OpenELEC
A direct alternative to
OpenELEC that gives you
a little more choice for
how you set up a HTPC. It
hasnt had any new development for
about a year now, but thats nothing to
worry about as its still excellent.
Ubuntu
When it comes to being
an entertainment distro,
Ubuntus strength is its
supreme list of packages.
You can set up XBMC/Kodi, Plex, Myth
or just plain video and music players on
Ubuntu of any type.
AVLinux
Not for playing back
your media per se, AV
Linux is an excellent
way for you to actually
create audio and video yourself,
thanks to a custom kernel and great
package selection on a live CD or live
USB stick.
10/10
8/10
4/10
8/10
3/10
10/10
9/10
10/10
Kodi
VLC
Clementine
Nuvola
GIMP
Previously
XBMC, Kodi
Entertainment
Center is the
premier media PC software
around. Its the software
behind OpenELEC and it can
be used for simple music and
video playback, or streaming
services and recording live TV.
An extremely
powerful yet small
piece of software
that can not only
play just about any form of
media, but also send, receive
and record network streams.
Its very customisable and easy
to use even if you dont want to
stream your desktop.
One of the
problems we
have found with
browser-based
streaming is that we cannot
control playback with media
keys or hotkeys. Nuvola allows
you to keep all your streaming
audio in one place and, more
importantly, control it.
The powerful
image manipulator
that is probably
the best open
source has to offer, GIMP can
even challenge Photoshop
thanks to its array of excellent
features and tools it even has
a more straightforward naming
convention in places.
CrunchBang
A Debian derivative,
CrunchBang uses the
lightweight Openbox
window manager to be
as distraction-free as possible and
offers a good balance between the
performance and exibility of Arch and
the shallow learning curve of Ubuntu.
Gentoo
Arch Linux
Arch has never been a distribution to
pander to the common denominator.
While its contemporaries add userfriendly wizards and hand-holding
installation packages, Arch dumps the
newcomer to a console session and
leaves them adrift with little more than a Wiki page for
company. For beginners, simply getting Arch installed
can seem like a major achievement but beginners are
most certainly not Archs target market.
Once its installed, Arch reveals its true potential.
It allows the more technical user to install only
the packages required for day-to-day work for
Ubuntu
Often derided for
Canonicals treatment
of the wider opensource community,
Ubuntu nevertheless promises wide
compatibility backed by the option of
commercial support contracts.
2/10
5/10
10/10
6/10
8/10
9/10
2/10
9/10
Eclipse
VirtualBox
Git
Vim/EMACS
GNU Debugger
It might lack
compatibility with
the GNU General
Public Licence, but
the Eclipse Public Licensed
Eclipse IDE is a powerful tool.
Based on IBMs Visual Age,
it supports most common
programming languages youll
be working with.
While the
GPL-licensed
VirtualBox OSE
build only provides
virtualised USB 1.1 support, its
other features make it a great
way to run alternative operating
systems on top of userspace
Linux; ideal for testing your
code on other platforms.
Born of a copyright
confusion that
surrounded
BitKeeper, Git is
the distributed revision control
system of choice for kernel
developers. It allows for easy
collaborative working with
plenty of ways to track bugs
added in later code revisions.
The standard
debugger for
GNU/Linux, GDBs
capabilities
extend beyond the obvious
with support for programming
languages ranging from Free
Pascal and Ada through to
Objective-C and Java. We
recommend giving it a try.
OpenSUSE
OpenSUSE is the
community-driven,
fully-open variant of SUSE
Linux. Sponsored by
SUSE, OpenSUSE requires no support
contracts or licensing and often
provides newer features.
Ubuntu
Like SUSE and Red Hat,
the company behind the
software Canonical
offers varying support
contracts and training options,
while its software compatibility is
top-notch.
8/10
7/10
7/10
7/10
6/10
5/10
7/10
8/10
Puppet
Chef
Docker
Lynis
SUSE Studio
An open-source
configuration
management
utility designed
to support heterogeneous
networks of Unix-like and
Windows machines, Puppet is
a powerful automation tool for
sysadmins of Enterprise-class
infrastructures. Worth a look!
An alternative to
Puppet, the Rubyand Erlang-based
Chef integrates
well with commercial cloud
environments including
Amazons EC2 and Googles
Cloud Platform, and works as
a local install for managing
internal infrastructure.
Docker provides
the ability to
easily and
quickly deploy
applications inside isolated
software containers on Linux.
Compared to a traditional
virtual machine, a Docker
container has signicantly
lower overheads.
BackBox Linux
Wifislax
Kali Linux
For years, BackTrack Linux was
the king of Linux distributions
for those doing security audits
and penetration testing. In 2013,
however, the project was forked into
Kali Linux. Created and maintained
by Mati Aharoni and Devon Kearns of Offensive
Security, Kali is a ground-up rewrite of BackTrack
and a worthy successor to it.
Based on Debian, rather than the Ubuntu origins
of its predecessor, Kali includes pre-installed
copies of the most popular security utilities,
including network sniffer and analyser Wireshark,
port-scanning tool nmap, password cracker
John the Ripper and even the Aircrack-ng suite
REMnux
REMnux specialises in
reverse-engineering
of malicious software.
Tools are provided for
memory investigation and analysis of
various executable formats as well as
documents and even web content.
6/10
7/10
5/10
5/10
9/10
9/10
6/10
9/10
Lynis
nmap
OpenVAS
Wireshark
Metasploit
A tool so famous
it ended up with
screen time in The
Matrix Reloaded,
Fyodor Vaskovichs (real name
Gordon Lyon) nmap should
have a place on every system.
Its rapid network mapping is
incredibly exible and can be
individually tailored.
The Open
Vulnerability
Assessment
System (OpenVAS)
started life as a fork of Nessus
under the name GNessUs.
Now, its one of the leading
vulnerability scanning and
management tools and its
entirely free and open-source.
While Wireshark
formerly
Ethereal has
its competitors
in the packet-snifng arena,
its friendly user interface and
powerful analysis and ltering
tools are second to none.
Wireshark is useful for general
network diagnosis as well.
This framework
is invaluable
for penetration
testers. When
a scan has revealed a
vulnerability, Metasploit
can attempt to exploit said
vulnerability; proving or
disproving its existence quickly
and easily.
iprediaOS
Whonix
A very different private
distro, anonymously
connecting you online via
an anonymous terminal
and anonymous server, giving two
levels of security to maximise privacy
and stop any incoming attacks.
Tails
Privacy can be extremely important
on the Internet, and its only going
to become more of a concern as
time goes on. With more ways to
leave your trace on the Internet,
and more companies wanting your
details to sell you ads, it can be tricky to remain truly
anonymous. This can be essential for some people
whistleblowers, victims of stalking and people writing
unpopular opinions on Twitter. It can also be handy for
just buying a secret gift for your other half to avoid the
inevitable targeted ads popping up that an incognito
mode wont stop.
Tails can help you with all of this, and makes it
fairly easy to do in the process. It manages this
through many careful layers of security and privacy
considerations rstly, the entire system runs
in RAM and does not use any disk-bound swap
Liberte
A Gentoo-based
Tails alternative
thats not had much
development recently
but is still extremely private and
very secure. It uses Tor and other
software to keep the user safe from
prying eyes.
8/10
7/10
6/10
10/10
6/10
10/10
4/10
7/10
Tor
Tor browser
ClawsMail
KeePassX
In the movie
Sneakers, an
intrepid group of
Bay Area hackers
bounce their signal off multiple
servers and satellites to avoid
detection. Tor is essentially
this, sending your requests
through several secure and
encrypted servers.
Built using
Firefox and Tor,
using the Tor
browser is an
easy way to stay completely
anonymous online without the
need for booting into a private
distro. Its so good its used by
default in Tails to make sure
you stay private.
This is a PGP
encryption
for your email
clients, including
Thunderbird, that lets you send
messages in condence. It
also works on its own, just in
case you want to leave even
less trace of its existence on
your system.
Manage your
passwords with
KeePassX, the
cross-platform
password manager. It allows
you to store a lot of data in a
highly encrypted database that
can only be accessed via your
password once its accessed,
you can even search it.
Florence Virtual
Keyboard
A virtual keyboard
that avoids
any keylogging
programs to
make your computer just that
little more secure. It can also
be used if your keyboard is
missing and broken, and is
extensible and customisable.
Sabayon
A Gentoo variant,
Sabayon retains the
rolling-release ethos but
is a lot more welcoming.
Designed to work out-the-box,
Sabayon loses a little in exibility
compared to its upstream parent but
is still a powerful distribution.
Arch
Gentoo
Named for the speedy Gentoo
penguin, Gentoo and Arch have long
been rivals. Both offer a true rollingrelease development methodology,
meaning that the latest updates
are brought to the entire user base
simultaneously ensuring that no installation is ever
out of date, and that installation need only occur once
and both feature a BSD-inspired ports-like software
distribution platform.
For the Linux purist, the hands-off approach of Arch
is likely to appeal, but for the average user Gentoo is
a gentler introduction to the world of rolling releases.
First released back in 2002, the distribution has a
considerable fan base who appreciate the teams stillrare approach to development and software releases.
The other main advantage to running Gentoo is that
its software is compiled from source directly on the
users system via the Portage manager. This means no
Aptosid
7/10
6/10
10/10
8/10
9/10
10/10
4/10
9/10
GIMP
Audacity
Firefox
LibreOffice
VLC
Supporting
multi-track mixing
and with more
lters and utilities
than you could imagine using,
Audacity helps prove that Linux
is no slouch when it comes to
creative work and that it can
hold its head up there with the
proprietary platforms.
Although under
re for perceived
bloat ironic,
considering the
project was founded to deal
with perceived bloat in the
Netscape browser the
Firefox browser, now on
version 34, remains a popular
choice among users.
Created following
Sun Microsystems
acquisition of
OpenOfce.org,
The Document Foundations
LibreOfce is now the default
in many distributions, offering
features and compatibility
to please even the biggest
Microsoft Ofce fan.
The strength of
VLC lies in its
exibility. As well
as the ability to
play almost any audio or video
format, it supports streaming
over the network and the
ability to record from various
sources including capturing a
live view of your desktop.
8/10
Knoppix
7/10
5/10
7/10
10/10
9/10
4/10
9/10
WebConverger
Puppy Linux
A very special and tiny
distribution that, while
very light for normal
computers, is best
suited for giving ancient PCs some
usefulness. Its based on Ubuntu
usually, with a quite custom kernel
and a different set of packages.
WebConverger allows
you to set up a dedicated
web kiosk for something
like an Internet cafe,
running a modied version of Firefox.
Porteus
A very fast live distro that takes up only
300 MB of space, and is optimised
to run from live media. You can add
modules for extra software if needed.
Clonezilla
GParted
Wicd
TestDisk
Tails 1.3
CPU
x86 compatible (IBM PC
compatible and others, but
not PowerPC or ARM)
RAM
1 GB recommended
Storage
Internal or external DVD reader, or
ability to boot from USB or SD card
Available
tails.boum.org/download
Summary
While its only minor
improvements and
additions, its still a very
secure and private distro.
It is now easier to be on
the Internet and remain
private using Tails, thanks
to Electrum and Keyringer
bringing a better way to
pay for things and securely
transmit messages
CPU
1 GHz
RAM
512 MB minimum, 1 GB recommended
Storage
7 GB minimum
Available from
releases.ubuntu.com/15.04
Summary
While not a necessary
upgrade from 14.10 and
really, if youre that against
systemd then its best to
stick to 14.04 it still offers
enough so that when you
do upgrade, youll notice a
slightly better selection of
features and apps.
Above Jessie gives you the option to install the Cinnamon desktop
RAM
1 GB recommended
(for desktop)
Storage
10 GB (for desktop)
Pros
Stable, reliable, comes with a great
selection of software and is very
easy to customise to your
individual specications
Cons
Summary
Debian 8 is a ne new
stable in the Debian line of
distros, perfect for all kinds
of users for at least the
next six months, while still
excellent for those who like
ease of use, familiarity and
good security on one distro
for a more extended
period of time.
Fedora 22
Fedora branches into three distinct variants for its latest release,
building on the solid foundations laid in Fedora 21
CPU
1 GHz
RAM
1 GB
Storage
10 GB
this cycle, while the UI for Boxes has also been totally
revamped with a better box creation assistant, new
preferences, default display scaling and a new feature
that lets you send keyboard shortcuts through to a box.
In terms of software there are some other improvements
with Fedora. KDE Plasma 5 and LXQt have both been
packaged for this release, theres a brand new IDE for
GNOME called Builder, including features like splitpanel editing and a Markdown preview, and theres a
new Preupgrade Assistant that assesses your system to
ensure its ready for the next upgrade. At the back end,
Fedora is now a step closer to running on Wayland, with
the display server being used for the GNOME Display
Manager in this release (although the GNOME session
still uses X), and the Elasticsearch indexing server has
been integrated with the Fedora repos.
Pros
The new GNOME 3.16 features and the
DNF package manager are highlights,
and the three editions are well suited to
their purposes
Cons
Its hard to fault this release its a
solid improvement on Fedora 21 and
the switch to DNF has been very well
implemented
Summary
Virtualisation is now
easier across all editions
of Fedora 22 and DNF
should prove to be a
worthy successor to Yum.
Factoring in the subtle but
important design changes
and new features, this
release is an excellent
progression for the distro.
Above The Videos, Camera and Calculator are new additions for Freya
RAM
1 GB
Storage
15 GB
Above Photos has been redesigned since being forked from Shotwell
Pros
Design and menu improvements
throughout Pantheon, new and
overhauled software, notications,
rewall and privacy mode
Cons
May be just a bit too limiting for
users accustomed to greater
choice and customisation options
in their distro
Summary
Freyas host of updates
brings improvements
across the board, from
new core apps to a rewall
and simplied workspace
switching, making the new
release a clear progression
on an already brilliant
distro that has a lot to offer
to Linux newcomers.
openSUSE 13.2
A look at the release candidate for openSUSEs 13.2, the next
step in the Linux distribution for everyone to use
Pros
This version looks a lot nicer and
generally is much nicer, being right
back on track for openSUSE
Cons
Not as easy to use as others
for newcomers, and focus on
aesthetics may have taken away
from tech
One-click installing
This interface, know as YaST, is one of the many
ways you can go about installing packages in
Future innovations
This release of openSUSE also brings with it two
new technologies that are quickly becoming Linux
Usage scenario
Actually using openSUSE around all these
features and software seems like a renewed
experience. For the last couple of years,
somethings felt off with the distro, and it didnt
help that the community was having trouble
getting people in to help build and test it. Since
13.1s release, a styleguide has been introduced
and the last year has been spent bringing 13.2
up-to-scratch while still being able to showcase
some of the latest and great FOSS technology.
It can be a little intimidating for those that are
not used to the variety inherent in Linux, and its
denitely not something you could recommend
to a newcomer. However, for those with some
knowledge of Linux, openSUSE is an excellent
distro that makes desktop Linux use quite easy
once you learn the ins and outs.
Summary
This is a return to form for the distro
that has had some issues getting out
the door, let alone being stable, in the
last few years. The year of focus on
polish with the new guidelines have
worked wonders.
Cons
The Linux Mint teams latest version of the distro is their rst
long-term support release based on Ubuntu 14.04 17.1
comes with some much needed updates. For the rst time
ever, Linux Mint has received a full-on point release update
and in more unique is the fact that this 17.1 comes instead of
the Linux Mint team working on a Linux Mint 18. Linux Mint 17,
for the rst time in the distros history, is a long-term support
release based on Ubuntus own current LTS, 14.04 Trusty Tahr.
With no new numbered Linux Mint coming until 2016, its good
to see actual quantiable evidence that the Mint team not only
still exist, but are keeping with their LTS promise.
As such, on rst glance, theres not a massive difference
in 17.1 over 17. The core of the distro has received a series of
security and bug x updates, with all default software now
updated to their latest versions at the time of release as well.
In terms of the desktops, all versions have had tweaks to
Q The Software Manager is one of the things that separates it from Ubuntu, with no ads or
paid apps. Its had a few minor updates, including the ability to show off more screenshots
Minor changes
It is a minor update over the original version of
Linux Mint 17, but its denitely a useful one for
those that like to keep their software up-to-date.
If youre already running Mint 17 you wont really
Summary
Linux Mint 17.1 may only be a minor
update over 17, but it brings with it
enough improvements to warrant an
upgrade if youve not been keeping
your system up-to-date, or still on the
edge of whether or not to get 17 in the
rst place.
tri Spe
al ci
of al
fe
r
Enjoyed
this book?
Try es
3 issjuust
for *
5
* This offer entitles new UK direct debit subscribers to receive their first three issues for 5. After these issues, subscribers will then pay 25.15 every
six issues. Subscribers can cancel this subscription at any time. New subscriptions will start from the next available issue. Offer code ZGGZIN must
be quoted to receive this special subscriptions price. Direct debit guarantee available on request.
** This is an US subscription offer. The USA issue rate is based on an annual subscription price of 65 for 13 issues which is equivalent to $102 at the
time of writing compared with the newsstand price of $16.99 for 13 issues being $220.87. Your subscription will start from the next available issue.
Dedicated to
all things Linux
Written for you
Linux User & Developer is the only
magazine dedicated to advanced users,
developers & IT professionals
About
the
mag
subscribers to
www.imaginesubs.co.uk/lud
Quote code ZGGZIN
Or telephone UK 0844 249 0282+ overseas +44 (0) 1795 418 661
+ Calls will cost 7p per minute plus your telephone companys access charge
EVERYTHING
YOU NEED
TO FOLLOW THE
TUTORIALS AND
PROJECTS IN
THIS BOOK
YOUR BONUS
RESOURCES
Go to: http://www.filesilo.co.uk/bks-714/
160 Linux Tips, Tricks, Apps & Hacks
HOW TO USE
01
02
03
04
facebook.com/ImagineBookazines
facebook.com/LinuxUserUK
162 Linux Tips, Tricks, Apps & Hacks
Generate co mplex
graphics
Transform your
network
STAY SECURE
FIND OUT HOW TO DEFEND YOUR
NETWORK AND SYSTEM, AND KEEP
YOUR DATA SAFE
BUILD A SERVER
TAKE THE NEXT STEP AND UP
YOUR COMPUTING POWER BY
UPGRADING YOUR SERVER
Run Linux in
the cloud
DISTRO GUIDE
DISCOVER THE BEST FREE
SOFTWARE TO HELP YOU TAKE
LINUX TO THE NEXT LEVEL
www.imaginebookshop.co.uk
Guides
for RasPi,
Debian &
more
Supercharge
your Pi