Friday, 25 June 2010

How to Manage WBFS Partitions in Ubuntu Linux

A previous post of mine, How To Play Nintendo Wii Games from a USB HD, deals only with the Windows OS.  Suppose you'd like to load Wii games from a USB HD, but you're using, say, Ubuntu Linux?  Well then you would need an alternative WBFS partition manager.

Enter Wiithon.

Wiithon is python-based GUI linux application for managing WBFS partitions.  It's clean, simple to use, and even supports remote updates of game info, pictures, etc.  If your external HD doesn't already have a WBFS partition, Wiithon can create one.  The application can even copy wii games from one partition to another...

The current stable version is 1.1 and I believe development might be at a standstill (the latest repo is Karmic), but it works great on Lucid.  To install, simply run the following commands from Terminal:

grep "deb karmic main" /etc/apt/sources.list || echo deb karmic main | sudo tee -a /etc/apt/sources.list && sudo apt-key adv --keyserver --recv-keys 1F882273 && sudo apt-get update && sudo apt-get install wiithon && sudo gpasswd -a $USER disk

This will add the Wiithon repository to your /etc/apt/source.list, and download and install the program.  Once installed, you can launch from the Applications > Games > Wiithon menu, but you must be in sudo mode to do so!

If you'd like to give the current user permission to launch (recommended), simply run

sudo gpasswd -a $USER disk

You can now launch Wiithon from the Applications menu using your current user profile!

Tuesday, 22 June 2010

How to Convert MTS to AVI in Linux

I played in an Ultimate tournament yesterday and thought it would be great to take some team video and create a highlights/bloopers reel.  However, this requires some editing on the computer and I was filming with my Sony HDR-SR10, which records in full HD 1080 AVCHD.  This results in an bunch of .MTS files on your computer, and though some media players will play these files, they video quality is chopping and full of weird horizontal lines.

Clearly these video files must be converted to a more workable format....

I've tried many different scripts and packages, including m2tstoavi and handbrake without success.  After some fiddling, it seems that the best option is a customised ffmpeg.  Here's how it worked for me:

1. Download the Necessary Packages

sudo apt-get install build-essential libxvidcore4-dev libfaad-dev libfaac-dev libmp3lame-dev subversion

2. Grab Most Recent FFMPEG

svn checkout svn:// ffmpeg

3. Compile the Source Code

cd ffmpeg
./configure --enable-gpl --enable-libmp3lame --enable-libxvid --enable-libfaac --enable-nonfree
sudo make install

This will probably take a little while...

4. Configure FFMPEG to Your Camera

Run ffmpeg and pass it one of your .MTS video files to the program.  This will allow you to see some basic info about the video/audio formats your camera uses.  Then, tailor ffmpeg to your camera (assuming you only have one of these super-hd video cameras).  I'm using a sample video called 00451.MTS.

ffmpeg -i 00451.MTS

The important output will be near the bottom:

Input #0, mpegts, from '00451.MTS':
  Duration: 00:00:24.54, start: 1.000033, bitrate: 5510 kb/s
  Program 1
    Stream #0.0[0x1011]: Video: h264, yuv420p, 1440x1080 [PAR 4:3 DAR 16:9], 59.96 fps, 59.94 tbr, 90k tbn, 59.94 tbc
    Stream #0.1[0x1100]: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s
    Stream #0.2[0x1200]: Subtitle: pgssub

There are 3 streams: video, audio, and subtitle.  I'm not sure what subtitle is, but let's ignore it for now.  Video is in 1440x1080 resolution, pixel aspect ratio is 4:3, display aspect ratio is 16:9, and 59.96 frames per second, at 5510 kb/s.  Audio is in ac3 at 448 kb/s.


Now ffmpeg can be used to convert video.  If you only have one or two files to convert, simply navigate to the proper directory, and enter the following comand in your terminal:

ffmpeg -i InputFile.MTS -vcodec libxvid -b 18000k -acodec libmp3lame -ac 2 -ab 320k -deinterlace -s 1440x1080 OutputFile.AVI

But if you have many files you may want to use a batch conversion script.  Create a gedit file in your favourite scripts directory... /usr/share/myscripts will do fine.  Save the following text file to the directory:

for a in `ls *.MTS` ; do ffmpeg -i $a -vcodec libxvid -b 18000k -acodec libmp3lame -ac 2 -ab 320k -deinterlace -s 1440x1080 `echo "$a" | cut -d'.' -f1`.avi ; done

Call it ConvertMTS or something.  When run, this script will convert any .MTS files in the current directory to .AVI and save the new files in the same directory.   To use the script, navigate to your MTS folder in terminal:

bash /usr/share/myscripts/ConvertMTS

.... Sit back and wait :-)

Thursday, 17 June 2010

How to Play DVDs in Ubuntu Linux

Ubuntu linux comes ready to do many things out of the box, but DVD playback isn't one of them.  However, it's quite easy to enable this feature by following the steps below.

To play DVDs in a movie player like VLC or Totem Movie Player (Ubuntu default) you require a package called libdvdcss2.  You can't get this package directly from the repositories, probably for legal reasons, but it can be downloaded via the libdvdread4 package.

sudo apt-get install libdvdread4

Now run the libdvdcss2 install script:

sudo /usr/share/doc/libdvdread4/

This is all you need to play DVDs....Just open via Totem, VLC, or your favourite movie player.  I had to restart the system before it would take effect.

Monday, 14 June 2010

Guayadeque: Great Linux Music Player

Yeah, we all know about Rhythmbox, Banshee, Exaile and Amarok... some may even be familiar with Helix, MPlayer, and VLC as music players.  None of them quite had what I was looking for in a music player.  In fact, I've been on a mini-quest for a good gnome music player for some time now.  I believe that quest has ended with Guayadeque.

Guayadeque is a simple, well-organised GUI music player for gnome.  It's performs well with large libraries (30,000+ files) and satisfies all my music playing criteria.  Anonbeat, the developer of Guayadeque, is a Gran Canaria native and I believe the project is named for a nature reserve valley on the island.  Features include:

  • Support for mp3, flac, ogg, wma, aac and other common formats
  • Auto-lyrics pull from or 5 or 6 other sites
  • AudioScrobble compatibility ( and/or
  • Internet radio station support (e.g. Shoutcast)
  • Static/Dynamic playlist
  • Custom label support (in addition to normal tags)
  • Musicbrainz tags
  •  Smart Playlist mode (suggests music based on your style)
  • Minimize to tray/song change alert
  • Automatic album art cover fetching
  • Search functionality
  • Overall easy-to-use gui

You can see more screenshots of Guayadeque here.

Installing Guayadeque

You can install the stable .deb installer package from the Guayadeque homepage (v0.2.5), but there are a few cool features that only exist in the 0.2.6 builds.  To install...

Add the Guayadeque repository:

sudo add-apt-repository ppa:anonbeat/guayadeque
sudo apt-get update
sudo apt-get install guayadeque-svn

Launch from Applications > Sound & Video > Guayadeque!  You can update to new builds using:

cd guayadeque
svn update
sudo make install

Happy listening!

Thursday, 10 June 2010

How To Install Java (JRE) in Ubuntu Linux

Java is an object-oriented programming language developed by Sun.  Java is used by a large number of websites and you will likely require it for an optimal web browsing experience.  Ubuntu doesn't come with Java, but it is incredibly easy to install (note: make sure you have previously enabled the multiverse repository).

A quick search for "sun-java" in Synaptic Package Manager results in the following main packages:

  • sun-java6-bin
  • sun-java6-demo
  • sun-java6-fonts
  • sun-java6-javadb
  • sun-java6-jdk
  • sun-java6-jre
  • sun-java6-plugin
  • sun-java6-source
 If you only require java for your internet experience (99% of users), you only require sun-java6-fontssun-java6-jre, and sun-java6-plugin.  Mark the packages for installation via Synaptic Package Manager or install via terminal:

sudo apt-get install sun-java6-fonts sun-java6-jre sun-java6-plugin

After going through the install prompts, you may verify the install via terminal with the command:

java -version

You should see output that looks something like this:

java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Server VM (build 16.3-b01, mixed mode)

Lastly, you can check that java is working in your favourite internet browser by visiting this test page.  You have now successfully installed java in Ubuntu!

How to Enable Multiverse Repository in Ubuntu

Ubuntu comes by default with Multiverse repositories installed by not enabled.  There are many useful packages in multiverse that won't appear unless you enable the repository.  What is multiverse?  It's basically a repository of software packages not supported by ubuntu proper.  This includes non-free and restricted-use packages.  Don't let that scare you.  For the most part, it just means that you may be using some closed-sourced software.  Many of this software is quite common (e.g. Java).

You can enable this repository simply by selecting the multiverse checkbox under System > Administration  > Software Sources.  You might also want to check universe and restricted while you're in there.  This can also be accomplished via terminal:

sudo gedit /etc/apt/sources.list  (backup first if squeamish)

The # or ## character(s) represent a line that's commented out.  Removing these characters from the beginning of a line will make it live.  Simply find the lines beginning with deb and ending in multiverse and remove the #

sudo apt-get update
Finish off with an update, and you're finished!  Multiverse is now enabled.

How to Make Ubuntu Linux Look Like Windows 7

This post will show you how to modify your Ubuntu linux OS to look like Windows 7.

After displaying some pretty annoying warning messages for the last 3 months, my wife's Win7 eval copy has finally expired.  Now, I'm not spending $100 to upgrade to a new win7 system... apart from the fact that I don't like win7, it's definitely not a necessity when most time on the computer is spent in a browser or word processor.

Enter Ubuntu.  v10.04 (Lucid Lynx) is the most current and easiest-to-use distribution of linux yet.  If you're not yet on the Linux wagon take a look at this post.  But what if you don't want to learn a new operating system?  Or if you've gotten used to the look and feel of Windows?  No problem.  Among ubuntu's many benefits is its ability to customise its appearance - even to the likes of Windows7.

Step 1: Put Your Best Foot Forward

Make sure that your system is fully updated and that you are able to run normal Visual Effects.  You can do this by running:

sudo apt-get update
sudo apt-get upgrade

You can confirm that you are running normal Visual Effects by right-clicking anywhere on the desktop, selecting Change Desktop Background, selecting the Visual Effects tab and selecting Normal.

Step 2: Install Emerald

Emerald is a handy tool that allows you to install non-standard themes in Ubuntu.  We'll use Emerald to install the Windows7 theme.  Install emerald & libemeraldengine0 via Synaptic Package Manager or terminal:

sudo apt-get install emerald libemeraldengine0

You should now be able to access Emerald via System > Preferences > Emerald Theme Manager or via terminal:

from this link and save to a temp directory.  Run Emerald Theme Manager and load your newly downloaded theme by clicking in the Import button and navigating to the theme file in temp directory.  The theme details and imagery should now be seen in Emerald.  Close Emerald and open a window, say nautilus... you should see changes.  If there are no changes, hit Run Application (alt + F2 by default) and type:

emerald --replace

You should now see new Win7-like windows with transparent borders (as in first image in this post).  If you had to do this, chances are you'll need to do it each time you start your system.  To keep yourself from going insane, add the command to your startup procedure.  Go to System > Preferences > Startup Applications and add the above command.

You can also grab the default Windows 7 desktop wallpaper from below if you so desire (click to open).

Step 3: Install GnoMenu

The Windows Start menu doesn't exist in Ubuntu, but the gnomenu package does a pretty good job of replicating it.  Obviously it's not 100% the same.... probably not even 80% the same but I think it's good enough.

Install the gnomenu dependencies via terminal:

sudo apt-get install python python-xdg python-cairo python-gconf python-xlib deskbar-applet

Download the gnomenu .deb installer from this link and install with Package Installer.  After installation, simply add the menu to your bottom panel by right-clicking a free space on the bottom panel > Add to Panel > GnoMenu.  Note: If GnoMenu does not show up in this list you may need a quick restart.

Step 4: Some Visual Housekeeping

Now, of course you're free to keep your panels and menus however you desire.  But to adopt a truly Windows look and feel a few changes must be made.

Get rid of your top panel altogether by clicking on free space and selecting Delete This Panel.  Remove everything you no longer want on your lower panel (in my case I got rid of everything except GnoMenu, a couple launch icons, the Window List and the Time/Date).

Right-click on the bottom panel, select Properties and change the size to 38 and the background to "solid."  You can also add Window Selector to replace Window List, but this is a matter of personal preference.

Right-click on GnoMenu and select Properties.  Play around with the settings until you get a look and feel that works for you.  I recommend XP for Button Selection and Vista for Menu & Icon Selection. I also made the Windows icon (Super L) as the menu launch button on the Preferences tab.

Lastly, add the Computer, Home and Trash icons to the desktop.  In terminal, run:


Check computer_icon_visible, home_icon_visible, and trash_icon_visible in the apps > nautilus > desktop key.  You should now see all three icons on your desktop.

Whew -- that's it.  As with any customisation, you may need to play around a little bit to make it work for you.  But you should now have a desktop that looks like this:

Note:  I found a particularly good set of Win7 icons that you can download from this link (password: justplainobvious.  You can use these items with any theme by customising the theme under Appearance Preferences. 

Wednesday, 9 June 2010

How to Add a Code Box in Blogger

This has been nagging at me for some time... why, oh why, does Blogger not have a code box built into the editing interface???   In the past I've used adjustable text boxes and other weird presentation formats to simulate code boxes but they are lengthy and cumbersome.  Here's how to create an easy-to-use, stylish code box for your blogger articles.

From your Blogger account, click Layout in the top menubar and select Edit HTML on the resulting page. You may want to save a copy of this template if you have previously modified it in any way.  Find the text ]]></b:skin> and add the following code immediately before it

.code {color: #006AB0; border : 1px solid #DADADA;padding : 5px 5px;font-family : Consolas, "Courier New", Courier, mono, serif;font-size : 12px;background-color : #fAfAfA; width : 90%;overflow : auto;margin : 10px 0 10px 10px; border-left : 20px solid #DADADA;max-height : 500px;min-height : 16px;line-height : 16px;}
.code:hover {background-color : #f3f3f3;
Make sure you added this code BEFORE the red text above.  Save your template.

Now you're finished!  To create a code box in a Blogger post, just insert your "code" like so:
<div class="code">

Note that the code box shown above is not my design, but was taken from Bariski.

  © Blogger template 'Isolation' by 2008

Back to TOP