Posts Tagged ‘Ubuntu’

** Unable to load Mozilla for hosted mode ** (GWT & Ubuntu 8.10 Linux)

Posted in GWT, Linux, Ubuntu on January 2nd, 2009 by Nick – 19 Comments

I’ve recently been working with GWT (Google Web Toolkit) and ran into a small snag configuring it on my Ubuntu 8.10 setup.  This will be a short HOW-TO for configuring GWT on Ubuntu or other linux distros.  The three topics I’m going to talk about are:

  • Getting the hosted browser working in linux
  • Dealing with an external browser error when using Compile/Browse
  • Adding GWT to the path.

Getting the Hosted Browser Working in Linux
When trying to run using the hosted browser (shell) I got the following exception:

** Unable to load Mozilla for hosted mode **
java.lang.UnsatisfiedLinkError: /home/hellz/projects/gwt-linux-1.5.3
/mozilla-1.7.12/libxpcom.so: libstdc++.so.5:
cannot open shared object file: No such file or directory
 at java.lang.ClassLoader$NativeLibrary.load(Native Method)
 at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778)
 at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1674)
 at java.lang.Runtime.load0(Runtime.java:770)
 at java.lang.System.load(System.java:1005)
 at com.google.gwt.dev.shell.moz.MozillaInstall.load(MozillaInstall.java:190)
 at com.google.gwt.dev.BootStrapPlatform.init(BootStrapPlatform.java:49)
 at com.google.gwt.dev.GWTShell.main(GWTShell.java:354)

The key to troubleshooting the problem is in the second line, libstdc++.so.5 to be exact.  It can’t find this C++ library.  Turns out the hosted browser needs libstdc++5, but the version currently installed on my 8.10 system is libstdc++6.  So you can either:

Open System->Administration->Synaptic Package Manager and install libstdc++5
or
At a console type: sudo apt-get install libstdc++5

Now you should be running in a hosted browser fine.

Error on Compile/Browse
The second issue you might run into is GWT not recognizing your external browser.  You’ll know you have this problem after clicking on the Compile/Browse button.

You get an error that looks like:

[ERROR] Unable to find a default external web browser
[WARN] Try setting the environment variable GWT_EXTERNAL_BROWSER to
  your web browser executable before launching the GWT shell

The problem is that GWT can’t find your default installed browser (which is most likely firefox).  This is easy to fix:

  1. Open your .bashrc or .profile file, which is located in your home directory.  So type gedit ~/.bashrc or nano ~/.bashrc or however else you want to open it.  The reason I listed both files is because IMO the environment and pathing system of Ubuntu (and some other distros) is a spiderweb mess.  I modified my .bashrc, but I’m not sure if that’s best practice.
  2. Add this line to the bottom of the file: export GWT_EXTERNAL_BROWSER=/usr/bin/firefox
  3. Logout and log back in for the changes to take affect.

Now the Compile/Browse button should bring up your external browser.

Adding GWT to the path

Add PATH=”$HOME/projects/gwt-linux-1.5.3:$PATH” to your .bashrc (or .profile) file.  Of course you might have to modify the directory name to point where you have GWT installed.  For this to take effect you’ll have to logout and log back in as well.  You can double check your path to see if GWT has been added by typing echo $PATH. Once you have GWT added to your path you’ll be able to execute projectCreator and applicationCreator from anywhere.

iPods & Amarok, Part 4: Podcasts

Posted in Linux, Ubuntu on January 1st, 2009 by Nick – Be the first to comment

Most people think they need itunes to manage their ipods.  In this post I’ll show how to get audio from your favorite podcast to your ipod using Amarok on linux.  Before we start, you need to connect your iPod and make sure it comes up as an Amarok device.  If you need help with this refer to Part 1.


Adding the podcast to Amarok.

Before we can get the podcast onto the ipod, we’ll need to add it to Amarok.  Here are the steps to accomplish this:

  1. In Amarok, choose the Playlists tab.  You can find this in the set of vertical tabs on the left side.
  2. Right click on the red folder labeled “Podcasts”
  3. Select “Add Podcast…”
  4. Type or paste in the URL of a favorite podcast and click OK.  It will then retrieve the podcasts and you’ll see them in that red Podcasts folder.  Podcasts are typically taken from a RSS feed so the URL will most likely be an xml file.

Moving the podcast to your ipod.

  1. From that new list of available podcasts, you can now right click on one of them and choose ” Download Media”.  This will download the podcast as an audio file, so depending on how long the podcast is, it may take some time.
  2. Once the download is complete, you right click on that same podcast again and choose “Transfer to Media Device”.  This doesn’t do the actual copy to your ipod, but queues it up for the copy.
  3. Click on the Devices tab (same left side vertical tabs) and you’ll see everything on your ipod.  You’ll also see at the bottom a Transfer Queue, which you should also see your queued podcast.
  4. Last step is to click on the Transfer button at the top.

You’re done and should now see the podcast in your ipods menu in both Amarok and the ipod itself.

Here are all of the iPods and Amarok posts:
iPods and Amarok, Part 1: Making the Connection
iPods and Amarok, Part 2: Album Cover Art
iPods and Amarok, Part 3: Playlists
iPods and Amarok, Part 4: Podcasts

At the time of this blog, I’m using Ubuntu 8.10 (Intrepid Ibex), Amarok 1.4.10 and an iPod Nano (3rd Gen).

For this example I used a podcast from Clark Howard.

iPods & Amarok, Part 3: Playlists

Posted in Linux, Ubuntu on December 31st, 2008 by Nick – Be the first to comment

Creating a playlist for your iPod is one thing that is more intuitive on itunes than Amarok, but once you get schooled it’s pretty simple.  Before we start, you need to connect your iPod and make sure it comes up as an Amarok device.  If you need help with this refer to Part 1.

Creating a playlist on your iPod using Amarok:

  1. In the Devices tab, in the left window where it shows all the music on your iPod you’ll see at the very top a red folder labeled “Playlists”.  Right-click on that red folder and select “Create Playlist…”, then name the playlist.
  2. The next step is to add songs to the playlist.  In that same left window, right-click on the song or album you want, select “Add to playlist” and select the playlist you are adding to.

Just properly disconnect and unmount your ipod and you’re done.

I mentioned above that itunes has a bit more intuitive of an interface for playlists….let me explain why I think so….
The right side window in Amarok can’t be used at all to manipulate your playlist.  You can’t drag, or click and add from there.  I think this is a drawback and can be confusing, maybe they’ll change that in Amarok2.

Here are all of the iPods and Amarok posts:
iPods and Amarok, Part 1: Making the Connection
iPods and Amarok, Part 2: Album Cover Art
iPods and Amarok, Part 3: Playlists
iPods and Amarok, Part 4: Podcasts

At the time of this blog, I’m using Ubuntu 8.10 (Intrepid Ibex), Amarok 1.4.10 and an iPod Nano (3rd Gen).

iPods & Amarok, Part 2: Album Cover Art

Posted in Linux, Ubuntu on December 30th, 2008 by Nick – 1 Comment

This will be a quick explanation on how to get album covers on your iPod using Amarok.  This assumes you’ve already been able to connect to Amarok and copy music successfully.  If you have not, then refer to Part 1.

One thing a lot of people don’t know is that you can fetch any album covers you’re missing using Amarok.  It can’t hurt to run a fetch, it only takes a couple of minutes, it’s free and it will connect to AmazonMP3 to get all the covers you need for songs that are in your Amarok music library.

To fetch missing album art using Amarok:

  1. Go to Tools->Cover Manager.
  2. Click on “Fetch Missing Covers”.

Transferring the album art to you iPod:

  1. Click on the Devices tab in Amarok and make sure the iPod is connected.
  2. Click on the iPod button, and use the menu to set your iPod’s model. If you aren’t sure, Apple support site has the info you need.
  3. In that same iPod menu, click on Update Artwork.  Takes just a couple of seconds and you are done.

Now you can browse Iron Maiden albums by cover instead of name on your iPod.

Here are all of the iPods and Amarok posts:
iPods and Amarok, Part 1: Making the Connection
iPods and Amarok, Part 2: Album Cover Art
iPods and Amarok, Part 3: Playlists
iPods and Amarok, Part 4: Podcasts

At the time of this blog, I’m using Ubuntu 8.10 (Intrepid Ibex), Amarok 1.4.10 and an iPod Nano (3rd Gen).

iPods & Amarok, Part 1: Making the Connection

Posted in Linux, Ubuntu on December 29th, 2008 by Nick – 1 Comment

There are millions of iPod owners out there and I don’t think I stand alone when I simply state that the iTunes application and interface is a chunk o’ junk.  There is an alternative if you’re running linux (and windows soon).  That alternative is called Amarok.

I just got an iPod nano for xmas, and since I don’t run Windows I needed a way to initialize and get some music on this clean device.  Here’s the list of steps you need get your iPod connected to Amarok so you’re ready to start moving music to it.

  1. Plug your iPod into your computer using the USB cable.
  2. Open Amarok
  3. In the menu go to Settings->Configure Amarok…
  4. Click on “Media Devices”
  5. You can try and autodetect by pressing the “Autodetect Devices” button, but this has never worked for me.  If it doesn’t work, then you need to “Add Device…”.   A dialog box will come up to choose your device plugin.  Choose “Apple iPod Media Device”.  Enter a name for it. Enter the mount point of the device.  To find the mount point, open up a console or explorer and go to /media and look for a directory that you might think is your iPod.  There’s no 100% sure way for me to tell you what the name is, on mine it was “/media/IPOD” but it might be something else.  If you’ve used iTunes with that iPod before, then you might have named the iPod already.  Look for that name.  If you don’t see it there you can also try looking at /mnt.  So once you have the name and location (/media/IPOD or whatever), you then put that in the mount point field and click “OK”.
  6. Click “OK” or “Apply” and close the Configure – Amarok window.
  7. On the left-side click “Devices” (probably at the very bottom).  At the top there should be a drop down menu that has your “iPod (mounted at /media/IPOD)”.  Right above that, click on “Connect”.

You are now ready to copy your music over :)

Here are all of the iPods and Amarok  posts:
iPods and Amarok, Part 1: Making the Connection
iPods and Amarok, Part 2: Album Cover Art
iPods and Amarok, Part 3: Playlists
iPods and Amarok, Part 4: Podcasts

At the time of this blog, I’m using Ubuntu 8.10 (Intrepid Ibex), Amarok 1.4.10 and an iPod Nano (3rd Gen).