How to compile HandBrake w/ the GTK+ interface on Ubuntu Intrepid

19 10 2008

Recently i upgraded from Ubuntu hardy to the beta of Ubuntu Intrepid. I of course love the program Handbrake, which allows you to convert DVD’s and DVD like sources to a movie file, with presets to things like psp, ipod, apple tv, xbox 360, and more.

Anyway, the current stable version is 0.9.2, but the latest version, 0.9.3 svn, has the hotly anticipated GTK+ interface, which finally gives linux users a graphical interface rather then having to use the command line, which for this program can get quite complicated.

There are several guides for compiling on Ubuntu Hardy, but I noticed that there are a few changes that need to be done for it to work on Intrepid. Here is a step by step rundown of what to do.

First, you need to remove ffmpeg if you have it installed already so we can install one that has more codecs available.

sudo apt-get remove ffmpeg

Now, we add the medibuntu repo to our sources.list so we can install their version of ffmpeg. We also install the keyring package so we can actually use the repo.

sudo wget -O /etc/apt/sources.list.d/medibuntu.list 

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

now we install ffmpeg, this time from the medibuntu repo.

sudo apt-get install ffmpeg

Next, we install the required packages. For Intrepid, we do not need to compile from source yasm, as it includes a much more recent version. Get some coffee as this will take a while. (the entire thing is one command)

sudo apt-get install automake build-essential jam libdvdcss-dev libtool subversion zlib1g-dev libbz2-dev dvdbackup xmlto texinfo gfortran libgtk2.0-dev nasm doxygen libsdl1.2-dev gfortran-multilib gcc-multilib g++-multilib libesd0-dev libgtk1.2-dev libfftw3-dev electric-fence libx264-dev libx264-59 x264 libtheora-dev intltool gettext libgtk2.0-dev libglib2.0-dev libhal-storage1 libhal-storage-dev libhal-dev yasm libgtkhtml3.14-dev

Now, we need to make a directory to put the Handbrake svn files in. I personally have a svn folder within my home folder to contain all the svn files of the various programs i compile, that way I can exclude it from backups, and its just easy to remember

cd ~/
mkdir svn
cd svn
svn co svn:// HandBrake
cd HandBrake

Now, we need to compile the program. In the past, the handbrake devs wanted you to use jam, but after running configure now, it says quite clearly that we are supposed to use make now. So, we shall. After you run make, this will take like 30 minutes to compile as it has to compile a bunch of libraries…so go watch some TV as this is finishing.

cd gtk
sudo make install

Thats it! Now there will be a HandBrake entry in the menu under applications > sound/video > Handbrake. Enjoy your ripping!

How to sync music, download album art, and convert movies to your Cowon D2 using Ubuntu Linux

17 10 2008

my cowon iaudio x5L recently died. I needed a replacement, and I settled on a cowon D2, which turned out to be a pretty sweet player. I wanted to try to see if i could have it sync my banshee library to the player to make it easier, and it turns out you can, but some bug or problem prevents it from being really easy. It is still possible, so I will explain my method for syncing music to my D2 using banshee, downloading and formatting album art, and converting movies to my Cowon D2

First, make sure you have the latest version of banshee, which you can download from their website:

Second, make sure your cowon d2 has the latest firmware. You can download the firmware here and instructions on how to install it are here.

Third, we need to create a text file to make banshee detect the D2, for some reason it doesn’t do it automatically. This text file also tells banshee to put the music files in the right place, to specify the folder depth so it places the music in /MUSIC/artist/album, and what filetypes the player supports so it will convert any filetype that the D2 does not support (handy!)

In ubuntu (gnome), you can start up text editor by going to applications > accessories > text editor or just running the command ‘gedit”. Now, paste this into the window:


Now, save this textfile with the name .is_audio_player on the root directory of your cowon. Now, you should be able to restart banshee, and it will detect the cowon D2 at the bottom. There does not appear to be a sync button, so highlight your entire library or whatever you want to sync, and drag it to the cowon icon. It will start sending your music to the cowon, as well as converting any file types that are not compatible with it and converting it into a compatible filetype.

Now, once that is done, since the Cowon D2 supports album art, here is an easy way to download album art to it. The cowon only displays the album art if a file named ‘cover.jpg’ is present in the album folder.

So, what we do first is: download albumart. You can download and install the deb here:

Then, open up albumart by typing albumart-qt into the console (applications>accessories>terminal)

Next, go to File > open and select your MUSIC/ folder on your cowon D2. Then, go to settings > configure on the albumart program and choose the ‘generic’ entry under “targets”. Click the box that says enable, and for the filename of the image, type in “cover.jpg” (without the quotes)

Now, since you opened your /MUSIC/ folder on your cowon, it should of searched the tags of all the files and listed all the albums. Highlight all the albums in albumart and then click the blue download arrow, and it will download the correct cover art, place it in the folder under the name ‘cover.jpg’, and even apply it to the file itself if the file format supports it (mp3 only i believe).

If you have album art that isnt found using albumart, you can find it and drag it to the album in albumart and it will convert it and place it for you.

Also, i noticed that the program has some bugs with non english characters (chinese…) and it would error out if it tried to download album art for that cd. If this happens, just select everything but that CD, and drag the album art manually to the album in the program.

Now, the final thing, converting videos to the cowon D2. This requires a program called avidemux, which you can get by typing in terminal:

sudo apt-get install avidemux

Now that you have that open, lets convert a video! Please note that converting wmv videos did not work at all for me, the audio was extremely garbled. Most other formats should work however.

Now that you got the program installed, open it. Its entry is located in applications > sound and video > avidemux. Open up the file you wish to convert, using file > open. After that, the video should appear in the program.

First thing you need to do is select the first drop down box under video, and select “MPEG-4 ASP (Xvid4)”

Second thing you need to do is to remove bframes. This can be done by selecting the second button under ‘video’, the button labeled configure. On the second tab, motion and misc, you need to de-click the box that says BVHQ, and lower the “number of b frames” down to 1. Now, click OK to save the selection.

Now, we go to the third button under ‘video” labeled filters. Click the button, then double click on “mplayer resize”. In the width section you should enter the number ‘320’ and in the height section, enter 240. You can leave all the others at their default. Click OK to add the filter to the queue.

Now, scroll down in the filter list until you find the entry called “resample FPS’ and double click on it. It pops up a window with some number in it. Delete it, and enter “30”. I am unsure what ‘blend’ does, but I clicked it just in case. Click OK when you have done this to add it to the queue.

Click close to save the filter list. Now you are all done! Now, back on the avidemux main program page, click the “save” button near the top. It will pop up a file lis window, you can just save it to <somevideohere>.avi on your desktop. Click OK, and it will convert the file. When it is done, all you need to do is drop the video file in the /VIDEO/ folder on your D2,  and if everything has gone well, it will play =).

How to get BitPim to detect your cellphone in Ubuntu Linux

31 08 2008

I have always used bitpim in windows, because for some reason I could never get it to detect my phone in Ubuntu Linux, the program would run fine, it would just ‘fail’ to detect the phone. I recently found a way to get bitpim to detect my phone (a Verizon Wireless LG VX8350 ) in Ubuntu.

What you need:

  • Ubuntu
  • Your cellphone
  • A usb cable that connects your cellphone to a computer.
  • double check that your phone is supported, check this site, under the dropdown ‘phones’ for more info:

First off, install bitpim. It is in the ubuntu repos, but the version was so old (version 1.02 vs 1.06) that it didn’t even have my phone model. So i went to:

and downloaded the Linux DEB. Simply double click it to bring up GDebi, which will install the dependencies and then install bitpim.

The bad thing about the BitPim deb is that it doesn’t create an icon for our menu. However, the command is simply bitpim, so we can create a menu entry.

First off, download the BitPim Icon here:

the BitPim Icon

the BitPim Icon

and save it to your desktop. Then, open up the terminal (Applications > Accessories > Terminal ) and then type

cd ~/Desktop
sudo cp bitpim.png /usr/share/pixmaps/

and enter your password.

This will copy the picture file into a folder that is used mostly for icons.

Now, go to System > Preferences > Main Menu. Click on “Accessories” and then on the right, click on the button that says “New Item”

In the box that pops up, put “BitPim” under Name, put “bitpim” for the Command, and under description, i just put “A program that interfaces with your cellphone.” Now for the picture, click on the spring icon, and it will open up a file chooser dialog. If its not already there, type


in teh address bar above the icons and press enter. Then scroll down until you find ‘bitpim.png’ and select it, and double click it to select it.

Now it should take you back to the launcher creation dialog, just press “OK” and the menu entry will be created. You can click “close” to close the main menu dialog.

Now, we need to install a program to make it so Ubuntu detects and sets correct permissions to your cellphone when you plug it in.

Download this file to your desktop:

When it is finished downloading, right click the file, and select “extract here”.

now, if you closed the terminal, time to open it back up again (Applicatons > accessories > terminal). Type:

cd ~/Desktop
cd Mobile-Phones-on-Linux
chmod +x

Now, it will ask you some questions in the terminal before it installs. after entering your sudo password, it will ask you what kind of installation to do. you need to type in “1” and hit enter, just so it installs hotplugging for your cellphone, as we already have the latest version of BitPim installed.

Then, after that, it will ask you what kind of phone do you have. I have a LG phone so i selected “1” for LG. select the correct brand of your phone, type in the number and hit enter. If your brand is not listed, then just type in “5” for OEM USB and hit enter, and it will install the files.

It prompts you to restart your computer before the changes can take effect, so we will do that now.

After your computer has restarted, now your phone should be detected. Plug in your phone, and start BitPim. (Using the menu entry we just created, Applications > Accessories > Bitpim ) Once it has started up,  click the Icon of the silver cellphone on the right hand side with the magnifing glass to start the detection process. If all goes well, it should detect your cellphone and ask you to name it. if it does, then congratulatons! everything worked. If it didn’t work, you might want to check the helpfile or the bitpim wiki ( for help and to see if your phone is supported

I hope this helps!

How to get wireless working with my Compaq Presario F767NR Laptop and Ubuntu

12 07 2008

I just got this laptop a short while ago, and the first thing i did was make the recovery dvds (it required 3? wtf…) and wiped vista clean from the hard drive and installed Ubuntu hardy 8.04

The laptop essentially works almost perfectly. The main problem that I encountered when i first installed it was the fact that the Ubuntu version of madwifi was not recent enough to support my wireless card, an atheros  AR242x.

So i compiled the latest version of madwifi to find that the drivers worked, but ubuntu would kernel panic (bad) every time I put the computer to sleep (which was every time I closed the lid), so that wouldn’t do, so I hopped on IRC and was instructed to compile a special branch of madwifi that used HAL, and what do you know, it worked, although unstable (network manager sometimes just flat out refused to connect, and othertimes it would connect instantly)

I am almost positive that for the next version of ubuntu (intrepid) that this version of madwifi will be installed by default and you will not need to manually compile them, I’ll post how i got it working for anyone else who is having the same problem

First, download some stuff since your internet is gonna be disconnected. Enter these commands separately into the terminal:

sudo apt-get install subversion build-essential
cd ~/
mkdir svn
cd svn
svn co

after this point, you don’t need your internet anymore, so to avoid conflicts, go to your restricted driver manager and remove the atheros drivers.

this can be done by going to system > administration > hardware drivers, and deselect any entries that pertain to atheros (there should be two), it will ask for a computer restart, so save this page to your desktop, restart and come back.
now that you are back, lets finish installing the drivers:

cd ~/svn/madwifi-hal-
sudo make install

after this, i had to restart my computer or else i got errors when i tried to load the new drivers, so again restart and then afterwards enter:

sudo modprobe ath_pci
sudo modprobe wlan_scan_sta

those load the required modules to enable wireless, and if everything went well, they should load without any errors and network manager should see your network and you should be able to connect. And if the kernel ever updates and you find yourself without internet, you will just have to recompile the drivers still located in the ~/svn/ directory against the new kernel and reinstall them. Just make sure you run “make clean” before you recompile them however.

To make it so you dont have to enter those lines on every restart, do this:

gksudo gedit /etc/modules

and add


to the bottom of the file. Save and close.
Now, from my experience my network connection was a lot more stable once I upgraded to network manager 7.0-svn, which again should be in the next version of ubuntu (intrepid) by default. Installing it is easy. Simply go to software sources (system > administration > software sources), enter your password, and go to the third party sources tab. Click add, and add both of these lines:

deb hardy main
deb-src hardy main

and click close. it should ask to reload the cache, click yes. Then just go to upgrade manager (system > administration > update manager) and it should say you have some upgrades available. Upgrade network manager (dont worry, network manager does die during the middle of installation, dont panic) and after its done, restart, and then upon restart re-enter your login credientials to your network and you should be good 😉


2 02 2007

So, my mom gave me her old scanner (a Visioneer OneTouch 8100) cause she never used it. I was excited upon receiving it because I no longer had to go into her office of clutter and doom to scan an image.

Fast forward to today, when i just tried it for the first time. I plug it into my computer while running ubuntu edgy, and try to fire up Xsane image scanner program…. well its plugged in and nothing is happening and Xsane isn’t doing anything (not detecting the scanner). So i hightail it over to google and find that this one scanner is on the linux “incompatible” list due to the lack of any documentation on this scanner whatsoever. Great.

Well, this scanner was designed to work with windows right? Maybe with the right drivers from the website, the scanner will at least work in windows… right? WRONG. The stupid drivers for the scanner that i downloaded off of the manufacturers site were horrible. They installed fine, but that was all about they did. I tried to configure the scanner drivers to save the picture of the scanned image somewhere, or at least open the image in some sort of image editing application. But every time I tried to configure an option, ANY option for that matter, it either said “this option is non configurable” or “the program has attempted to do an unsupported action” or something else along those lines. Great.

So the scanner does not work in ubuntu. The OFFICAL drivers given from Visioneer for windows XP (which is what im using) do not work, do not let me configure anything, and do not point me in any direction whatsoever in where the image file of the paper i just scanned went. So, this is essentially a nice big green paperweight.

EDIT: I however, figured out that if you dont install the drivers at all, and just plug it in and use the camera/scanner wizard in windows xp, the scanner works perfectly. It is still unsupported in ubuntu hardy however (7/12/08)

So, i guess the moral of this story is: Visioneer fails as a company. Ive given up getting support from them as ive read on various websites and review pages that visioneer does not support this scanner anymore.

Quit button in ubuntu doesnt work anymore

2 02 2007

This is the only real complaint that i’ve had with ubuntu so far since i’ve installed edgy (after getting past the “fsck died with error status 8” cause of the installer not putting the UUID in the /etc/fstab of my /home partiton that i kept from dapper to edgy). But anyway, ever since a couple days ago, for some reason when i click the big red button to “quit” (giving me a choice to shutdown, hibernate, log out, switch user, etc) , it just logs me out automatically without bringing up the window that asks me which option i would like to choose. So i can no longer just switch users and let my brother log in.. i now have to close everything and log out

of course its just a bug, but an annoying one.