Cooking with Linux - It's About Time!

To answer the classic question, “Does anybody really know what time it is?”, our Chef's answer seems to be, “Yes, but you need lots and lots of clocks.”

Although binary clocks may be geeky, there's something cool about a nice, retro, analog clock running on your desktop. To avoid looking for and downloading anything, try the venerable Xclock that comes with your system's X software. This baby was originally written by Tony Della Fera, Dave Mankins and Ed Moy. To run the Xclock, simply type xclock (use your Alt-F2 program launcher or the command line). By default, it doesn't show a second hand. To activate that, type xclock -update 1. This adds a second hand that updates every second.

The Xclock hasn't changed much over the years (why mess with success?), but that lack of change got Marc Singer writing his Buici clock, a simple, yet classy clock that does nothing other than show you the time with a nice, red, sweep second hand. For those who like a little more animation than just a sweep second hand, I recommend Kaz Sasayama's rglclock. This is a rotating 3-D Mesa/OpenGL clock that you can drag with the mouse to spin in whatever direction and at whatever speed you like. All three of these are shown in Figure 4.

Figure 4. Analog clocks come in many styles, from the classic Xclock on the left, followed by the simple but classy Buici clock in the center, and the spin-happy rglclock to the right.

Taking classy to a higher plane was surely Mirco Mueller's plan when he wrote Cairo Clock. Seriously, this is a gorgeous-looking clock with several different faces, 12- and 24-hour formats and more. To change a running Cairo Clock, right-click and a menu appears letting you change not only the look of the clock, but several other attributes as well (Figure 5). You even can change the size to whatever you like.

Figure 5. The highly configurable and beautiful Cairo Clock can be changed while it is running.

Although I've spent some time talking about analog clocks, there are some pretty cool digital clocks out there as well. One of my favorites is Jamie Zawinski's XDaliClock (Figure 6), a wonderfully strange digital clock where the numbers don't so much change, as morph. Second by second, and minute by minute, digits melt from one to the other. You'll be watching this one just to see the hours change as 59 minutes and 59 seconds approaches. Use the command xdaliclock -cycle, and you'll not only see the numbers morph, but the background color as well.

Tim Edwards' dclock, a modification of Dan Heller's original code, is a great digital clock that looks like the old seven-segment LED display clocks. dclock has a number of command-line arguments that let you set the date format, the color of the LED segments (both on and off) and more. For instance, typing dclock -date Today is %A, %B %d -fg yellow -bg brown -led_off brown4 generates the clock in the lower part of Figure 6. Furthermore, while the clock is running and your mouse pointer is inside the active window, you can change various settings with single keystrokes. For example, pressing the S key toggles the seconds display, R reverses the video colors and / increases the angle of the digits. Check the documentation for other one-key changes.

Figure 6. The very cool XDaliClock melts away the seconds, while dclock keeps somewhat more solid time.

All this talk of clocks just makes it more apparent that closing time is fast approaching. While François refills your glasses a final time, I'll leave you with perhaps the strangest clock of all, the aptly named UFOClock by Matt Wronkiewi (Figure 7), which is also very cool and worthy of some desktop space.

Figure 7. The UFOClock—timepiece or artifact left behind by an alien race?

The UFOClock displays the time of day, the phase of the moon, ratio of day to night, time to the beginning (or end) of twilight, and the time until the solstice or equinox. If you are asking, yes, I'm still trying to figure it all out. The distribution bundle comes with an example configuration file, so you can set the latitude and longitude of your home location (so you can tell the time of day).


White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState