Archive for the ‘HOWTO: Ubuntu’ Category

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, you can use this guide to help you install the 64-bit version of Skype.

Virtualbox does have a 64-bit version of their software available, and it can be downloaded from this address.

I’ve gone ahead and modified the mega command to reflect this difference:

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://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

10 Things To Do After You Install Ubuntu Linux

Ubuntu 8.10 (Intrepid Ibex) was officially released yesterday.  Boosh!!  Often with each new release comes a spike in the number of people who are trying it out for the very first time.  So to help the new users out, I’ve written this guide to introduce you to this popular Linux-based operating system and some of the cool software you can install on it.

Here’s what we’re going to go over:

  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.

1.) Customize Your Ubuntu Desktop
Difficultly: Very Easy

The first thing anybody should want to do with their own computer is make it look the way they want it to look.  Who wants an OS that forces its users to conform to one particular layout over another?  With Ubuntu, you have a lot of flexability.  You even have the option to use a different desktop environment.  GNOME is the default environment for Ubuntu; KDE (which looks very similar to Windows XP/Vista/7) is the default environment for Kubuntu;  xfce is the default for the lightweight Xubuntu.  There are others, such as Fluxbox and IceWM, that are geared towards being minimalistic in resource usage and makes them perfect for older, slower machines.  These alternate environments are beyond the scope of this guide so we won’t be taking a look at them for now.

Below is a screenshot I took of my own desktop shortly after upgrading my computer from 8.04 to 8.10.

You may or may not like the looks of the default desktop.  If you don’t, that’s okay because you can modify the interface in so many different ways the possibilities are endless.  Check out this small gallery of Ubuntu screenshots I put together to see some examples of what you can do to your own Ubuntu desktop.

The best way to explain how to customize your desktop is to show you a video (albeit, from an older version of Ubuntu) that demonstrates how you can modify the following things:

  • Changing Wallpapers
  • Changing Screensavers
  • Panel Properties (Location/Auto-hide/Background)
  • Changing/Adding Desktop Themes
  • Adding/Moving Launcher Shortcuts to your Panel/Desktop
  • Modifying Menu Layouts
  • Adding Applets to your Panels
  • Modifying your About Me user info
  • Customizing your Login screen layouts/themes
  • Using Multiple Workspaces

The video makes use of http://art.gnome.org/ during it’s demonstration of changing wallpapers and themes, but another noteworthy site you should check for such things is http://www.gnome-look.org/. My personal favorite website for wallpapers is InterfaceLift Wallpapers.  You should also check this site out for wallpapers, too.

You might have noticed in some screenshots of Ubuntu that some people have added a dockbar (similar to the one used in Mac OS X) to their Ubuntu installation.  Below is a picture of one in action.

Check out this guide I’ve written about adding Cairo-Dock to your Ubuntu install as it is one of the best available for Ubuntu (in my opinion).

2.) Run Update Manager
Difficultly: Very Easy

Typically, Ubuntu ISO images are a tad bit older than the current status of the distribution. So often times after a fresh install, your Linux Kernel might be out of date along with a lot of other software. Running Update manager manually after installing can bring your system up to date with the latest security and software patches.  While Update Manager does check for updates automatically, it often doesn’t do it immediately after you login.  So after a fresh install it is a good idea to force it to check for updates.  To do this:

  • Click System>Administration>Update Manager
  • Click on the “Check” button to check for updates

If there are updates available, you simply click “Install” to install them. Piece of cake.

*Note: If you’re having hardware issues (e.g., 3D video acceleration not working, wireless adapter not in use, etc.) after installing all available updates, you should check in System>Administration>Hardware Drivers to see if there are any proprietary drivers that need to be enabled.

3.) Install Flash, Java and Win32 Video Codecs in just four clicks!
Difficultly: Very Easy

In order to get the best multimedia experience out of our computer, we need to install a few programs and plugins.  Most of you out there are familiar with Flash, Java and multimedia file formats like Divx, Xvid, MP3, ASF, Apple Quicktime, etc. Installing decoders to open these types of files has been made simple by bundling them all together into one package.  And installing it is very easy.  To get started, do the following:

  • Click Applications>Add/Remove.  A new window will appear (see below)
  • Change the “Show:” drop menu in the upper right corner to “All Available Applications”
  • Search for the word “restricted”

  • Once the search returns its results, check off the box next to “Ubuntu Restricted Extras”
  • Sit tight. Don’t click the Apply Changes button just yet.  We’re going to check off a few more things

4.) Install Compiz Fusion Advanced Settings Manager
Difficultly: Very Easy

Compiz Fusion (the program responsible for the dazzling eye-candy on Ubuntu) is included by default, but its advanced control panel is not. Need of this advanced control panel comes up if you are a power user who wants to use the 3D window management features to the MAX, which means turning your desktop into a rotating cube, among other nerdy things. You can also greatly customize your special effect animations and window behaviors using this control panel. So let install it!

  • After you’ve checked off Ubuntu Restricted Extras in the above step, do another search for the word “compiz”

  • Check off “Advanced Desktop Effects Settings” (shown above)
  • Sit tight, and don’t click apply just yet.  There’s more we’re going to search for and check off.

Once the control panel applet is installed, it can be found in System>Preferences>Advanced Desktop Effects Settings.

*Notice: You will want to make sure you have Compiz enabled in System>Preferences>Appearence>Visual Effects before using the above control panel you’ve installed.  Otherwise changes you make with it will not be seen.

5.) Install WINE for running Windows-based software in Ubuntu
Difficultly: Very Easy

WINE is a program that acts as a sort of emulator for Windows programs to run on top of.  Instead of needing to use Windows for running that favorite application or game, you can run the program right in Ubuntu with the help of WINE.  The only catch is that not all Windows program run on WINE yet.  So you should search the WINE applications database to see if a program you’re wanting to use works with WINE.  Below is a screenshot of Half-Life 2 running in Ubuntu, thanks to WINE!

To install WINE:

  • In the Add/Remove Applications applet (should still be open from the previous step), search for “wine” and then check off the box next to WINE in the results window.
  • Click Apply in the lower right corner to install WINE, as well as the other programs you’ve already checked off in Add/Remove.

To run a windows program with WINE, simply double-click on the executable (typically something like setup.exe) and it should run just as it would in Windows (provided the WINE AppDB shows that the program you are trying to use works with WINE).  Shortcuts created by software installers are typically added to the Applications>Wine>Programs menu.  You can read more about using WINE here.

6.) Enable (reveal) your Archive Manager and create zip files
Difficultly: Very Easy

Some of you might be wondering: How can I create a zip file? The answer is with the included Archive Manager. This tool (for some weird reason) isn’t shown in the Applications>Accessories menu by default. But we can reveal it very easily by doing the following:

  • Click System>Preferences>Main Menu
  • Click on the Accessories menu in the left panel, then check off the Archive Manager (see below). Then click Close.

That it! Now when you open your accessories menu, you’ll be presented with a new shortcut to your Archive Manager. You can use this utility to create zip files. Keep in mind that it can also create other types of archives, such as tar.gz, so you should specify your desired file type when you create a new archive.

The included archive manager can create zip and tar.gz archives, and a few others (not RAR).  To explore the possibilities, click Applications>Accessories>Archive Manager.  Once open, click New in the upper left corner and take a look at the bottom of the window where you can specify archive file type, password locking and spliting.  After you create a new archive, you simply drag and drop files into the archive manager and it will add them to the new archive.

7.) Install the libdvdcss2 decoder for DVD playback
Difficultly: Medium

Click Applications>Accessories>Terminal.  This will open a new terminal window.  (If you would like to know more about Terminal, check out my Terminal for Beginners guide). Copy the following command and paste it into the Terminal window:

  • sudo wget http://www.medibuntu.org/sources.list.d/intrepid.list –output-document=/etc/apt/sources.list.d/medibuntu.list

This will add the Medibuntu repositories to your 3rd party software sources (in other words, this tells Update manager to check one additional server when it looks for system updates).  Next, paste this command into Terminal:

  • sudo apt-get update && sudo apt-get install medibuntu-keyring && sudo apt-get update

This will add the GPG encryption keys to your system so you are able to accept encrypted downloads from the medibuntu servers.  Finally, type this into terminal:

  • sudo apt-get install libdvdcss2 && sudo apt-get update && sudo apt-get upgrade

This will install the libdvdcss2 package, check for updates again and install them.  Once all the updates are installed, you should be able to watch a DVD simply by inserting a disc into the computer.  Also, you may have heard a rumor that installing this decoder is illegal. If you live in the US and someone tells you this, refer them to 17 U.S.C. Sec. 1201(f). The binaries to crack the DVD video stream encryption are not illegal if you have a license to the content.  In other words, if you have purchased your own legal/legit DVD, then that means you have license to watch it.  After all, the content must be decrypted in order to make the content usable.  However, the law is not the same in all countries so you should check your local laws to see.

8.) Install Skype
Difficultly: Very Easy

Skype is a very popular Voice Over IP application that allows you to make cheap phone calls from your computer.  They ask you for 10 bucks for your first set of calls and send special offers your way from time to time.  I happened to get in on a great deal paying 30 bucks for one year of unlimited calls to anywhere in the United States, so that’s a pretty good deal if you ask me.  It also features webcam capabilities and conference calling.

Installing Skype is easy.  All you have to do is download the deb file from Skype.com.  Here is a direct link:

http://www.skype.com/go/getskype-linux-ubuntu

Once the deb file is finished downloading, double-click on it.  An installer window will appear with a “Install Package” button in the upper right corner of the window.  Click that button, and when it’s finished, you’ll find Skype in Applications>Internet.

9.) Install Google Earth
Difficultly: Medium

First thing you have to do is download Google Earth. To do that, visit this link: http://earth.google.com/download-earth.html

After you agree to the license, you’ll be taken to a new page where an automatic download will begin and ask you what you want to do with a file called GoogleEarthLinux.bin. Simply save this file to your Desktop for now.

Next we’ll need to open up a terminal window. To open Terminal:

  • Click Applications>Accessories>Terminal

When you first open terminal you’ll be given a prompt where you can enter commands. You also will be sitting in your Home Folder. If you type in the letters “ls” (That’s ls, short for the word “list”, in lowercase), you’ll be shown the files and folders in your home folder. Notice that one of them is called “Desktop”. We need to change our directory so we can run our GoogleEarthLinux.bin file. To do this:

  • Type “cd Desktop” (no quotes) and hit enter.

In the world of Linux, everything is case-sensitive, so be sure to capitalize the word “Desktop” in the above command. This command will bring you to your Desktop folder. If you type “ls” again and hit enter, you’ll see the files which reside on your desktop right now. Listed in it somewhere should be the bin file you just downloaded.

Now for the magic!

  • In terminal, type: “sh GoogleEarthLinux.bin” (no quotes) and hit enter.

After you press enter, the following window will appear, and begin to install Google Earth for you:

Shortly after the above screen appears, you’ll get another one that says the program successfully installed. You’ll then be given the option to run Google Earth right away. If you don’t want to, you can just click Quit, and start it later by going to Applications>Internet>Google Earth.

Note:  Google Earth runs best on PCs that are equiped with 3D graphics acceleration cards/chipsets.  Some video cards require you to have their proprietary drivers enabled in order for them to be utilized by the system.  You can check to see if you need to enable any such drivers by clicking System>Administration>Hardware Drivers.

10.) Install Virtualbox
Difficultly: Medium

Virtualbox is a popular application used on many different operating systems that allows you to create Virtual Machines, upon which you can install any number of operating system.  So, for instance, you could be running Windows XP inside of a window on top of Ubuntu.  This is good for users who are trying to migrate from Windows to Ubuntu but are not quite ready to take the big leap or are being held back by one or two applications that won’t run in Ubuntu.

So here’s what you need to do:

 

  1. Download the Virtualbox deb file for your particular processor architecture (i386 or AMD64) from here.
  2. Double-click on the the deb file you downloaded to start the installer.  Click “Install Package” to install Virtualbox.
  3. Once that is finished, you will need to add yourself to the vboxusers group.  To do this quickly, open up a Terminal window (Applications>Accessories>Terminal).  Once Terminal is open, paste in the exact text and press the enter key:  sudo adduser $USER vboxusers
  4. Reboot the PC.
That’s all you need to do to install Virtualbox.  However, you will need to do a couple more things if you want your virtual machines to have access to your USB ports:
  1. In terminal, type:  sudo gedit /etc/fstab
  2. Paste the following text at the bottom of the fstab file:  none /proc/bus/usb usbfs devgid=46,devmode=666 0 0
  3. Save the changes to the fstab file and close Gnome Text Editor.
  4. Reboot the PC.
You’ll find Virtualbox in Applications>System Tools>Sun xVM VirtualBox.  I don’t have a guide written yet about how to use Virtualbox, but you can check this one out in the mean time to help get you started.

Well, that wraps up this list of things to do. There are plenty of other very cool applications out there worth installing, such as Audacity, Avidemux, VLC, Amarok, DeVeDe and many more. Most of these programs can be installed using the Add/Remove applet which we used to install our Ubuntu Restricted Extras package. Simply searching for the program name will produce a result that you can check off install with a couple clicks, and that sure beats the hell out of looking through a filing cabnet for a software CD or a serial number.

 

Another cool thing you can do is add scripts to your Nautilus file browser that will give you new abilities when you right-click on something.

Anyway, I hope you enjoy your new Ubuntu Linux operating system!

Friday, October 31st, 2008

How To Fix Virtualbox After Upgrading Ubuntu

Yesterday I decided to upgrade my installation of Ubuntu 8.04.1 to 8.10 Release Candidate.  The upgrade went over pretty smoothly, save for a few minor bugs that were easy to fix (bugs are to be expected when you’re using “beta” software).  But the biggest issue I had after upgrading was with trying to run Virtualbox.  The first error message I got when I attempted to start up my XP machine in Virtualbox was this:

The VirtualBox kernel driver is not accessible to the current user. Make sure that the user has write permissions for /dev/vboxdrv by adding them to the vboxusers groups. You willneed to logout for the change to take effect..
VBox status code: -1909 (VERR_VM_DRIVER_NOT_ACCESSIBLE).

This threw me off because, for one, I am already a member of the vboxusers group. And attempting to recompile the kernel headers using the sudo /etc/init.d/vboxdrv setup terminal command also did not work.  So I had to do a little digging around and finally found the solution, and it is EASY!

The Magic Trick

Let’s keep this short and sweet, okay?  We have four things to do:

  • Copy and Paste an entry to our Software Sources list
  • Copy and Paste a command into a terminal window
  • Copy and Paste a line into our fstab file
  • Run Update Manager

Click on System>Administration>Software Sources.  You will be asked to enter you administrator password.  Once open, click on the “Third-Party Software” tab.  You will likely see something that looks like this:

You can just ignore all of those entries that are unchecked.  What we want to do is add one to this list.  Click the Add+ button at the bottom left and then paste in the following text in the box that appears:

  • deb http://download.virtualbox.org/virtualbox/debian hardy non-free

I know some of you out there are thinking, “Hardy?  I thought we’re running Intrepid Ibex now…”  Don’t worry, it will work.  Now that you’ve added the above text, click the Add Source button. It will add a new entry to the window.  You can click the close button now.  The following message will then appear:

Click Reload.

Now, open a Terminal window by clicking Applications>Accessories>Terminal.

In here, copy and paste in the following text by using the Edit>Paste menu option in the Terminal window.

  • wget -q http://download.virtualbox.org/virtualbox/debian/sun_vbox.asc -O- | sudo apt-key add -

Be sure to include all the text above (from the wget to the minus-sign at the end) when copying.  Paste the text into Terminal and press enter (if necessary).  It may also ask you for your administrator password again.

We’re already half way finished.  Now we need to add a line of text to our fstab file.  We are doing this to reestablish Virtualbox’s access to your USB ports.  To edit the file, paste this into the terminal window you should still have open (open another one if you closed the first one).

  • sudo gedit /etc/fstab

This will open a text editor.  Paste in the following text at the very bottom of the file:

  • none /proc/bus/usb usbfs devgid=46,devmode=666 0 0

You don’t need to make any other changes to the file, though if you see another line at the bottom of the fstab that looks very similar to the one you just pasted it, comment it out by inserting a couple of pound-symbols ## in front of that line, like this:

  • ##none /proc/bus/usb usbfs devgid=125,devmode=664 0 0

I suggest commenting out, as opposed to deleting it completely, so that if there is a problem after, you can just reverse the edit you made by removing the pound signs later.  You don’t have to do this if you don’t want to though.  I did it just to be tidy.  For this edit to take effect, you will need to restart the computer after saving the file.

Finally, once you are booted up and running again, run System>Administration>Update Manager.  Check for updates, apply all that are available, and you should be good to go!

If this fails, try downloading the latest copy of Virtualbox from http://www.virtualbox.org/wiki/Linux_Downloads and reinstall it (although I did not have to do this as Update Manager took care of all downloading and upgrading automatically after following the above steps).

A new feature has been implimented in 8.10 that will automatically update the kernel headers whenever there are future Linux Kernel updates, so you should’t have to worry about recompiling them in the future.  However, it is possible that come Ubuntu 9.04, you may have to repeat the above steps (or something close to them) in order to fix Virtualbox again.  The alternative to this is to not upgrade Ubuntu to the latest distrobution, which is perfectly fine because 8.04 has Long Term Support (LTS) and will continue to recieve normal updates until April, 2011.

Wednesday, October 29th, 2008

The Fastest Way To Upgrade Ubuntu

Every six months Ubuntu Linux users get to enjoy the offering of a major upgrade for their favorite operating system.  This time around we are about to go from version 8.04 (Hardy Heron) to 8.10 (Intrepid Ibex).  These upgrades often slam the hell out of the distro servers which often results in partially failed upgrades, very slow downloads (we’re talking dial-up-modem slow) and otherwise a lot of time wasted on the part of the user who has sworn to never touch any key until the upgrade is finished (lest he accidentally interrupt upgrade).  So, what is there to do about this inconvenience?

Of course, the simplest way to avoid this traffic jam is to do just that:  avoid it.  Put the upgrade off for a week until the servers aren’t under so much pressure and then use the built-in Upgrade Manager.  This is the perfect solution for the laziest of users who stopped reading this before the end of the previous sentence.  But for antsy users out there (especially us Americans who are addicted to having immediate satisfaction with everything) there is another way to go and it’s the BEST way to upgrade from here on out if you want to do it right now and avoid the traffic.  This is an esspecially useful tactic for people who have multiple computers running Ubuntu who don’t want to wait for each one to download updates, because you can now just go to each one with an upgrade CD and save yourself a lot of time.

What you’ll need:

  • A blank CD
  • To make sure all current updates for 8.04 have been applied (use the Update Manager to install them)
  • An opportunity to walk away from your computer for a couple of hours

Once the upgrade is underway, you will want to leave it running alone and treat the PC like a Crock Pot of stew that will take a couple hours to cook, checking it on occasion but waiting till finished before sipping the flavor.

Here’s What We’re Going To Do

Very, very briefly, here’s the plan:

  1. Download (from here) the Ubuntu 8.10 Alternate ISO torrent file and open it up with Transmission Bittorrent Client (included with Ubuntu 8.04 by default).
  2. Use Brasero Disc Burning to burn the downloaded ISO to a blank CD.
  3. Insert the CD and click “Run Upgrade” when prompted.

Piece of cake.

Downloading Ubuntu 8.10 ALT via BitTorrent

First, visit this web address:

http://releases.ubuntu.com/8.10/

From this page, scroll down until you start to see a listing of file names like this:

Note: The above screenshot shows Release Candidate copies of Ubuntu.  The official release will not contain the letters “rc” in the file name.

There are many files listed here, but the ones you need to look for are those ending in .iso.torrent.  Choose between the i386 and the amd64 versions of Ubuntu and download the appropriate torrent, selecting “Run with Transmission” when you are asked what you’d like to do with the file once it’s finished downloading. You can see the i386 Release Candidate version of 8.10 that I clicked on above in purple; odds are you will likely want the same file.  Don’t download the “desktop” iso files (not shown, but further down the list); otherwise known as the Live CD version of Ubuntu.  These ISOs do not provide the ability to upgrade, so be sure you select one of the two alternate iso.torrent’s.

When transmission loads the torrent file, it will ask you where you want to save the iso file it is about to download for you.  I would select the desktop just to keep things simple and hit OK, then Transmission will begin downloading the iso file from the swarm of other bittorrent users.

A Word About BitTorrent…

For those of you who are not familiar with BitTorrent, here a little summery of how it works:  Instead of having everybody try to download the same thing from a central server, individual users share the overhead by uploading to each other what they’ve already downloaded from others before them and vice versa (everyone is a server AND a client).  As you can see from the screenshot above, this can result in very fast download speeds because you are downloading from multiple locations simultaneously.  This animation helps illustrate how data is shared between multiple users while keeping the work decentralized.

For the purposes of this guide, it’s not very necessary go further into the technical details, but it should be said that BitTorrent performs best either with a direct Internet connection (i.e., no router between your PC and your modem) or with port-forwarding configured on your router if you have one.

Burning Your Alternate ISO File To CD

Once Transmission is finished downloading the ISO go ahead and close transmission.  You’ll now want to burn the ISO file you downloaded onto a blank CD.  Right-click on the downloaded ISO file and select Open With>Brasero Disc Burning.  A small dialog box will come up asking you for other options, but you can just click on the Burn button to get the ball rolling.  Once the CD is burnt, you’re ready to do the upgrade.

Performing The Upgrade With Your Burnt CD

Insert your freshly burnt Ubuntu Alternate CD into your PC while logged into your current Ubuntu installation.  Within a few seconds, you should see a popup that looks like this:

Click “Run Upgrade”.  You’ll then be presented another popup that asks you if you want to use the Internet to check for updates along-side the CD you just inserted.  It’s up to you, but I would select “Yes” to this question.  This way you can be sure your system will be as up-to-date as possible without the need to download everything.  Selecting “No” will still work, and work even faster, but you will still have additional (non-essential) updates that will need to be downloaded in the future.

At some point it will ask you if you want to remove obsolete packages, which you can answer “yes” to.  The computer will generate a summery of everything that is about to take place (what packages will be upgraded, how much data needs to be downloaded, etc.) then you can Start the Upgrade.

And that’s pretty much it.  So enjoy your new upgrade!

Saturday, October 25th, 2008

Whoa!! Virtualbox needs kernel maintenance?

Thanks to a reader, I stand corrected about the overall experiences of using VMware vs. Virtualbox.  I was informed that, although minor Linux kernel updates don’t require you to execute any sort of command in your terminal window to keep your virtual machines running, you would have to type such a command for major Linux kernel revisions.  So I decided to see what this experience is like.

The command you type in terminal to recompile your Virtualbox kernel headers is:

  • /etc/init.d/vboxdrv setup

So I did it just for fun, and I added a sudo in front of the command for good measure too.  Then I pressed enter and gasped 30 seconds later:

…I’m already done?… Wow, that was fast!

Well, there you have it.  Virtualbox is apparently a real pain in the ass to use (not really).  It turns out you have to type a command into the terminal window after all, and then press the enter key once!  You might need to invest in a sweatband for your forehead before going through that ordeal [/sarcasm].  The good news for VMware Server fans is that there’s a similar command that does about the equivalent:

  • sudo vmware-config.pl -default

Unfortunately, I don’t have the time to copy and paste in the results of what you’d see after typing that command in here to show you.  You’ve seen that bloody mess all too often, if you’re a seasoned VMware user.  And if you are a seasoned user you should know the implications of using that -default option given the extensive myriad of questions asked.  So hopefully, the defaults work for you.

…..

On an unreleated note, my girlfriend’s father was diagnosed with a form of intestinal cancer yesterday.  I’ll be leaving for Missouri tomorrow night…  Please think of him, pray for him.

Saturday, July 12th, 2008

Virtualbox vs. VMware Server

Before we start, I’d like to get something off my chest:  VMware Server is CRAP!  Don’t take this the wrong way. I’ve used VMware Server for about a year and a half, staring shortly after discovering Ubuntu itself. And at the time, Linux Kernel updates didn’t come down the wire quite as often as they do now. The thing about kernel updates is that you would have to recompile the kernel headers of VMware Server after an update manually. In other words, you had to go to the Terminal, type in a command to execute a script, and hit the enter key about 20 times to accept all the defaults (with the faith that the defaults are exactly what you want them to be).   Yeah, I know what you’re thinking:  “What a stupid task to force a user to go through.  Have any of these guys ever heard of the five 9’s?”

Now I should give credit where it is due.  VMware Server is still a powerful virtual machine solution with a ton of functionality packed into it.  But it seems to be geared towards advanced users who enjoy wasting time in terminal windows because their software breaks on them all the time.  Anyway, Virtualbox is a LOT better than VMware in this department.  In the time that I’ve used it, I’ve never had to do anything special after a kernel update. It just keeps on working. No special commands needed… at least that I’ve seen so far in the last couple month of testing, through 3 kernel updates.  It’s still kicking, but it is yet to seen what will happen when 8.10 comes out.  I suspect it will not cause a problem.

Okay, so how do I install VBox?

First, visit this link.  From here, you’ll be able to download a self-installing deb file for your version of Ubuntu.  There are other distro-specific versions available for download (such as SUSE, Debian, Red-Hat, Fedora, etc) but I can only go into installing the software in Ubuntu.  But in most cases, I’d bet this guide will work for you even if you’re not using Ubuntu.

Ok, so you have your deb file downloaded.  Double-click on it, then click “Install Package”.  After this, the application will be installed and you’ll find a new icon in your Applications>System Tools menu. But first, you will now need to add your user account to the vboxusers group.  The quickest way to do this is click Applications>Accessories>Terminal.  From within terminal, type

  • sudo adduser $USER vboxusers

and then press enter.  Leave the terminal window open.  You are done with installing and setting up Virtualbox… almost.  You will now need to make some changes to get USB working.  This involves editing 3 configuration text files.  So let’s get started.  Still in Terminal, type

  • sudo gedit /etc/init.d/mountdevsubfs.sh

This will open the mountdevsubfs.sh file in your Text Editor.  While this file is open, look for these lines:

# Magic to make /proc/bus/usb work
#
#mkdir -p /dev/bus/usb/.usbfs
#domount usbfs “” /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
#ln -s .usbfs/devices /dev/bus/usb/devices
#mount –rbind /dev/bus/usb /proc/bus/usb

On these bottom four lines, remove the # signs so it looks like this:

# Magic to make /proc/bus/usb work
#
mkdir -p /dev/bus/usb/.usbfs
domount usbfs “” /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
ln -s .usbfs/devices /dev/bus/usb/devices
mount –rbind /dev/bus/usb /proc/bus/usb

Now save the file and you’ll be sent back to the terminal window.  For some people, that’s all you have to do.  If you restart your PC and run Virtualbox, but still have problems getting your USB devices to mount, we have two more files to edit.  But first, we need to find the Group ID number for the vboxusers group.  This can by done by typing the following command into terminal:

  • grep vbox /etc/group

This will give you a result similar to:  vboxusers:x:118:username

In the above example, 118 is the group ID number for the vboxusers group.  Your number will likely be different.  Jot your own number down for future reference.

Now on to editing the remaining two files.  Type this into terminal: 

  • sudo gedit /etc/fstab

In this file, you will want to paste in the following text at the bottom:

## usbfs is the USB group in fstab file:
none /proc/bus/usb usbfs devgid=118,devmode=664 0 0

Note the part that says “devgid=118″.  Change the 118 to match the number you wrote down just a second ago.  It must match your group ID for vboxusers.  Save and close this file.

We have one last file to edit.  Type this into terminal:

  • sudo gedit /etc/init.d/mountkernfs.sh

Inside of this file, there is a line that says “# Mount spufs, if Cell Broadband processor is detected”.  You will want to insert the following text ABOVE that line:

## Mount the usbfs for use with Virtual Box
domount usbfs usbdevfs /proc/bus/usb -onoexec,nosuid,nodev,devgid=118,devmode=664

Again, you will want to change the 118 to match your vboxusers group ID number.

Once all of this is done, you will need to restart your PC.  Granted, this isn’t the easiest looking app to install, but it is easier to use and install and maintain than VMware Server in my opinion.  Enjoy!

Thursday, July 10th, 2008

Customizing your Ubuntu Desktop

I often like to go a little out of my way to write blogs that contain original information.  But for some things, it pays to refer people to a resource that already exists to save time.

Alan Pope is well known in the Ubuntu Linux community for his screencasts.  A collection of them can be found at http://screencasts.ubuntu.com/.  All of his screencasts can be streamed from Google Video, as well as downloaded in MPEG-4 and OGG  format.  The one you will likely want to check out when it comes to modifying your computers login screen, desktop background, fonts, color scheme/theme can be found here:

http://screencasts.ubuntu.com/Customising_Ubuntu_Desktop

The video covers:

  • Changing Wallpapers
  • Changing Screensavers
  • Panel Properties (Location/Auto-hide/Background)
  • Changing/Adding Desktop Themes
  • Adding/Moving Launcher Shortcuts to your Panel/Desktop
  • Modifying Menu Layouts
  • Adding Applets to your Panels
  • Modifying your About Me user info
  • Customizing your Login screen layouts/themes
  • Using Multiple Workspaces

The video makes use of http://art.gnome.org/ for it’s demonstration of downloading wallpapers and themes, but another noteworthy site you should check for such things is http://www.gnome-look.org/.  My personal favorite website for wallpapers is InterfaceLift Wallpapers.

A couple of things this video does not cover (which I think it should) is Compiz Fusion (the software behind Ubuntu’s special effects, such as wobbly windows, action animations, etc).  But in Alan Pope’s defense, the video was based upon Ubuntu 6.10 which did not include Beryl or Compiz by default.  I’ll write a seperate blog about customizing Compiz in the near future.

The video also does not cover the installation and use of a dockbar (such as AWN or Cairo Dock).  I happen to have already written a tutorial about Cairo Dock if you’d like to make you’re Ubuntu desktop look more like a Mac.

Well I leave it to you.  Have fun customizing!

Sunday, June 22nd, 2008

The Linux Terminal For Beginners

A very long time ago, computers didn’t have mice, icons or fancy graphics.  Instead of an Operating System with a Graphical User Interface, there was the Command Line Interface.  With it, you would issue commands to your computer in a text only environment that is not seen so often these days.  But many computer technicians, especially Linux geeks, consider it to be one of the best ways to interact with the PC for certain kinds of tasks.  Though there is a little bit of a learning curve about it new users shy away from .  So I’m going to try and flatten that curve with an introduction to the Terminal window for beginners.

Understanding the Command Line

To help get a better feel for the Terminal, you should open one up right now and follow along with this guide.  To do this (in Ubuntu) click Applications>Accessories>Terminal.  Once you do, a new window will appear with a command prompt and a blinking cursor.  The prompt typically looks like this:

username@hostname:~$

The username is your username, the hostname is the name of your computer.  The tilde symbol “~” is shorthand for “your home folder”.  And the dollar sign indicates that you are currently operating under a kind of limited privilege mode (if you were running terminal with Root level privileges, the $ would be a #.  More on that later).   Following all of these things is a blinking cursor, which is your cue to begin typing a command into the Terminal window.

In the above screenshot, we have our Nautilus file manager to the left as well as a small terminal window on top of it where I’ve typed in the commands “cd Documents”, followed by an “ls” command,  pressing Enter after each.  If you’ll notice, the “dear ubuntu forum moderators.odt” file is shown in both the terminal window as well as the file browser.  It’s the exact same file, and I used those two commands in Terminal to “browse” to the folder containing that file and list the contents of the folder.  So we have two commands here that we can talk about briefly:

cd - Change Directory (e.g., “cd Documents”)
ls - List current folder contents.

When you first start Terminal, you are usually placed in your Home Folder (which is indicated by the ~ (tilde) symbol).  If you type ls and press enter, you’ll see all of the files and folder contained in your Home Folder.  Try to practice navigating from your home folder to some other folder using the cd command.  NOTE:  All Linux commands are Case-Sensitive! Once you’ve navigated into a folder, or perhaps into a folder within another folder, you can go “backwards” to the parent directory by typing “cd ..

Exercise 1:  cd and ls

  1. Click Applications>Accessories>Terminal
  2. Type ls to view the contents of your Home Folder
  3. Type cd Documents and press Enter to navigate into the Documents folder.
  4. Type ls to see the files (if you have any) listed.  Then type cd .. and press enter to return to your home folder.

Ok, how about a few more commands?

As shown above, the cat command can be used to create new files, but it can also be used to append text from one or more files to the end of another file… but we’re not going to get that advanced.  We just want to create a new file and play with it using other terminal commands.

cat - Create new files, combine text files and display them
cp - Copy
rm - Delete/Remove

Using these commands, we’re going to create a text file, copy it, then delete the first copy.

Exercise 2:  cat, cp and rm

  1. Open terminal, and browse to the Documents folder by typing cd Documents, and press Enter
  2. Create a new text file by typing cat > foo.txt and press Enter.
  3. You’ll be sent to a blank line just below the command prompt.  You can type whatever you want, starting a new line each time you hit Enter.  It’s a basic text editor.  When you’re finished typing, you can save and exit by pressing CTRL-D.
  4. Type ls to see the new file in the directory.  To display it’s contents, you can type cat foo.txt.
  5. Copy the file by typing cp foo.txt foo2.txt.  Type ls again to see the new second file.
  6. Delete the first file by typing rm foo.txt, and then type ls again to see the change you made.

There are other commands out there besides cat (such as touch) that can be used to create new files, but we’re trying to keep this short and simple.

Now lets create a file, then a new folder, and move the file into that folder.  We’ll do this with the mkdir, mv and ./ commands.  The ./ command in particular is interesting — it basically stands for “the current directory you are in”.  Sound redundant, right?  Here’s why you need to use it:  There are many commands in the Linux system that can be run from any directory, such as the ones we’ve been using (cat is an example).  These commands reside in a location of the computer that’s been designated to be available at the terminal no matter what folder you reside in.

So say you created a computer program called “cat”, but had nothing to do with text files, and more to do with the feline animal.  If you simply typed “cat”, Linux would assume you meant the cat program we used to create a text file, and not yours.  By adding the ./ in front, it forces Linux to focus on that local folder you happen to be in.

Exercise 3:  mkdir, mv and the ./ delimiter

  1. Open terminal, and cd into you Documents folder.
  2. Type cat > foo2.txt, press enter, type some text, then CTRL-D to save and exit cat.
  3. Type mkdir foocopyfolder to create a new folder.  You can type ls after this to see it.
  4. Type mv foo2.txt ./foocopyfolder/ to move the file into foocopyfolder
  5. Type ls to see that the file is now missing, then cd foocopyfolder, and then ls one more time to see the recently moved file.

Other Useful Commands

By now, you should already be familiar with the basics of the terminal.  Here are some other commands you can experiment with:

rmdir - Remove Directory
sudo - This is typically inserted in front of any regular command that requires root level privileges in order to do.  You can think “Super User Do” to help you remember how it’s spelled and what it does.  For example, if you wanted to execute a command that required root privilages (such as installing a program) you would type “sudo apt-get install vlc”.  Remember, the terminal windows is Case-Sensitive.
locate - a useful index-based file search utility
lspci - Lists PCI devices in your computer (used for technical troubleshooting)
lsusb - Similar to lspci, but for USB devices
apt-get - This is used very often to install, remove and update software.  An example of this command would look like:  sudo apt-get install vncviewer.  Note the sudo in front.

The Manual Command

Now, a lot more could be said about these commands.  If you ever want to read all you can read about any one command, you can do that with the man command (which is short for Manual), followed by the command you’re interested in reading about.  For example, if I wanted to read about all the different options for the ls command, I would type man ls.  When viewing a manual for a command in terminal, you can use the up and down arrows to scroll, and then when you’re done reading, you need to press the Colon key : followed by the q key.  This will take you back to the Terminal window.

That’s all I am going to write about the Terminal for today.  The three very simple exercises above should have you feeling just a little more comfortable with the Terminal and navigating around your file system.  Here are a couple tips though, in case you get lost:

cd / - takes you to your root directory
cd ~/ - takes you to your Home Folder.

And just so you know, your Home Folder is actually located in /home/yourusername/.

There are a lot of great guides out there that go into a lot more detail that I’m willing to do here, so check Google to see what you can find.  Here’s one that I think is pretty clear and concise that you should take a look at if you intend to learn more about the command line.

Saturday, June 14th, 2008

How to Install Real Player 11 (32-bit) in Ubuntu

Well shit (see the comments).  Looks like the deb file I was linking to was taken down at the request of Real.  However, there is another way to install Real Player.

Step 1:

Visit this link and copy/paste the correct line of text (depending on your version of Ubuntu) into a terminal window to add the third-party repositories to your software sources list:

https://help.ubuntu.com/community/Medibuntu#Adding the Repositories

Step 2:

Visit this link and download the appropriate deb file for your systems architecture (i386 or AMD64):

http://packages.medibuntu.org/intrepid/realplayer.html

That’s pretty much it!  Enjoy!

Here be old, out of date instructions with timeless joke: 

You probably remember Real Media Player from back in the hay days of the middle and late 1990s while browsing the Internet using Netscape Navigator (at least I was) on a dial-up connection.  Well it seems Real is still alive and kicking.  Just recently, I was shocked when I discovered that a torrent I had downloaded actually contained files in Real format.  I really thought everybody had gotten with the times by now and switched over to Divx/xvid codecs.  Then again, Real Media was originally intended to be a format that could be streamed over a network, and not downloaded first to be played later.  Which means if you really do remember actually using Real Media for anything in the 90s, it was probably from a video chat with a stripper.

Bandwidth was not the only thing squeezed in the 90s (ba-dum ching!).

Let’s get on with this post, shall we?

There are guides out there that show you how to download the binary executable (a *.bin file) of a Real Media Player installer, aimed towards multiple versions of Linux, but this requires you to open that dastardly terminal window and type a bunch of greek.  Instead, you’d probably like a deb file that you can just double-click on and be done with it.  Well, I’ve found one originally posted here on Ubuntu Forums.  You can download the file here from this link and either run the file right out, or save it to your desktop first and double-click on it to get the ball rolling.

Once its installed, you’ll find a new shortcut for it in Applications>Sound and Video>Real Player 11.

But you might encounter an error; something along the lines of “cannot execute child process (realplay), file or directory does not exist”… I’m paraphrasing.

If this happens, here’s how you fix it:

System>Preferences>Main Menu

Select the Sound & Video category on the left side, then Right-Click on RealPlayer 11 and click “Properties”.  This will open up a little window that looks like this:

In the above picture, the Command: line says “/opt/real/RealPlayer/realplay”.  This is what yours should say, but it might not.  If it doesn’t, make it as I have it, and that should do the trick.  Then click Close twice, and you’re done!

Now, I wonder if CBS’s Big Brother still does the SuperPass deal where you can watch all the contestants live 24/7.  I can still remember the live feed of those babes who fashioned bikini’s out of peanut butter during Season 3…

Saturday, May 24th, 2008

If you use Linux and haven’t heard of Amarok yet…

I have a confession to make. I have been using Ubuntu Linux for over a year now. No, wait.. let me correct that. I started with a 3rd party distro of Ubuntu called Ubuntu Ultimate Edition, which at that time had included many different “power applications” pre-installed with it, most of which I had no immediate use for (several apps in the Programming menu come to mind…). There was a particular application in the Sound & Video category that I gave a short look but never really bothered to give it a GOOD look. That program was Amarok.

Forgive me, Linux community, for I have sinned! [dramatic pause... sound of thunder in the distance] But please, do not fret or pity me, my friend. For I have been saved. Behold! My new great Icon:

Ok, dogma jokes aside: If you have Ubuntu, or pretty much ANY distribution of Linux, INSTALL THIS APP! Would you like to have a few thousand Internet radio stations in HUNDREDS of different genres at your finger tips? Well that’s just ONE feature of many that make up Amarok. Here are some others that really stand out:

  • Synchronizing, retrieving, playing, or uploading music to the following digital music players: iPod, iriver iFP, Creative NOMAD, Creative ZEN, MTP, Rio Karma and USB devices with VFAT (generic MP3 players) support.
  • Creating and editing play-lists, including smart and dynamic playlists. The dynamic play-lists can use such information as the “score” given to a song by an Amarok script, and the playcount which is stored with the song.
  • Playing media files in various formats including but not limited to (depending on the setup) FLAC, Ogg, MP3, AAC, WAV, Windows Media Audio, Apple Lossless, WavPack, TTA and Musepack. Amarok does not play digital music files embedded with DRM.
  • Last.fm support, including submitting played tracks (including those played on some digital music players) to Last.fm, retrieving similar artists, and playing Last.fm streams.
  • Version 2 (in the works right now) will support iTunes Online Music Store, as well as support Windows and Mac OS.
  • Thousands of free Internet radio stations, presorted in over 285+ musical (and spoken word) genres. WOW!

I feel sorry for you Windows and Mac users. You have been forsaken….for now. You’ll have to wait a little bit longer for your musical savior to enlighten you, when version 2 is released. Unfortunately, it’s only in its first alpha phase, so it will be several months before a final release (or even a stable beta) can be expected. But keep your eyes peeled. This is a wonderful application!

To install Amarok in Ubuntu

Click Applications>Add/Remove. Then search for “Amarok”, check off the box next to the search result “Amarok”, and then click the Apply button. You’re done! Install takes just a few minutes (depending on your Internet connection and download capabilities).

The program is pretty easy to get used to. Unfortunately, I’m not in much of a position to give an full review of the program. Being as I myself just “rediscovered my music” with this app, I don’t have much more to say about it other than the MASSIVE collection of radio stations already included with its play-list collection is absolutely jaw dropping. There must have been over 40 stations listed in the Oldies genre alone! Now that’s insane. Even for the Internet.

Ok. Nuff said. Download, Install, Enjoy!

To install Amarok in Other Linux Distros, you can check out one of the links below.


Kubuntu

openSUSE

Fedora

Gentoo

Arch

Ark Linux

Debian

Mandriva Linux

PCLinuxOS
Other (FreeBSD, Yoper, etc.)

Sunday, April 13th, 2008