Archive for November, 2008

My Wordpress Spam Troubles Are Over!

About a week ago someone had posted a comment on my blog in reply to my “Is Ubuntu Family Friendly” post, and by accident I marked it as spam.  This is common for people like me who have installed the Wordpress software on their servers, but never have actually signed up for an account with Wordpress or installed any third-party spam management plugins.  People like that (like me) would end up getting anywhere from 15 to 40 of the most absurd spam comments posted to their blog for review on a daily basis.  Because you actually want genuine comments to appear on your website, you sit down and go through all the comments and end up getting into that habit where you hover your mouse over the same part of the screen and then repeatedly click over and over without moving anywhere else.  Do it too quickly, and you’ll end up clicking “Spam” on stuff you don’t want to mark as spam.

While googling for a solution to recovery the comment I accidentally tossed into my Wordpress database purgatory, I found a cool spam management plugin called Akismet.  You can download it from www.akismet.com.  This little thing has a lot of really cool features, including pie-charts and line-graphs showing statistics about the daily spam and “ham” (real comments) submitted to your blog.  And for once, I almost never ever see 40+ spam messages a day waiting to be trashed.  Not to mention the fact that you can very easily recover comments you didn’t mean to mark as spam in the first place.  If you’re a user of Wordpress, I highly recommend this little plugin.  The only slight drawback is that you have to sign up for a free account with Wordpress.com, but that only takes a few minutes and I’d bet that most of you out there have already done this.  Blog on!

Sunday, November 30th, 2008

Virtualbox/VMware Kernel Update Pow-wow

For the last couple of months I have been under the impression that the DKMS package that was developed by Dell and included with Ubuntu 8.10 was going to take care of all our worries regarding Linux Kernel header modules.  One of the biggest annoyances I’ve had to put up with ever since I started using virtualzation software (like VMware Server and Sun Virtualbox) is the fact that after a new Linux Kernel came down the wire, I would have no choice but to open a terminal window and run a command to manually recompile Kernel headers.  I’ve been telling people for weeks, “Yeah, 8.10 does it all for you automatically.  No need to mess with the terminal anymore.”  To my surprise yesterday I downloaded the latest updates including a new Kernel, and yet I still had to recompile my Virtualbox kernel headers.  (By the way, this kernel update patched a security vulnerability that was found the day before, but now it’s fixed.  24 hours to fix a hole = lots of envy from Windows users).  I’m waiting for someone to reply to a post I put up in Ubuntu forums about this to find out what’s going on, but in the mean time here’s what you need to do to fix your VM software:

Virtualbox:

Open a terminal window and paste in the following text:

  • sudo /etc/init.d/vboxdrv setup
You’ll be asked to enter your admin password and that’s about it.

After about 30 seconds or so it should be finished and your Virtualbox should be back to normal. Whew!

VMware Server:

Open a terminal window and paste in the following text:

  • sudo vmware-config.pl -default
If all goes well, VMware Server should be up and running as it was before the updates.  If it’s not, you might want to reinstall VMware.  The best way to do that is to uninstall it with this command:
  • sudo vmware-uninstall.pl
And then follow this guide to reinstall (This guide is for versions 1.0.7 and 1.0.8).

Saturday, November 29th, 2008

Is Ubuntu Family Friendly?

Yesterday while I was browsing Ubuntu Forums I came across a thread posted by someone named EssexJames.  He recounts a recent experience with showing his 10 year old son Ubuntu:

I enjoyed setting up Ubuntu 8.10 with my 10 year old son. We learned about Ubuntu together and I was pleased that he was really engaged and interested in the whole process of installation and the philosophy of Ubuntu.

We looked at the various packages that can be installed - to see if there was anything that looked really interesting. We got some graphics and video applications. All excellent.

Then we hit a snag. “Daddy, what’s Brainf**k?” he said. (This is the name of one of the packages).

Can I ask the community that develops Ubuntu and those that compile distributions, to please bear in mind that computers are family devices.

This forum’s terms and conditions state “…you warrant that you will not post any messages that are obscene, vulgar…”. It’s a great shame that the development community don’t apply similar rules.

He continues in a follow up post:

If the objective of Ubuntu and other Linux distributions is to provide an operating system which people can use to replace Microsoft software, then it will need to tidy up the use of profanities in the code and application names. Families with children will see these things, decide it’s not for them, pay the devil and go to Microsoft instead.

I’ll happily f and blind with the best of them, but don’t expect profanities to appear on-screen when installing operating system software.

I wanted my son to become enthused by Linux and to learn about it himself. I install filters for web browsing for him - but I didn’t think I’d need one for an operating system and its components.

There have been several good replies to these two posts that I wanted share with you.  Indeed, it would be rather awkward for any parent who is showing their child a free OS and then discover within the package manager (which organizes over 26,000 different individual programs/dependencies and actually requires you to type in an administrator password before it can even be looked at) an uttering of profanity.  Here’s what some members of the Ubuntu community had to say in response to this:

From “steveneddy”:

I suggest that you explain it to him politely and professionally and if it bothers you, don’t mention it to him again.

All children are going to learn these words eventually.

This is a good time to wear the Daddy hat and sit down with the little tyke and have a man to man talk.

I also raised my two daughters, now 20 and 23, and have my two grandchildren here living with me.

We just have to decide that when that day arrives, and it will, that we are man enough to explain things like this to them in an adult manner so that they understand why it is that way and why some of us choose not to use those types of words around our children.

Don’t think worse of the whole community just because of the lapse in judgment of one developer.

From “starcannon”:

It is best to preview any material that you wish to expose your children to. It would be wrong to drop software simply because someone does not like the name. I would say that if freedom of speech and all of its implications are not something your prepared to deal with, perhaps some other OS is appropriate for your situation; I think Ubuntu is the greatest thing since sliced bread. I have 2 daughters, one is 11 and the other is 12, I do not see that they have been damaged at all by the occasional exposure to a slang word in the package manager, they hear much worse on the school bus; and then there is popular media such as television, movies, and music, all 3 of which have much more offensive words and ideas than a satirically named and obscure [programming] language.

There is plenty of xxx software for MS Windows, arguably much more than for any other OS, the difference is that when one searches for software for windows they may use the google search engine, when one searches for software for Ubuntu they use the Synaptic search engine; ironic isn’t it that if one runs across the “F” word on google while looking for windows software, that is acceptable; if however, one runs across it on the Synaptic search engine it is not acceptable. Ultimately I don’t care what a package is named, I care what the package does, indeed I never even knew about BF until you posted about it, /shrug, and again, it is your responsibility as a parent to do the parenting, not Microsoft’s, not Canonical’s, not Linux’s, not GNU’s, not Apple’s. Accept responsibility or don’t either way I certainly hope that package availability is never based on psuedo puritan ideals that have not even come close to actually existing in over 125 years.

“Grant A”, complimenting starcannon adds:

You are 100% correct. People say they are getting their kids ready for the real world, and THIS is the result. V-Chips, and their kin have made parents very lazy and thus devaluing the social standards the U.S. once held. Life has cuss words, believe it or not your children WILL hear these words. It is up to YOU to teach your child what it means. And no matter what you do, you can train him, you can stick a shock collar on him (please don’t) he WILL still say cuss words, or think them. I know a preacher who is a profane cusser. I am very offended that you want to step upon my rights to FREE speech as declared in over 200 countries, I do not tolerate fascism.

I am aware that this post may have sounded derogatory, but it wasn’t. Sometimes the blunt truth is the best truth. I’m not going to sugar coat everything I say on the Internet. I tried to keep this as civil as possible and avoided all the flaming I wanted to do. Please teach your children yourself, who else will? The Internet is not your baby sitter. If you don’t want your kid to see cuss words, you might as well have left him illiterate.

I agree with all of what was said in the above responses.  It ultimately falls on the parent to do the parenting of their child.  Grant A’s mentioning of the V-Chip, I think, is a good example of how some parents try to use technology to avoid awkward conversations with their child about things like sex, violence, drugs and “adult” language.  That being said, it should be emphasized that the Internet itself is a far more profane place than a simple package manager ever could be. Slightly off topic, I think to call any computer which is attached to the Internet a “family device” is a contradiction, no matter what operating system you choose to use.

EssexJames has marked his thread as “Solved” since posting it yesterday, but he’s not posted any kind of followup to indicate exactly what the replies have solved for him.  So I sent him a private message asking him what he’s decided and he says, although little can be quickly done to enable a profanity filter in Synaptic (and possibly won’t be implimented quickly because of resistance/misunderstandings), he and his son will continue to use Ubuntu.  He added that he will also start keeping a closer eye on him and his computer activities.  Good job, dad!

Monday, November 24th, 2008

One Hell Of A Show

What a concert.  I think the last time I saw Nine Inch Nails live was in Denver, Colorado back in 2001.  No no, that’s too far back; I saw them again in KC a few years later.  As always they put on a spectacular show, this time around featuring the uber-cool “stealth screens” (which you can see in the above photo suspended over the band).  WIRED magazine did an article not so long ago about the ingenious use of these screens, which the band would interact with while on stage.  There’s a video included with the article (here’s a YouTube hosted copy of that same video, in case the one on Wired’s website doesn’t work) that explains all the cool tricks they could do with this new setup so check it out. You might be interested to learn that the computer responsible for generating the visuals on stage (aka, “the brain”) runs Linux.

The opening act was an little known “experimental rock” band called Boris (although I thought the big orange sign behind them on stage said “Bong”).

Their music was… pretty damn annoying.  If your favorite NIN CD of all time was Fixed (which itself was an experimental remix album based on Broken, an album Trent Reznor originally wrote because he was intentionally trying to destroy his career because he quickly grew to hate the legal/business sides of the music industry, and somehow ended up winning a Grammy for it) you might have been able to get into Boris.  For the most part Kristin and I were just praying for them to finish up and get the hell off the stage.  I know others in the arena got into them, and that’s perfectly fine.  I actually could have given one of their songs a thumb up if it hadn’t lasted for 15+ minutes, ending with their goofy drummer standing on top of his trap set with his arms in the air like a D-bag before walking off stage without the rest of the band.   And they kept playing the same drone for another 5 minutes after that.  Rather than ridicule them as being horrible… I decided that their performance was simply funny.  The drummer reminded me of Animal the Muppet.

Every time one of the band members yelled, “Whoooooooo!” into the microphone, I told Kristin to take a drink of her beer.  That helped keep her smiling because otherwise it was like watching someone wince at the sound of children scratching a chalkboard with lawn rakes.  I give them an A for effort.

After they were finished, and the rest of the fans arrived after the opening act, the show got off without a hitch and went on pretty flawlessly (so far as I could tell).  You can read other reviews by fans who also attended this show by visiting the tour journal at the ETS forums, found here.  There’s also a TON of videos from various shows on Youtube that you can look up and watch if you’ve got the time to spare.  I’ve even uploaded a few to my Facebook profile.

There is one song (The Greater Good) that is rather dark and creepy… a lot of whispered lyrics.  My girlfriend, being mostly unfamiliar with NIN, had trouble making out what he was saying.  The lyrics were, “Breath us in…. slowly…. slowly.”  She thought he was saying, “I breath my skin…. smelly…. smelly.”  HILARIOUS!  Every time she repeated what she thought the words were I about fell over from laughter.

One my favorite parts of the show was during the song Survivalism, which is off of the Year Zero album.  Year Zero was a concept album which Trent wrote shortly after the re-election of George Bush in 2004.  The premise behind the album was essentially what an album from about 15 years or so in the future might sound like if things in the government continued its streak of corruption.  It had a heavy George Orwell/1984-ish theme about it (warrentless wiretapping, facism/totalitarianism, excessive censorship of information,  etc.)  It was quite fun to see the backdrop for this song being “security cameras” aimed at the fans while the song played.  I especially liked the little touch in the lower right screen:

Overall I was very pleased with the show and would have felt it still worth the money if the opening act had not played.  One last little note mentioned by Trent during the show:  “For those of you who don’t know, you can download our latest album for free from our website.  And you can download every other album that’s not free from everybody else’s website.”

Download “The Slip” from www.nin.com for free

Sunday, November 23rd, 2008

Bob Church Ends His Chemotherapy

A few of you out there may be familiar with my occasional posts about Bob Church.  He is the father of my girlfriend (and of course, wife to be) Kristin Church.  Bob has been fighting cancer for a long time, having begun chemotherapy a couple of months before his grand birthday party back in September.  Friends and family from all over the country, some who had never flown on an airplane before in their whole life, came all the way out to Moberly, Missouri to see Bob in person and celebrate his 61st birthday with him.  I took some photos and a good chunk of priceless video while I was out there and I’d love it if you’d take some time to download it all and enjoy some of the memories everybody took away from the party.  You’ll find two files for downloading located here.

Bob is a skilled writer of tall tales, short stories and beautiful poems.  I was honored and saddened to have helped him post his very last update to his blog yesterday, announcing that he has no further intentions of adding anything further to his collection of over 320+ writings that have accumulated there since 2006.  Even with the absence of fresh material he continues to gain new fans and inspire fellow poets who hope to one day write with the same kind of colorful essence and flow he’s demonstrated.

The decision to end chemotherapy came yesterday, partially from the doctors who have been working with Bob, and partially from Bob himself.  The cold truth of the matter is that these treatments are wretched in their induction of unbearable sickness, and the doctors feel at this point that continuing treatment of this kind would only do more harm than good.  They both feel that these final days should be spent with him in as best condition he can possibly be instead of sickened to the core and unable to visit with family and friends.  Regular secondary medications have kept the physical pain and anxiety he’s endured suppressed to a more tolerable level.  Unfortunately the medication he takes does little to suppress the same symptoms endured by all of us around him, and things are quite depressing right now.

So the plan is to make the best of things and try hard to not let our emotions rob what little time is left.  We’re planing on watching Wall-E today, a film I love so much that I watched it 4 times in the theaters when it was first released.  Being bed bound in the living room, one of the best things we can do with him is watch movies as a family, and a few other unique titles are down the line.  I’ll write more some other time about a movie Bob and I first had a very excited discussion about when we met for the very first time in person at an Olive Garden in Columbia, Missouri.  And I’m going to host it on my server for others to download without hassle as a dedication to him.  Speaking of Columbia, Kristin and I will be going there tomorrow night to see Nine Inch Nails in concert in an arena that is across the street from the VA hospital Bob’s chemotherapy treatments started at earlier this year…

Thursday, November 20th, 2008

Some New Music By Yours Truely

This is a slightly touched-up version of the song I released a couple days ago, with an additional song cross-faded into it.   Download it now.  My supervisor listened to it and said, “I feel like it’s the end of a blood bath and the credits are rolling.”  My girlfriend said it reminded her of vampires (whatever that means).

Enjoy!

Thursday, November 13th, 2008

From The Linux Terminal To Shell Scripts

Just a little over a week ago I put together a list called 10 Things To Do After You Install Ubuntu Linux.  The list of things to do went as follows:

  1. Customize the appearance of Ubuntu (wallpaper, theme, fonts, dockbars, etc.)
  2. Run Update Manager.
  3. Install Flash, Java, Windows Media Codecs and MS fonts with just 4 clicks!
  4. Install Compiz Fusion Advanced Settings Manager with one more click.
  5. Install WINE with one more click and use it to run Windows based software.
  6. Reveal Archive Manager in the Accessories menu and use it to create zip archives.
  7. Install the libdvdcss2 decoder so you can watch DVD’s.
  8. Install Skype from a *.deb file.
  9. Install Google Earth using Terminal.
  10. Install Virtualbox.
As a challenge to myself, I wanted to try and find a way do it all with only one command in the Terminal.  In Linux, you can chain multiple commands together allowing you to execute many commands in sequence.   What I ended up with was one giant command that you can copy and paste into a terminal window that can do steps 2-5 & 7-10.  Here is what I came up with:
Code:
sudo apt-get update && sudo apt-get -y upgrade && sudo apt-get install -y ubuntu-restricted-extras compizconfig-settings-manager wine libqt4-core libqt4-gui && sudo wget http://www.medibuntu.org/sources.list.d/intrepid.list --output-document=/etc/apt/sources.list.d/medibuntu.list && sudo apt-get update && sudo apt-get -y --force-yes install medibuntu-keyring && sudo apt-get update && sudo apt-get install -y libdvdcss2 && sudo apt-get update && sudo apt-get upgrade && wget http://download.skype.com/linux/skype-debian_2.0.0.72-1_i386.deb && sudo dpkg -i skype-debian_2.0.0.72-1_i386.deb && wget http://dl.google.com/earth/client/GE4/release_4_2/GoogleEarthLinux.bin && sh GoogleEarthLinux.bin && wget http://download.virtualbox.org/virtualbox/2.0.4/virtualbox-2.0_2.0.4-38406_Ubuntu_intrepid_i386.deb && sudo dpkg -i virtualbox-2.0_2.0.4-38406_Ubuntu_intrepid_i386.deb* && sudo adduser $USER vboxusers && echo “none /proc/bus/usb usbfs devgid=46,devmode=666 0 0? | sudo tee -a /etc/fstab

NOTE: A couple of the files that are downloaded using the above commands are intended for 32-bit/i386 processors.  If you are running the 64-bit version of Ubuntu, read the very last section of this post to see what you need to do differently.

You’re probably looking at that huge command thinking, “What the hell is THAT?!”  At first glance, it’s very difficult to see each individual command, much less know what every command does.  So I’m going to break it down one step at a time.

Now, as cool as it might seem to copy and paste one long command like this into a terminal window to accomplish all of these tasks in less time, it has its pitfalls.  For one, it’s easy to accidentally not copy everything you intend to paste.   In addition to this, the entire series of commands usually take longer than the sudo authorization timeout.  What that means is, after about 5 minutes or so, another sudo command will be invoked and because it’s been a few minutes since you entered your password for the first sudo, it will ask you for it again.  This defeats the purpose of trying to find a way to automate all of these things.

Fortunately, there’s a more reliable way to do this.  And it’s called Scripting.  More on that later.  Right now, I want to break these commands down piece by piece so you can see each one and understand what they do.  The commands we’re going to learn about are:

  • sudo (Used to gain root privileges in the Terminal)
  • apt-get (Used to check for updates, install and remove software)
  • && (Used to chain-link commands together into strings)
  • wget (Used to download files from the Internet from the Terminal)
  • dpkg (Used to open and install *.deb packages)
  • echo (Used to reflect input out to a to-be-specified destination)
  • The | pipe symbol (routes output from a command into another command)
  • tee (accepts text input and can be used to append text files)

The Mega Command — In Baby Steps

Of course one of the first things we need to do is open a Terminal window by clicking Applications>Accessories>Terminal.

Step 2 in our list of 10 things to do says “Run Update Manager.”  This is done in the terminal window with the following command:

sudo apt-get update

The very first part of the command you see is the word sudo.  As discussed in my Linux Terminal For Beginners blog, this command is what gives the user root-level privileges in a terminal window and it requires the administrator password to be entered in order for it to work.  Root access is required for installing software, applying system updates and modifying system configuration files that you normally don’t have permission to edit (among other things).  An easy way to remember sudo is to think “Super User DO.”

Following sudo is the command apt-get with the update option added.  The apt-get program is used to install, remove, upgrade and even reinstall software packages in Ubuntu.  In this case we’re telling apt-get to check the distribution repositories to see what updates are available for your system, and that’s it.  Technically this is called resynchronizing your software source indexes.

After this we have:

&&

The two ampersands characters (&&) act sort of like a chain link which tells the terminal, “Once the  command preceding && is finished with whatever it’s doing, proceed to execute whatever follows && as long as there were no errors.”  By using multiple &&’s, you can daisy-chain multiple commands back to back in a long string.  So now you know what all those &&’s up there are all about.

Following && is:

sudo apt-get -y upgrade

This tells Ubuntu to review the list of available updates that were just acquired by the index re-sync, download and install them.  The -y option automatically answers “Yes” to the “Do you want to continue” prompt that apt-get presents when you are about to install or remove software.  This command is followed by another &&.

Next up we have Steps 3, 4 and 5 in our list:

sudo apt-get install -y ubuntu-restricted-extras compizconfig-settings-manager wine libqt4-core libqt4-gui

This command installs the Ubuntu Restricted Extra’s package (which contains Flash, Java, Win32 Video Codecs, MS Fonts and a couple of other little bells and whistles), Compiz Configuration Settings Manager and WINE.   I also added in the libqt4-core and libqt4-gui packages because the Skype installation later down the line depends on them… so I figured we should take care of them now.

While the Ubuntu Restricted Extras are installing, you will have to answer “OK” and “Yes” to the following two screens by using the Tab-Key and Enter Key on your keyboard:

If you happen to know of a way to automate these answers from the command line please let me know!

Step 7: We then come to adding the Medibuntu repositories so we can install the 3rd party libdvdcss2 DVD codec package.  The commands needed for installing libdvdcss2 (and what each one does) are outlined in my original 10 Things To Do After You Install Ubuntu Linux.  You basically did three copy & paste steps entirely within the terminal window.  All I had to do for this little challenge was simply insert &&’s in between these three steps to make one long chain:

Code:
sudo wget http://www.medibuntu.org/sources.list.d/intrepid.list --output-document=/etc/apt/sources.list.d/medibuntu.list && sudo apt-get update && sudo apt-get install -y --force-yes medibuntu-keyring && sudo apt-get update && sudo apt-get install libdvdcss2 && sudo apt-get update && sudo apt-get upgrade

And that’s pretty much it.  For some reason I had to add a –force-yes after the -y in order to make it answer Yes for you.

Step 8: Next up is Skype.  Installing Skype via the terminal consists of using the following two commands chained together with an &&:

wget http://download.skype.com/linux/skype-debian_2.0.0.72-1_i386.deb && sudo dpkg -i skype-debian_2.0.0.72-1_i386.deb

At the beginning is the wget command, followed by a http address.  wget (if I’m not mistaken) simply stands for Web Get, and it is used for downloading files off of the Internet from the command line.  In this case, it’s downloading the skype-debian_2.0.0.72-1_i386.deb installer file.  Normally you would save a file like this to your PC and then double-click on it to start the GUI based installer.  But we want to install this package from the command line.  We do this using the dpkg -i command, followed by the file name of the deb file we just downloaded.  And that’s that.

Step 9: Next up is Google Earth.

wget http://dl.google.com/earth/client/GE4/release_4_2/GoogleEarthLinux.bin && sh GoogleEarthLinux.bin

We use wget again to download a binary installer file, which is then executed by the sh command interpreter (sh GoogleEarthLinux.bin).  This will launch the GUI based installer, which unfortunately requires you to click the Install button and then Close the program out for the rest of the string to continue.

Step 10: Finally, we come down to installing Virtualbox.  This takes three commands:  Downloading the deb file with wget, using dpkg -i to install it, and then using the echo, | pipe and tee commands to append a line of text to the bottom of your fstab file (which grants Virtualbox access to your USB ports).  This is done with the following:

wget http://download.virtualbox.org/virtualbox/2.0.4/virtualbox-2.0_2.0.4-38406_Ubuntu_intrepid_i386.deb && sudo dpkg -i virtualbox-2.0_2.0.4-38406_Ubuntu_intrepid_i386.deb* && sudo adduser $USER vboxusers && echo “none /proc/bus/usb usbfs devgid=46,devmode=666 0 0″ | sudo tee -a /etc/fstab

Here we can see wget being used to download a deb file, followed by the dpkg -i command being used to install it.  (You will be asked to press the Enter key to select “OK” when a dialog box appears notifying you about Virtualbox creating the vboxusers group).

What we see after that is the echo command.  And I’d like to go into a little detail about this very last bit because it’s very cool.

echo does just what it sounds like.  It echoes (bounces back/reflects) the input we give it.  If you were to type echo “the cat in the hat” in a terminal window, you would see the terminal print back the cat in the hat because you didn’t send it anywhere but to the terminal itself.  What we want to do is echo some text to another command that can append our /etc/fstab text file, and in this case, that command is tee.  The syntax we’re using is:

  • echo “some text” | sudo tee -a /etc/fstab

So how do we get our echoed text to go to tee instead of back to our terminal window?  Right after the “some text” part, we see a | pipe symbol.  Here’s a picture of what it looks like on your keyboard:

Pipe takes the output that echo spits out and pushes it out to the tee command.  The -a after tee stands for append, and it will insert whatever echo sends it into the end of our /etc/fstab file.

Now, let’s take all of this and make a script.

Doing The Above With A Script

A script is nothing more than a text file that contains a list of commands to be executed one after another.  So lets start by creating a text file.  You can either:

  • Click Applications>Accessories>Text Editor
  • In Terminal, type gedit and then press Enter.

Once our text editor is open, you’ll want to paste in this line of text at the very top:

  • #!/bin/bash

Bash stands for GNU Bourne-Again SHell, and is the default command interpreter used by your Terminal in Ubuntu.  While it’s not necessary to include this at the begining (because Bash is the default), it is good practice, as there are other command interpreters out there that may not interpret your script the same way Bash does.  This will force whatever version of Linux you are using to use Bash to run the script.

Following this, we can start by pasting in our commands, separating them line by line.  I’ve already taken the above commands and put them into a script that you can use.  You can download it by clicking here, or from the Terminal type:

  • wget http://www.davestechsupport.com/blog/downloads/megascript.sh

To view or edit this script in your text editor, type:

  • gedit megascript.sh

You’ll notice that in the script there are no instances of sudo present.  That’s because we will be running the script itself with sudo, which in turn gives everything within the script root privileges.  So now you won’t have to type your admin password more than once.  Now that we have our script, we need to run it.  We need to give our script permission to be executed.  To do this, type:

  • chmod +x megascript.sh

And to run the script, we type:

  • sudo ./megascript.sh

As it was in the above steps with Java and Google Earth, you will have to be present at the computer to click “OK”, “Yes” and “Install” to keep things moving.  I’ll update this blog if anyone out there knows of a way to automatically send these answers to these programs so that the script is 100% automatic and not depend on user participation for it to finish.

Other Neat Things You Can Try

You could optionally add these three lines of text to the end of the above script:

  • echo “The Megascript is finished and your system will restart in 10 seconds!  Press CTRL-C to cancel the reboot.”
  • sleep 10;
  • init 6

The first line echos the quoted text to the terminal window notifying you that the script has completed (well, all of the important stuff has finished, the script is still running).  The next command sleep 10 causes the script to pause for 10 seconds.  You could hit CTRL-C here if you wanted to interrupt the process.  Finally, the command init 6 logs you out of your session and reboots the entire machine, which is a good idea because you likely just finished installing a Kernel update, and the changes you made to your fstab file require a reboot in order for it to take effect.

I got creative with the sleep and echo commands, using them in one-second intervals to have a count-down be displayed in the terminal.  I also added a beep to each second with the echo -e ‘\a’ command.

Additionally, you could insert comments after each command in your script using double-pound symbols.  For example, the commands in your script could look like this:

  • apt-get update ## This checks for the latest updates
  • apt-get -y upgrade ## This installed all available updates

Doing this allows you to leave notes that describe the purpose of individual commands in case you forget.

Special Instructions for 64-bit Processors

There are two deb files downloaded in the steps above that are intended for 32-processors.  The Skype deb file and the Virtualbox deb file. Skype does not have a 64-bit specific version of their software available for download but there is a chance it will run.  However, there are ways to install the 32-bit version on a 64-bit version of Ubuntu.  Based upon this guide, I’ve modified the code (and the script).  However, I don’t have a 64-bit processor and have not tested this to make sure it works.

Virtualbox does have a 64-bit version of their software available, and it can be downloaded from this address.  You don’t need to do this though because I’ve already modified the code for this alternate download and installation.

Here’s the new code:

Code:
sudo apt-get update && sudo apt-get -y upgrade && sudo apt-get install -y ubuntu-restricted-extras compizconfig-settings-manager wine libqt4-core libqt4-gui && wget -N boundlesssupremacy.com/Cappy/getlibs/getlibs-all.deb; sudo dpkg -i getlibs-all.deb; sudo getlibs -p bluez-alsa && sudo wget http://www.medibuntu.org/sources.list.d/intrepid.list --output-document=/etc/apt/sources.list.d/medibuntu.list && sudo apt-get update && sudo apt-get -y --force-yes install medibuntu-keyring && sudo apt-get update && sudo apt-get install -y libdvdcss2 skype && sudo apt-get update && sudo apt-get upgrade && wget http://dl.google.com/earth/client/GE4/release_4_2/GoogleEarthLinux.bin && sh GoogleEarthLinux.bin && wget http://download.virtualbox.org/virtualbox/2.0.4/virtualbox-2.0_2.0.4-38406_Ubuntu_intrepid_amd64.deb && sudo dpkg -i virtualbox-2.0_2.0.4-38406_Ubuntu_intrepid_amd64.deb* && sudo adduser $USER vboxusers && echo "none /proc/bus/usb usbfs devgid=46,devmode=666 0 0" | sudo tee -a /etc/fstab

And here is an 64-bit version of my script: megascript64bit.sh

  • wget http://www.davestechsupport.com/blog/downloads/megascript64bit.sh

Use the same method to give it execute rights and then run it by typing sudo ./megascript64bit.sh

Wednesday, November 12th, 2008

Here’s A Little Song I Wrote

I recently decided to reconnect my Yamaha DJX keyboard to my computer and make some fresh attempts at writing music… for the first time in about 6 years.  At least, with this particular keyboard. I have a couple of other piano songs I recorded with a terrible 10 dollar microphone a few years back, but never had much luck at getting anything recorded with sophisticated computer software.  I decided it was time to work at an old hobby I dropped so long ago and see what can be done with more dedication and experimentation.

I give you the product of about 45 minutes worth of work.  Very little time was needed to lay down the tracks, and a lot more time was spent playing around with knobs and browsing through the large bank of instruments I have at my disposal to find just the right sound.  I’m excited to write more.

So, please enjoy this free download of a very short piece of music I wrote.

Tuesday, November 11th, 2008

The Matrix Runs On Windows XP

Just wait for the very end.  ;)

Hey, Ubuntu freaks!  I’m going to have another Terminal tutorial coming out on Wednesday with an introduction to creating bash scripts.  Sit tight!

Monday, November 10th, 2008

You Know What Rocks? Surround Sound.

The time is 9 a.m. and I am sitting here rocking out to some Nine Inch Nails.  Not just any Nine Inch Nails.  This is an album that I probably invested over $400 dollars in because when it came out I said to myself, “I have to invest in a surround sound amplifier, now!  I just have to.  There’s no two ways about it.  It is my destiny.”  When NIN released their 5.1 dolby digital remix of The Downward Spiral, I started researching audio amplifiers and had one goal:  To find one that could do at least 5.1 surround and be able to fit in my desk.  And I found exactly what I was looking for:  The Panasonic SA-XR50.

This puppy is slim, loud and does 6.1 surround sound.  I’m sure there are others out there which can handle more channels than that, but it was more than what I was looking for and has held up for the last few years with no problems, even with the confined space it sits in.

And I wasn’t about to plug it into a handful of tiny 2 inch wide satellite speakers.  If you’re serious about music and the quality of the audio coming out of your PC, you don’t just spend 99 dollars on a set of tiny speakers plus one crappy sub-woofer.  I have a pair of headphones that are worth more than that.  I even spent more than that just for the center channel speaker.  Really, do yourself a favor and invest in quality audio.  It’s money well spent and your ears will thank you later (so long as you don’t deafen yourself).  Listening to surround sound music is a very satisfying; you almost have to smoke a cigarette afterwards.

In an unrelated note… During the last 5 years or so, I’ve made upgrades to my computer for only one of two reasons:  Either Nine Inch Nails released a new album that contained audio tracks my hardware couldn’t handle, or id Software released Doom III.  And it’s been a while since Doom III came out so you can imagine how old my PCs hardware is.  The case isn’t that old, but the guts inside are.  Still, it doesn’t feel old.  It doesn’t feel like a slow computer… probably because I stopped using Windows and did away with all of that hard drive fragmentation, spyware, antivirus nonsense.  It sounds like a joke but you really do have to put more money into a computer in order to stave off the stress that comes with having to deal with all that crap, and all you end up with is delaying the inevitable system meltdown.  But I digress.

My computer is my primary entertainment device, and even though it’s attached to a 35″ TV with an S-Video cable, I don’t think that counts as “watching TV”.  I hate watching TV.

Okay, this post is going no where, which means I probably woke up too early.  But before I end this, I can think of one other thing that rocks besides surround sound:

Wednesday, November 5th, 2008