LJ Archive


diff -u: What's New in Kernel Development

Zack Brown

Issue #220, August 2012

Recently, some folks identified a bad patch that had gotten into the 3.3.1 kernel in the stable tree. It caused a certain set of hardware to fail to wake up again, once it'd been suspended. The fix was simply to revert the bad patch, after which the affected systems would work fine again. But, Greg Kroah-Hartman refused to make the change in his upcoming 3.3.2 release until Linus Torvalds made the change in the upstream git tree.

The result was an interesting debate between Filipe Contreras and a bunch of other developers over whether that was a good idea. Filipe's argument was that the 3.3.x kernels represented the “stable series”, and had the goal of eliminating bugs and giving the smoothest ride possible. Therefore, he argued, it made no sense to wait around for bug fixes to be incorporated into the upstream git tree first. The upstream git tree was for regular development, not stabilization, although the bug fix in question would result in real systems being able to do real work, instead of sitting there in a hung state.

There were a number of responses to that argument from various developers, including Linus. One argument made by Willy Tarreau was that if bug fixes didn't get into the upstream tree first, the bugs potentially would reappear in the very next development release. And, because each stable series was derived from a development release, it was only by incorporating stable series fixes upstream that the developers could ensure that fixes to one stable series would make it into the next stable series.

Linus also pointed out that there had been a time when this particular rule didn't exist, and the problem of fixes going into the stable series and then being left out of the development tree happened “all the time”.

Adrian Chadd offered up a bit of history from the Squid Project. Apparently, it had a stable and a development branch that it allowed to diverge, with the result that users wanted features and bug fixes for the older tree that were incompatible with the newer one, and mayhem ensued. So, Adrian argued, having a rule requiring changes to the stable tree to be incorporated into the development tree was a clean way to avoid that.

The really interesting thing about the whole discussion is that it illustrates the way kernel development itself develops. Traditionally, there's always been some aspect of the process that would bog down or become in some way unworkable—whether it was the struggle to find a good version control system, or identifying which people were the right ones to send patches directly to Linus, or figuring out how to do development while also producing a stable kernel for distributions. Eventually something breaks down and reveals some set of nuances that no one had noticed before. At that point, Linus and various other folks typically take an algorithmic approach to smoothing things out again. Sometimes the solutions break down later in new ways, and the succession of adjustments is fascinating to watch over time.

Ubuntu's New DNS: Unknown Host

Shawn Powers

Issue #220, August 2012

If you're the type of person who installs Ubuntu's server edition, you're also likely the sort of person who knows how to configure network settings. For most distributions, especially those based on Debian, the process is a bit strange, but familiar.

To configure the various interfaces, you edit /etc/network/interfaces and add the appropriate IP information, along with the gateway address. That doesn't complete the process, however, because if you manually configure the network interfaces, you need to add the DNS servers manually to the /etc/resolv.conf file. That's the way it's always been, and I never put much thought into it—until Canonical changed the way the resolv.conf file works.

I'll admit, my initial reaction was one of frustration, but once I got over myself, I have to say it makes much more sense to add the DNS configuration right into the /etc/network/interfaces file as well. My only complaint is that there aren't comments in either the /etc/resolv.conf file or the /etc/network/interfaces file on actually how to do it! (Thankfully, there is a note in /etc/resolv.conf warning that any changes will be overwritten, but no hints on how to make changes properly.)

The process, as it turns out, is rather simple. In /etc/network/interfaces, simply add a couple lines to the end of the stanza for a particular interface—for example:

# The primary network interface
auto eth0
iface eth0 inet static
 dns-domain example.com
 dns-search example.com

You'll notice the last three lines contain a few unfamiliar directives. They are fairly self-explanatory, but important to know. Once added to the /etc/network/interfaces file like above, the /etc/resolv.conf file is populated with the proper information when the network is activated. It's fairly simple, and it makes sense to have all the settings in one spot—but frustrating if you don't know about the changes!

Non-Linux FOSS

Shawn Powers

Issue #220, August 2012

If you're a Windows user, choosing an instant-messaging client actually can be a little frustrating. Some of the more-popular clients are loaded with advertising or cost a lot to get full functionality. Normally, I recommend Windows users install the Windows version of Pidgin. Recently, however, I stumbled across a nifty Windows-only IM client named Miranda.

Miranda is open source, ad-free and integrates perfectly into Windows. Granted, Pidgin works brilliantly under Windows, but it always feels like what it is—a port of a program designed for something else. Miranda has only a Windows version, and the one thing it does, it does quite well.

If the standard install of Miranda doesn't quite cover your needs, be sure to check out the add-ons designed for it. Whether you want to add Facebook chatting, integrate with Skype or check the weather, there are tons of add-ons from which to choose. Check it out today at www.miranda-im.org.

Lightspeed on Your Desktop

Joey Bernard

Issue #220, August 2012

One area of physics that is hard to wrap your head around is relativity. Basically, relativity breaks down into general and special relativity. General relativity deals with large masses and high energies, and it describes how space-time is warped by these. Special relativity deals with what happens during high velocities. Many odd and counter-intuitive effects happen when speeds get close to the speed of light, or c. The problem is that these types of conditions are quite far outside normal experience, so people don't have any frame of reference as to what these effects would look like—enter Lightspeed.

Lightspeed is an OpenGL program that shows what an object would look like as it travels closer and closer to the speed of light. Lightspeed actually models four different effects that occur when you get close to the speed of light. The first effect is called Lorentz contraction. This effect causes objects to appear to shrink in the direction of travel. This is scaled by a factor called gamma. Gamma is calculated by:

1 / sqrt(1 - v2/c2).

So, as you can see, as your velocity (v) gets closer to the speed of light (c), the value gamma increases toward infinity. The length contraction is calculated by

l' = l / gamma.

This means the length of an object in the direction of travel (l) decreases toward zero as the velocity increases toward the speed of light.

The second effect that Lightspeed models is Doppler shifting. You probably have noticed the sound version of Doppler shift when a fire truck drives by with its siren on. You can hear the shift in sound frequency from high to low as it goes by. The same thing happens with light too. As a light source comes toward you, it shifts in color toward blue. As it goes away, the color shifts toward red.

The third effect is something called the Headlight effect. When you have a light source that is moving, the amount of light being emitted isn't the same in all directions if that light source is moving. If the light is coming toward you, it will appear brighter. If it is moving away from you, it will appear darker.

The last effect that Lightspeed models is something called optical aberration. Because light travels at a finite speed, the light from different parts of the object come to you at different times. The end effect is that as an object comes toward you, it looks stretched out. And, when it travels away from you, it looks squashed. This is actually different from Lorentz contraction.

So, how can you see what an object would look like, taking all of these effects into account? This is where Lightspeed comes in. Most distributions should have a package available that you can install using their package management system. If you are interested in building from source, it is hosted at SourceForge. When you first start it up, it opens with a cube set in the middle of a field made up of rods for the edges and balls for the vertices (Figure 1). The beginning velocity is set as 1m/s. Since this is an OpenGL program, you simply can grab the cube with your mouse and spin it around, or up and down, in order to change the view of the object. At the far right, you can set the velocity that the object has relative to you, going from 1m/s all the way up to 299,792,457m/s (the speed of light is 299,792,458m/s).

Figure 1. Initial Scene on Starting Lightspeed

You can change the dimensions of the default cube object by selecting the menu option File→New lattice (Figure 2). You can set how many balls will be drawn in each of the three dimensions. You also can change the smoothness factor when the object is rendered on the display. In this case, it will look like what is shown in Figure 3.

Figure 2. Setting the Number of Vertices in Your Object

Figure 3. Altering the Smoothness of the Rendering

You also have the option of loading your own 3-D object, either in 3D Studio format (*.3DS or *.PRJ) or in LightWave format (*.LWO). This new object is what will be rendered, and the optical effects will be applied to this. You can save a snapshot of a particular object at a particular speed in either PNG or TIFF format. You also can export to an SRS file format (Special Relativity Scene). This is a format used by the program BACKLIGHT, which is a specialized raytracer used to illustrate relativistic effects. This lets you generate much higher resolution images of the affected object.

In the Objects menu item, there are options for drawing supplementary objects. By default, the floating grid is selected. You also can select coordinate axes, identifying the x, y and z axes. You can select the display of a bounding box for your object as well (Figure 4).

Figure 4. Displaying Axes and a Bounding Box around Your Object

Additionally, you can animate the scene by selecting Objects→Animation in the menu. This pops up a dialog box where you can select the starting and ending points on the x axis and the loop time in seconds (Figure 5). The scene then will be animated until you click stop.

Figure 5. Setting Options for an Animation of Your Object

Above, I looked at the four effects Lightspeed can model and apply to your object. By default, all of the effects are selected when you start up. If you want to change which effects are being modeled, you can go to the Warp menu item and select any combination of Lorentz contraction, Doppler red/blue shift, Headlight effect or Optical aberration. So, you can select only the Lorentz contraction and see what it looks like at 90% of the speed of light (Figure 6).

Figure 6. Looking at Just Lorentz Contraction at .9c

You have quite a bit of control over the camera as well in Lightspeed. You can select the focal length of the camera lens, going from 28mm to 200mm. You even can set a custom lens focal length by selecting Camera→Lens→Custom. You can set the position of the camera precisely by clicking Camera→Position. This displays a pop-up dialog, where you can set the exact x, y and z values for its location (Figure 7).

Figure 7. Changing Camera Position for a Better View

You can select what information is displayed on the screen by selecting the menu item Camera→Info display. You can have the velocity, the time, the gamma factor and/or the frame rate displayed on the screen.

The default background color is black, but you can change it to gray, white or very white. This display is an OpenGL display, so you can select the rendering mode. The default is shaded, but you can change it to wireframe rendering.

One of the really cool options is that you can spawn off other cameras by selecting Camera→Spawn camera. This lets you see your object from several different angles at the same time. So, now you can see what it looks like coming and going at the same time (Figure 8).

Figure 8. Setting Up Multiple Cameras for Different Perspectives

Once you have the speed and the relativistic effects set, you probably want to interact with the object a bit to see how it looks from different directions and so on. If you click the left mouse button and drag around, your object will be rotated around. If you click the left mouse button and press Shift at the same time, the camera view will be moved around, pointing in different directions. You can move the camera itself by clicking the middle mouse button and moving it up and down or left and right. You can move the camera in and out from the object by clicking the right mouse button and sliding up and down. If you completely mess up your view, you always can go back to the defaults by clicking the menu item Camera→Reset View.

So, remember this program when you are studying special relativity. Now you finally can see what it would really look like if you were traveling down the tunnel with the protons in the LHC or what the Starship Enterprise would look like as it flew by at sublight speed.

Linux-Native Task Management? Check.

Shawn Powers

Issue #220, August 2012

Task management programs are commonplace in our busy lives, but it seems that every system lacks something. Google Tasks is nice, but it lacks the features of a more robust task management system. Remember the Milk is nice, but it charges for some of its features. Many standalone task management programs are great, but they don't sync between devices.

Thankfully, Nitrotasks is a Linux-based task management program that not only syncs between computers, but also has some organization features reminiscent of the “Get Things Done” method. When you add the Web-based version and syncing compatibility with Dropbox or Ubuntu One, Nitrotasks is worth checking out. It's simple, but its Linux-native roots and Web-based access make it compelling. Be sure to put “check out www.nitrotasks.com” on your to-do list!

Linux in the Workplace Poll

Katherine Druckman

Issue #220, August 2012

We at Linux Journal HQ have a lot of Linux in our office. It's on desktops, laptops, servers, phones and tablets. We love Linux so much, we even have a Tux Droid (lnxjr.nl/tux-droid). We also use a wide variety of non-Linux open-source software for various purposes, and as FOSS has become more and more ubiquitous, we bet you do too. So, we wondered how you, our readers, use Linux and open-source software in your workplaces. Thanks to all who answered our short poll on LinuxJournal.com; we now have a better idea of how much love our favorite operating system gets in your offices.

When asked how much Linux you use in the workplace, we're thrilled to learn that the most-popular response (29%) was “We're allowed to choose the operating system we use, and the cool kids use Linux.” Freedom to choose your operating system is something we love to see. And, although we are also excited that a solid 14% of you indicated that everything you touch in your office uses Linux, we appreciate that this is not always possible in every work environment, so we're happy that most of you are in an environment where your preferences are respected, whatever they may be.

We are also glad to report that 66% of you use Linux on your work computers. The most popular flavor was Ubuntu, with Fedora a pretty distant second. And to the 34% using Windows, we hope it isn't giving you too many headaches!

86% of you use other, non-Linux open-source software, and a full 25% of you use mostly open-source software on Linux. And to the 14% who believe you are able to use open-source software just because no one knows Firefox is open source, let's hope the powers that be remain blissfully ignorant.

The most-popular reasons for using Linux at your companies are that Linux saves money and is more secure, and we couldn't agree more. You most commonly use Linux as a Web server, database server, desktop system, file server, for software development and as a mail server. Not too many of you are using Linux for movies and graphics, but we'd love to hear more from the 8% who are. Please drop us a line if you'd like to show off your work.

We are pleased that 32% of you are in your current position because of your Linux expertise. We also understand that our readers are people of many talents, so 44% of you hold your current position regardless of your Linux knowledge.

Finally, we're relieved that 73% of your bosses do know what Linux is, and to the rest of you, please let me know if you'd like my help in staging an intervention. Your boss may thank you in the long run, even if he or she thinks it's an air-conditioning company at the moment. Rest assured that I feel your pain. When I first worked for Linux Journal, many of my friends were pretty sure I was writing about china and crystal.

Thank you to all who participated in our poll, and as always, please check out LinuxJournal.com for more! Here's the poll and results:

1. How much Linux do you use in the workplace?

  • 14% — Everything I touch uses Linux, including the office coffee pot, the escalator and the florescent lights illuminating the penguin tank.

  • 17% — We use mostly Linux at work, but that weird guy in accounting has an iPhone.

  • 29% — We're allowed to choose the operating system we use, and the cool kid(s) use Linux.

  • 16% — Windows is on all our computers, but I have an Android phone in my pocket.

  • 7% — Linux is forbidden in the workplace, but the IT guy secretly uses it in the server room.

  • 5% — Penguins are shot on sight, and any mention of Linus Torvalds results in immediate termination.

2. What operating system is on your work computer?

  • 13% — Windows XP

  • 21% — Windows 7

  • 21% — Ubuntu

  • 3% — Kubuntu

  • 2% — Xubuntu

  • 1% — Other 'buntu

  • 6% — Debian

  • 6% — Fedora

  • 3% — SUSE

  • 4% — Red Hat

  • 5% — Linux Mint

  • 15% — Other distro

3. Does your company use open-source software (OSS) other than Linux?

  • 14% — No.

  • 14% — Yes, but only because no one knows Firefox is open source.

  • 11% — Yes, but only in the server room.

  • 3% — Yes, but only for Web development.

  • 14% — Yes, we use some desktop software like LibreOffice.

  • 6% — Yes, we use mostly OSS on Windows.

  • 1% — Yes, we use mostly OSS on OS X.

  • 25% — Yes, we use mostly OSS on Linux.

  • 7% — Everything in our office is open source, even the soda we drink.

4. If your company uses Linux, it is because:

  • 56% — Linux saves money.

  • 53% — Linux is more secure.

  • 28% — Linux runs on older hardware.

  • 23% — Linux isn't a Microsoft product.

  • 24% — Because I put it there and no one knows.

5. Do you have your current position:

  • 32% — Because of Linux expertise.

  • 9% — In spite of Linux expertise.

  • 44% — It has nothing to do with Linux.

  • 6% — I'm not currently employed; thanks for bringing it up.

6. Does your boss know what Linux is?

  • 73% — Yes.

  • 13% — No.

  • 7% — Well, my boss thinks Linux is an air-conditioning company.

7. How is Linux used at your company?

  • 60% — Web server

  • 55% — Database server

  • 53% — Desktop system

  • 51% — File server

  • 48% — Software development

  • 35% — Mail server

  • 34% — DNS server

  • 34% — Virtual server

  • 23% — VPN

  • 22% — Spam or virus filtering

  • 16% — Directory server

  • 13% — Telephony or PBX

  • 9% — HPC

  • 9% — Movie/graphics development

Note: not all respondents answered each question, and a few questions allowed for multiple answers, so please don't be alarmed when the answers don't add up to 100%.

Resara Me This

Shawn Powers

Issue #220, August 2012

More than any other program, Samba allows Linux desktops to exist in the world of Windows. In fact, Samba historically has allowed Linux to live secretly in the server room as well. It's possible to emulate a Primary Domain Controller from your Linux server, and Windows machines can't tell the difference. The problem is that Microsoft no longer uses PDCs and has turned to Active Directory.


Thankfully, Samba version 4 has just entered beta, and it supports Active Directory emulation! Although it's still in early beta stage, that hasn't stopped the folks at Resara from packaging up the software into a turnkey Active Directory replacement. Offering a fully functional community version along with its only slightly more-functional commercial version, Resara gives you a surprising feature set.

The server itself is built on Ubuntu, and its cross-platform (Linux, Windows, OS X) GUI administration tool runs pretty much anywhere. It offers simple administration of users, groups, computers, DNS and DHCP. If you need further customization of the Active Directory itself, Resara is compatible with Microsoft's own Group Policy Editor. That, unfortunately, runs only on Windows.

The administration GUI is simple and effective.

You'll be hearing more about Resara from me in future issues, but for folks looking to implement an Active Directory system without the desire to pay for Microsoft licensing, check out Resara now! The community version is at www.resara.org, and the commercial version is at www.resara.com. I'm using the commercial version, both because I want to support the project and because I'm sure I'll take advantage of the technical support!

They Said It

Most certainly, some planets are not inhabited, but others are, and among these there must exist life under all conditions and phases of development.

—Nikola Tesla

Life is and will ever remain an equation incapable of solution, but it contains certain known factors.

—Nikola Tesla

The opinion of the world does not affect me. I have placed as the real values in my life what follows when I am dead.

—Nikola Tesla

I predict that very shortly the old-fashioned incandescent lamp, having a filament heated to brightness by the passage of electric current through it, will entirely disappear.

—Nikola Tesla (in April, 1930!)

The desire that guides me in all I do is the desire to harness the forces of nature to the service of mankind.

—Nikola Tesla

Visit LinuxJournal.com and Help Take Over the World

Katherine Druckman

Issue #220, August 2012

Linux really means business. It's not just an issue focus, but also a reality. Linux Journal has been around since before Linux was cool. We've seen it grow from a system praised by hobbyists and hard-core geeks, through its not-so-awkward adolescence during the tech boom of the late 1990s, and blossom into an operating system so elegant that is has penetrated the mainstream and directly touches so many people in such a way that few even are aware of its presence. As we all know, few people who participate in the digital world in which we currently live are not touched by Linux in some way. That said, if you are reading this issue, you more than likely are one of the informed few who helps power the open-source ecosystem that in turn powers the lives of so many. To that end, we offer you LinuxJournal.com as a resource to aid you in your pursuit of technical greatness. With articles focused on programming, security, desktop, system administration and more, we think you'll find it a handy reference for staying up to date and discovering new skills that will help you make the world a better place.

LJ Archive