UpFront

diff -u: What's New in Kernel Development

Zack Brown

Issue #234, October 2013

There recently was a flame war on the linux-kernel mailing list that got some attention outside the kernel community. It started when Greg Kroah-Hartman complained that people were sending patches for the stable series that didn't belong there, and Linus Torvalds suggested he learn how to yell at people more; then Sarah Sharp said that Linus shouldn't be advocating abuse.

It turned out to be an interesting culture clash. Sarah posed her argument as, “Violence, whether it be physical intimidation, verbal threats or verbal abuse is not acceptable. Keep it professional on the mailing lists.” And, “In karate, or any other sport, if your opponent is motionless on the floor, you stop. You can't see the person you're emailing. You can't see if the first conversation-disabling blow has completely knocked them out. You can't see if you've misjudged their mental strength for the day and completely wiped out their ability to use their brain to correct the technical mistake you're trying to get them to fix.”

Linus posed his response as being, “People are different. I'm not polite, and I get upset easily but generally don't hold a grudge—I have these explosive emails. And that works well for some people. And it probably doesn't work well with you. And you know what? That's fine. Not everybody has to get along or work well with each other. But the fact that it doesn't work with you doesn't make it 'wrong'.” And he said that the issue was really about “how to work together DESPITE people being different. Not about trying to make everybody please each other.” He gave the example of Sarah's work with Greg, saying that they worked a lot with each other, probably because they did work well together, and that that was as it should be.

The debate went on for a bit, and ultimately the two of them, and others, decided to continue the discussion at the upcoming Kernel Summit, over cookies and pot brownies.

The debate interests me personally because, on the one hand, no one should ever be abused. That's what abuse is—something that shouldn't happen. Otherwise, it's just an activity. And on the other hand (in my opinion), not all of his “yelling” is really abuse. For one thing, it's an e-mail list, and there is a long and glorious history of flame wars on e-mail lists. People aren't required to participate, even when Linus Torvalds is the one doing the flaming. So I'm interested to see what kind of public pressure ultimately will come to bear on Linus to stop doing something that's really an ordinary on-line activity.

Dude, Where's My Car?

Shawn Powers

Issue #234, October 2013

When my family moved to Grand Rapids, Michigan, last year, one of the biggest adjustments was dealing with city parking. While we usually remember what side of the mall we parked on, there was a time downtown that I couldn't remember what parking garage we used, much less what level or spot. Thankfully, I had the parking ticket in my pocket, which included the address for the particular parking lot we used. Although we had to walk up 15 levels one by one to find the car, at least we knew it was there somewhere!

If you've ever walked around a parking lot wondering if you were the victim of theft, or possibly going senile, Valet is the perfect app for you. It not only remembers the GPS location of your parked car, but it also has a timer to remind you of parking meter timing. Plus, if your car has Bluetooth connectivity, Valet will record where you left your car without any interaction on your part. It just marks the location where Bluetooth disconnected, and it happily guides you back when you've finished spending your paycheck at Teavana in the mall. (Maybe that's just me.)

In fact, Valet fills such a simple yet helpful purpose, it's earned this month's Editors' Choice award. Its automatic tracking based on vehicle Bluetooth is really the feature that puts it over the top for me. It's the best $0.99 I've spent in a while. You can find it at the Google Play store, or check out the Web site: valetapp.co.

Non-Linux FOSS: Launchy!

Shawn Powers

Issue #234, October 2013

With Unity's method for launching and finding programs and applications, and OS X's spotlight tool becoming the new way to launch programs, the entire way we think about launching programs is changing. Although I still like to have a few icon shortcuts on my task bar, many folks prefer a quick keystroke to bring up Gnome-Do, or Unity's launcher, or even OS X's spotlight. If you're one of those people, but can't seem to find a smooth way to accomplish your launching on Windows, check out Launchy.

Launchy is an open-source dæmon that runs on Windows, OS X or Linux. It listens for a predefined keystroke and then pops up a search window. You start typing the application, document or media file you want to start, and Launchy autocompletes based on its index of your system. The main advantage is the ability to launch a program without moving your fingers from the keyboard.

(Image from www.launchy.net)

Launchy is fast, accurate and doesn't steal lots of resources on your system. I can't find a way to make Windows behave this way on its own, so although Launchy is cross-platform, it probably will be the most useful for Windows users. You can download your copy today at www.launchy.net.

Own Your Data with OwnCloud

Shawn Powers

Issue #234, October 2013

I love Dropbox. I really do. With a Google AdWords campaign, and $50 or so, I was able to max out my free storage. That means I have around 24GB of free Dropbox storage to fiddle with. Granted, that's a lot, but in the grand scheme of things, 24GB isn't very much space. During the past few years, I've mentioned several alternatives (like SparkleShare), but the new kid on the block, OwnCloud, is a Web-based application that provides a plethora of cloud-based services. The most popular is its file syncing.

Setting up OwnCloud isn't for the faint of heart, as it requires some PHP tweaking and really should be SSL-encrypted, but for anyone comfortable with configuring LAMP applications, it's not insurmountable. Once your server is installed, there are native syncing applications for Windows, OS X, Linux, Android and iOS. Because OwnCloud is hosted on your own server, your space limitation is based on your actual hard drive space!

If you've ever wished your Dropbox data was hosted on your own servers, or if you just don't have enough space, check out OwnCloud. It not only supplies file syncing, but with its extendible infrastructure, it also can do calendaring, sharing and pretty much anything else you'd want to do with cloud computing. Check it out today at www.owncloud.org.

Surf Safely with sshuttle

Shawn Powers

Issue #234, October 2013

In past issues, I've explained how to set up a SOCKS proxy with SSH. I've demonstrated how to tunnel traffic with SSH. I've even shown how to circumvent a company firewall with SSH. I've never been able to use SSH completely as a VPN, however, and that's always bummed me out—until I discovered sshuttle.

Mind you, sshuttle isn't a new program. It isn't even a new concept. What it is, however, is pure awesome. Basically, launching the sshuttle binary with root privileges will modify your system firewall to tunnel all (yes all) traffic through a remote SSH connection. The remote connection doesn't even need administrator privileges, so your shell account at your Web host might suffice for securing your traffic in a hotel or coffee shop. sshuttle will even tunnel your DNS lookups, which means your entire network interaction should be secure and encrypted.

sshuttle is in many OS repositories, or you can downloaded it from https://github.com/apenwarr/sshuttle.

With a simple sudo sshuttle --dns -vvr username@server 0/0, all your traffic will be encrypted and funneled through the remote server. Because DNS also is tunneled, it means you won't be vulnerable to DNS poisoning either! Check out sshuttle today. You won't be sorry.

They Said It

My home is not a place, it is people.

—Lois McMaster Bujold

The middle of the road is where the white line is—and that's the worst place to drive.

—Robert Frost

The future will be better tomorrow.

—Dan Quayle

Some have been thought brave because they were afraid to run away.

—Thomas Fuller

Reading is no substitute for action.

—Colleen Wainwright

Mapping Your GIS Data

Joey Bernard

Issue #234, October 2013

I've already looked at some GIS applications available on Linux. Programs like GRASS and qgis provide a full set of tools to do GIS. Sometimes, that's really overkill though. You may just want to display some data geographically and create a map. For those cases, there is Thuban, an interactive geographic data viewer (thuban.intevation.org).

Most distributions should have a package available within their package management systems. If not, you always can download the sources and build it from scratch. It does depend on Python, among several other libraries, so you need to do a bit of a dependency dance. Binary downloads even are available for Windows and Mac OS X, so you can point your non-Linux friends to them.

If you don't already have data of your own, sources of public-domain GIS data are available on-line. Here are a couple: www.naturalearthdata.com/features and wiki.openstreetmap.org/wiki/Shapefiles. The files available on these sites will get you started with SHP files that contain at least basic features for most of the world.

Thuban is not as flexible as full-fledged GIS software and cannot handle very many data file formats. You can use SHP files, DBF database files and various image file formats. In the screenshots for this article, I simply grabbed several of the data files available on-line.

When you start Thuban, you end up with a completely blank slate (Figure 1). The first step is to start a new session, which you can do by selecting the menu item File→New Session (not much will change on the screen). In order to start building your map, you need to add layers that can be manipulated. I started by selecting the menu item Map→Add Layer and adding in an SHP file to give me the basic geographic attributes for my home province of New Brunswick (Figure 2). This includes several different geographical items, such as water, river banks and parks. The default display is not very interesting yet (Figure 3).

Figure 1. Starting Thuban gives you a blank slate.

Figure 2. Adding a new layer opens a file selection dialog where you can choose an SHP file.

Figure 3. By default, Thuban just displays all of the data with a single symbol color.

You can edit the way a layer is displayed either by double-clicking the layer within the list in the legend pane or by right-clicking the layer of interest and selecting Properties. This will pop up a new window (Figure 4). In this case, I selected the “type” field within the classification pane. The easiest choice at this point is to click the Generate Class button. The Generate Classification window will pop up, where you can click on the Retrieve From Table button to get a list of the possible values. I accepted the default gray-scale mapping for the colors, giving four new entries in the layer properties. But this is not very interesting either, yet. Selecting each of the new properties, you can edit the symbol and change the colors for each of the types (Figure 5). If you want to have a preview of what this will look like, you can click the Try button. If it doesn't quite look right, you always can click the Revert button to undo the changes and try something else.

Figure 4. Each layer has a properties window where you can control how the data gets displayed.

Figure 5. Using the Generate Class button is a shortcut to get you started.

Although every map begins with a single layer, it is very rare that a single layer is enough to show all the details you may want to have displayed. In this example, I don't have any roads on my map. A separate SHP file is available that has this information, however. So, I clicked on the menu item Map→Add Layer and added the file roads.shp. Opening up the properties dialog shows that this particular SHP file has several different attributes to play with. For now, I selected four different road types and highlighted them with four different colors. There is still a default color for any road types other than the four I selected. To make them go away on the map, you can select the default property and simply make it transparent. Then, only the four selected road types will show up. Now the map is starting to look a bit more interesting, and I need to start worrying about what order the layers are in.

Thuban will draw layers in the order they appear in the legend list, starting at the bottom and working its way up. You can move a particular layer up our down by selecting it and then using the buttons at the top of the legend pane.

Another type of layer you can use is an image layer. Obviously, the image needs to be geo-referenced in some way. Thuban supports the geoTIFF file format. If you place your image at the bottom of the layer list, you then can draw on top of it with the data in the SHP files.

To manipulate the map itself, Thuban uses a sort of mode system. To zoom in, you need to select the zoom button. Then, you either can use click and drag to select a region to zoom in on or simply click a spot on the map to re-center and zoom in. Once you have zoomed in, you can use the pan tool to move the view window around the map to highlight different regions. There are buttons to zoom you to specific scales such that the entire map is visible. This always takes you back to the default map view.

Two tools allow you to work with individual elements from an SHP file. The first is an information tool that pops up a detail window for any element you select. The second is a label tool. When you select an element, a dialog window pops up allowing you to select one of the properties to be displayed as a label.

Once you have a map you're happy with, you probably will want to save it for later use. Because Thuban works with sessions, all of your work in generating the map will be saved as a session within Thuban, as long as you remember to save it by clicking the menu item File→Save Session.

But, this doesn't help much if you want to use your map outside Thuban. There is an option to export a map as an SVG file by using the menu item Extensions→Write SVG Map. This is not the most efficient output available, however. My simple example here blew up to more than 50MB for a single map with two layers.

The other option is to print your map. Although you can print to actual paper, for a hard copy, you also can print to a file using the generic PostScript printer. This generates a PostScript file that will be a bit more manageable. You also can convert this PostScript file to other formats with relative ease. So, to get a PDF of your map, you can print to a PostScript file and then convert it to PDF with the ps2pdf utility. Now you have a map that you can share with friends and family.