FOSSPICKS

Sparkling gems and new releases from the world of FOSSpicks Free and Open Source Software Mike Saunders has spent a decade mining the internet for free software treasures. Here’s the result of his latest haul…

Partition manager GParted 0.20 ersion numbers are funny The latter is what we’re looking at things. Some developers here, as it’s very useful to have Vwould argue that they don’t around on a spare CD-R or USB key mean much, but end users often for emergencies. infer a lot from them. We know of The ISO weighs in at a touch quite a few FOSS programs that under 200MB, and when booted, it have surprisingly low version asks for your keyboard layout and numbers, given their quality and language. Then it drops you into a feature set, such as . It has rather ugly desktop, with been around for years, has loads of some dreadful desktop icons. Sure, features, is used by professionals glitz and fancy effects aren’t for real work, and yet it’s only at important here, but a bit of work on 0.48. The same could be said of the presentation would be welcome, GParted: it’s a hugely useful and especially when you’re using it to fix mature tool, yet its 0.20 version someone else’s system. number suggests it’s barely at Anyway, GParted itself pops up, This panel shows the range of filesystems that are supported, and alpha stage. showing the layout of your hard operations available for them. That might scare some users drive. (If you have multiple drives, away, especially given its job of you can select the one you want to partition in the list to select it, and performing (potentially risky) edit via the drop-down menu on the then use the toolbar at the top (or filesystem operations. In our top-right of the window.) Click on a the right-click menu) to perform an experience over the years, though, operation on it. Note that GParted GParted is a tool you can rely on. It’s “GParted is very useful to have doesn’t perform its operations a GTK-based program for managing straight away – instead, it batches partitions on your hard drive, and around on a spare CD-R or USB them up until you click the Apply it’s available in two flavours: as a key for emergencies.” button at the top. standalone app, or as a live distro. GParted is tremendously versatile, supporting over 20 filesystem formats, although not every operation is available for each format. But for the common formats (ext*, , NTFS, FAT32, HFS+) you can create, copy, resize and relabel partitions. In many cases you can also perform checks on partitions, and attempt to recover deleted ones. It’s a great toolbox for working with hard drives, and an essential part of a sysadmin’s armoury. The GParted Live distro isn’t a feast for the eyes and looks very late 90s, PROJECT WEBSITE www.gparted.org but it gets the job done.

68 www.linuxvoice.com FOSSPICKS

Operating system Minix

lthough it’s not very well parts of the system exchanging known, Minix played a messages all the time, performance Amajor role in the early days can be impacted significantly. So of . It was created by the debates continue today, but computer science professor Minix 3 is a good example of a Andrew Tanenbaum as a learning genuinely useful all-round OS built tool, and Linus Torvalds used it to on a microkernel design. build the very early releases of his kernel. The two hackers got into a A bit of this, a bit of that fascinating online debate about Minix 3 is now regarded as an kernel design – a debate that has alternative to Linux and the BSDs become so famous, it even has its for embedded devices and low-spec own Wikipedia page: http://tinyurl. hardware and it runs many FOSS com/b2us8t. Tanenbaum argued apps you’re familiar with. To install Minix 3 is the first that microkernels are the future, it, you’ll need at least 64MB of RAM releases. Indeed, Minix also uses release to support ARM and Linux was already obsolete and an i586 or newer processor chips, and specifically NetBSD’s Pkgsrc system, so a wide before it had even taken off. along with 675MB of drive space. BeagleBoards (image: range of software is available with Torvalds disagreed, of course. Minix 3.3 is provided as a 288MB Mapper 07, Wikipedia). just a few commands. However, X But what is a microkernel? compressed ISO image, which wasn’t working at the time of Essentially, it’s a very small kernel extracts to 578MB, so it can be writing – the developers were still in that does a handful of vital jobs: burned to a regular CD-R. After the process of moving away from mapping memory, controlling booting, you’ll be prompted to log in the crusty old XFree86 codebase. processes, and enabling processes as root (without a password), and Ultimately, Minix feels a lot like to communicate with one another. then run setup to begin installation. Slackware and from the Everything else, including hardware This is all plain text, and there are no mid-90s. It’s surprisingly usable and drivers, networking protocols and hand-holding wizards, but if you interesting to explore, and the so forth, are run in “userspace”, have some Unix experience you documentation isn’t bad either. It where they can’t interfere with the won’t find it too daunting. won’t be challenging Linux or inner workings of the kernel. By and large, Minix has a familiar FreeBSD any time soon, but if Contrast this to Linux, where a good Unix-like userland, which isn’t you’re interested in exploring chunk of the OS’s functionality is surprising as much of it has been alternative kernels or just want to provided directly inside the kernel. taken from NetBSD in recent expand your Unix knowledge, give it So a microkernel should, in a go in VirtualBox or Qemu. (Note: theory, be more reliable, as parts “Minix 3 is now regarded as an for the former, create a virtual IDE can be swapped out more easily in hard drive image.) the event of a bug wreaking havoc. alternative to Linux and the BSDs But when you have more things PROJECT WEBSITE for embedded devices.” www.minix3.org happening in userspace, and major

How it works: Installing Minix3

1 Boot 2 Install 3 Wait You can use a real PC, but it’s easier to just use Log in as root and enter setup to begin the If you can devote the whole drive to Minix, use VirtualBox or Qemu to boot the ISO image – and at process. You’ll be prompted for your keyboard layout, the automatic mode. The files will be copied over, and this menu, hit Enter to boot up Minix. and then move on to drive partitioning. then you can reboot into your new Minix installation.

www.linuxvoice.com 69 FOSSPICKS

Old school terminal emulator Cool-retro-term

ollywood typically depicts bunch of extra packages. The “hackers” as bespectacled interface is built around Qt 5.2, so Hgeeks sitting in front of you’ll need an up-to-date distro to green text terminals with all sorts of build the source code – we used a incomprehensible gobbledygook test release of Fedora 21. We scrolling by. They’ll use these followed the instructions to the cliches even in films set in the letter, but we still had to install current decade, despite how daft some extras manually. they are. But go back to the 70s and Anyway, once it’s running, it’s 80s and you would actually find pretty awesome. The developers these flickery, eye-strain-inducing have done a great job of recreating displays hooked up to mainframes an old-school text terminal, beyond Top tip: enable this and minicomputers. just making everything pixellated to simply didn’t work. It’s not clear full-screen on your If you want something today that the extreme. There’s a fuzziness whether this is due to a bug in the laptop, go into a coffee really harks back to the good old around the characters, irregularity shop, and watch as program or the mid-development days of Unix, try Cool-retro-term. Its in the lighting, twitches from the everyone assumes status of Fedora 21, but we couldn’t name says it all: it recreates an virtual CRT, and warping at the you’re the l33t3st h4x0r explore some of the extra features. old-school terminal on your edges (simulating the bulge of a in the world. Still: you can normally customise desktop, and it’s pretty cool. non-flat screen). Even if you never the font size and colour scheme, Well, apart from compiling it. The used a Unix box in the 70s, it may and switch into a full-screen mode. developers have provided a helpful still remind you of 8-bit computers list of dependencies on the project’s hooked up to 80s TV sets. PROJECT WEBSITE website, but if you’re not running Unfortunately, we couldn’t access https://github.com/Swordfish90/ cool-retro-term KDE you’ll be pulling in a giant any of the settings; the menus

Screenshot taker Maim

ne of the best command You can use the program straight line tools for taking away by entering, for example, Oscreenshots is Scrot. With a maim foo.png to save the whole command line tool you can take screen as foo.png. You’ll probably batches of screenshots, selecting want to get the terminal window specific areas, which is very handy out of the way first, though, so add when you need to do repetitive jobs -d followed by a number to delay (such as collecting images for the screenshot-taking process for software documentation). Maim the specified number of seconds. claims improve on Scrot with some If you want to grab a part of the features that the former lacks. screen, you can specify coordinates The main dependencies are using the -x, -y, -h and -w flags; in Maim makes off-screen Imlib2, libXrandr and libXfixes; many cases, though, you’ll want to areas transparent, extra settings. It’s also possible to these are available as libimlib2-dev, select an area yourself. Maim can’t which is useful if you select a specific window using the libxrandr-dev and libxfixes-dev on do this on its own, but if you install have multiple monitors -i flag. This requires the window ID, Debian-based distributions. With Slop (linked to on the project’s with different which you can get by running those in place, grab the latest website) then the -s flag lets you resolutions. xdotool selectwindow, clicking on source code and build it like so: either click and drag to select an the window you want to capture, git clone https://github.com/naelstrof/ area, or click on a window’s titlebar and noting the number. Enter maim maim.git to take a screenshot of just that --help for the full list of options. cd maim window. The selected window is cmake ./ highlighted with a grey border, PROJECT WEBSITE https://github.com/naelstrof/maim make && sudo make install which you can customise using

70 www.linuxvoice.com FOSSPICKS

Atari-like virtual machine Aranym 0.9.16

here are many Atari ST/TT/ location of the file you downloaded Falcon emulators doing the (eg /home/mike/etos512k.img) Trounds, and most of them and start Aranym again. All being have very good compatibility with well, you’ll arrive at the desktop. the original machines. Aranym (a From here, you can go about contraction of “Atari running on any setting up your virtual Atari as you machine”) is slightly different in that wish. You can reedit the it doesn’t emulate a specific model configuration file to enable hard from the ST series; it just emulates drives using disk images or the best hardware suitable for an directories, and also tweak the open source version of TOS, the video settings as well. Note that Aranym features JIT (just-in-time) translation for the emulated ST’s old . Aranym completely takes over your CPU, so it runs lightning fast. After you’ve installed Aranym, mouse input when you’re using it, you’ll also need to get a TOS image so if you need to get the cursor apps, and you can also enable from http://emutos.sf.net. Like the back for other Linuxy work, press networking and get it online. Even if original TOS, EmuTOS is a single- left Shift, left Control, left Alt and you didn’t have one of the machines tasking operating system with Escape at the same time. at the time, it’s still great fun to play certain limits, but it’s completely Aranym is compatible with many around with an OS that’s half a relic open source and works really well original ST/Falcon games and of yesteryear, and half being kept with Aranym. Fire up Aranym for the alive thanks to the passion of open first time, and then close it; you’ll source hackers. now have a file called .aranym/ “Aranym is a contraction of config in your home directory. Edit PROJECT WEBSITE ‘Atari running on any machine’.” http://aranym.sf.net this to point the EmuTOS line to the

Text-mode Twitter client Rainbowstream command line Twitter let Rainbowstream read and post to client may seem like a your feed. A crazy idea, but in most Back in the terminal, you can now cases it works perfectly well. After begin using Twitter. Enter h to all, tweets are really just plain text, display a list of help topics, which and if you’ve ever spent much time you can then follow with another with Mutt, WeeChat and similar word – for instance, h tweets will tools, you’ll know that text-mode show you how to compose new programs can be faster and more tweets. Entering home (optionally efficient than their GUI equivalents. followed by a number) will show the Rainbowstream is written in Python, most recent tweets on your If you guessed this is a so the quickest way to get it is: timeline, while mentions will show terminal, but it’s a lark nonetheless. Raspberry Pi, pip3 install rainbowstream tweets that mention you. It doesn’t congratulations – you Enter config to see a list of The main dependency is Pillow, a take long to master, and if you can now apt-get remove configuration options for fork of the Python Imaging Library. spend a lot of time on Twitter, you’ll your X server. Rainbowstream, and then enter: Once you have it installed, enter appreciate its speed and efficiency. config IMAGE_ON_TERM=True rainbowstream and your web Certain features aren’t enabled by Now, when you view the most browser will pop up, prompting you default, such as the ability to display recent tweets from a user (eg view to authenticate on Twitter. What’s inline images, as shown in our @linuxvoice), linked images will be going on here? Well, Twitter doesn’t screenshot. This is really more of a displayed inline. let random applications use your novelty than anything else, as the account, so first it performs a images are inevitably low-resolution PROJECT WEBSITE www.rainbowstream.org check, confirming that you want to given the constraints of the

www.linuxvoice.com 71 FOSSPICKS

Mail client Alpine 2.11

e’ve given plenty of with patches. When you start Alpine, kudos to the Mutt email you’ll note that it’s more welcoming Wclient in previous issues than Mutt, with a menu-driven of Linux Voice, so some readers interface. However, like Mutt, there have asked us to also give Alpine a are keyboard shortcuts for various mention too. And for good reason options – these are displayed along – it’s a great program, and this the bottom. If a shortcut looks like author used it as his primary mail ^X, that means you have to press client for much of the early 2000s. Ctrl+X to activate it. To explain its history, however, we So, what makes Alpine great? Alpine is easy and quick need to take a deep breath: Alpine is Well, it’s very fast to use: once the configuration can be achieved to set up, and doesn’t a continuation of Pine, an email you’ve learnt the keybindings, you require extensive via the menus, so if you like the idea client that started life in 1989 and can whizz around your mailboxes, hacking of config files. of a text-mode email client but don’t was influenced by Elm (Electronic reading, replying to and sorting want to spend hours hand-crafting Mail) before it. However, Alpine mails in a fraction of the time it configuration files, you’ll love this. development ceased in 2008, and takes with the mouse. It’s also Alpine supports POP, IMAP and since then users have made highly customisable, and you can SMTP servers out of the box, and patches to add new features, along create colour themes for different can even browse NNTP groups. It with a fork (re-Alpine). types of messages. Almost all of can render HTML emails, albeit Are you following? In practical without much formatting, and terms, it doesn’t really matter: if you supports several mailbox formats. install Alpine from your distro’s “Alpine is a continuation of Pine, an package repositories, you’ll almost PROJECT WEBSITE email client that started life in 1989.” http://patches.freeiz.com/alpine certainly get an updated version

Source code analyser PMD 5.2.0

veryone makes mistakes, Both tools are written in Java, so especially when you’ve been extract pmd-bin-5.2.0.zip and Ehacking away on the same jump into the pmd-bin-5.2.0/bin/ piece of code for several hours. You directory. You’ll need to provide a may think you’re working well, but ruleset against which the code niggling bugs could be creeping should be checked, along with a into your code. If you’ve got a directory containing source code deadline to reach and simply can’t files. For instance, if you want to take a break, it’s worth running a check some JavaScript in source code analyser on your work /var/www/foo, you’d use: Here’s CPD in action, before you ship it. ./run.sh pmd -R ecmascript-basic -d /var/ use something like this: spotting repeating PMD is one such analyser. It aims www/foo sections of PHP code. ./run.sh cpd --minimum-tokens 100 --files to find flaws in your code such as Many other rulesets are available /var/www/foo --language php unnecessary object creation, – see the project’s website for a full Ideally, this should help you to unused variables, empty catch list. PMD will spit out its findings to reduce duplication, and stop bugs blocks and other bloopers. stdout, or you can redirect them to from being repeated across other Currently it only works with Java, another file by adding > list.txt to areas of the program. Plugins are JavaScript, XML and XSL, but an the end of the command. available to integrate PMD and CPD additional tool called CPD (the To run CPD, you need to specify with various IDEs, including Eclipse, “copy-paste detector”) is provided, the language it should check, along NetBeans and JBuilder. which identifies duplicated code in with a location and the minimum more languages including , C++, token length, which should be PROJECT WEBSITE http://pmd.sourceforge.net C#, PHP and Ruby. reported as a duplicate. So you’d

72 www.linuxvoice.com FOSSPICKS https://launchpad.net/pybik/FOSSPICKS Brain Relaxers

Flight simulator FlightGear 3.2

ow many games can If you’re running an variant, boast a 60,000 word there’s a PPA that has this latest Hmanual? Fortunately, FlightGear release you don’t need to read it all to (ppa:saiarcot895/flightgear). play FlightGear, but if you want to If you’ve ever tried a complex get the most out of the simulator, flight sim before, you might’ve given you’ll spend a lot of time with it. up before even getting off the FlightGear is serious business: it ground, thanks to the sheer number has been in development for of controls involved. FlightGear is no nearly 20 years, it’s incredibly different, but at least with the detailed, and it has realistic smaller aircraft like the Cessnas, “Hello, this is your captain speaking. We regret to announce physics. Well, apart from the you can enjoy some simple flying some minor technical issues with this Ryanair flight to Málaga. crashes... fun without burying your head in Normal service will be resumed soon.” It’s also huge. You’re looking at the docs. Hit S to start your engine, around 2GB for the complete hold 9 to ramp up the throttle, and the crashes aren’t very realistic game, which includes over 30 when you’ve got some speed, tap 8 – you just bounce around on the aircraft and hundreds of airports to lift off. Then use the 0 and Enter ground.) Still, if you manage to around the world. Getting it is a keys to control the rudder. take off and land a 777, write in bit difficult, as there’s no standard You won’t get far this way, as and let us know… bundle for all Linux distros, so there are many more controls to you’re left to your own distro’s master, but at least you’ll have a bit PROJECT WEBSITE www.flightgear.org repositories or third-party repos. of fun before crashing. (And really,

Multi-dimensional Scrabble game Scrabble3D crabble, like most popular In its default mode, Scrabble3D board games, has been lets you play a regular game with Sdone to death now. Sure, two, three or four players, dragging it’s still a great game, but from the tiles from the top-right of the squillions of computer versions window onto the board on the left. we’ve seen over the years, there’s The game asks for your language little to differentiate them. Until when you first start it, so that it can we came across Scrabble3D, that download the relevant dictionary, is. This adds another dimension and you can change this later on. If to the proceedings, and thereby a you’ve got bored with the regular whole other level to the Scrabble rules, some alternatives gameplay. The program is written are available: Clabbers (which lets using the Lazarus Pascal IDE, you place anagrams of words) and Click Game > Run demo which means that packages are Cambio Secco (whereby you can the slider under the 3D view on to see the CPU play available with both GTK and Qt exchange all of your tiles, once per against itself in the 3D the right to select a plane before interfaces. The 64-bit Deb file match, without losing your turn). mode. dropping a tile. It’s a bit fiddly at worked fine on our Ubuntu 13.10 To find the 3D mode, go into first, but the manual on the test machine; if you’re running an Configuration > Settings, choose project’s site explains it well. RPM-based distro such as Advanced mode, go to Board > Fedora, you’ll also find suitable Configuration, and select 3D. After PROJECT WEBSITE http://scrabble.sourceforge.net packages at the project’s website. starting a new game, you can use

www.linuxvoice.com 73