Do you need to install anti-virus software if you’re running Windows in a virtual machine?

A friend of mine emailed me the other day:

I recently installed Windows 8 on my Mac as a virtual machine using Parallels. Do I need to install virus/security software to protect my VM?

Here’s my answer back:

Short answer: Yes.

Longer answer: Hell yes!

Longest answer: It’s Windows, ain’t it?

For anti-virus, I just tell people to install Microsoft’s free offering. It works well enough, it’s free, it auto-updates, & it doesn’t use an obscene amount of system resources.

How to fix an annoyance downloading music from Wolfgang’s Vault using a shell script & Alfred 2

I really like the music I can stream & download from Wolfgang’s Vault. It’s all live concert tracks from hundreds of great bands & artists, in a wide variety of genres: Rock, Blues, Country, Jazz, & Folk. For $3 a month (that’s nothin’!) I can stream as much music as I want, download concerts for $5 a pop, & in addition, I get to download two shows a week for free. All in all, quite a deal.

The only problem is that the default download app is a Java-based hunk o’ crap. It literally would never work for me, & would instead spin & spin. Finally I filed a bug with tech support, & I was told to try the legacy Mac download app, which does work. It only has two problems:

  1. I have to sign in. Every. Single. Time. Not a huge biggie. I use the mighty TextExpander to quickly fill in my email & my password, so that’s only mildly annoying.
  2. The app pukes two files into my home directory: cvdm.dat & cvdm.err. While the app is running, it also adds cvdm.pid, but at least that file is deleted when you quit the app. The other two stay behind, cluttering up my otherwise neat & organized home directory. And if you delete those two files, your Preferences are deleted as well. Lovely.

I finally got sick of those files staring at me every time I’m using Path Finder or, far more rarely, Finder. So I decided to write a shell script that would fix the problem. To invoke it, I use Alfred 2, but really, you don’t need it, as the shell script works just fine by itself. But if you use Alfred (or LaunchBar, or the fantastically wonderful Keyboard Maestro), you can call the shell script using it for that extra bit of laziness.

Optional: Install terminal-notifier gem

In the script you’ll notice that I use terminal-notifier, a Ruby gem that works with the Mac OS Notification Center. If you want to use it, you’ll need to install the gem first:

$ sudo gem install terminal-notifier

By the way, using it couldn’t be easier:

$ terminal-notifier -message "Message Text" -title "Message Title"

If you don’t want to use terminal-notifier, just remove those lines from the script (& the comments above them, of course).

The shell script: wolfgang.sh

In your ~/bin directory (yes, you’d better have one), add the following script:

#!/bin/bash

#===============================================================================
#          FILE:  wolfgang.sh
#         USAGE:  Run manually or invoked from Alfred 2
#   DESCRIPTION:  Manages Wolfgang’s Concert Vault Download Manager app
#                 & hides stupid files that are placed in ~/ & needed by CVDM
#        AUTHOR:  Scott Granneman (RSG), scott@chainsawonatireswing.com
#       VERSION:  0.1
#       CREATED:  04/27/2013 11:24:07 CDT
#      REVISION:  
#===============================================================================

case $1 in
  open)
    # Unhide files required by Concert Vault Download Manager
    mv /Users/USERNAME/.cvdm.dat /Users/USERNAME/cvdm.dat
    mv /Users/USERNAME/.cvdm.err /Users/USERNAME/cvdm.err
    # Open Concert Vault Download Manager
    open /Applications/Concert\ Vault\ Download\ Manager.app
    # Notification
    terminal-notifier -message "" -title "Wolfgang’s Vault is Open!"
    ;;
  quit)
    # Quit Concert Vault Download Manager
    kill $(ps aux | grep "[C]oncert Vault Download Manager" | awk '{print $2}')
    # Hide files required by Concert Vault Download Manager
    mv /Users/USERNAME/cvdm.dat /Users/USERNAME/.cvdm.dat
    mv /Users/USERNAME/cvdm.err /Users/USERNAME/.cvdm.err
    # Notification
    terminal-notifier -message "" -title "Wolfgang’s Vault is Closed!"
    ;;
  *)
    # Typo? 
    terminal-notifier -message "You must type either 'open' or 'quit'" -title "Need Correct Argument"
    ;;
esac

Replace the eight instances of USERNAME with your Mac OS username, save it, & make it executable (chmod 755 ~/bin/wolfgang.sh).

Side note: Some of my eagle-eyed readers may have noticed this line, which gives me the PID for the Download Manager app & then kills it:

kill $(ps aux | grep "[C]oncert Vault Download Manager" | awk '{print $2}')

“Hey,” they’re thinking, “why didn’t you just use cat cvdm.pid to get the PID? After all, the app generates that file only when it’s running, so surely it contains the PID, right?”

To which I reply, “Oh my gosh, you & I had the exact same thought! But guess what? It turns out that cvdm.pid is 0 bytes & doesn’t contain squat. How convenient! Hence my fallback on an old standby.”

At this point, you can stop & just use the script. To open the Concert Vault Download Manager (CVDM) & unhide those files it uses:

$ ~/bin/wolfgang.sh open

To close the CVDM & hide the files:

$ ~/bin/wolfgang.sh quit

That’s all well & good, but it’s too much typing. Let’s set up Alfred to make this quicker & easier.

The Alfred workflow

I upgraded to Alfred 2 the day it came out, & couldn’t be happier. It’s an excellent upgrade to an already fantastic product. It’s very different that the original Alfred, however, so if you’re still using that, you’re going to have to figure out how to set things up yourself (that said, it’s fairly close to what I’m doing here, so it’s not hard).

Open Alfred’s Preferences & go to Workflows. Create a new Workflow by going to + > Templates > Essentials > Keyword To Script.

In the list of Workflows you’ll see a new one: Keyword to Script, by Unknown. Double-click it to open its Details. Enter the following:

  • Workflow Name: Manage Wolfgang’s Vault Downloader
  • Description: Open or Quit Wolfgang’s Vault Download App
  • Bundle ID: com.granneman.wolfgang
  • Created By: Scott Granneman
  • Website: http://ChainsawOnATireSwing.com

For the icon, I searched Google Images for “Wolfgang’s Vault logo” & used one of the ones I found.

Press Save. It should now be named Manage Wolfgang’s Vault Downloader, by Scott Granneman.

Double-click on the Keyword input so it opens. Enter the following:

  • Keyword: wolf
  • Check the box in front of With Space
  • Select Argument Required from the dropbown menu
  • Title: Manage Wolfgang’s Vault Downloader
  • Subtext: Enter "open" or "quit"

Press Save.

Double-click on the Run Script action1 so it opens. Enter the following:

  • Language: /bin/bash
  • Escaping: Uncheck all
  • Script: /Users/USERNAME/bin/Music/wolfgang.sh {query}

Replace USERNAME with your Mac OS username & press Save.

Hover over the Keyword input until the little nub appears on its right side. Click on it & drag the resulting line to the little nub that appears on the left side of the Run Script action until they’re connected. It should look like this:

Wolfgang’s Vault Workflow in Alfred

If you don’t want to do all of the steps above, you can just download the workflow & double-click to install it. Be sure to double-click on the Run Script action & change USERNAME, though!

You’re finished! Time to test our new Workflow.

To open the Concert Vault Download Manager (CVDM) & unhide those files it uses, open Alfred (I use Command+Space2) & type the following:

wolf open

To close the CVDM & hide the files:

wolf quit

And there you go. I hope this shows a way to get around a particular annoyance that really shouldn’t exist at all. A little shell scripting, a little Alfred, & voilà! you can hide some sloppy work by others.


  1. Some of you Alfred 2 users may be wondering why I didn’t use the Terminal Command action instead. The reason: I didn’t want a new tab to open in iTerm 2, my terminal app of choice, every time I used this Workflow. 

  2. Yes, I know that’s the default for Spotlight. Once I started using Alfred years ago, I quickly realized that I would hardly ever need to use Spotlight directly again, so I re-mapped Command+Space to open Alfred. To open Spotlight, I use Alt+Space. 

Some links re: The Wall Street Journal on Apple

A person I’d never spoken with before emailed me today with a complaint about HP (I get these often because of a post I wrote years ago that got a lot of attention: HP’s Horrible, Unhelpful, Incompetent Tech Support and Service). I always enjoy reading the messages I get, & I try to help as best I can1.

I mentioned in my reply that I now use Macs. My correspondent replied in part:

But Apple apparently is in the same decline trend as HP, if not worse.

Huh? I wrote back:

Out of curiosity, on what do you base your idea that “Apple apparently is in the same decline trend as HP”?

Here’s what he told me:

Wall Street Journal articles. Apple has been losing money by the billions…a little bit more than HP…but from different processes. Apparently HP is due to bad investments/mergers and takeovers while Apple is due to bad CEO leadership or lack of since Jobs died.

My two accountants confirmed my WSJ interpretation of articles on Apple and HP.

Oh boy. I wrote back the following. I have no idea if it will make a difference.

Oh, that’s funny. The WSJ often does a really bad job reporting about Apple (& other companies too). I wouldn’t take what it say re: Apple to be good guidance.

Here are a few articles that explain what I’m talking about (the last one kind of sums it up):

Apple isn’t losing money at all. They have over $100 billion IN CASH. Their stock is going down, but that’s more due to weirdness in the stock market & a misunderstanding of Apple’s business by analysts. Stock going down != losing money.

So, while it might not be a good time to invest in Apple’s stock, it’s certainly as good a time as any for someone to look at buying an Apple product, if that would float your boat. It did mine. :)

People in the tech industry who follow Apple know when the Journal is spewing BS, but your average reader won’t. It reminds me of how I used to read Consumer Reports before I got into tech, & their reviews seemed to make sense. Then, after I was in this business for a while, I started realizing that their reviews of computers & phones were often completely full of crap2. But your average reader isn’t gonna know that at all.


  1. And based on all those emails I get, it’s still not a good idea to buy a computer from HP. I wouldn’t. No frickin’ way. 

  2. When it comes to reviews of refrigerators & cars & stoves, Consumer Reports is still great. But not computers & other such devices. 

The old Mac OS X is not UNIX canard

I’m on a mailing list for UNIX enthusiasts here in St. Louis, & a member posted this the other day:

I DO count MacOS X as UNIX. However, I know there are some of our users who object claiming that the fact that it is NOT completely Open Source disqualifies it from our respect.

I responded thusly:

Speaking as both a Linux and Mac user, Mac OS X is more UNIX than any Linux is. This is a fact.

From http://en.wikipedia.org/wiki/UNIX_03:

“The Single UNIX Specification (SUS) is the collective name of a family of standards for computer operating systems to qualify for the name “Unix”. The SUS is developed and maintained by the Austin Group, based on earlier work by the IEEE and The Open Group. … Beginning in 1998, a joint working group known as the Austin Group began to develop the combined standard that would be known as the Single UNIX Specification Version 3 and as POSIX:2001 (formally: IEEE Std 1003.1-2001). It was released on January 30, 2002. …

Darwin is an open source operating system: it is essentially the open source subset of Mac OS X. Darwin is compliant with the SUS 03. …

Linux aims to be compliant, but as certification is expensive, no Linux distribution has been registered as SUS compliant.”

(Of course, I consider Linux to be a variant of UNIX, as anyone with a brain does.)

Anyone who says that Mac OS X is not a UNIX is putting their biases before fact.

Open Source != UNIX. The two have absolutely nothing, strictly speaking, to do with each other.

Sorting table data with CSS & jQuery

I wrote up a tutorial for my students in Advanced Web Development: Sorting Tables with CSS & jQuery. From the intro:

Tables can be incredibly useful when they are used to display data, but what can be even more useful is the ability to sort the data in the table by columns. On this page we’re going to learn how to sort tables by simply clicking on the column headers. Click once to sort ascending (A-Z) and a second time to sort descending (Z-A).

To perform this magic, we’re going to use tablesorter.js, which builds off of jQuery.

I hope you find it helpful. My plan this summer is to write up about 20 of these one-page tutorials on a variety of subjects, so my students can work through them at their own paces. I think it will be good for everyone.

With great power comes the easy possibility of deleting all your files

Normally, when I want to use the find command to delete files, I do this:

$ find . -name foo -exec rm {} \;

Turns out I could also do this:

$ find . -name foo -delete

However, while investigating the -delete action, I read this in man find:

-delete
    Delete files; true if removal succeeded.  If the removal failed, an  error  message
    is  issued.   If -delete fails, find's exit status will be nonzero (when it eventu‐
    ally exits).  Use of -delete automatically turns on the -depth option.

    Warnings: Don't forget that the find command line is evaluated as an expression, so
    putting  -delete  first  will make find try to delete everything below the starting
    points you specified.

Well, sure, that really does make sense. Putting the -delete action where the expressions go would definitely cause a disaster. At the same time, you’d like to think that you might get warned first before find went ahead and nuked all your files. Two takeaways from this:

  1. UNIX doesn’t baby its users. If you tell your system to delete your files, by God, that’s what it’s going to do!

  2. Always test your particular find construction first before unleashing its full fury.

Recommended Reading 15

  • Poor in cages show dark side of Hong Kong boom
    “For many of the richest people in Hong Kong, one of Asia’s wealthiest cities, home is a mansion with an expansive view from the heights of Victoria Peak. For some of the poorest, like Leung Cho-yin, home is a metal cage. The 67-year-old former butcher pays 1,300 Hong Kong dollars ($167) a month for one of about a dozen wire mesh cages resembling rabbit hutches crammed into a dilapidated apartment in a gritty, working-class West Kowloon neighborhood.”
  • Tinkerer-in-Chief Bolts Times: Joe Sexton’s Innovative, Profane Reign
    “‘If you are not asking yourself every couple of years how to once more scare yourself to death, then you are living something of the coward’s life,’ he says. ‘Ain’t no room for cowards in journalism at this moment in time.’”
  • Death-defying self-portraits of falling
    “It’s an understatement to say photographer Kerry Skarbakka puts himself in perilous situations. He leaps from great heights–often a cliff or ledge–and then clicks the shutter. He photographs himself falling in a series titled The Struggle to Right Oneself. Using a clever combination of daredevil imagination, martial arts, and some rigging gear, Skarbakka captures that proverbial ‘point of no return,’ the space in between an action or an event, of scary mid-air suspension.”
  • The Lost Wolves of New England
    “Beef was considered the proper staple of a modern nation, however. With the introduction of so-called “industrial farms” for breeding horses and cattle, especially in the northern island of Hokkaido, wolves were re-categorized as evil predators, and Japan created “a culture of wolf hatred.” So efficient were the Japanese, with guns and traps and strychnine, that the last Japanese wolf was killed, near the beautiful ancient capital of Nara, in 1905, the same year in which the upstart nation won the Russo-Japanese War and took its place among the beef-eating world powers.”
  • How to Save a Dying Language
    “In a highly connected global age, languages are in die-off. Fifty to 90 percent of the roughly 7,000 languages spoken today are expected to go silent by century’s end. We live under an oligarchy of English and Mandarin and Spanish, in which 94 percent of the world’s population speaks 6 percent of its languages. Yet among threatened languages, Aramaic stands out. Arguably no other still-spoken language has fallen farther.”

The first day I used the Internet

A reporter asked me an interesting question a few years ago: “When did you first start using the internet? What for?” I wrote up my response, but then she ended up interviewing me on the phone, so I never sent it. While poking around in a folder on my Mac, I found it. It’s a good description of one of the most important moments in my life1, so here it is.

I started using the Net in 1995. I was teaching at Missouri Scholars Academy, and one of the speakers was a technologist named Alan November. He kept talking about this thing called “the Internet” that I had vaguely heard of, and the more he said, the more fascinating it sounded. At the time, I was also a grad student in English Literature at Washington University in St. Louis, and I knew that I had a free Internet account, so I decided to use that on my maiden voyage.

When I got home from MSA, I scraped together about $200 for a 14.4 modem (screamin’ fast at the time) and gathered together another $200 for 2 MB of RAM, bringing my Mac LC up to a whopping 4 MB of RAM total, which I thought was an insane amount. How could I ever need more?

Finally, after the modem and the RAM arrived in the mail, I hooked everything up early one Saturday afternoon, read the printed out instructions next to me, typed oh-so-carefully into my computer what seemed like utter gibberish, pressed a button, and … I was connected to the Internet!

12 hours later—yes, 12 hours—I finally signed off. I had done everything possible: participated in online forums debating current events, surfed to Gopher (think pre-Web) sites in Africa and Europe, downloaded software, sent email to the one person I could think of who had email, read literary resources stored on machines in universities all across America, and waaaaaaaaaiiiiiiiitttttttted for that 14.4 modem to make all those connections. My head was spinning. This was incredible! Amazing! It was going to change everything! There was no doubt in my mind: the Internet was going to revolutionize how we all lived, learned, and communicated.

I was bursting with excitement, pacing back and forth in my apartment, and I had to share this utter certainty with someone. Who could I call at midnight? Who would let me babble nonsensically about something that only a relatively few people had experienced, or even understood? Who would patiently listen as I mounted my soapbox, declaiming my utter certainly that the rest of our lives would be completely rewired—literally—by this phenomenon of the Internet?

My Mom, of course.

So I called my technophobic Mom at midnight—don’t worry, I’m not a bad son, as I knew she’d be awake sewing—and began talking as fast as I could, syllables stuttering out in my almost-manic excitement. I rambled on like a street preacher stoked with the Spirit for at least five minutes without a breath, detailing all that I had seen and done, and prophesying global changes that would dwarf anything we’d experienced before. Finally I paused and took in a breath. My Mom waited a beat and made her reply:

“That sounds very nice.”

She didn’t get it, of course. Not then. Nor did the teachers at the high school at which I was an English teacher. My friends? No comprehension. My girlfriend? Shrugs. But I was now filled with an evangelical urge to spread the word about the Internet. And I still have that fire in me today, lit over a decade ago over the span of a marathon 12-hour introduction to the Internet.


  1. OK, granted, not nearly as important as my marriages or the birth of my son or the deaths of parents & family & friends. But still pretty important! 

Recommended Reading 14

  • Global Slavery, by the Numbers
    “While slavery is illegal across the globe, the SumAll Foundation noted, there are 27 million slaves worldwide, more than in 1860, when there were 25 million. Most are held in bonded servitude, particularly after taking loans they could not repay. Slaves cost slightly more now, with a median price of $140, compared with $134 per human then. Debt slaves cost on average $60; trafficked sex slaves cost $1,910.”
  • Could a professional fighter survive an encounter with a fully grown healthy gorilla determined to kill him, without feigning death?
    No.
  • Spider-Man Turns 50: Why the Moody Teenage Webslinger Still Matter
    “Amazing Spider-Man #1 hit shelves 50 years ago, on March 10, 1963. Since then, Spider-Man has spawned four—soon to be five—big-budget movies, nine TV shows, a stage play, a radio drama partially masterminded by Brian Mays of Queen, a few dozen video games, and, of course, thousands of comic books and toys. He’s a major figure, and he deserves to be: Spider-Man redefined our idea of a hero by making superheroes a lot more relatable than they were before.”
  • John E. Karlin, Who Led the Way to All-Digit Dialing, Dies at 94
    “By all accounts a modest man despite his variegated accomplishments (he had a doctorate in mathematical psychology, was trained in electrical engineering and had been a professional violinist), Mr. Karlin, who died on Jan. 28, at 94, was virtually unknown to the general public. But his research, along with that of his subordinates, quietly yet emphatically defined the experience of using the telephone in the mid-20th century and afterward, from ushering in all-digit dialing to casting the shape of the keypad on touch-tone phones. And that keypad, in turn, would inform the design of a spate of other everyday objects.”
  • The Meat Industry Now Consumes Four-Fifths of All Antibiotics
    “Note that that while human antibiotic use has leveled off at below 8 billion pounds annually, livestock farms have been sucking in more and more of the drugs each year—and consumption reached a record nearly 29.9 billion pounds in 2011. To put it another way, the livestock industry is now consuming nearly four-fifths of the antibiotics used in the US, and its appetite for them is growing.”