C
a
n
S
t
o
c
k
P
h
o
t
o
I
n
c
.
/
m
a
x
k
a
b
a
k
o
v
ON THE COVER
how to hardeo Yo0r SSh 0oooect|oos, p. 80
ocrypted 8ack0p So|0t|oos w|th Tr0e0rypt aod Sp|der0ak, p. 94
Ao |otrod0ct|oo to 00ao0tm 0ryptography, p. 68
Tor: 8rowse the web Aoooymo0s|y, p. 50
Tak|og Advaotage oI ocrypt|oo, p. 56
T|ps Ior 0s|og the pax Arch|v|og 0t|||ty, p. 21
So||d-State 0r|vesAre They worth |t?, p. 108
LJ237-Jan2014.indd 4 12/17/13 3:42 PM
WWW.LINUXJOURNAL.COM / JANUARY 2014 / 5
LINUX JOURNAL (ISSN 1075-3583) is published monthly by Belltown Media, Inc., 2121 Sage Road, Ste. 395, Houston, TX 77056 USA. Subscription rate is $29.50/year. Subscriptions start with the next issue.
INDEPTH
108 Solid-State DrivesGet
One Already!
If youve been on the fence, this
article should convince you to give
SSDs a try.
Brian Trapp
COLUMNS
36 Reuven M. Lerners
At the Forge
Talking to Twitter
44 Dave Taylors Work the Shell
Easy Watermarking with
ImageMagick
50 Kyle Rankins Hack and /
A Bundle of Tor
56 Shawn Powers The
Open-Source Classroom
Encrypting Your Cat Photos
120 Doc Searls EOF
Returning to Ground from the
Webs Clouds
KNOWLEDGE HUB
106 Webcasts and White Papers
IN EVERY ISSUE
8 Current_Issue.tar.gz
10 Letters
16 UPFRONT
34 Editors Choice
64 New Products
125 Advertisers Index
26 MANDELBULBER
94 TRUECRYPT
50 TOR
LJ237-Jan2014.indd 5 12/18/13 10:15 AM
Executive Editor
Senior Editor
Associate Editor
Art Director
Products Editor
Editor Emeritus
Technical Editor
Senior Columnist
Security Editor
Hack Editor
Virtual Editor
Jill Franklin
jill@linuxjournal.com
Doc Searls
doc@linuxjournal.com
Shawn Powers
shawn@linuxjournal.com
Garrick Antikajian
garrick@linuxjournal.com
James Gray
newproducts@linuxjournal.com
Don Marti
dmarti@linuxjournal.com
Michael Baxter
mab@cruzio.com
Reuven Lerner
reuven@lerner.co.il
Mick Bauer
mick@visi.com
Kyle Rankin
lj@greeny.net
Bill Childers
bill.childers@linuxjournal.com
Publisher
Director of Sales
Associate Publisher
Webmistress
Accountant
Carlie Fairchild
publisher@linuxjournal.com
John Grogan
john@linuxjournal.com
Mark Irgang
mark@linuxjournal.com
Katherine Druckman
webmistress@linuxjournal.com
Candy Beauchamp
acct@linuxjournal.com
Contributing Editors
lbrahim Haddad Poberl Love Zack 8rown Dave Phillips Marco liorelli Ludovic Marcolle
Paul 8arry Paul McKenney Dave Taylor Dirk Llmendorl Juslin Pyan Adam Monsen
Linux Journal is published by, and is a registered trade name of,
Belltown Media, Inc.
PO Box 980985, Houston, TX 77098 USA
Editorial Advisory Panel
8rad Abram 8aillio Nick 8aronian Hari 8oukis Sleve Case
Kalyana Krishna Chadalavada 8rian Conner Caleb S. Cullen Keir Davis
Michael Lager Nick lallys Dennis lranklin lrey Alicia Cibb
Viclor Cregorio Philip Jacob Jay Kruizenga David A. Lane
Sleve Marquez Dave McAllisler Carson McDonald Craig Oda
Jellrey D. Parenl Charnell Pugsley Thomas Quinlan Mike Poberls
Krislin Shoemaker Chris D. Slark Palrick Swarlz James Walker
Advertising
E-MAIL: ads@linuxjournal.com
URL: www.linuxjournal.com/advertising
PHONE: +1 713-344-1956 ext. 2
Subscriptions
E-MAIL: subs@linuxjournal.com
URL: www.linuxjournal.com/subscribe
MAIL: PO Box 980985, Houston, TX 77098 USA
LINUX is a registered trademark of Linus Torvalds.
LJ237-Jan2014.indd 6 12/17/13 3:43 PM
has the tools to keep you afoat.
TrueNAS Unifed Storage features the Intel Xeon Processor
5600 series and supports high availability, remote replication,
deduplication, encryption, compression, and snapshots. It has
the tools to deal with any storage challenge you may face.
Key Features:
Dual Intel Xeon Processors 5600 Series
Support for CIFS, NFS, iSCSI, and more
Active Directory, LDAP, and NIS
integration
Multi-Petabyte Scalability
Call iXsystems toll free or visit our website today! 1-855-GREP-4-IX | www.iXsystems.com
Intel, the Intel logo, and Xeon Inside are trademarks or registered trademarks of Intel Corporation in the U.S. and other countries.
LJ237-Jan2014.indd 7 12/17/13 3:43 PM
Current_Issue.tar.gz
SHAWN POWERS
8 / JANUARY 2014 / WWW.LINUXJOURNAL.COM
Lapsang
Souchong!
B
ack when we were kids,
security meant little more than
having a secret password to keep
little siblings out of the treehouse. Thats
still the case in some situations. Take the
title of this column, for instance. If you
go to the #linuxjournal IRC channel on
FreeNode, saying Lapsang Souchong
will mark you as part of the inner circle.
(Note, this does not make you one of the
cool kids...possibly the exact opposite!)
When it comes to computer security,
however, things are quite a bit more
complex. Whether you want to encrypt
your data or lock down network
access, Linux provides a wide variety of
security tools. This month, we focus on
using those tools in our Security issue.
Reuven M. Lerner starts off the issue
with instructions on how to integrate
Twitter into your applications. Whether
you need your app to tweet results,
error messages or automatic cat photos,
Reuven walks through implementing
the API. Dave Taylor follows up with a
tutorial on using the ImageMagick suite
to watermark and copyright photos.
Since I use ImageMagick extensively with
my BirdCam project (which youll hear
more about in a month or so), I found
his column particularly interesting. If you
need to work with photos, especially if
direct interaction isnt possible, Daves
column will be interesting for you too.
Kyle Rankin gets into the security
mindset this month by approaching
privacy. Specifically, he explains how
to set up Tor in order to browse the
Web in private. Tor is just as useful as
it once was, but thankfully, its gotten
easier and easier to implement. I follow
Kyles column with The Open Source
Classroom, and this month, I talk
about file encryption. Many people are
intimidated by the notion of encryption,
but it doesnt have to be scary. This
month, well do just enough encryption
to wet your whistle, and hopefully get
you interested in learning more.
Although I may have introduced
encryption in my column, Subhendu Bera
takes things to a whole new level with
Quanlum Cryplography. Malhemalics-
based encryption is complex, for sure, but
will it be enough as technology advances?
Subhendu gives an explanation of
LJ237-Jan2014.indd 8 12/17/13 3:43 PM
CURRENT_ISSUE.TAR.GZ
WWW.LINUXJOURNAL.COM / JANUARY 2014 / 9
Quanlum Cryplography and a quick lesson
in Quanlum Mechanics as well. ll you're
interested in the future of cryptography,
youll love his article.
Remember Telnet? Telnet has been
replaced in almost every situation by the
much more secure SSH protocol. Granted,
there still are a few situations that warrant
the use of Telnet, but those generally are
inside your network and never over the
Internet. Just switching to SSH, however,
isnt enough to ensure that youre secure.
Sure, the connection itself is encrypted,
but what if you have a user with a
simplistic password? Or a script kiddie
scanning for vulnerabilities? Federico
Kereki describes how to harden SSH this
month, making the wonderful and exible
SSH protocol a little safer to use. Whether
you want to limit your allowed users or
disable password connections altogether,
Federicos article will guide you down the
path of better SSH.
I may have started this issue with the
basics of le and disk encryption, but if
you are looking for more, Tim Cordova is
about to be your favorite person. Going
far beyond single le or even removable
drive encryption, Tim shows how to
encrypt your entire hard drive. Then,
Tim goes even further and explains how
to congure TrueCrypt in conjunction
with SpiderOak to make sure your data
is not only encrypted, but backed up as
well! If youre interested in privacy and
encryption, dont miss this article.
We nish off the security issue with
Brian Trapps article on solid-state drives.
SSDs have been around for a number
of years now, and were nally to the
point that we can provide some longevity
statistics and reliability information. Have
you been avoiding SSDs because you
thought they would wear out? Did you
think they had a signicantly higher failure
rate? Were you worried that you need
Windows-specic drivers to make them
work? Brian assuages many of those fears
and validates those that are valid. SSDs are
fast, and they can provide an incredible
performance boost in most situations. You
owe it to yourself to see if your scenario
warrants an SSD. Brians article will help.
This issue also contains tons of
other Linux goodies. We have product
announcements, opinion pieces and even
fractals. You dont have to be one of
the cool kids to enjoy this issue of Linux
Journal, but it helps to be one of the
smart kids. Thankfully, our readers tend
to have that attribute in plentiful supply.
We hope you enjoy this issue as much as
we enjoyed putting it together.
Shawn Powers is the Associate Editor for Linux Journal.
Hes also the Gadget Guy for LinuxJournal.com, and he has
an interesting collection of vintage Garfield coffee mugs.
Dont let his silly hairdo fool you, hes a pretty ordinary guy
and can be reached via e-mail at shawn@linuxjournal.com.
Or, swing by the #linuxjournal IRC channel on Freenode.net.
LJ237-Jan2014.indd 9 12/17/13 3:43 PM
letters
10 / JANUARY 2014 / WWW.LINUXJOURNAL.COM
rss2emailExcellent Article
Thanks to Kyl e Ranki n for hi s
Command-Li ne Cl oud rss2emai l
arti cl e i n the October 2013 i ssue.
I ve been l amenti ng my l oss of
RSS feeds for some ti me, and thi s
i s a perfect sol uti on!
Steve Hier
I love that Linux affords us multiple
solutions to our tech problems. Ive
tried a handful of Google Reader
alternatives (settling on commafeed),
but I love seeing how other people
tackle the problem as well. Kyles
penchant for simplicity certainly
comes through with his preference for
rss2email. Im pretty sure Kyle would
be happy with just a constant stream
of 1s and 0s, but hes not quite willing
to admit it!Shawn Powers
LVM, Demystified
Regarding Shawn Powers article
LVM, Demystified in the December
2013 issue: Ive been a fan of LVM2
from the beginning. (LVM1 really
wasnt ready for Prime Time.)
You said in your article LVM is an
incredibly flexible, ridiculously useful
and not terribly complicated to use
system. I agree totally. However, it is
not without its idiosyncrasies.
I f you do a fol l owup arti cl e, you may
menti on a few thi ngs.
1) There was a bug where tryi ng
to pvmove an enti re vol ume wi th
mul ti pl e LVs on i t someti mes hung
up LVM (at l east the progress of
the move), necessi tati ng a reboot.
The recommendati on i f you had a
l evel wi th thi s bug was to move
each LV i ndi vi dual l y.
This had the side benefit of allowing
you to defragment the segments
of your LV (by moving the segments
in order and filling each PV). This
makes no difference to performance,
LJ237-Jan2014.indd 10 12/17/13 3:43 PM
WWW.LINUXJOURNAL.COM / JANUARY 2014 / 11
[ LETTERS ]
but makes it easier to see what you
have where. Tedious, but it makes
the neat freak in me happy.
The Red Hat Advi sory was
PH8A-20!2.0!6!-!, 8ugzilla 8Z#706036.
2) The metadata present on each PV
now eats up a PE (that is, in your
case, not usable 3.00 MiB, but its
usually 4MB), and it is a good practice
to have metadata on every PV! That
means that, for example, if you have
5 * 100GB PVs, you dont have 500GB
to use, you have 499.9something
GBthat is, 500GB minus 20MB
(5 PEs, each 4MB in size). This is a
problem mainly with SAN LUNs, as
they are usually precisely some size.
Thi s means that i f you al l ocated
!" $%%&, i t woul d fai l , tel l i ng you
that you were sl i ghtl y short of
what you needed. A subsequent
!' ($)*% woul d gi ve you al most
500GB and woul d work. (I thi nk I
have my math ri ght here, but you
get the pi cture.)
3) '+,-./'01 !!20/. 333 and
/+,-./'01 !!20/. are your best
fri ends i f you want to understand
basi c LVM.
4) Dont try to pvmove a swap
vol ume. Si mpl y al l ocate a new one
and del ete the ol d one.
Excel l ent arti cl e. I ts not an easy
concept to get across to the novi ce,
but once you understand i t, i t seems
so si mpl e.
Tom Lovell
Its always tough for me to decide
Since 1985
OVER
28
YEARS OF
SINGLE BOARD
SOLUTIONS
Phone: (618} 529-4525 Fax: (618} 457-0110 www.emac|nc.com
2.6 KERNEL
EQUIPMENT MONITOR AND CONTROL
LoW 6ost FaneI F6
F0I-090I
to 168 of 8kM
NI-FI {0tIonaI)
T|e P0X-090T cores ready lo rur W|l| l|e 0peral|rg 3ysler |rsla||ed or l|as|
d|s|. App|y poWer ard Walc| l|e L|rux X-w|rdoWs des|lop user |rlerlace appear
or l|e v|v|d co|or LC0. lrleracl W|l| l|e P0X-090T us|rg l|e respors|ve |rlegraled
louc|screer. Everyl||rg Wor|s oul ol l|e oox, a||oW|rg you lo corcerlrale or your
app||cal|or ral|er l|ar ou||d|rg ard corl|gur|rg dev|ce dr|vers. Jusl wr|le-ll ard
Rur-ll... Starting at $450 Qty 1.
http://www.emacinc.com/saIes/Iinux_journaI_dec
LJ237-Jan2014.indd 11 12/17/13 3:43 PM
12 / JANUARY 2014 / WWW.LINUXJOURNAL.COM
how far to travel down the rabbit hole
when approaching a topic like LVM.
By sysadmin standards, Im a noob
myself, since I avoided LVM for so
long. I figured it was worthwhile to
bring folks up to my comprehension
level, even if I wasnt a zen master.
I said all that to say that I really, really
appreciate letters like yours. Not only
do I get to learn more, but it benefits
everyone who reads Linux Journal as
well. And, now I get to go play with
more LVM stuff!Shawn Powers
Bird Feeder
Shawn Powers bi rd-feeder arti cl e
(see I ts a Bi rd. I ts Another Bi rd!
i n the October 2013 i ssue) was
one of the most appeal i ng I ve read
i n LJ si nce 1994. I ts somethi ng
I often contempl ated, but never
got beyond that. Many thanks for
poi nti ng the way.
An FYI , I al one have turned about
si x peopl e i nto acti ve vi ewers,
so I do hope you have pl enty of
capaci ty, i f onl y so I dont get
l ocked out now. I ts a very pl easant
di versi on. And youve put out a
great bi rd buffet. Based on my
own feeders, you wi l l be kept qui te
busy keepi ng them ful l as word
spreads i n bi rd l and. And of course,
one real l y has to keep doi ng i t
throughout the wi nter now, as some
bi rds become dependent on them.
Bob Kline
I t was my favori te arti cl e to wri te, up
there wi th the arti cl e on the arcade
cabi net I bui l t and submi tted back
when I was a freel ancer. I m starti ng
a fol l owup arti cl e now, whi ch wi l l
probabl y be publ i shed...hmm...i n
February? I ve been ti nkeri ng wi th
Bi rdCam, addi ng mul ti pl e cameras,
moti on detecti on wi th moti on,
archi ve vi deo creati onal l sorts
of cool stuff.
Thank you for the e-mai l . I m real l y
gl ad you enj oyed the arti cl e and
the camera. I have i t scal ed out to
my Dreamhost account, so i t shoul d
be abl e to handl e l ots of hi ts. I
zoomed i n the camera cl oser to the
feeders (you probabl y noti ced), and
embedded the wi ndow cam and
a cl oseup of the bi rd bath. I ts so
funny to see the starl i ngs i n the bi rd
bath. I mi ght poi nt a camera there
to capture vi deo!Shawn Powers
Linux Archive DVD
I woul d be very tempted by the
Archi ve DVD, i f there were PDF or
Mobi versi ons of the back i ssues
avai l abl e on the Archi ve. I l ove the
[ LETTERS ]
LJ237-Jan2014.indd 12 12/17/13 3:43 PM
WWW.LINUXJOURNAL.COM / JANUARY 2014 / 13
i dea of usi ng grep to search the
HTML versi ons, but i t woul d be ni ce
to send an i ssue (once found) to
your favori te readi ng devi ce.
I know matchi ng the ori gi nal
pri nt format wi th a di gi tal format
i s a pai nstaki ng process. Maybe
you coul d make i t cl ear i t i s an
approxi mati on or use a new
di fferent automated format for
the back i ssues?
The di gi tal versi ons of the back
i ssues woul d be useful for LJ readers
who have become accustomed to
carryi ng our LJ i ssues on Ki ndl es,
tabl ets or phones.
Rob
The Archi ve DVD used to confuse
and frustrate me as wel l . I thought i t
was a si mpl e col l ecti on of past i ssues
that I d be abl e to fl i p through l i ke
a pi l e of magazi nes. I ts grown on
me over the years, however, because
I see i t as more of a col l ecti on of
arti cl es unbound from the magazi ne
format. Organi zati on i s sti l l by
i ssue, yes, but cl i cki ng through i s a
di fferent experi ence.
Subscri bers have access to back
i ssues i n whatever di gi tal format
i s avai l abl e (al l formats for i ssues
goi ng back to September 2011,
and PDFs of al l formats from Apri l
2005). We dont, unfortunatel y,
have di gi tal versi ons goi ng al l the
way back, but those that exi st
shoul d be accessi bl e on your
subscri ber page. Hopeful l y that
hel ps!Shawn Powers
iPad App Issues
I ve been usi ng my i Pad for vi ewi ng
the di gi tal subscri pti on si nce the
pri nted versi on ceased to exi st. I
thi nk there needs to be a maj or
update to your newsstand app.
I ve downl oaded every i ssue to
my i Pad, but I cannot vi ew any of
the downl oaded i ssues wi thout
an acti ve I nternet connecti on. For
some reason, thi s eveni ng I m not
abl e to connect to whatever servi ce
control s your downl oads. Not onl y
can I not downl oad the l atest i ssue,
but I cannot vi ew/read any of my
exi sti ng al ready-downl oaded i ssues!
Readi ng my previ ousl y downl oaded
i ssues shoul d not rel y on nor requi re
an acti ve connecti on to anythi ng.
When I m not havi ng a probl em
connecti ng to your servers, al l my
downl oaded i ssues say Read next
to them; when I am havi ng an i ssue,
they al l swi tch back to Downl oad.
Pl ease address thi s i ssue as soon
as possi bl e. Havi ng to gi ve up my
[ LETTERS ]
LJ237-Jan2014.indd 13 12/17/13 3:43 PM
[ LETTERS ]
14 / JANUARY 2014 / WWW.LINUXJOURNAL.COM
pri nt i ssues was hard enough, but thi s j ust
compounds the probl em.
Thanks for a great magazi ne!
Jon Simonds
I dont have an i Pad personal l y, but I ve
noti ced wi th my wi fes that the i OS7
i mpl ementati on of Newsstand, at l east as i t
pertai ns to the Li nux Journal app, i s frustrati ng
at best. To be honest, I downl oad ei ther the
.epub or .pdf di rectl y and peruse the i ssue
from there. Wel l work wi th our vendor to
try to get thi ngs worki ng ri ght wi th
Newsstand, but I expect the process to be
l engthy and frustrati ng! The downl oadabl e
copi es you get l i nks for as a subscri ber shoul d
l oad ri ght i nto the i Books app i f youre havi ng
i ssues wi th the Newsstand app. Hopeful l y,
thi ngs wi l l be strai ghtened out soon. I have
found i n the past that del eti ng and then
re-i nstal l i ng the Li nux Journal app someti mes
hel ps as wel l .Shawn Powers
At Your Service
SUBSCRIPTIONS: Linux Journal is available
in a variety of digital formats, including PDF,
.epub, .mobi and an on-line digital edition,
as well as apps for iOS and Android devices.
Renewing your subscription, changing your
e-mail address for issue delivery, paying your
invoice, viewing your account details or other
subscription inquiries can be done instantly
on-line: http://www.linuxjournal.com/subs.
E-mail us at subs@linuxjournal.com or reach
us via postal mail at Linux Journal, PO Box
980985, Houston, TX 77098 USA. Please
remember to include your complete name
and address when contacting us.
ACCESSING THE DIGITAL ARCHIVE:
Your monthly download notications
will have links to the various formats
and to the digital archive. To access the
digital archive at any time, log in at
http://www.linuxjournal.com/digital.
LETTERS TO THE EDITOR: We welcome your
letters and encourage you to submit them
at http://www.linuxjournal.com/contact or
mail them to Linux Journal, PO Box 980985,
Houston, TX 77098 USA. Letters may be
edited for space and clarity.
WRITING FOR US: We always are looking
for contributed articles, tutorials and
real-world stories for the magazine.
An authors guide, a list of topics and
due dates can be found on-line:
http://www.linuxjournal.com/author.
FREE e-NEWSLETTERS: Linux Journal
editors publish newsletters on both
a weekly and monthly basis. Receive
late-breaking news, technical tips and
tricks, an inside look at upcoming issues
and links to in-depth stories featured on
http://www.linuxjournal.com. Subscribe
for free today: http://www.linuxjournal.com/
enewsletters.
ADVERTISING: Linux Journal is a great
resource for readers and advertisers alike.
Request a media kit, view our current
editorial calendar and advertising due dates,
or learn more about other advertising
and marketing opportunities by visiting
us on-line: http://ww.linuxjournal.com/
advertising. Contact us directly for further
information: ads@linuxjournal.com or
+1 713-344-1956 ext. 2.
PHOTO OF THE MONTH
Remember, send your Linux-related photos to
ljeditor@linuxjournal.com!
WRITE LJ A LETTER
We love hearing from our readers. Please
send us your comments and feedback via
http://www.linuxjournal.com/contact.
LJ237-Jan2014.indd 14 12/17/13 3:43 PM
J
o
i
n
t
h
e
W
e
a
r
a
b
l
e
s
R
e
v
o
l
u
t
i
o
n
!
A conference for Designers, Builders and
Developers of Wearable Computing Devices
Wearable computing devices are the Next Big Wave
in technology. And the winning developers in the next decade
are going to be the ones who take advantage of these new tech-
nologies EARLY and build the next generation
of red-hot apps.
Choose from over 35 classes and tutorials!
G Learn how to develop apps for the coolest gadgets like Google
Glass, FitBit, Pebble, the SmartWatch 2, Jawbone, and the
Galaxy Gear SmartWatch
G Get practical answers to real problems, learn tangible
steps to real-world implementation of the next generation
of computing devices
March 5-7, 2014
San Francisco
WearablesDevCon.com
A BZ Media Event
Linux Journal_Layout 1 12/2/13 10:58 AM Page 1
LJ237-Jan2014.indd 15 12/17/13 3:43 PM
UPFRONT
NEWS + FUN
16 / JANUARY 2014 / WWW.LINUXJOURNAL.COM
diff -u
WHATS NEW IN KERNEL DEVELOPMENT
A recent bug hunt by kernel
devel opers ended up i denti fyi ng
a l ong-standi ng bug i n GCC. The
i ndi cati ons were there from the
start, but i t took some i nvesti gati on
to nai l i t down.
Originally, Fengguang Wu reported
a kernel oops, and used git bisect
to i denti fy the speci fi c patch that
reveal ed the probl em. I t was an
opti mi zati on suggested by Linus
Torvalds and i mpl emented by
Peter Zijlstra that aimed at freeing
up a hardware register by using the
asm goto instruction in the kernels
modify_and_test() functions.
The first indication that the problem
mi ght boi l down to a compi l er bug
was that the patch j ust seemed
correct to fol ks. Nei ther Peter nor
Linus were able to see anything wrong
wi th i t, so they suggested tryi ng
to reproduce the oops on kernel s
compi l ed wi th di fferent versi ons of
GCC, and Li nus suggested di sabl i ng
asm goto di rectl y to see i f that
had any effect.
At first, Fengguang found that
earlier compilers made no difference.
Hed started off using GCC 4.8.1,
but 4.6.1 also produced a kernel
that would reproduce the oops. But
as Linus suspected, disabling asm
goto in the kernel code did fix the
problem. After a while, Fengguang
also discovered that the older GCC
version 4.4.7 also produced a working
kernel, because that compiler had no
support for asm goto.
Gradual l y, other fol ks began to
be abl e to reproduce the probl em
on thei r own systems. Ori gi nal l y,
the i ssue seemed to affect onl y
32-bi t Li nux systems, but ul ti matel y,
Li nus was abl e to reproduce the
probl em on hi s own 64-bi t system.
I t was harder to tri gger on a 64-bi t
system, but i t boi l ed down to bei ng
the same probl em. As the scope
of the probl em began to reveal
i tsel f, Li nus remarked, I t makes
me nervous about al l our tradi ti onal
uses of asm goto too, never mi nd
the new ones.
Jakub Jelinek opened a Bugzilla
ticket against GCC, and folks started
thinking about workarounds for the
kernel. Even after GCC got a fix for this
LJ237-Jan2014.indd 16 12/17/13 3:43 PM
[ UPFRONT ]
WWW.LINUXJOURNAL.COM / JANUARY 2014 / 17
particular bug, it wouldnt do to allow
the kernel to miscompile on any version
of GCC, if it possibly could be avoided.
A workaround did end up going into
the next Linux kernel release candidate,
and a fix went into GCC 2.8.2. Shortly
afterward, Greg Kroah-Hartman also
adopted the kernel workaround in the
3.11.x stable tree.
The reason the kernel needed a
workaround in spite of the fact that
a real fix went into GCC was because
the kernel needs to support the widest
possible dispersion of host systems.
Anyone, anywhere, with any particular
hardware setup, using any particular
versions of the various development
tools, should be able to build and run
the kernel. In some cases that ideal
cant be reached, but it remains an
ideal nonetheless.
Traditionally, software could mount
a filesystem only after registering it
with the kernel, so the kernel would
know its name and a bit about how
to manage it. This has been true even
for internal filesystems like ia64,
pfmfs, anon_inodes, bdev, pipefs
and sockfs. But, Al Viro recently
said there was no longer any reason
to require registration for these
filesystems, and he submitted a patch
to take out the requirement.
First of all, he and Linus Torvalds
agreed that there probably isnt any
user code that actually looks up those
filesystems in the registry. Theres just
no reason anyone would want to.
As Al expl ai ned on the mai l i ng
l i st, there used to be a need to
regi ster al l fi l esystems. But about a
decade ago, the kern_mount() cal l
changed to take onl y a poi nter to
the fi l esystem, rather than needi ng
to l ook i t up by name.
Ever since then, the need to
register these internal filesystems has
been minimal. The only remaining
dependency was a single data structure
initialized by register_filesystem()
that was needed by al l fi l esystems.
But, Al sai d that even thi s
dependency was el i mi nated a coupl e
years ago, when the data structure
was opti mi zed no l onger to need
regi ster_fi l esystem(). By now, Al
sai d, theres no reason to regi ster
the fi l esystem types that can onl y
be used for i nternal mounts.
With this change, /proc/filesystems
would no longer list internal
filesystems. And as Linus pointed out,
those filesystems wouldnt reliably be
listed anywhere on the system. Even
/proc/modules, Linus said, would list
those filesystems only if theyd been
compiled as modules.
So, with some mild trepidation,
Linus accepted the patch. If no one
howls, itll probably stay.ZACK BROWN
LJ237-Jan2014.indd 17 12/17/13 3:43 PM
18 / JANUARY 2014 / WWW.LINUXJOURNAL.COM
[ UPFRONT ]
Blu-ray Encryption
Why Most People
Pirate Movies
I get a fair amount of e-mail from
readers asking how a person could do
questionable things due to limitations
imposed by DRM. Whether its how to
strip DRM from ebooks, how to connect
to Usenet or how to decrypt video, I
do my best to point folks in the right
direction with lots of warnings and
disclaimers. The most frustrating DRM
by far has been with Blu-ray discs.
Unless Ive missed an announcement,
there still isnt a proper way for
Linux users to watch Blu-ray movies on
their computers. Its hard enough with
Windows or Macintosh, but when it
comes to Linux, it seems that turning
to the dark side is the only option. In
the spirit of freedom, let me point you
in the direction of how, and leave it
up to you to decide whether its a road
you want to travel.
When ripping a movie from Blu-ray, I
know of only one program that can do
the job. MakeMKV is a cross-platform
utility that will extract the full,
uncompressed movie from most Blu-
ray discs. Unfortunately, you have to
download the source code and compile
it. You need both the binaries and the
source download files, and then follow
the included directions for compiling
the software. Yes, its a bit complex.
Once you compile MakeMKV, you
should be able to use it to extract
the Blu-ray disc to your computer.
Be warned, the file is enormous, and
youll most likely want to compress
it a bit. The tool for that thankfully
is much easier to install. Handbrake
has been the de facto standard video
encoding app for a long time, and
when paired with MakeMKV, it makes
creating playable video files close to
painless. I wont go through the step-
by-step process, but if the legally
questionable act of ripping a Blu-ray
disc is something youre comfortable
doing, http://www.makemkv.com
and http://www.handbrake.fr are
the two software packages youll want
to explore.SHAWN POWERS
LJ237-Jan2014.indd 18 12/17/13 3:43 PM
WWW.LINUXJOURNAL.COM / JANUARY 2014 / 19
[ UPFRONT ]
Non-Linux FOSS:
Persistence of Vision
Raytracer (POV-Ray)
Back in the mid-1990s, a college
friend (hi Russ!) and I would put our
old 8088 computers to work rendering
ray-traced images for daysliterally.
The end result would be, by todays
standards, incredibly low resolution
and not terribly interesting. Still,
the thought of a computer system
creating realistic photos from nothing
more than math equations was
fascinating. As you
probably already
guessed, Russ and
I werent terribly
popular.
Al l these years
l ater, the same
ray-tracing software
we used back
then is now up to
version 3.7, and it
has been released
as free, open-
source software.
The developers
kindly have created
a downloadable
Windows installer
for those folks stuck on a Microsoft
operating system. If you think the
world is nothing more than math,
and youd like to prove it with
ray-traced images, head on over
to http://www.povray.org and
download your copy today. I cant
promise it will make you popular, but
at least by my standards, it will make
you cool!SHAWN POWERS
This image is completely computer-generated, created by
Gilles Tran, released into public domain.
LJ237-Jan2014.indd 19 12/17/13 3:43 PM
20 / JANUARY 2014 / WWW.LINUXJOURNAL.COM
[ UPFRONT ]
Stream and Share Your
Media with PlexWeb
Plex is one of those applications I
tend to write about a lot. Its not
because I get any sort of kickback or
even a discount, but rather its just an
incredible system that keeps getting
better. For this piece, I want to talk
about PlexWeb, which functions much
like the Android app Ive mentioned
before, but works completely inside
a Web browseralmost any Web
browser, on any operating system.
You can access PlexWeb by surfing
to http://my.plexapp.com and
logging in with your free account.
(If you have a static IP at home, you
also can connect directly to your
home server by bookmarking the
URL generated by
pl exapp.com.) You
wi l l be redi rected to
your home server,
and youl l be abl e to
transcode and stream
your movi es to any
computer, anywhere.
I freely admit that
I wish Plex was open
source. Thankfully,
however, its proprietary
code doest mean Linux
users are excluded. Whether youre
using the Plex app on your Android
device, installing Plex Home Theater
on your Linux machine or even
streaming video to your Aunt Ednas
Web browser while visiting over the
holidays, Plex is an incredible tool
that keeps getting better. PlexWeb
is free, but if youre interested
in experiencing the latest and
greatest Plex has to offer, a PlexPass
subscription will get you access
to features like Cloud Sync before
anyone else gets to see them! To get
started with Plex, visit the Web site
at http://www.plexapp.com.
SHAWN POWERS
LJ237-Jan2014.indd 20 12/17/13 3:43 PM
WWW.LINUXJOURNAL.COM / JANUARY 2014 / 21
[ UPFRONT ]
Make Peace with pax
pax is one of the lesser known utilities
in a typical Linux installation. Thats
too bad, because pax has a very good
feature set, and its command-line
options are easy to understand and
remember. pax is an archiver, like
tar(1), but it's also a better version of
cp(1) in some ways, not least because
you can use pax with SSH to copy
sets of files over a network. Once you
learn pax, you may wonder how you
lived without it all these years.
pax has four modes: list, read,
write and copy. Reading and writing
are controlled by the !4 and !5
options, repectively. In combination,
!45, pax acts a little bit like 6/ !7.
If neither is used, pax lists the
contents of the archive, which may
be a file, device or a pipe.
By default, pax operates as a filter:
it reads from standard input and
writes to standard output, a feature
that turns out to be very useful. But
usually these days, the target is an
archive file, the familiar tarball. Lets
start by creating one:
8 6, 9:2/
8 2;,-4 /0<02/'=
8 :>?6@ /0<02/'=9A>>
8 /0< !5A /0<02/'=3:04 /0<02/'=
The !5 option means writethat
is, create an archive. The !A option
provides the name of a file to which to
write the archive. If desired, pax can
gzip or bzip the file at the same time:
8 /0< !5BA /0<02/'=3:043CB /0<02/'=
Like most tar implementations,
pax, by default, uses the Posix ustar
file format. Because pax was born
of a desire to unify archive file
formats, many other formats also are
supported, but in practice, theyre
seldom used. Likely as not, any .tar.gz
file you download from the Internet
actually will be a ustar archive:
8 /0< !5BA /0<02/'=3:043CB /0<02/'=
S 1c paxamp1c.1a*
/0<02/'=3:04D EFGHI :04 046@-+=
/0<02/'=3:043CBD CB-/ 6>2/4=..=, ,0:0
The first thing you nearly always
want to know about any archive is
whats in it. Listing the contents is the
default action in the absence of either
a !4 or !5 option:
8 /0< !A /0<02/'=3:04
/0<02/'=
/0<02/'=9A>>
LJ237-Jan2014.indd 21 12/17/13 3:43 PM
22 / JANUARY 2014 / WWW.LINUXJOURNAL.COM
[ UPFRONT ]
Note that the archi ve retai ns the
di rectory name you speci fi ed on the
command l i ne. That comes i nto pl ay
l ater when you read i t.
To read an archi ve, use !4:
8 2;,-4 :
8 6, :
8 /0< !4A 339/0<02/'=3:04
What di d that do? Lets l ook at
the source and target di rectori es:
8 6, 9:2/
S nd paxamp1c 1 # 1avcsc bo1h 1ccs
/0<02/'=
/0<02/'=9A>>
:
:9/0<02/'=
:9/0<02/'=9A>>
When pax read the paxampl e.tar
archi ve, i t created fi l es i n the
current di rectory, t. Because the
archi ve i ncl uded a di rectory name,
paxampl e, that di rectory was
re-created i n the output.
Copying Sets of Files To my
mi nd, paxs !4 and !5 opti ons make
more sense than thei r !< and !6
equi val ents i n tarreason enough
to swi tch. But, pax can do more
than tar: i t can copy fi l es too:
8 42 !4A :
8 /0< !45 /0<02/'= :
S nd 1
:
:9/0<02/'=
:9/0<02/'=9A>>
Unl i ke cp(1), pax i s an archi ve
uti l i ty. I ts j ob i snt to make copi es,
but to archi ve fi l es. When pax
creates a fi l e, i t preserves the fi l es
metadata from i ts i nput. The form
of the i nput doesnt matter. I n thi s
case, the i nput i snt from an archi ve,
i ts the fi l e i tsel f:
8 '. !' /0<02/'=9A>> :9/0<02/'=9A>>
-W----- 1 k1oWdcn Whcc1 0 Scp !! 1S.4S paxamp1c1!oo
-W----- 1 k1oWdcn Whcc1 0 Scp !! 1S.4S 11paxamp1c1!oo
Yestwo i denti cal fi l es wi th two
i denti cal ti mestamps. The permi ssi on
bi ts and ownershi p can be control l ed
too, i f desi red. Take that, cp(1)!
Perhaps you dont want to re-create
the di rectory, or perhaps you want to
change i t i n some way. One opti on
i s not to menti on the i nput di rectory
on the command l i ne, but i nstead
provi de fi l enames:
8 42 !4A :9/0<02/'=9
S {cd paxamp1c1 && pax -W * ..111)
S nd 1
:
:9A>>
LJ237-Jan2014.indd 22 12/17/13 3:43 PM
[ UPFRONT ]
Thats usual l y easi est. But
i f you need somethi ng more
sophi sti cated, the !. opti on
rewri tes the pathactual l y, any
part of the fi l enameusi ng a
regul ar expressi on:
S m -! 11*
S pax -W -s `.paxamp1c.my1ncW1pa1h.` paxamp1c1 1
S nd 1
:
:921
11my1ncW
11my1ncW1pa1h
11my1ncW1pa1h1!oo
The !. opti on i s handy, for
i nstance, when unpacki ng a
tarbal l that doesnt have versi on
i nformati on i n the di rectory name.
What Coul d Go Wrong? I f
you gi ve the wrong fi l ename to
wri te, you j ust get an archi ve by
the wrong nameno harm no
foul . I f you mi stype an i nput
archi ve fi l ename though, you l l
!"#$%&%'()*+
,,,-.$%$ '()*+ / 01#2 4&)5$%6$
!"#$% &'$()*)(+,)"-& +-# +.+)%+/)%),0 1+0 .+203
!!!"#$%&'(')*+,-".($
/0111023/02212
4(!&'5,67 89*+( :;<6&=7 8;>&+
8,??&@7 :;';+=,6;
8;>&+ ABCDEABCD :;<6&=
45)-67+# 89:;<89:; ,+/%$, /0 =$-"."
>93?@ AB =CB D< 8E>:FFGHFI
93FJ93K LAM N"2$ )H
O' ," >F LP QR!
H?; LP 5+2# #2).$ < >I; LP SSB
4&+E5*+?&' *+%,= ," &(2$$-T 2",+,)"-
F=;'=G ;= H/IBD
J3CDK :LCDK :3CDK A/ +%&" +.+)%+/%$
:;';+=,6; MN0C/
7+-+&"-)( 4"UV5/""6 NWJ:>
WU%%0 2UVV$# OP)0F4#M01/DQ ,$&,$#X
#2"'&T #U&,T 1")&,U2$ Y 1"2$
>:3>@ 8LR 4"U(5S(2$$-
93ZJ93I LAM N"2$ )?
O' ," >F LP QR!
:9;JH?; LP 5+2# #2).$ < ?>9 LP SSB
MN0/IK MN03BK MN0RB +%&" +.+)%+/%$
89*+( OLSDDEO2SDD
B$%% 72$()&)"- !ZH;;<!FH;;
D< N"2$ )H [U+# \I ("2$]
>?3F@J>H3:@ WAB =CB
D< 8E>K9;G>;I;
^_)#)+ [U+#2" `?;;;!
H?; LP J / :T 9;'@ @'*>&
O' ," :9 LP QR! \>IFF !AM]
B_BaQb "2 P%UJ2+0
I;93>>+</<V<-
F=;'=G ;= H/CS3
#2BCDK #2CCDK #2LCDK #23CD
+%&" +.+)%+/%$
A)V5 '$2*"21+-($ ^_)#)+ :JB "- +- WAB QLP<=CB
A)V5 '$2*"21+-($ N"2$ )H [U+# N7O&T :9 LP QR!
O%,)1+,$ ("-*)VU2+/)%),0 c (5""&$ 0"U2 %+',"'d& *$+,U2$&
e-$ 0$+2 =)-UG ,$(5 &U''"2, c '5"-$ +-# $1+)%
452$$ 0$+2 1+-U*+(,U2$2d& "-J&),$ D+22+-,0
M9(*.& (5 %'&0*+G=;66&@ )*+,- @*G='*<,=*(+7
LJ237-Jan2014.indd 23 12/17/13 3:43 PM
24 / JANUARY 2014 / WWW.LINUXJOURNAL.COM
[ UPFRONT ]
fi nd yoursel f i n 1985:
8 /0< !4A /0<02/'=35@>>/.-=
pax. Fa11cd opcn 1o cad on paxamp1c.Whoops1c {ho such 1c
o d1cc1oy)
A11h110h! pax ach1vc vo1umc chanc cqu1cd.
7=0,1 A>4 046@-+= +>'?2=D (
1npu1 ach1vc namc o "." 1o qu11 pax.
Ach1vc namc >
Thi s i s an i dea that outl i ved
i ts useful ness before i t was
i mpl emented. You coul d type i n
the fi l ename here, agai n, wi thout
readl i ne support or tab compl eti on.
Wel l , at l east i t says what to do:
Ach1vc namc > .
pu1111n pax!
How exci ti ng!
As menti oned previ ousl y, pax
uses standard i nput and standard
output by defaul t. That i s a feature,
but the fi rst ti me you forget to
provi de a fi l ename, you may thi nk
pax i s very, very sl ow:
8 /0< !4 /0<02/'=3:04
Oops! No !A. Al so no message
and no prompt. pax i s i gnori ng
the archi ve fi l ename argument and
readi ng standard i nput, whi ch i n
thi s case, i s the keyboard. You coul d
type ^D, for end-of-fi l e, but that
forms i nval i d i nput to pax. Better to
send up a smoke si gnal :
JK
pax. S1na1 cauh1. c1can1n up.
I ts even worse the fi rst ti me
you acci dental l y wri te to standard
output whi l e i ts connected to your
termi nal . You heard i t here fi rst:
dont do that.
Putting Standard Input to
Work Standard i nput and standard
output do have thei r uses, and here
pax real l y comes i nto i ts own. For
one thi ng, you can veri fy the effect
of the !. opti on wi thout creati ng
an archi ve or the fi l es:
S pax -W -s `.paxamp1c.my1ncW1pa1h.` paxamp1c1 | pax
my1ncW1pa1h
my1ncW1pa1h1!oo
Absent the !A opti on, /0< !5
wri tes to standard output. So
rewri te the pathname wi th !., and
pi pe the output to pax agai n, thi s
ti me usi ng i ts l i st mode, wi th
nei ther the !4 nor !5 opti on. By
defaul t, pax reads from standard
i nput and, i n l i st mode, pri nts the
fi l enames on the termi nal .
That can save a l ot of ti me, not to
LJ237-Jan2014.indd 24 12/17/13 3:43 PM
WWW.LINUXJOURNAL.COM / JANUARY 2014 / 25
[ UPFRONT ]
menti on a mess on the di sk, when there are
thousands of fi l es.
Suppose you want to copy the paxample
directory to another machine. One approach
would be to create a tarball, copy to the target,
log in to the target and unpack the tarball:
8 /0< !5A /0<02/'=3:04 /0<02/'=
8 .6/ /0<02/'=3:04 >0;D9:2/9
/0<02/'=3:04 (%%L (%MN (%3%MN9. %%D%%
8 ..@ >0;
>0;OPQ8 6, 9:2/
>0;O:2/Q8 /0< !4A /0<02/'=3:04
>0;O:2/Q8 '. /0<02/'=9
A>>
But theres a much easi er way. I nvoke pax
on both machi nes, and connect the output of
one to the i nput of the other:
S pax -W paxamp1c | ssh oak `cd 11mp1 && pax - && nd paxamp1c`
/0<02/'=
/0<02/'=9A>>
/0< !5 wri tes to standard output. ..@
reads standard i nput and attaches i t to
whatever uti l i ty i s i nvoked, whi ch of course
i n thi s case i s pax agai n. /0< !4 reads from
standard i nput and creates the fi l es from
that archi ve.
pax i s one of the l esser known uti l i ti es i n a
typi cal Li nux i nstal l ati on. But i ts both si mpl e
and versati l e, wel l worth the ti me i t takes to
l ear nrecommended.
JAMES K. LOWDEN
Never let the future
disturb you. You will
meet it, if you have
to, with the same
weapons of reason
which today arm you
against the present.
Marcus Aurelius
Antoninus
Temptation rarely
comes in working
hours. It is in their
leisure time that
men are made or
marred.
W. N. Taylor
We turn not older
with years, but
newer every day.
Emily Dickinson
The human tendency
to regard little
things as important
has produced very
many great things.
Georg Christoph
Lichtenberg
Getting fired is
natures way of
telling you that you
had the wrong job in
the first place.
Hal Lancaster
They Said It
LJ237-Jan2014.indd 25 12/17/13 3:43 PM
26 / JANUARY 2014 / WWW.LINUXJOURNAL.COM
[ UPFRONT ]
Taking Fractals
off the Page
Fr act al s are one of t he wei rder
t hi ngs you may come across
when st udyi ng comput er sci ence
and progr ammi ng al gor i t hms.
From Wi ki pedi a: A f r act al i s a
mat hemat i cal set t hat has a f r act al
di mensi on t hat usual l y exceeds i t s
t opol ogi cal di mensi on and may f al l
bet ween i nt eger s. Thi s i s a real l y
odd concept t hat you coul d have
somet hi ng l i ke an i mage t hat i snt
made up of l i nes or of sur f aces,
but somet hi ng i n bet ween. The
t er m f r act al was coi ned by Benoi t
Mandel brot i n 1975.
A key proper t y of f r act al s i s
t hat t hey are sel f - si mi l ar. Thi s
means i f you zoom i n on a f r act al ,
i t wi l l l ook si mi l ar t o t he way
t he f r act al l ooked or i gi nal l y.
The concept of recur si on al so i s
ver y i mpor t ant here. Many t ypes
of f r act al al gor i t hms use recur si on
t o gener at e t he val ues i n t he
gi ven set . Al most ever yone
has seen comput er gener at ed
i mages of cl assi c f r act al s, l i ke
t he Mandel brot set or t he
Cant or set . One t hi ng about al l
of t hese cl assi c i mages i s t hat
t hey are t wo- di mensi onal ( or
act ual l y great er t han one and
l ess t han t wo- di mensi onal , i f
you want t o be pedant i c) . But
t here i s not hi ng t hat f orces t hi s
t o be t he case. Fr act al s can be
any di mensi on, i ncl udi ng great er
t han t wo. And wi t h moder n 3- D
gr aphi cs cards, t here i s no reason
why you shoul dnt be abl e t o
exami ne t hese and pl ay wi t h
t hem. Now you can, wi t h t he
sof t ware package Mandel bul ber
( http: / / www. mandel bul ber. com) .
Mandel bul ber i s an exper i ment al ,
open- source package t hat l et s
you render t hree- di mensi onal
f r act al i mages and i nt er act wi t h
t hem. I t i s wr i t t en usi ng t he GTK
t ool ki t , so t here are downl oads
available for Windows and Mac OS X
as wel l as Li nux. Act ual l y, most
Li nux di st r i but i ons shoul d i ncl ude
i t i n t hei r package management
syst ems. I f not , you al ways can
downl oad t he source code and
bui l d i t f rom scr at ch.
I f you want some i nspi rati on on
what i s possi bl e wi th Mandel bul ber,
I strongl y suggest you go check
LJ237-Jan2014.indd 26 12/17/13 3:43 PM
[ UPFRONT ]
WWW.LINUXJOURNAL.COM / JANUARY 2014 / 27
out the gal l ery of i mages that have
been generated wi th thi s software.
There are some t r ul y i nnovat i ve
and amazi ng i mages out t here,
and some of t hem i ncl ude t he
par amet er s you need i n order t o
regener at e t he i mage on your own.
The Mandel bul ber Wi ki provi des
a l ar ge amount of i nf or mat i on
( http: / / wi ki . mandel bul ber. com/
i ndex. php?ti tl e=Mai n_Page) .
When you are done readi ng thi s
arti cl e, check out everythi ng el se
that you can do wi th Mandel bul ber.
When you f i r st st ar t up
Mandel bul ber, t hree wi ndows
Figure 1. The main window gives you all parameters that control the generation of
your fractal.
LJ237-Jan2014.indd 27 12/17/13 3:43 PM
28 / JANUARY 2014 / WWW.LINUXJOURNAL.COM
[ UPFRONT ]
open. The f i r st i s t he par amet er s
wi ndow ( Fi gure 1) . Al ong t he ver y
t op are t he t wo mai n but t ons:
render and st op. Bel ow t hat i s
a l i st of 12 but t ons t hat pul l up
di ff erent panes of par amet er s.
You get an i ni t i al set of def aul t
par amet er s t hat wi l l gener at e
a 3- D ver si on of t he cl assi c
Mandel brot set . Cl i cki ng on
t he render but t on wi l l st ar t t he
render i ng process. I f you have
mul t i pl e cores on your machi ne,
Mandel bul ber wi l l gr ab t hem t o
hel p speed up t he cal cul at i ons.
The rendered pl ot wi l l be drawn i n
i ts own wi ndow (Fi gure 2). The thi rd
wi ndow shows you some measures
of how the renderi ng progressed
(Fi gure 3). You get two hi stograms
Figure 2. This is what the default 3-D fractal looks like.
LJ237-Jan2014.indd 28 12/17/13 3:43 PM
[ UPFRONT ]
WWW.LINUXJOURNAL.COM / JANUARY 2014 / 29
Figure 3. Histograms of the Rendering Progression
Figure 4. A Sierpinski sponge has infinite surface area and zero volume.
LJ237-Jan2014.indd 29 12/17/13 3:43 PM
30 / JANUARY 2014 / WWW.LINUXJOURNAL.COM
[ UPFRONT ]
descri bi ng the number of i terati ons
and the number of steps.
To gener at e new i mages,
more t han 70 exampl es are
i ncl uded wi t h t he i nst al l at i on of
Mandel bul ber t hat you can use as
st ar t i ng poi nt s. Cl i cki ng on t he
but t on Load exampl e pul l s up a
f i l e di al og where you can l oad
one of t hem. For exampl e, you
coul d l oad menger sponge. f r act .
Cl i cki ng t he render but t on wi l l
gener at e a 3- D Si er pi nski sponge
( Fi gure 4) . Al t hough t echni cal l y,
t he set i s onl y one t opol ogi cal
di mensi on t hat encl oses zero
Figure 5. There are several different fractal types from which to choose.
LJ237-Jan2014.indd 30 12/17/13 3:43 PM
[ UPFRONT ]
WWW.LINUXJOURNAL.COM / JANUARY 2014 / 31
vol ume ( arent f r act al s wei rd?) .
What can you change i n
Mandel bul ber ? Cl i cki ng on t he
f r act al but t on pul l s up t he pane
where you can set t he par amet er s
f or t he f r act al i t sel f ( Fi gure 5) . You
can sel ect f rom sever al di ff erent
t ypes of f r act al f or mul a t ypes,
such as mandel bul b, quat er ni on
or menger sponge. You can set
sever al opt i ons, dependi ng on
exact l y whi ch f r act al t ype you
choose. For exampl e, i f you sel ect
t he i t er at ed f unct i on syst em ( I FS) ,
Figure 6. You can create a hybrid system made from a mix of up to five different
fractal types.
LJ237-Jan2014.indd 31 12/17/13 3:43 PM
32 / JANUARY 2014 / WWW.LINUXJOURNAL.COM
you t hen can cl i ck on t he I FS t ab
t o set sever al di ff erent par amet er s.
One of t he i ssues i s comi ng up
wi t h t r ul y uni que, yet aest het i cal l y
pl easi ng, set s of equat i ons wi t h
whi ch t o exper i ment . To hel p i n
t hi s regard, Mandel bul ber has a
hybr i d opt i on i n t he l i st of f r act al
t ypes. When you sel ect t hi s opt i on,
you t hen can choose t he hybr i d
but t on and set up t o f i ve di ff erent
f r act al equat i ons ( Fi gure 6) . Wi t h
t hi s opt i on, you can creat e ver y
compl ex and sophi st i cat ed f r act al s
t o render.
Mandel bul ber doesnt j ust
generate stati c i mages of these
hi gher di mensi onal fractal s. There
i s an opti on to generate ani mati ons
of how these i mages change when
some parameter i s swept over.
To start, you need to cl i ck on the
Ti mel i ne button at the bottom
of the vi ew pane. Thi s pul l s up a
ti mel i ne wi ndow where you can set
the parameters used to generate
your ani mati on. The record button
puts parameters i nto the actual
keyframe number ( Key no. fi el d
on the ri ght) . I t then l oads and
renders the next keyframe i f i t i s
not the l ast keyframe.
Then, you can add new
keyf r ames wi t h t he i nser t af t er
but t on or del et e keyf r ames wi t h
t he Del et e but t on. To modi f y a
gi ven keyf r ame, you can doubl e-
cl i ck i t t o set t he par amet er s, and
t hen you can cl i ck on record t o
render t he keyf r ame.
I nt er pol at i on bet ween t he
keyframes is handled by Catmull-Rom
spl i nes. Once you have t he
keyf r ames handl ed, you wi l l need
t o render t he f ul l ani mat i on.
Cl i cki ng on t he Ani mat i on but t on
i n t he mai n wi ndow br i ngs up t he
par amet er s you can set . These
i ncl ude t hi ngs l i ke t he number
of f r ames t o render f rom t he
keyf r ames, as wel l as t he st ar t
and end f r ame number s. You t hen
can cl i ck on t he Render f rom
key- f r ames but t on t o gener at e t he
ani mat i on. On my net book, t hi s i s
a pret t y l ong process. For i mage
gener at i on, you al so have cont rol
over camer a posi t i on, l i ght i ng and
shader opt i ons. You shoul d be abl e
t o gener at e t he exact i mage or
ani mat i on t hat you want .
I f you are l ooki ng t o gener at e
some amazi ng 3- D l andscapes
or uni que shapes f or somet hi ng
sci ence- f i ct i ony, you def i ni t el y
shoul d check out Mandel bul ber
j ust be prepared t o l ose sever al
hour s as you st ar t pl ayi ng wi t h al l
of t he par amet er s avai l abl e.
JOEY BERNARD
[ UPFRONT ]
LJ237-Jan2014.indd 32 12/17/13 3:43 PM
LJ237-Jan2014.indd 33 12/17/13 3:43 PM
34 / JANUARY 2014 / WWW.LINUXJOURNAL.COM
Zedge, for All
Your Annoying
Ringtones!
I real l y dont under st and
f ol ks who use songs as t hei r
r i ngt ones. I snt i t annoyi ng or
conf usi ng when t he song comes
on t he r adi o? I f i t s your f avor i t e
song, dont you get desensi t i zed
t o i t when you l i st en t o t he CD
( or di gi t al equi val ent of CD) ?
Never t hel ess, you probabl y hear
dozens of r i ngt ones ever y day.
Those probabl y var y f rom super
annoyi ng t o what a cool
r i ngl one". Wi l h Zedge, you can
be t he per son annoyi ng your
f el l ow subway passenger sor
maki ng t hem j eal ous.
Zedge i s a l ree app i n l he
Googl e Pl ay st ore, and t he
r i ngt ones ( and not i f i cat i on
sounds and al ar m sounds)
are compl et el y f ree as
wel l . I cur rent l y use t he
WHAAAT?!?!??! sound f rom
t he mi ni ons on Despi cabl e Me
as a not i f i cat i on sound ( whi ch
i s cl ear l y super cool and not
annoyi ng) . My r i ngt one, whi ch
[ EDITORS' CHOICE ]
EDITORS
CHOICE