UpFront

diff -u: What's New in Kernel Development

Zack Brown

Issue #213, January 2012

The kernel.org break-in continues to inconvenience developers, although the various pieces do seem to be getting picked up. A lot of git repositories are returning to kernel.org as their maintainers submit credentials into the new GPG “web of trust” that is designed to reassure the kernel.org administrators that git tree maintainers are who they say they are. Linus Torvalds also has endorsed the web of trust by asking people sending him pull requests to make sure their repositories are hosted on kernel.org, so he can trust their identity. Establishing a web of trust is not the easiest thing to manage. A lot of key-signing events have been announced all over the world, but some people don't live close to any of those events and may have a hard time getting their keys signed, without which they won't be allowed to maintain git repositories on kernel.org.

Another difficulty is that people within the web of trust might have a security breach on their personal systems, which could result in their private GPG keys being compromised. Greg Kroah-Hartman recently posted tips on how to avoid that at https://lkml.org/lkml/2011/9/30/425. Greg admonished, “it is imperative that nobody falls victim to the belief that it cannot happen to them.”

An important thing to remember about all of these security measures is that they don't impact regular contributors who want to submit patches to the kernel. You can all still send your patches to the mailing list with no problem. The web of trust is intended only for people maintaining git repositories on kernel.org, because those people will have to be trusted by the kernel.org administrators not to taint those repositories.

VirtualBox came under some heavy criticism recently. Dave Jones remarked that a lot of kernel bug reports were due to VirtualBox corrupting memory and having weird crashes. He posted a patch to taint any kernel that had VirtualBox loaded, so that any automated bug-collecting tools could choose to ignore bug reports coming in from those systems.

Greg Kroah-Hartman approved of Dave's patch, and the conversation proceeded to the point where people were suggesting that all out-of-tree patches should be tainted in a similar way. Eventually Frank Mehnert, the VirtualBox maintainer, responded to the complaints against VirtualBox. He said, “We always have had good relations to the Open Source community, so feel free to point me to an archive where all these kernel panic reports arrive that you've got. We fixed some bugs in our kernel modules in the past, and it is even possible that some of the current bug reports are from older versions of VirtualBox that might have been fixed in the meantime.”

Neil Brown submitted a suspend dæmon, intended to provide a basic set of interfaces for user programs to control how and when the system can suspend. If a program should not be interrupted, it can use the dæmon to prevent the system from suspending at that time. Likewise, if a program wants to suspend the system, it can tell the dæmon to suspend the system as soon as no other program is blocking suspension. A lot of technical details came under discussion, in particular the selection of interface (ioctl, sysfs, system calls and so on), but overall, Neil's basic idea seems to have some support from a lot of developers.

Casper, the Friendly (and Persistent) Ghost

Shawn Powers

Issue #213, January 2012

Creating a live Linux USB stick isn't anything new. And, in fact, the ability to have persistence with a live CD/USB stick isn't terribly new. What many people might not be aware of, however, is just how easy it is to make a bootable USB stick that you can use like a regular Linux install. Using the “Startup Disk Creator” in any of the Ubuntu derivatives, creating a bootable USB drive with persistence is as simple as dragging a slider to determine how much space to reserve for persistence!

The concept of persistence has come a long way too. The casper filesystem basically overlays the live USB session, so you actually can install programs in your live session and have those programs remain installed the next time you boot. The same is true with files you might create and store in your home directory as well. If you've ever liked the concept of a live USB, but felt limited by the default set of applications, persistence is for you. In fact, with a sizable USB stick and a little more work, you can make a multiboot USB stick with persistence as well.

Fade In Pro

Charles Olsen

Issue #213, January 2012

When I switched from Windows to Linux, I found software to replace almost everything I had been doing in Windows. Most of the software I needed was in the repos, although I did pay for a couple commercial programs.

The most difficult program to replace was Final Draft, a commercial program for writing screenplays. Final Draft is available for Windows and Macs, but not for Linux. It also does not run in Wine or CrossOver Office.

I understand that software for writing screenplays is a small niche, but it's not limited only to writers in Hollywood. Any company that prepares videos for training or other purposes would benefit from a program that helps write scripts.

You can write scripts with a word processor, of course. But, the formatting is tricky and goes beyond what you can accomplish just by using styles. A dedicated script-writing tool ensures that all your formatting is correct, and it also can help in other ways.

At first, I was able to get by with Celtx, a free screenplay program that is available for Windows, Mac and Linux. But a nasty bug crept into the Linux version, making it painful to enter character names for dialogue. Although the developer acknowledged the issue two years ago, and several new versions have been released since then, the bug is still there.

A new solution now is available. Fade In Professional Screenwriting Software is a powerful application for writing screenplays, and it includes tools for organizing and navigating the script, as well as tools for managing revisions and rewrites.

Fade In intelligently handles the various formatting elements of a screenplay. You can format the elements manually using key combinations or menus, or you can format everything just by using the Enter and Tab keys. Type a Scene Heading and press Enter, and the next element automatically is formatted as Action. Press Tab to change the formatting to Character, which automatically is followed by Dialogue. Press Tab to change from Dialogue to Parenthetical, which formats properly and inserts the parentheses.

Fade In builds autocomplete lists of your characters and locations. Once you've written a character or location, you can re-enter it with a couple keystrokes.

When it's time to produce a screenplay, Fade In can help by generating standard production reports including scenes, cast, locations and so on. You then can print these reports or save them to HTML or CSV.

Fade In can import and export files in these formats: Final Draft, Formatted Text, Screenplay Markdown, Unformatted Text and XML. It also can import files in Celtx or Rich Text Format and export to PDF and HTML. The Final Draft format is particularly important if you want to sell your script or submit it to certain screenplay-writing contests.

Fade In is not free. According to the Web site, the regular price is $99.95, although at the time of this writing, you can get it for $49.95. Either way, it's much cheaper than $249 for Final Draft. You can download the demo and try it first, then buy it if the software works for you.

There also are versions of Fade In for mobile devices: Android, iPhone and iPad.

You can download the Linux version as a DEB, RPM or tar.gz file in either 32-bit or 64-bit versions.

Check it out at www.fadeinpro.com.

Non-Linux FOSS

Shawn Powers

Issue #213, January 2012

We talk about Dropbox a lot here at Linux Journal—from tips and tricks, to free Web site hosting, to cloud backups. The good news for those Linux Journal readers stuck using alternative operating systems is that Dropbox doesn't pick favorites. (Even if we do.)

Even though Linux supports a wide variety of network protocols, getting computers networked together often can be a nightmare. For quick-and-efficient transfer of files, it's hard to beat Dropbox's seamless syncing. With the free 2GB of storage, even fairly large files are easy to transfer.

(Image from www.dropbox.com)

gStrings in Your Pocket

Shawn Powers

Issue #213, January 2012

What may sound like a perverse concept is actually one of the many ways smartphones can change your life. If you play a musical instrument but don't happen to have perfect pitch (most of us, sadly), you can buy a tuner, pitch pipe, tuning fork or any number of other aids to keep yourself in tune. If you have a smartphone in your pocket, however, you also can simply download gStrings. Available in the Android Marketplace in either a free ad-supported version or an inexpensive ad-free version, gStrings will help you tune any number of instruments accurately.

Although it's certainly no replacement for perfect pitch, having a tuner in your pocket is very convenient if you're a musician. Quite a few tuning apps are available for Android, but I've used gStrings personally, and it works great: https://market.android.com/details?id=org.cohortor.gstrings.

Astronomy on the Desktop

Joey Bernard

Issue #213, January 2012

Many people's initial exposure to science is through astronomy, and they are inspired by that first look through a telescope or their first glimpse of a Hubble image. Several software packages are available for the Linux desktop that allow users to enjoy their love of the stars. I look at several packages in this article that should be available for most distributions.

The first is Stellarium, my personal favorite for day-to-day stargazing. When you install it, you get a thorough star catalog. By default, Stellarium starts up in full-screen mode. The layout makes for a very attractive display of the sky above you, and almost all the details of the display are customizable.

Figure 1. Opening Stellarium gives you a look at the local sky.

If you hover your mouse pointer over either the bottom-left border or the lower-left-side border, one of two configuration panels appears. From here, you can set visual items, such as constellation outlines, constellation names, whether galaxies and nebulae are visible, as well as a coordinate grid. You also can set location and time values. This means you not only can see what the sky looked like in the past or what it will look like in the future, but you also can see what it looks like on the other side of the planet. Additionally, you can add even more stars to the catalog that Stellarium uses.

Figure 2. You can set the time so it's later, letting you check out what you might want to look for that evening.

Figure 3. The configuration window lets you download even more star catalogs.

Stellarium includes a script capability. With it, you can script views of starfields and share them with others. When you install Stellarium, you get several demo scripts to use as examples. As of version 0.10.1, there is a new scripting engine based on the Qt scripting engine. A full API is available, allowing you to interact with all of the functions that Stellarium provides. It is a full scripting language called ECMAscript. You may know it better as JavaScript. You can define your own functions, encapsulating larger chunks of work. There is a for statement, providing a loop structure that will look familiar to C and Java programmers.

To access and run scripts in Stellarium, you need to open the configuration window and click on the scripts tab. Once you've written your own scripts and want to run them, you can place them in the scripts subdirectory of the user data directory. On Linux machines, the user data directory is $HOME/.stellarium. Once you put your script files there, along with any textures they may require, they will show up within the list of scripts in the configuration window. A plugin architecture also is available, but it is much harder to use, and the API varies from version to version.

The nice thing about Stellarium is that it isn't limited to your computer. It can interact with the real world in a couple ways. The first is through telescope control. Stellarium provides two different mechanisms for controlling your telescope. The older mechanism is a client-server model. The server runs as a standalone application that connects to and controls one telescope. It then can listen to one or more clients, which can include Stellarium. Several options are available for the server portion, and they provide control for many telescopes from Meade, Celestron and others. The second mechanism is a plugin for Stellarium, which first was available in version 0.10.3. This mechanism can send only slew instructions to the telescope, which essentially are “go to” instructions.

One major warning is that Stellarium will not stop you from slewing to the sun. This could damage both eyes and equipment if you don't have proper filters on your telescope, so always be careful if you are working during the day.

The plugin can interact with pretty much any telescope that understands either the Meade LX200 interface or the Celestron NexStar interface.

The other way Stellarium can interact with the real world is as a planetarium. Stellarium can handle the calculations involved in projecting over a sphere. This way, you can make a DIY planetarium. You need a dome onto which you can project your display across the inside. You also need a video projector and a spherical security mirror. Use the spherical distortion feature in Stellarium and then project the results through the video projector and onto the mirror. Then, you can lie back under the dome and see the sky above you. The Stellarium Web site (www.stellarium.org) has links to groups on the Internet where you can find help and hints when building your own planetarium.

The other popular astronomy program is Celestia. Celestia is a three-dimensional simulation of the universe. Where most astronomy software shows you what the sky looks like from the surface of the Earth, Celestia can show you what the sky looks like from anywhere in the solar system.

Figure 4. When you first open Celestia, you get a satellite-eye view of the Earth.

Celestia has a powerful scripting engine that allows you to produce tours of the universe. When you install Celestia, you get a script called demo.cel that gives you an idea of its capabilities. The add-on section of the Celestia Web site (www.shatters.net/celestia) includes a full repository of available scripts.

Because so much work has been done to make it as scientifically accurate as possible, it also is being used in educational environments. Currently, 12 journeys are available that provide information for students and the general public on the wonders of the universe. As opposed to scripts, journeys give you more control over your speed and pace, allowing you to take more time at the areas that are of most interest to you.

When you install Celestia, you get the core part of the program and a few extra add-ons. Currently, more than 500 add-ons are available, and if you install them all, you will need more than 18GB of drive space. The main repository you should check out first is located at www.celestiamotherlode.net.

If you want to travel to another planet in the solar system, you can click on Navigation→Go to Object. Here you can enter the name of the object and how far away you want to be. Then, click on Go To, and you'll be taken there directly. Once you're there, you can rotate your camera view with the arrow keys. In this way, you can go to Mars and turn around and see what the sky looks like from there.

Figure 5. When you want to go to an object, you can set what object you want go to and how far away you are.

Figure 6. You can zoom in to see the Great Red Spot on Jupiter.

Figure 7. You can look out and see the night sky on Mars.

If you want to move around the orbit of the body you're currently at, you can use the Shift and arrow keys to slide around and see the whole surface. What you see when you are in orbit around another planet is a texture mapped onto the body.

Celestia's core installation includes a minimal set of textures that strive to be as accurate as possible. You can change the textures being used by including add-ons from the repository. Some of these include textures that allow you to see what the Earth may have looked like during the last Ice Age or even four billion years ago.

In 2007, Vincent Giangiulio created an add-on called Lua Edu Tools. This add-on provides all kinds of extra functionality to Celestia. A toolkit is displayed on the right side of the screen that provides sliders for controlling many of Celestia's parameters. It also provides a “cockpit” overlay, making it feel even more like you're flying through space. The default texture is the space shuttle, but you can use other ones too. Celestia also lets you use a joystick to control movement, so you can immerse yourself completely into your dream of flying through space.

You can share your experiences with others by saving still images or movies. If you click on File→Capture Image, Celestia lets you save a PNG or JPEG image file. Clicking on File→Capture Movie lets you save a movie of your travels. You can set the aspect ratio, the frame rate and the video quality. Once you click Save, Celestia will be ready to start recording. When you are ready, click the F11 key to start recording. When you're done, you can stop recording by clicking F12.

This article is only an introduction to what you can do. Hopefully, it inspires you to go explore the universe on your desktop. From there, bundle up and go spend the night out under the skies. You won't regret it.

They Said It

A computer once beat me at chess, but it was no match for me at kick boxing.

—Emo Philips

As a rule, software systems do not work well until they have been used, and have failed repeatedly, in real applications.

—Dave Parnas

Computer science is no more about computers than astronomy is about telescopes.

—Edsger Dijkstra

Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done.

—Andy Rooney

Computing is not about computers any more. It is about living.

—Nicholas Negroponte

LinuxJournal.com

Katherine Druckman

Issue #213, January 2012

Have you visited LinuxJournal.com lately?

Check out www.linuxjournal.com/tag/security for helpful information on everything from configuring firewalls, to DNS cache poisoning, to packet sniffing. There are several great article series and tutorials to help get you over many of your security hurdles.

Don't miss Mick Bauer's “DNS Cache Poisoning, Part I” (www.linuxjournal.com/article/11008) and “DNS Cache Poisoning, Part II: DNSSEC Validation” (www.linuxjournal.com/article/11029) from our archives.

Greg Bledsoe's “Back from the Dead: Simple Bash for Complex DdoS” (www.linuxjournal.com/content/back-dead-simple-bash-complex-ddos) also may come in handy in a bind.

And, for a quick tip, take a look at Shawn Powers' video “Quick and Dirty SSH Tunneling” (www.linuxjournal.com/video/quick-and-dirty-ssh-tunneling).

You Need A Budget

Shawn Powers

Issue #213, January 2012

This time of year is often rough on finances, and although there are many money-management tools available for Linux, none are quite like You Need A Budget, or YNAB for short. Unlike traditional budgeting programs, YNAB focuses on a few simple rules to help you get out of debt and, more important, to see where your money is going. If you've ever struggled with sticking to a budget (I certainly have), give YNAB a try. I'm not a “numbers person”, yet YNAB seems to make sense.

YNAB is an Adobe Air-based application, so it runs on Windows, Macintosh and Linux. It's not free, but there's a seven-day trial and a 30-day money-back guarantee. There's even an app in the Android Marketplace that will sync with your desktop application for entering purchases on the go. YNAB isn't for everyone, but if you've ever struggled with budgeting and been frustrated that most finance applications are Windows-only, give YNAB a try: www.youneedabudget.com.

(Image from www.youneedabudget.com)