Tuesday, May 31, 2011

Recompiling your Kernel to 3.0.0-RC1 (or any later version) in Linux Mint 11


As part of Linux's 20th birthday, Linus Torvalds has put out the release candidate version 3.0.0 of his kernel.  His changelog can be found here and I congratulate anyone that finishes it, because I did not.  Now, from what I did manage to read it includes many fixes including improved video support and support for the Microsoft Kinect.  If you're interested in installing it in Linux Mint 11, like I was it will probably take a few hours or more (mostly automated) depending on if you have many errors and the level of customization that you choose to do to your system.  When you're done with installing the kernel, it will still leave the old kernel in your boot list in the event that you do not like the kernel or it is unable to boot.  Still with me?  Good!  Open up terminal and follow along:

Part 1 - Get the Kernel
You can check for a new version of the kernel at www.kernel.org.  If there is a newer version than 3.0-rc1 that has the [Full Source] available, this method *should* still work.  If there is a new version, all directions below will have to be adjusted for the new file name and directories created because of it.  Here is how you can get it for the one we're installing now:

cd /tmp

wget http://www.kernel.org/pub/linux/kernel/v3.0/testing/linux-3.0-rc1.tar.bz2

Part 2 - Extract the Kernel

sudo tar -xjvf linux-3.0-rc1.tar.bz2 -C /usr/src

cd /usr/src/linux-3.0-rc1

Part 3 - Install Files Necessary to Compile Kernel
I *think* these are the correct files, I'll have to come back and do a revision if I got them wrong because my Dropbox text that I was typing up messed up and reverted to the wrong version that left out this part and I had to check my terminal history for what was installed during this step.

sudo apt-get install gtk+2.0-dev  libglade2-dev libglib2.0-dev

Part 4 - Configure the Kernel
This is going to be the part where I can't really help you, you'll have to know about your system if you plan to change anything about your system.  You'll have a long list of options that you can turn off [N], have loaded automatically into the kernel [Y], or loaded as modules [M] (which you have to load for your system to be able to use every time).  The options are not that scary, but you may not understand a lot of them.  If you are not sure then just leave them alone and move past that option or google them and see if they are related to your system.  There is plenty of documentation of each option that I can't cover completely.

sudo make gconfig

Part 5a - Compile the Kernel
This part is going to take a long time to do, probably a couple of hours if you have a relatively quick system.  It's going to be completely automated so once you've started you can go do something else.  I chose to turn my screensaver off so I could periodically glance over and see if it was done from far away.  If you're lucky, you won't get any errors.  If you don't get any errors, go to part 6.  If you do get errors, go to Part 5b.

sudo make

My error message was "error: WARNING: modpost: Found 4 section mismatch(es)."  Yours may have a different amount of sections listed though.  If you get this message just go to Part 5b.

Part 5b - Compiling the Kernel with Errors
Again, this is going to take a couple of hours, but once it finished I didn't have any errors.  I am also not sure how it changes the settings or if you could just start by running it from here.  Regardless I had to run it this way to be able to compile my Kernel.


You shouldn't have any errors now and it should allow us to install the kernel modules.

Part 6 - Installing the Kernel Modules
This part shouldn't take anywhere near as long as compiling the kernel did, but will still probably take a few minutes, possibly upwards of 10.

sudo make modules_install

Part 7 - Installing the Kernel
Again, this part will be quicker.  Expect it to take no longer than a couple of minutes.

sudo make install

Part 8 - Making an initrd Image of the New Kernel
For our system to be able to boot into the new kernel, we need to make an image of the kernel that we just made for our system to use.

cd /boot

sudo mkinitramfs -o initrd.img-3.0.0-rc1 3.0.0-rc1

Part 9 - Update GRUB with the New Kernel Image
We need to tell GRUB that we just finished making the new kernel and that it is in the directory and to add it to the boot screen.

sudo update-grub

Part 10 - Reboot and Bugs
To get into the new kernel all you have to do is reboot and select it from the screen.  If it takes a while to load and you see the Linux Mint GRUB screen or a black screen for a while, just be patient it means that a service is failing to load properly.  For me it was nouveau and after a short time (30 seconds or so), the operating system booted up.

Installing TweetDeck in Linux Mint 11

With my plans to try and use Twitter, I decided that I also wanted to install Tweetdeck and not just the Chrome extension of it.  I like the actual application better than the extension because my tabs are cluttered enough already.  Everyone likes companies that provide cross-platform support and a native version better, right?

So I'll give you two sets of instructions, one for 32-bit and the other for 64-bit Linux Mint.

64-Bit Linux Mint

Download and install getlibs-all.deb.  Open terminal with CTRL-ALT-T and then type these two commands:

sudo apt-get install lib32asound2 lib32gcc1 lib32ncurses5 lib32stdc++6 lib32z1 libc6 libc6-i386 lib32nss-mdns

sudo getlibs -l libnss3.so.1d libnssutil3.so.1d libsmime3.so.1d libssl3.so.1d libnspr4.so.0d libplc4.so.0d \ libplds4.so.0d libgnome-keyring.so libgnome-keyring.so.0 libgnome-keyring.so.0.1.1

Once you've done these steps, follow the 32-Bit Linux Mint instructions to finish installing TweetDeck.

32-Bit Linux Mint

Start by downloading the Adobe Air .bin file from this link and Tweetdeck from here.

Now open terminal with CTRL-ALT-T and navigate to your download folder.  In terminal type:

chmod +x AdobeAIRInstaller.bin
sudo ./AdobeAIRInstaller.bin

Once that is done installing return to your Downloads folder in Nautilus.  Double-click on the TweetDeck_0_37.5.air file located in your download folder and follow the prompts and the 32-bit version will be installed in Menu -> Accessories.

EDIT: Fixed some misspelled package names and instructions.

Sunday, May 29, 2011

Upgrading GNOME3 from 2.x in Linux Mint [OUTDATED]


***Warning***I would just like to say that before you start that installing GNOME3 can cause problems for your system and that you may have to format.  GNOME3 is not quite ready for release on Debian based systems, but it has been said that Linux Mint is planning on supporting it in the future.  That being said, if you're not breaking stuff then you're not having fun.

I had to try a couple of things and format my laptop many times.  I managed to get GNOME Session updated to 3.0.x, but so far I have been unable to get GNOME Shell to compile past version 2.32.1.  I'm still working on that, but I'll do a write up on getting GNOME Session upgraded.

Start by opening terminal and adding the GNOME repository:

sudo add-apt-repository ppa:gnome3-team/gnome3

Now go to Control Center -> Software Sources -> Other Software.  Change both sources that say http://ppa.launchpad.net/gnome3-team/gnome3/ubuntu katya (main and source code) to say natty like so:

Close both windows and return to terminal.  Hit reload when prompted by software sources.  From terminal type the following commands to begin upgrading to the GNOME 3 Session:

sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install gnome-session
sudo apt-get dist-upgrade
sudo apt-get upgrade
sudo apt-get install gnome-shell

This will update everything to 3.0 except gnome-shell (at the time of writing this) which will only install version 2.3x.   It seems that will have to be installed from the source repository to get the 3.x version.  I'll do a writeup on this once I have figured that out.

After that is installed though, log out and try to log in again.  You will need to select the display type when you log in.  You will have 3 types of Gnome listed most likely: Gnome, GNOME, and GNOME Classic (No effects). "GNOME" is the one that will load the GNOME3 Session.  If the screen is black and all you can see is an Activities bar up top, you need to click on it and search for the program "Background" and just change the background because there was a problem with it loading from your old one (you can go back to it after you change it).

If all goes well, which it may or may not have then you should end up with something that looks like these screenshots:

Saturday, May 28, 2011

SBFing the Droid X using Linux Mint

I thought I would help contribute to this by writing a post about SBFing the Droid X using Linux Mint. This is particularly relevant considering A) I had to do it today and B) the 4.5.596 Gingerbread update did NOT change the bootloader for those of us with a Droid X, so we can still SBF back to Froyo when we screw up our phones (like I did this afternoon). The best part about SBFing with Linux is that now that you've (hopefully) learned some of the ins and outs of the operating system from the earlier posts, I think you'll find that the SBF process is much more hassle-free with Linux than it is with Windows.

As far as software, you will need:
  1. sbf_flash utility. This can be found here.
  2. The actual SBF file. Make sure you get the right version. I recommend the Android 2.2.1 System Version 2.2.340 Full (VRZ_MB810_2.3.34_1FF_01) (Current OTA) for best results. This can be found here. It can take quite awhile to download, so just be prepared.
On the phone end, you will need to have:
  1. Your Droid X, preferably fully charged. If your battery is low, you will not be able to SBF. I've never done this with less than 90%.
  2. A USB cable. Plug this into your computer, but hold off on plugging it into your phone just yet.
Start off by powering down your phone. Hold the camera button and the volume down buttons at the same time. Then hold the power button. The screen will likely flash for a second - now let go. The bootloader screen will pop up. It will say Bootloader: 30.04, several spots of black screen, and then Battery OK, OK to Program, (assuming your battery is in good shape) and Connect USB Data Cable. So far so good!

Now open a terminal window. You'll want to navigate to the directory where you've placed your sbf_flash utility and your SBF file. I made a folder called ~/sbf. Once you're in the correct directory, you can type the following command:
This will list the files in the directory. You should see sbf_flash and VRZ_MB810_2.3.34_IFF_01.sbf. Now type the following:
chmod +x sbf_flash
If you've been following the blog, you've seen this before. This simply makes the sbf_flash utility executable to run as a program.

Now, connect your Droid X via USB cable to the computer. It should show on the screen that it is connected! Once it is connected, type the following command into the terminal window you still have open:
sudo ./sbf_flash VRZ_MB810_2.3.34_1FF-01.sbf
Your terminal window should look something like this:

The phone will now begin the SBF process (after you enter your password). I would like to note here that after the SBF process is complete, the phone will reboot. Once the phone reaches the boot animation (i.e. the scary Droid eye) I always unplug my USB cable. I have never been able to SBF without immediately bootlooping after, so for others who have similar problems, this is the solution:

  • During the boot animation, pull the battery.
  • Return the battery to the Droid X.
  • Hold down the home key, then hold down the power key. Wait until the Android logo with a triangle and an exclamation mark pops up.
  • Now press the search key. This is what is known as stock recovery, just in case you haven't seen it before.
  • Scroll down to "wipe data/factory reset" using the volume buttons, and select it using the camera button.
  • When it is finished, press the camera button on the "reboot now" option. The phone should reboot successfully.

Congratulations, you have just managed to SBF using Linux Mint!

Tweaking Linux Mint 11 (Part 1)

As you start to add and change programs to your system, there may be some behavioral tweaks (simple or complex) that you want to do to your system to make your life a little easier.  I would like to cover some of the more important tweaks that I think people will want to change.

Preferred Applications

This feature is located in Menu -> Control Center -> Preferred Applications.  It grants you access to the applications that are run by default whenever your system makes specific calls.  For example, in the screenshot below I have changed my preferred web browser to Google Chrome so that anytime I click on a hyperlink it will no longer be opened with Firefox.  I chose Google Chrome because of the effortless bookmark/extension sync feature across Windows/Linux platforms if I ever need to switch back and forth.

Configuring the Boot Loader

Some of you may not be happy with Linux Mint 11 being the default operating system that is booted into or may want to change the time it takes for GRUB2 to boot into one of the operating systems.  To do this go to Menu -> Control Center -> StartUp-Manager.

First you can change your default operating system that is highlighted by GRUB2, so that you automatically boot into it from the boot loader.  You may also change how long it takes to boot into your default operating system using this program.

The "Timeout" option indicates how long the boot loader screen will stay active giving you the option of selecting an operating system.  If you would like to automatically boot into the operating system that you have selected enter "0" for the time.  Otherwise you can pick a default timeout that you would like.  However, if you would like to set it to not time out at all then there are some *slightly* more complicated steps to follow below:

Start by opening a terminal and typing the command:

gksudo gedit /etc/default/grub

Here we can change the time to infinite and do some more advanced configuration options as well.  By default this is the top few lines of my grub:

If you want to change your GRUB timeout from x to infinite change the following line:


If you would like GRUB to remember operating system you booted into last and highlight it automatically on restart, change the first line and add this one after it (both case sensitive):


Now, if you've made any changes in gedit hit the save button and then type this for following for your changes to take effect:

sudo update-grub

Restart and your changes should now be in place.  You can test the GRUB_DEFAULT and GRUB_SAVEDEFAULT by setting a low GRUB_TIMEOUT and booting into different operating systems and rebooting.

Starting a GUI-Based Application on Boot

It's possibly you may want to start an application that has a GUI when starting your system to help automate your system a little.  You may also have one that is being run automatically that you want like removed.  Go to Menu -> Preferences -> Startup Applications.

From here we can either add or remove an application.  For the sake of the tutorial, I'm going to add a Minecraft server so that I don't have to start it up every time I turn my computer back on.  Start by clicking Add and entering the name of your application.  Now we want to type the command to execute the application from terminal.  For some samples, check out the Native Games for Linux Mint 11 section on menu commands.  My Add Startup Program looks like the following:

Name: Minecraft Server
Command: java -jar /home/user/minecraft_server.jar nogui

Or if you'd like another example of how to start Pidgin when your system starts up:
Name: Pidgin
Command: pidgin

Friday, May 27, 2011

Linux Mint 11 is out!

Linux Mint 11 "Katya" was just released yesterday and some of you would probably like to know how to upgrade your system to the release version of Katya.  Depending on how well you stay on top of updating your system, it is entirely possible that you've already updated your system out of the release candidate stage.  For those of you wanting to know how to do it though without having to lose all of your information formatting and reinstalling Linux Mint 11, I'd like to just tell you what is involved in updating your distribution.

If you started a while ago and have Linux Mint 11 RC and want to update to the final release then all you have to do is go to Administration -> Update Manager.  Now install updates for all level 1 or level 2 application.

You'll probably have to do it twice to install the two sets of updates below:

After that, you're done.  You now have the appropriate packages for the release of Linux Mint 11.

Thursday, May 26, 2011

Native Games for Linux Mint 11

**Correction about .deb Files**  If your .deb files do not open with GDebi Package Installer when you double click on them but rather Archive Manager, then right click on them, select Open With Other Application... type "gdebi-gtk" for custom command.  Select 'Remember this application for "Debian package" files' and it should now open all .deb files when you double click on it.

If you're not interested in the games, the installation procedures for the various file types could be useful located down below for all of the games in the Humble Indie Bundles #1 and #2.

There are quite a few games available natively on Linux that are actually quite fun.  For starters, Indie developers love us and we love them.  That's why it is a good idea to support projects such as The Humble Indie Bundle when it comes up.  The Humble group has set up a donation with Indie developers that lets you decide on a tip being split however you like between the game developers, Electronic Frontier FoundationChild's Play Charity, and Humble Bundle, inc.  The goal of this project is to let people donate any amount they want or can to the project to get all the available DRM-free, cross-platform games(Windows/Linux/Mac).  They also work with programs such as Steam, Desura, and OnLive to give you keys to access your games there to.

When a humble bundle is available that you've purchased, or you may already own one (or the games themselves).  You'll possibly have access to the a screen that looks like the one below:

One of the first things you most games have multiple installers.  At very least, they almost all have DIFFERENT types of installers.  So, first thing we need to do is figure out how we deal with the the various installation files.

Installing Braid (braid-linux-build2.run.bin)

In order to install this file, open terminal and navigate to the directory that the game was downloaded and type the following commands:

chmod +x braid-linux-build2.run.bin

This will install bring up a menu to install Braid and eventually have you choose between the 32- and 64-bit installation.  The game will be located in Menu -> Games.

If you get an OpenGL error while trying to run this game then it may be an issue with GL_EXT_texture_compression_s3tc being disabled due to licensing in your country.  It can apparently be remedied by typing apt-get install driconf in terminal and turning that feature on in driconf configuration under Image Quality tab.

Installing Cortex Command (cortex_command-amd64-installer-b24-12162010.bin)

Cortex Command will install exactly the same way as Braid did.  So open up terminal and type the following commands (it will change depending on if you have the 32 or 62 bit file):

chmod +x cortex_command-amd64-installer-b24-12162010.bin

The game will be located in Menu -> Games.

Installing Machinarium (Machinarium_full_en.tar.gz)

This one is going to be a little different and more difficult to install, but let's start by going to terminal and navigating to location that Machinarium was downloaded to.  In particular, this one doesn't actually have an installer and is a flash game.
tar xvf Machinarium_full_en.tar.gz
mv Machinarium ~/Machinarium
To give this a menu launcher, go to Menu -> Preferences -> Main Menu.  From Main Menu, go to Games -> New Item and use the following launcher properties for Machinarium:

Type: Application
Name: Machinarium
Command: bash -c "cd ~/Machinarium/ && ./Machinarium"

If you would like an icon for it, I am using this one.  This game is not currently capable of being launched from the MintMenu, but can be launched from a Gnome Main Menu (Right click on Task Bar, Add to Panel -> Main Menu).  Otherwise, you can just right click on the application and open it from the ~/Machinarium directory.

Installing Osmos (Osmos_1.6.1.deb)

This is going to be one of the easiest things you will install.  Debian packages are basically installation files for Debian distributions such as Ubuntu and Linux Mint.  To install this file, double click on it and you will be taken to the Package Installer:

Click Install Package and the game will be installed to the Menu -> Games folder.  Once it is done you will see a message saying that your installation is complete and that is all that you have to do to install the Osmos Debian package.

Installing Revenge of the Titans (RevengeOfTheTitans-HIB-18012-amd64.deb)

This Debian package comes in two incarnations, a 32-bit and 64-bit package.  I wasn't paying attention when I was downloading it and tried to install the 32-bit one on my system and was greeted by this helpful message:

This at least let me know to go back and download the 64-bit package.  To install this one, the instructions are exactly the same as Osmos.  Double click on the appropriate Debian package and then hit Install Package.  The game will be found in the Menu -> Games folder.

Installing World of Goo (WorldOfGooSetups.1.41.deb)

Again, installing this package is very easy.  Just double click on WorldOfGooSetup.1.41.deb and go to Install Package.  World of Goo will be located in Menu -> Games.

Installing Aquaria (aquaria-lnx-humble-bundle.mojo.run)

Open a terminal and type the following commands to start installing Aquaria:

chmod +x aquaria-lnx-humble-bundle.mojo.run

It will be located in your Menu -> Games folder.

Installing Gish (gish153-1.tar.gz)

Open a terminal and navigate to gish153-1.tar.gz and then type the following commands:

tar xvf gish153-1.tar.gz
mv gish153 ~/gish

Now we need to create a menu icon in Main Menu.  Go to Games -> New Item and use the following settings and an icon:

Type: Application
Name: Gish
Command: bash -c "cd ~/gish && ./gish"

Installing Lugaru HD (lugaru-full-linux-x86-1.0c.bin)

This follows the same rules as the bin installations above, so we'll do that for this one as well in terminal:

chmod +x lugaru-full-linux-x86-1.0c.bin

That's it.  Follow the installation screen and it'll be in your normal Menu -> Games screen.

Installing Penumbra Overture (penumbra_overture_1.1.sh)

This will install the same way as the bin files.  Start by opening a terminal and typing the following commands:

chmod +x penumbra_overture_1.1.sh

Follow the dialogue and then the game will be installed to your games folder.

Installing Samorost 2 (samorost2_linux.zip)

Samorost 2 is a flash game that involves playing from an html file.  So we're going to extract the contents of this game to a folder (keeping the same installation theme of the previous games ~/gamename, but not important).  Open terminal and navigate to the zip file and type the command:

unzip samoros2_linux.zip -d ~/samorost2

Now go to Main Menu and set the icon and launcher properties to the following:

Type: Application
Name: Samorost 2
Command: bash -c "cd ~/samorost2 && gnome-open Samorost2.html"

Again, with things that we've made an icon for, they won't run in MintMenu but they will run in the Gnome's Main Menu.

Minecraft Beta

You have probably heard about Minecraft - you may even own it.  The game runs very well in Linux and is a Java game so it is cross-platform.  This means there is very little you have to do (besides buying the game) to play the game.  You can play it from the browser or download it from their website.  Once it is downloaded, right click on the file and select Properties -> Permissions -> Check the box titled "Allow executing file as program" (this is the same chmod +x).   Run the program once by double clicking it and let it patch everything by logging in.  Now close the program and go back to your home user directory.  Press CTRL+H to show hidden files and copy the minecraft.jar file into .minecraft.  Now we need to make a Main Menu entry with an icon and appropriate settings:

Type:  Application
Name:  Minecraft
Command:  bash -c "cd ~/.minecraft && java -jar minecraft.jar"

And again, as a reminder, the Main Menu entries won't work with MintMenu.  Also mods, skins, and texture packs to beautify Minecraft can be found at Minecraft Forums.  I suggest you head on over there and look for a pack that suits your interests.

Wednesday, May 25, 2011

Installing Wine in Linux Mint 11 [Reference Page]

Introduction to Wine

Wine is a compatibility layer that allows your system to run Windows binaries that allows the binaries to call Windows APIs that are implemented in DLLs.

Wine is not entirely an emulator like VirtualBox in a couple of ways.  First, you do not need to install any of the Windows operating systems to run a program that requires a particular Windows API.  You can achieve this effect without owning a copy of Windows.  Second, an emulator slows the system down by emulating an entirely new operating system for the processes to go through.  By taking just the libraries of Windows and the speed of a Linux system, you can sometimes gain speed over running a program in Windows.

It should be said that Wine has to convert Direct3D games to OpenGL for them to run properly in Linux.  This can cause a performance hit of varying degrees for games that are not available in OpenGL.  Now, games that have an OpenGL setting are more likely to be able to outperform Windows due to the fact that Wine does not have to use processes converting the Direct3D to OpenGL before you see it.

Installing the Latest Version of Wine

To install the latest version of Wine in Linux Mint 11 enter the three commands below in terminal:

sudo apt-add-repository ppa:ubuntu-wine/ppa
sudo apt-get update
sudo apt-get install wine1.3

Configuring Wine and Winetricks

Under All Applications -> Wine you will have two applications installed that will help you configure Wine to run Windows executables.  The first is called "Configure Wine" that allows you to specify the operating system to emulate, which DLLs to have installed (ex. Direct3D 9), shader and audio options.

The next application will let you automatically install some applications, games, and benchmark tools.  It also is capable of downloading and installing required programs (wine prefix -> Install a...)  such as DirectX and Visual C++

What Programs Run in Wine?  (And How Well)

While Wine is constantly being improved, there are many factors that will determine how well your application runs in Wine.  A 32- or 64-bit operating system or version of a software can both cause problems or work better than the other.  Also the distribution of Linux that you're running can have an effect on the your application due to the libraries available.  For example, Gentoo may run application A and not B, but Linux Mint may work in the opposite manner.  This is why there is a searchable database located at WineHQ where people contribute their bug reports, installation instructions, and provide a grade to the applications.  The grading system is as follows (from worst to best): garbage, bronze, silver, gold, and platinum.

Installing an Application Using Wine

[Simple Version] It has become very easy to install an application using Wine using the graphical interface of Linux Mint 11.  Once you have downloaded your .exe file, all you have to do is right click on it and select "Open With Wine Windows Program Loader."  This will start the process of installing the application like you would normally in Windows into the default wine prefix.  All programs in the default wine prefix share wine settings, such as installed DLLs and their settings.

[Advanced Version]  To install a program into a "bottle" and give your application a different configuration file you need can install and run an installer, set up wine, and run the actual program by following these 3 commands:

env WINEPREFIX="/home/name/.wine-program" wine install.exe
env WINEPREFIX="/home/name/.wine-program" winecfg
env WINEPREFIX="/home/name/.wine-program" wine /home/user/.wine/dosdevices/c:/location/to/.exe

For the name, you should use the username on your account and for the program, you can set it to anything and use it for multiple installations. Below is a sample image showing two different ways you could set your programs up. The left two are games, right two are applications. This is just an example though, you could combine them in any manner that you want or not at all.

*** BUG INFORMATION *** When you install a program with Wine, you will get an application installed in the MintMenu that will error out.  There is a work around where you can put a small gnome menu icon on your tray (or use a launch shortcut from your desktop) to launch all of your programs that have been installed through Wine.  To add a Gnome Menu, right click on a blank spot on your task bar and click "Add to Panel" and then add "Main Menu" to your task bar.  Click on it, and you will find your applications installed in Wine -> Programs.

Monday, May 23, 2011

Installing XBMC Media Center for a Home Theater PC

Some of you may have blu-ray players, HDMI out, music, pictures, and videos on your computers that you would like to watch on your TV (or monitor). That's where XBMC comes in. It's a browser that is capable of displaying the weather, downloading a vast array of plugins and scripts (such as youtube and engadget videos), combining the contents of a group of folders (e.g. E:\Movies1, ~/Movies2/, and smb://networkcomputer/movies3/) that would be displayed alphabetically as a folder listed as Movies in within XBMC, an easy download subtitle script, and more.

XBMC is a very nice program for people interested in organizing their media. I've been using it for a few years now. I bought a $20 infrared remote off Newegg.com. This is not necessary - you can still use a physical or wireless keyboard and mouse but having a remote with a pause button on it adds to the experience.

Installing XBMC is currently very easy. We'll be using the unstable Team XBMC repository because as of writing this, there is no stable version released for Natty Narwhal (Linux Mint 11 is based on Ubuntu 11.04 and can use all of their repositories and their own as well.) If you'd like to check for a stable release before doing anything, you can just try typing xbmc in the Software Manager and see if anything comes up. If not, lets continue on with installing the unstable repository and XBMC Media Center. Open terminal and type the following (3) commands:

sudo add-apt-repository ppa:team-xbmc/unstable
sudo apt-get update
sudo apt-get install xbmc

Once it is installed, close terminal and you will find XBMC installed at Menu -> Sound & Video -> XBMC Media Center.

This is the main screen and the default skin for XBMC. First, lets configure the ability to download subtitles at the touch of a finger from multiple services. Start by clicking on Programs -> Get More -> Subtitles -> XBMC Subtitles -> Install

Now you want to configure the subtitles. Pick your primary, secondary, and tertiary languages from the list. Set all 3 languages the same if you can only read one language:

Under Services, check Sublight.si and any extra subtitle services that may apply to you. In the advanced options section, you may want to check the option "Search next available service if no results are found" so that it will look through other subtitle services.

Hit OK and then escape a few times until you are back at the main XBMC Media Center screen. Now go to System -> Skin -> Add-On (Shortcuts) and scroll down to Video OSD at the bottom. Click on Subtitle Add-On.

This will bring up the next window that allows you to enable the XBMC Subtitles add-on by selecting it.

You will now have an on-screen display available to download subtitles if you would like from any movie or TV show that you would like. I will touch more on this again later.

While we're in the settings, let's set up the weather. Back out to the Settings menu and click on Weather.

The weather setup is pretty generous with how you can set it up. Click on the first location that you want to change and type an area code, a city/state, or a city/country combination and you should get a screen like the one below:

If you get multiple listings, select the appropriate one (e.g. you may have an airport listing as well) and then exit out of the weather one when you are satisfied with that. Go back to the main XBMC and check that the weather option works and is reporting correctly and looks like this:

If for some reason your regional settings for temperature are not correct, or you want to just change between Fahrenheit and Celsius all you need to do is go from the XBMC main menu to System -> Appearance -> International.

On this screen you will want to change your region, for example UK (24h) and UK (12h) will both give you Celsius while only changing the format of the clock from the USA regional format.

Next, for Android users there is a free application on the market called Official XBMC Remote that can be set up to control XBMC remotely (http or LAN). If you'd like you can go ahead and download the application on your phone while we configure the XBMC settings for the remote.

In XBMC go to Settings -> Network

These are the settings we want to change for the phone. We want to check "Allow control of XBMC via HTTP." You can leave the Port as 8080. Username can either stay as xbmc or be changed to something more secure. Password should also probably be changed to something more secure than being blank. You want to ensure that no one is able to just see your media that wanders by.

Now we need to find out the IP address of your computer. If you know what it is already (e.g. looking through your router) then you can skip this step. Otherwise, open terminal and type:


You'll see a long block of text, look for "inet addr:" followed by an ip address. Mine is and that will be going into my phone in XBMC Remote. Now open up XBMC Remote. You should be greeted by a message that says:

No hosts detected

Click on "settings" or use the menu in order to add an XBMC host or IP address to your configuration."

So click settings, you'll be greeted by another error message asking you to press the menu key. Do so now, you'll now see an "Add Host" key. Tap that. Your setup should look similar the one below (things marked in red depend on you):

Name of this instance: HTPC
Host or IP address:
HTTP API port: 8080
Username: xbmc
Password: xbmcpassword
EventServer port:9777
WiFi only: checked
Access Point:
Mac Address: This should be filled in automatically when you type in your Host IP address
Socket read timeout in milliseconds: 5000
Wait after WOL in seconds: 40
WOL Port: 9

Now we can back out of the settings. But we still don't have any way to test the settings because we haven't added anything to the library yet. We'll get back to this one later too.

Before we get into adding actual movies or TV shows into XBMC, I want to cover how to add video Add-Ons. This is fairly straight forward and easy to do. from the main menu just select Videos -> Video Add-ons -> Get More...

This will give you access to a wide range of clips and videos from various networks including your playlists and favorites on YouTube once you have set your account up with the plugin.

Now to set up video libraries. We'll use TV shows for an example. First you want to click on Add Videos... click Browse and navigate to the first location of your TV shows. Now if you have multiple locations, click Add and then hit Browse again. If a hard drive doesn't show up, you may have to search for it in by selecting "Root filesystem" then going to "media." If all goes well, you should have something that looks like this:

Enter a name for the media source and hit OK. Mine will be TV Shows. Now this next part is optional, but you might want to choose a scraper that will go through all your TV shows, music, and movies and provide album covers, artwork, and posters.

There are three choices for scrapers: The TVDB for TV Shows, MTV for Music videos, and The MovieDB for movies. If you have a mix, you are able to add multiple scrapers.

Once you hit okay, you have the option of letting the scraper download information. It takes a little bit, but worth it. Once it is done downloading. click on the folder you just made, move your mouse to the left side of the screen to pull out the menu and if you'd like change the view to show more detail, or just icons.

Finally, let's say the scraper got the wrong show. It happens. Right click on the show, go to TV Show Information. Click "Refresh." Now select the show that corresponds to the original language and release date of the show that you want the actual poster for.

Now that we've got some files in our library, we can either select them with the keyboard and mouse or with the Android application that we downloaded earlier. In the bottom right corner of the XBMC application, click on the bubble that says something like "XBMC Pre-11.0 Git: Unknown" and it will give you a pop-up asking you which server you'd like to connect to. Select the HTPC one that we made earlier. Now to try watching a TV show. Select "Watch your TV Shows." If everything went well, you should see all of your album art on your phone now too. Select a show to try out and then hit play. Now, using your phone or the keyboard, if you would like to activate subtitles navigate to this button and click on it:

That will bring up a screen allowing you to pick from all the available subtitles for your language for that particular file. If you notice the file doesn't match the audio at all you can either go into the audio settings (two buttons to the right from the above picture) and adjust the delay of the subtitle file -or- download a new subtitle file if you noticed that you one got was too far broken to match at all (or completely wrong). The download screen will look like this though:

Once done downloading, the movie will resume playing and you are free to enjoy! This concludes the XBMC Media Center tutorial.

Sunday, May 22, 2011

Guide to Closing Programs Without the Power Button (and Workspaces!)

Yep. I see you there. You installed something. Started that program and then got a screen that froze and now you have to hold the power button in until your computer turns off just so you can get back into Linux and try again. I figured I would cover Workspaces and ways to kill programs so that it isn't quite as annoying when one of those programs goes rogue and kills your machine.

First, thing I am going to do is teach you how to switch workspaces in the xserver (GUI) interface by default. This can help you maximize your working area and reduce clutter. You have 4 working areas (NW, NE, SW, and SE) and you start in the top left one. To move from one to the other, you hold down CTRL-ALT and use the directional pad on the keyboard to switch.

The text-based interface works much the same way. You have 6 interfaces that are accessed by holding CTRL-ALT and pressing F1-F6 to switch between the different workspaces. CTRL-ALT-F7 will bring you back to the xserver GUI that you're currently on. This is important to remember when you have a problem with the xserver GUI and need to remedy the issue.

Now, let's cover the issue of closing rogue programs. It might just be an annoying window that you keep clicking close on and the window won't disappear or a full-blown computer stroke. If you lose complete control of your system and you know what caused it, it can usually be very easy to fix.

Scenario: Your calculator went insane and told you pi was equal to 3.15 and then locked up.

What we know about this, is that it's the calculator causing a problem so we're going to use CTRL-ALT-F1 to find the error (I'm going to use terminal for screenshots, it'll look roughly the same) and try to kill the process by typing "top" in the terminal window once you've logged in. This part can be a little tricky and annoying, but not too bad.

I don't see anything in the first list that looks like a calculator, so I'm going to look through the list by using < and > (shift+, and shift+.) to scroll through the pages.

After a little searching, I found it. Now we have to kill the process. The hard part is over, note that my PID is 21852. So we want to press "k" to start to kill the process. You'll then be asked "PID to kill:" type 21852 (replace with your PID). One last prompt will appear saying: Kill PID 21852 with signal [15]: and you type "kill" to finish the process. Now press CTRL-ALT-F7 to return back to the GUI.

Installing Windows 7 in a Virtual Machine

There are a couple of reasons you may want to do this. In Linux there are just some things you're not able to do without going into Windows: one of those is Microsoft Office 2010, which struggles with Wine. If you'd like to have Windows and possibly other operating systems at your fingertips though, let us continue with the tutorial for setting up Virtual Machines in Linux Mint 11.

Go to the Software Manager located in the Menu. Search for "virtualbox-ose" and install it:

Now go to Menu -> Accessories -> VirtualBox OSE

Select "New" to begin the process of creating a new virtual machine. Press Next until you get to the following screen and select the operating system you want to use and name your virtual machine.

Now we'll want to designate how much RAM to allow your system to have, if you can afford it 1024 MB is a good amount for a Windows 7 system. Otherwise 512 is the minimum recommended by VirtualBox. Using the slider move it to the amount of RAM you'll be using:

Next we'll want to create a new boot hard disk for our operating system files and other programs to be stored on. We'll do that by clicking "Create new hard disk."

Next we'll have to choose which type of hard disk our operating system gets. The options are "Dynamically Expanding Storage" and "Fixed-Size Storage." With both of these, you will specify the size that Windows will think the drive is, but the Fixed-Size Storage one starts out the same size that you specify immediately taking up the maximum amount the virtual box is capable of.

Once you have decided the type of drive to make, you will be asked to assign the maximum amount of space to the system. You should choose this amount based on what you plan on doing with your Windows system, considering that it is difficult to get 3D acceleration to work in emulated systems though and that many games may not work.

Hit Next a couple of times to finish out the menu and you will be brought back to the main menu with our newly created blank Virtual Machine.

Next, we'll want to select the boot disk for the CD/DVD disk (or ISO) that we will be installing Windows from. To do this, select Settings from the screen above, go to Storage on the left side and under IDE Controller select "Empty." Now under Attributes on the right hand side, choose the appropriate CD/DVD drive that corresponds to your drive, or if you're using an ISO file click on the picture of the CD, select "Choose a virtual CD/DVD disk file..." and then navigate to the location of your ISO.

Once your CD is mounted you should be brought back to the main screen. Click start, to boot up into the Windows installation, from here you should see the familiar screen that looks like the one below:

Follow the windows installation like you would normally install it. Once it is done, you'll automatically boot into Windows. If you'd like you can unmount your installation CD now by right clicking on the single CD icon at the bottom right of the window and selecting "Remove disk from virtual drive."

Now, for additional functionality (such as allowing Seamless Display and Shared Folders) if you press Host Key (Right CTRL by default) + D you will begin the process of downloading and installing the VirtualBox Guest Additions.

Say Yes, when prompted to download the ISO from the internet. Another prompt will appear, asking you to download it. Click that and then you'll be asked if you wish to mount the ISO. Click, mount and wait for autoplay to appear. Install the windows application like normal.

Reboot your virtual machine and enjoy the new features accessible from the menu. Some features that you may enjoy are Seamless Mode (Host Key + L) with certain applications or full screen mode. To get a shared folder working, you will want to right click on the folder in the bottom tray of the operating system window and click on "Shared Folders..." and then select Add Shared Folders (Ins):

From here, you can find a directory that you want to have windows recognize from your Linux box as a network drive. For folder path, if you select "Other..." you will gain access to a file browser. Auto-Mount will make the drive mount upon start.

That concludes the basics of VirtualBox. Below I have included a picture of Windows 7 running in Seamless Mode in Linux Mint 11. The only program I have running in it is Internet Explorer 9. Getting Microsoft Office 2010 is easy to get installed at this point. You just install it from the CD or the executable file found from Microsoft's website. This is particularly helpful for students looking to run OneNote 2010 in Linux.

Installing the Android SDK in Linux Mint 11

In a slight change of direction, I'm going to cover the installation of the Android SDK for those of you out there that are interested in developing and designing themes in Linux.

First thing we will want to do is prepare our computer by downloading and installing Eclipse. To do this, open up terminal and type the following command:

sudo apt-get install eclipse

Hit yes and let everything install. After that is done, select menu and search for and run Eclipse. The first screen you will be greeted by will look like the one below:

Just hit next to continue past the screen, or designate a folder for your workspace. If you'd like the folder to be hidden put a period in front of it. Now that we're in Eclipse, we need to set up the repository for the Android Development Tools (ADT) and download them. Click on Help and select Install New Software. From here, you want to click "Add..." and you should be at this screen now:

In the location section of this window, you want to put the following address:


When you click OK the source will load (if for some reason this source isn't selected with "Work With", just change it) and you should see the Android Development Tools listed. Check all of them and click next through all of the menus and accept the licensing agreement.

Now let's put Eclipse on hold for a minute and go to the Android SDK Download page and get the .tgz file for Linux (i386). Once this is downloaded, open the terminal and go to the directory that it was downloaded to (possibly ~/Downloads) and if you are interested in checking the checksum against the one on the website, type:
md5sum android-sdk_r11-linux_x86.tgz

If all goes well, you'll be greeted by a checksum that matches the one on the website. Now to extract the .tgz file and move it to the home directory:

tar zxvf android-sdk_r11-linux_x86.tgz
mv android-sdk-linux_x86 ~/

If you'd like, you can delete the .tgz file now by typing rm android-sdk_r11-linux_x86.tgz. Now, return to Eclipse and go to Window -> Preferences. On this screen you want to select Android on the left side. For SDK Location, you will want it to be (depending on your version):


So far, so good. You may or may not see this error pop up though:

No need to panic though, click Okay to get out of this and go back to the main Eclipse menu and then go to Window -> Android SDK and AVD Manager. On the left side, select Available Packages and then under "Android Repository" install the Android SDK Platform-tools, revision 4. Once that is installed, everything should be up and running and you'll have something that looks like this:

**There was an error in the bottom of the above screenshot that I got rid of by resetting Eclipse. I forgot to take a screenshot of it and wanted to mention that I had an error appear, but was still able to compile a "Hello World" script.

If you're interested in getting the Graphical Editing Framework installed, just go to Help -> Install New Software... Add the site listed below:


Select this repository and just choose the version of the Graphical Editing Framework that you want. It will install the same way as ADT did previously.

Finally, the Android Debug Bridge (ADB) can be located in the following directory and with the following commands:

cd ~/android-sdk-linux_x86/platform-tools

This will give you a laundry list of command tools for ADB.

**As an additional side note, I don't actually program for the Android OS. I did this writeup to help and encourage the Android community to program in the Linux environment. If for any reason this write up is incomplete, please let me know and I'll see what I can do to help complete it.