Tips and tricks for using ImageMagick on Linux

Friday, November 9, 2007

There's nothing quite like command-line tools for handling large batches of tasks, and image manipulations are no exception. Web developers and administrators will appreciate the ability to handle large numbers of files easily, either at the command line or in scripts. The author presents more examples of the ImageMagick suite, this time demonstrating how to put curved corners, logos, or frames and borders on your images, as well as how to convert to and from multipage file formats including Adobe's PDF format.

How to build your own Linux distribution

Go to the source to learn Linux basics and build the right Linux for you. Linux From Scratch (LFS) and its descendants represent a new way to teach users how the Linux operating systems work. LFS is based on the assumption that compiling a complete operating system piece by piece not only teaches how the operating system works but also allows an independent operator to build systems for speed, footprint, or security.

Apple's "Time Machine" Now For Linux...

Wednesday, November 7, 2007

Apple's Time Machine is a great feature in their OS, and Linux has almost all of the required technology already built in to recreate it. This is a simple GUI to make it easy to use.
"Apple's 'Time Machine' is cool, but I use Linux, not MacOSX. So here is a Linux implementation (built off of rsync, of course). No fancy OpenGL, but quite functional none-the-less."


New Parental Controls Limit Xbox Time

As part of a new marketing blitz to promote the Xbox 360 as a "family friendly" video game console, Microsoft on Wednesday rolled out a new feature called Family Timer, which will show up in the Family Settings Screen.

The Timer will let parents limit the number of hours their kids can play the Xbox on a daily or weekly basis. When the time limit is reached, the console will automatically shut off, ostensibly after saving the game.

Microsoft says that more than 90 percent of parents placed restrictions on gaming, and over half the parents surveyed said they would use a timer if it was available. In conjunction with the new feature, the Redmond company is joining with the National PTA to encourage parents to talk with their kids about "screen time."

"The campaign is designed to educate parents on the tools and resources available that can help them manage their family's media use," explained Robbie Bach, president of Microsoft's Entertainment and Devices Division. "The main program was a 20-city bus tour where we visited with parents and showed them how to use the controls on the Xbox 360 and Windows Vista, and with kids showing them that there are fun games for all ages."

The Family Timer feature is already found in Windows Vista in order to limit the time kids can spend in front of the computer. The previously available parental controls in the Xbox 360 largely revolved around which time of games were allowed to be played based on rating.

My todays favourite pick from digg

CinemaNow and Sonic Try DVD Copying Despite CSS Headaches

Digital entertainment download service CinemaNow has announced a partnership with Sonic Solutions' QFlix, to develop a system which enables burning of protected DVDs that promise to be identical to those available off the shelf, with one very big catch.

CinemaNow holds protection of DVD copyrights high in its list of priorities. It had previously offered a download-and-burn service, though copied discs intentionally included a kind of defect that was supposed to protect against further copies. That defect defeated those copies to the extent that they did not even play on many DVD players.

Changes to the CSS license were recently approved by the DVD Copy Control Association, making it possible for licensed services to legally burn DVDs, a development which follows CinemaNow's business model perfectly. As a result of a court order, CinemaNow's and Sonic Solutions' joint development should not have to carry the copy-defeating mechanism.

But as a result of studios' ability to adjust the definition of "managed copy" when necessary, new language may be added to the CCA license that would create a situation where DVD copying is technically legal, but also highly improbable. The technicality is that managed copies could be made, but only played if an original resides in the player alongside a copy.

Adding insult to the injury of CinemaNow's adoption is that the downloaded material cannot even be burned on any presently available hardware. This means that CinemaNow's partnership with Sonic, barring other circumstances, would still not yield any fruit until ,someone releases an appropriate CSS-enabled burner and DVD-Rs.

Unity game engine updated for Leopard

Tuesday, November 6, 2007

Unity Technologies has announced the release of Unity 3D 2.0.1, an updated version of their 3D game design engine for Mac OS X. The free update for registered 2.0 users is ready for download.

The software runs on Mac OS X but enables developers to deploy across multiple platforms, including Mac OS X, Windows and the Web. It incorporates an integrated editor, asset importing, shadow and light support, optimized graphics for both OpenGL and DirectX, terrain modeling, shaders, scripting support, networking, physics, audio and video support and asset management.

New to the 2.0.1 release is support for Mac OS X v10.5 “Leopard,” along with some necessary documentation updates that “enhance the documentation for both pre-existing and new features introduced with the initial Unity 2.0 release,” according to the developers.

Unity 2.0 is available as a trial version download. It costs $199 for the “Indie” license and $1499 for the “Pro” license, which includes Asset Server. Upgrades from 1.0 start at $99.

Evolution of apple [pic]

A visual created to show the evolution of most all Apple products created over the past 30 years. This was created to show the evolution of the form factor and industrial design of the products, not to show every single model or upgrade Apple has launched.

Click here to view a “really” big image

Ipod saves Soldier's Life

The back of the Ipod.

Critical update***********************
I have talked to Kevin and he has told me the real story of getting shot in the iPod.

The Armor stopped the bullet. Kevin didn't know he was shot. The iPod was how he found out.

The full story:
iPod tells soldier he was shot - the real story

Photos sent to me by my friend Danny with this caption:

My wife’s uncle works in a military hospital and told me about this. Its pretty amazing. Kevin Garrad (3rd Infantry Division) was on a street patrol in Iraq (Tikrit I believe) and as he rounded the corner of a building an armed (AK-47) insurgent came from the other side.

The two of them were within just a few feet of each other when they opened fire. The insurgent was killed and Kevin was hit in the left chest where his IPod was in his jacket pocket. It slowed the bullet down enough that it did not completely penetrate his body armor. Fortunately, Kevin suffered no wound.

I thought it was a great story so I posted them here.

Mozilla's Prism now available for Linux too

The Mozilla Prism project, which seeks to more closely integrate desktop and web applications, made its first release on 24 October, but only for the Windows platform. The Linux community reacted as one would expect. Mozilla has now announced the availability of a Linux version. Mac OS X support has been added as well.

Google rallies allies in open Linux phone initiative

Google and 33 other companies have announced an ambitious industry alliance that will maintain a completely open source mobile phone stack. The Open Handset Alliance (OHA) says phones based on its Linux-based "Android" stack will reach market in as soon as eight months.

The Android stack is based on "open Linux kernel," the group says. It also includes a full set of mobile phone application software, in order to "significantly lower the cost of developing and distributing mobile devices and services," OHA said.

The stack appears to have been created by Android, a mobile phone software house that Google acquired just over two years ago. The Android stack's name is apparently a reflection of co-founder Andy Rubin's fondness for robots. Rubin previously co-founded Danger, a software house that continues to provide software for the Sidekick "hiptop" marketed by T-Mobile.

Few real technical details about the Android stack are available at this point; however, an "early access" version of the Android SDK is being prepped for release on Nov. 12, the OHA said. The stack will be licensed under "one of the most progressive, developer-friendly open-source licenses," according to the fledgling organization.

In taking on not only the Linux kernel and middleware layer, but also the application stack, the OHA appears to have more ambition than earlier industry groups, such as the kernel-oriented LiMo Foundation, and the middleware-oriented LiPS (Linux Phone Standards Forum) and OMA (Open Mobile Alliance) initiatives, among others. In terms of its licensing and scope, the OHA's Android stack may more closely resemble Trolltech's Qtopia Phone Edition and FIC's OpenMoko projects.

The truth about the linux desktop market share

To understand the markets you have to know something about magicians, and how they work.

The magician will typically flourish something or gesture expansively with his right hand, while surreptitiously moving his left hand inside his jacket to remove or hide the next object to be palmed, so the trick with magicians is never look at what they want you to look at, and all of a sudden everything becomes quite clear, it is not magic, it is pop psychology, body language and misdirection.

You have to do the same thing with Linux on the desktop, comparing Open Office to MS Office is like watching the hand that the magician wants you to watch, you'll never get the trick and most importantly you'll never grok that the trick is social engineering, not magic.

I'll cite a case in point.

A few weeks ago a co-worker expressed an interest in buying a computer, going on the internet, etc.

As you do, I politely offered to help out.

I have enough bits lying around to have built him a pretty decent computer, around the 2.5 GHz CPU mark, none of it proprietary components, and I could have installed Linux (prolly Mepis, my personal favourite) or a warezed copy of XP+SP2 if he wanted to play games, maybe even dual boot.

Given current exchange rates I could have done this for about 100 US bucks, maybe 200 if we threw in a new fast hard disk and some new RAM, was he interested? no...

What he was interested in, and what he did, was go to Pissy World, and take out a credit agreement on an in-house branded piece of overpriced junk, which naturally enough came preinstalled with windows and and bunch of other rubbish.

If you think this was about buying a computer, or choosing between Operating Systems, then like the OLPC crowd, you are watching the magicians wrong hand...

This is about MONEY, more specifically debt, which is just another way of saying "power" and "influence" and "control"

The actual money doesn't matter, the money is just a vehicle, and what that vehicle provides is another individual with another lieu to big business, in addition to his rolling mobile phone contract and so on, he now has become entwined into a credit contract for some hardware and software which itself becomes a rolling upgrade contract cycle.

In this scenario where the actual money doesn't matter, all you need to do is ensure that the ticket price is high enough that the preferred method of entry is through the preferred turnstile, eg engaging in said rolling contractual relationships.

0.00 US$ Linux distros don't cut it, there is no "leverage" to be used there against the consumer, free as in beer or free as in speech discussions still don't really address this issue, they are still watching the magicians wrong hand.

For linux to enter the year of the linux desktop that we have all been waiting for, linux will have to be transformed, from free beer / speech into something that can be leveraged into a price point where the customer ostenibly has a choice between paying the ticket price in cash, but is penalised for this and encouraged to enter instead into the rolling contractual relationship.

The "free" computers idea that gets resurrected every now and again is an example of why linux fails, the idea there was that the users eyeballs would pay for and leverage the component cost of the equipment, it never stood a chance, because it was competing against a model where everything else, and I mean EVERYTHING from banks through credit card companies through insurance / warranty deals through hardware and microsoft all played the consumer into "voluntarily" signing up for the rolling contractual relationship business model, in which they become an asset which is tracked and analysed and traded and manipulated.

Linux will make it to the desktop along with the free PC and DN Forever, eg never.

Having said that, Linux adoption will continue, just as people like myself who have no mortgage, no overdraft, no hire purchase, no credit card debt, and no other rolling contract debts, like using linux wherever possible, because it is free not as in beer or speech, but free as in not leveraged against me, there will always be a core of people who feel this way, linux becomes what Karl Marx would have described as a "Political" choice, the workers control the means of production.

Microsoft et al like to stylise Linux and open source as a dangerous virus, we are talking about a subversive communist operating system and software, not a good old american capitalist one (capitalist doesn't mean monetary profit, capitalism means using monetary profit to leverage control, the money is the magicians right hand, control is his left, the one palming the cards) which means free software is dangerous, the enemy, a disease that in itself has no power, but which if it was allowed to eat into market share could sap the power and leverage of the incumbent market choices...

Linux is fairly safe and "benign", only those with market leverage and power can bring it to a point where it seriously impacts the incumbents, and by exercising that leverage you are by definition depleting your leverage and transferring all your power back to the individuals... not going to happen, not while there are capitalists in the same market to feed upon the prey.

Windows is a capitalist OS.

Linux is a anarcho syndicalist OS.

Mac is a communist OS.(chairman jobs' little red book)

PS3 etc is socialist.

10 Advantages of Ubuntu over Vista

Monday, November 5, 2007

I converted from Vista to Ubuntu a little over 2 months ago and am soooooo happy with it, best decision of my life. I am going to tell you my top 10 advantages of it over Windows Vista. Please remember these are my own opinions, if you have more advantages and indeed any disadvantages (if you can find any) then please post them as comments.

1) Eye Candy
If I am completely honest, the biggest reason why I converted was the eye candy. Sure Windows Vista comes with lots of it, but it just isn’t as good. Ubuntu 7.04 comes with just a few of the effects seen a lot nowadays, these effects include the rotating cube desktop and wobbly windows, it just makes it much nicer to use. I have installed Beryl on my computer to give much more eye candy. I base a lot of my judgments on looks first, features later.

2) Easy to Install Applications
Installing new programs in Ubuntu is a doddle, far easier than in Windows, because there is one program that basically gives you access to most applications available to Ubuntu, simply click the program you want and it will install, you don’t need to accept agreements because its all open source so there is no need to click Next 20 times before the program is installed. Simply select the program and click OK, wallah! done.

3) Secure
In Windows Vista, to change a setting requires a ridiculous amount of dialog boxes and passwords, in Ubuntu, you are never logged in as an administrator (root), you are logged in as a simple user, you can change options that are only applicable to your user area but for changing options that affect the system you are required to input the administrator password, one dialog and you’re in, simple and secure. There is also the added bonus that there are very few viruses for Linux, I haven’t ever come across one yet so you can feel safe, imagine not having any virus protection software installed in Windows, there is no need for it in Linux, freedom from the threat of losing all your data.

4) Easy to change options
Ubuntu comes with a control panel but also comes with a menu next to the Applications menu where you simply select the thing you want to change, be it the Desktop background or the network settings. Everything on the windows that appear is simple and there are just the options you need so it is easy to change the options.

5) Community
The community behind Linux, especially Ubuntu is what attracts many people to the operating system. People in the Linux community are mainly ex-Windows users so they know what it feels like to be new to an operating system, so they are happy to help. Whenever I had and have a problem with Ubuntu I simply post on the Ubuntu forum and within minutes there are answers to the problems. I never got put on hold or had to phone up customer service and wait for hours if I had any problems.

6) Free
Everything about Ubuntu is free, the operating system (you can even have them send you a free copy of the operating system, they even pay the postage charges), the software installed is free (including all the software you can download) any help and support is free. The whole experience is 100% free, because it is open source. Open source means that you can distribute and even edit the code behind the program.

7) Simple Networking
The other day I was amazed with how easy it was to connect my Ubuntu laptop to my Windows XP PC. I simply plugged in my laptop to the network hub and it immediately connected with no problems, I didn’t even have to configure it.

Mozilla Firefox
OK, I know that you can use Firefox on Vista as well, but on Ubuntu, there is no Internet Explorer that keeps popping up and cant get rid of. Mozilla Firefox is the number one web browser (remember, my opinions).

9) Fast
Windows Vista is slow and takes up a lot of resources which means you need a pretty decent computer to run it, I know with my 1GHz computer with 512MB of RAM it was too slow to work with. Ubuntu is just fast, it doesn’t slow down in performance when it has been on for a couple of hours, it just keeps on going and everything opens literally a second after you click the icon, and closes when you click the X, with Windows Vista you have to wait for like 30 seconds before a program starts and try shutting down a program like Word 2007 or Visual Studio after using it for a couple of hours, it takes forever.

10) Updates
Ubuntu gets updated every 6 months, well as close as it can do, and whenever I turn my computer on there are updates for the programs installed. Compare that to Windows, how often does that get updated, well the 5 years between Windows XP and Vista sort of answers that question.

So there you go, my top 10 advantages of Ubuntu over Windows Vista. As you can probably see I am very much into Ubuntu so obviously I am going to make Windows Vista look really bad compared to it, but it didn’t take much work to do that, so what does that say? Windows Vista is for some people and good luck to them (or you, if that is you), but Ubuntu offers a worthy alternative for all. Please leave your comments, I would like to hear from you.

Leopard spotted with more problems

Following shortly after installation issues, more problems are arising about Apple’s newly released OS X upgrade. Leopard, which came hailing hundreds of new features apparently has some features Apple failed to disclose. Heise Security, a private UK security firm, has found multiple leaks in the Leopard firewall that may give viruses and other malware direct access to your system.

One major issue is that when upgrading, even users who had the firewall activated on their previous install will find it deactivated once they fire Leopard up. Worse than that is that even once activated, the Leopard firewall has many holes that can allow outside sources to access both system data and user data.

The Apple firewall, similar to newer versions of Windows firewalls, is also capable of ground-level virus scanning. Unfortunately the Leopard firewall failed to detect viruses that infiltrated the system while the firewall was disabled, even after it was reactivated. Basically, users who haven’t noticed their firewall deactivated may potentially already be infected with malware that won’t be caught by Apple’s software, even after you reactivate it.

This isn’t the first time OS X has had serious security flaws. It has always had comparatively sub-par virus protection, and companies that provide additional virus scanning software don’t tend to focus on OS X nearly as heavily as Windows. This could be due to a few things – not the most subtle of which is market share.

Though Apple has made great advancements in the market since OS X was first released and has been gaining popularity even more rapidly since the company partnered with Intel, it still doesn’t have anywhere close to the saturation of Windows. OS X holds around 6.5% of the OS market currently, with all versions of Windows holding over 90% (statistics sourced from here).

Apple fans will always bring up two points to establish OS X’s seniority over Windows: how foolproof it is to install, and how secure it is. In the last few days we’ve seen news contradicting both of these points.

JACK Sync: A Primer For Linux Users

Recently I've been working with the transport synchronization capabilities of the JACK audio server. This article is a report on those capabilities as tested with a variety of Linux audio applications under the JAD and 64 Studio distributions.

JACK: The 1-minute Profile

By now everyone in the Linux music and sound world has heard about Paul Davis's JACK audio server and transport control system. By way of introducing this article and for the benefit of the remaining few people who don't yet know about it I'll briefly review JACK's more salient characteristics.

JACK's name is a recursive acronym for "JACK audio connection kit". The kit provides a system for freely connecting independent audio data I/O points, thus allowing the audio output from one JACK-savvy application to be sent to the audio input of any other JACK-aware client. The system supports multiple connections to and from any audio I/O points, and all data streams are synchronized to sample-accuracy.

As a sound server, JACK operates between the low-level sound system drivers and any JACK-aware client applications, managing the flow of multiple freely interconnected audio data streams. The system has been designed for professional use, and it has become an expected feature in Linux audio software. JACK has been extended recently to handle MIDI data streams in sample-sync with its audio I/O, an especially exciting development for those of us who await a MIDI-capable Ardour.

JACK was also designed from the start with a transport control system that would synchronize the operation of any subscribed clients, and that system is the focus of this article.

Synchronization: A Little Background

In the sound and music software world, synchronization typically refers to the precise timing of audio events with video, MIDI, and other event streams. Accurate synchronization of audio and video events is a critical part of movie production. Sounds must occur at the precise times of their associated visual cues, and our aural acuity will notice very quickly when sound and image don't correspond. What seems to be a simple problem turns out to be a complicated procedure, thanks to the different timebases used for audio and video, hence the need for some means of synchronizing disparate event streams.

In Ye Olden Tymes film composers calculated event correspondences with stopwatch and pencil. They let machines do the math now, but there is still a need to understand synchronization arcana such as the variety of SMPTE frame rates and how to successfully utilize MTC.

The advent of the MIDI sequencer ushered in an new crop of synchronization problems and solutions. First, sequencers and drum machines needed to be synchronized with each other (or with other sequencers and drum machines), hence the development of various MIDI synchronization protocols such as frequency shifted keying (FSK), song position pointer (SPP), and "smart" FSK sync. Next, the MIDI studio wanted to integrate with the tape studio. Since most tape recording studios already used SMPTE timecode as a synchronization solution it seemed only natural that the MIDI studio should adopt SMPTE as well. The original MIDI specification made no provision for carrying SMPTE timecode signals over a MIDI cable, so the spec was eventually extended to define an encoding of SMPTE into what is now known as MIDI Time Code (MTC).

The marriage of the MIDI sequencer and the hard-disk recorder brought in another synchronization headache. Computer-based recordists quickly discovered that the timing of audio tracks and MIDI tracks tended to drift apart after a few seconds of simultaneous play. This problem prompted the development of solutions for synchronizing audio and MIDI tracks within the same application, paving the way for the development of the modern audio/MIDI sequencer.

The JACK Transport Control System

The ability to manage multiplexed audio I/O is impressive, but it isn't worth much during recording or playback if the various tracks, channels, and streams don't stay in time with one another. To make that happen, JACK supplies a transport control subsystem. The system provides sample-accurate synchronization of streaming audio I/O, and any client that supports the JACK transport control can operate or be operated by any other similarly aware client. In a typical scenario where two or more applications agree to use the JACK transport control, any client can behave as the control master, thus eliminating the need to designate a master client. The transport timebase (i.e. the musical tempo) is set and maintained by only one of the clients, but it remains in effect regardless which application acts as the master control.

This transport control system is an integral component of JACK, and it is completely transparent at the user level. No extra software is required: When you load the jackd daemon you've loaded the transport control system as well. The client application's transport UI is used as it would be without JACK, and the user has no contact with the system's underlying details.

Space limits forbid an in-depth discussion of those details here, but interested readers can find full technical documentation of the system on the JACK Web site at Developers of audio and MIDI software for Linux and OSX are especially welcome and are encouraged to integrate JACK support into their own software.

JACK Sync In The Studio

Synchronizing with JACK is usually a straightforward process. My first example is typical: I started QJackCtl, Rui Nuno Capela's excellent GUI for controlling JACK, then I started the latest MusE sequencer (version 0.9) with no special options. MusE recognized JACK instantly, and I could control the start/stop and rewind/fast-forward functions at any time from either QJackCtl or MusE.

Figure 1: JACK sync with QJackCtl and MusE

Next I tried synchronizing Ardour and the seq24 MIDI sequencer. Seq24 works in two edit modes, a pattern composer and a performance arrangement editor (seq24's Song Editor), and it is designed to operate in only one of those modes at any time.

Figure 2: Configuring seq24 for JACK sync

Seq24's Files/Options dialog includes the JACK Sync tab seen in Figure 2. Unlike MusE, seq24 has a variety of options to condition its behavior with JACK. Each option works as reported by the tooltips help: JACK Transport enables seq24's status as a peer client, Transport Master attempts to set seq24 as the master controller, and Master Conditional will set seq24 to master status only if there is no other master defined elsewhere. The Live and and Song mode buttons determine which mode JACK will control (it can only do one at a time), and the Connect/Disconnect bars should be self-explanatory.

Figure 3: Ardour syncs with seq24

This example also illustrates how JACK handles different transport capabilities. By design, seq24 has no manual rewind controls, it automatically rewinds the pattern or song back to its beginning (or to the start of a designated loop in the Song Editor). The start/stop controls work perfectly, as does the autorewind, yet it also behaves as expected when controlled by the rewind buttons in Ardour or QJackCtl. Figure 3 shows off this synchronized network in action, with QJackCtl acting as the master transport control while Ardour records the audio output from QSynth (as played by the JACK-sync'd seq24). Yes, it's cool and a lot of fun.

My next experiment put Ardour in sync with a video display utility named xjadeo. Xjadeo was designed as a video monitor "assistant" specifically for the synchronization of audio samples with video frames. It is definitely not intended for general-purpose video file playback.

Figure 4: Video sync with Ardour and xjadeo

As previously, I set Ardour's sync status to JACK and Time Master, then I started xjadeo with this command line :

xjadeo -i 3 foo.avi

Xjadeo's bare appearance (Figure 4) conceals a powerful helper application. Its feature set includes various controls for frame rate and timecode display (the -i switch), color equalization controls, and the capability to sync via MTC (MIDI Time Code) instead of JACK. Again, space forbids a complete presentation of xjadeo and its features, but considering its price (free) and availability (free) you could just check it out for yourself.

The experiment was once again anticlimactic. Everything worked as advertised, I could control xjadeo's transport from either Ardour or QJackCtl to sync the audio and video streams, and I was a happy fellow. Even in my simple test it was easy to see how the program could be put to serious use.

For my last test I connected the audio output from the Hydrogen drum machine into an audio recording track in the Rosegarden sequencer. As usual, QJackCtl was also employed.

Setting Hydrogen for JACK sync is easy enough. Make sure the audio driver of choice is JACK (in the Tools/Preferences dialog), then click the JACK Trans button in Hydrogen's track display (see Figure 5). That's it, Hydrogen will now behave as the transport master or slave.

Figure 5: Rosegarden records Hydrogen

Setting up Rosegarden requires more navigation, but the process is equally straightforward. Go to the Settings/Configure Rosegarden panel, click on the Sequencer Settings icon, then select the Synchronization tab. Set the JACK transport mode to Sync, apply the changes, then click OK (Figure 6). Now Rosegarden shares JACK transport peer status with Hydrogen and QJackCtl.

Figure 6: Configuring Rosegarden for JACK sync

And yet once more it all worked as advertised. One extra step was added: I had to manually connect the stereo outputs from Hydrogen to the inputs for the Rosegarden track, a trivial task quickly completed in QJackCtl's audio connections panel. I also had to start from Rosegarden if I wanted to record the drum track. Alas, the sequencer's Record status is not available to the transport control.

JACK vs. ReWire

JACK is sometimes referred to as the Linux equivalent of ReWire, an audio/MIDI connection and transport protocol for Windows and Macintosh sound and music software. I have no Windows system here at Studio Dave, but a comparison of features revealed that JACK and ReWire indeed share some common design concerns. Both provide audio routing with flexible I/O and a master transport control system, and both are freely available. However, ReWire is available free of charge only to developers of proprietary software. JACK is GPL'd open-source free software, available at no charge to anyone, anywhere, anytime.

JACKing Out

At the start of this article I referred to "Paul Davis's JACK". Paul is indeed the chief architect and head honcho in charge of JACK, but his software has become the work of many hands. Its thriving development community ensures JACK's maintenance and further evolution: MIDI support is already available in versions >= 0.103.00, JACK for OSX exists now, and a rumored Windows port may yet see the light of day. Speaking personally, I'd like to see more applications incorporate the JACK transport control. For example, the LiVES video editor supports the JACK audio server, but it would be very cool if it also supported the transport control. Video editors are a natural choice, but other audio applications such as trackers and soundfile editors might make good candidates for JACK sync.

10 Linux commands you’ve never used

It takes years maybe decades to master the commands available to you at the Linux shell prompt. Here are 10 that
you will have never heard of or used. They are in no particular order. My favorite is mkfifo.

pgrep, instead of:

# ps -ef | egrep '^root ' | awk '{print $2}'
You can do this:
# pgrep -u root

2. pstree, list the processes in a tree format. This can be VERY useful when working with WebSphere or other heavy duty applications.

# pstree
| |-kacpid
| |-kauditd
| |-kblockd/0
| |-khelper
| |-kmirrord
| `-2*[pdflush]

3. bc is an arbitrary precision calculator language. Which is great. I found it useful in that it can perform square root operations in shell scripts. expr does not support square roots.

# ./sqrt
Usage: sqrt number
# ./sqrt 64
# ./sqrt 132112
# ./sqrt 1321121321
Here is the script:
# cat sqrt
if [ $# -ne 1 ]
echo 'Usage: sqrt number'
exit 1
echo -e "sqrt($1)\nquit\n" | bc -q -i

4. split, have a large file that you need to split into smaller chucks? A mysqldump maybe? split is your command. Below I split a 250MB file into 2 megabyte chunks all starting with the prefix LF_.

# ls -lh largefile
-rw-r--r-- 1 root root 251M Feb 19 10:27 largefile
# split -b 2m largefile LF_
# ls -lh LF_* | head -n 5
-rw-r--r-- 1 root root 2.0M Feb 19 10:29 LF_aa
-rw-r--r-- 1 root root 2.0M Feb 19 10:29 LF_ab
-rw-r--r-- 1 root root 2.0M Feb 19 10:29 LF_ac
-rw-r--r-- 1 root root 2.0M Feb 19 10:29 LF_ad
-rw-r--r-- 1 root root 2.0M Feb 19 10:29 LF_ae
# ls -lh LF_* | wc -l

5. nl numbers lines. I had a script doing this for me for years until I found out about nl.

# head wireless.h
* This file define a set of standard wireless extensions
* Version : 20 17.2.06
* Authors : Jean Tourrilhes - HPL
* Copyright (c) 1997-2006 Jean Tourrilhes, All Rights Reserved.
# nl wireless.h | head
1 /*
2 * This file define a set of standard wireless extensions
3 *
4 * Version : 20 17.2.06
5 *
6 * Authors : Jean Tourrilhes - HPL
7 * Copyright (c) 1997-2006 Jean Tourrilhes, All Rights Reserved.
8 */9 #ifndef _LINUX_WIRELESS_H

6. mkfifo is the coolest one. Sure you know how to create a pipeline piping the output of grep to less or maybe even perl. But do you know how to make two commands communicate through a named pipe?First let me create the pipe and start writing to it:

Then read from it:

7. ldd, want to know which Linux thread library java is linked to?

# ldd /usr/java/jre1.5.0_11/bin/java => /lib/tls/ (0x00bd4000) => /lib/ (0x00b87000) => /lib/tls/ (0x00a5a000)
/lib/ (0x00a3c000)

8. col, want to save man pages as plain text?

# PAGER=cat
# man less | col -b > less.txt

9. xmlwf, need to know if a XML document is well formed? (A configuration file maybe..)

# curl -s '' > bcc.html
# xmlwf bcc.html
# perl -i -pe 's@
@g' bcc.html
# xmlwf bcc.html
bcc.html:104:2: mismatched tag

10. lsof lists open files. You can do all kinds of cool things with this. Like find which ports are open:

# lsof | grep TCP
portmap 2587 rpc 4u IPv4 5544 TCP *:sunrpc (LISTEN)
rpc.statd 2606 root 6u IPv4 5585 TCP *:668 (LISTEN)
sshd 2788 root 3u IPv6 5991 TCP *:ssh (LISTEN)
sendmail 2843 root 4u IPv4 6160 TCP badhd:smtp (LISTEN)
vsftpd 9337 root 3u IPv4 34949 TCP *:ftp (LISTEN)
cupsd 16459 root 0u IPv4 41061 TCP badhd:ipp (LISTEN)
sshd 16892 root 3u IPv6 61003 TCP> (ESTABLISHED)
Note: OpenBSD 101 pointed out that “lsof -i TCP” a better way to obtain this same information. Thanks!Or find the number of open files a user has. Very important for running big applications like Oracle, DB2, or WebSphere:

# lsof | grep ' root ' | awk '{print $NF}' | sort | uniq | wc -l

Note: an anonymous commenter pointed out that you can replace sort | uniq with “sort -u”. This is true, I forgot about the -u flag. Thanks!