Wednesday May 02, 2007
Ubuntu 7.04, Beryl, Streaming, SwiftFox, and a Little Bit of NetBeans IDE
I now know the meaning of "forever". I know its true length and depth. It is something like a very very long time. (And probably even longer than that). That is the time it's taken me to achieve the targets I'd set for myself in taming Ubuntu 7.04, wrestling it to the ground, beating it right in the face until it did my bidding. And my bidding it has done, as the brave reader of this blog entry will discover. Seriously, though, I'm learning a lot about Ubuntu 7.04. And I'm doing it the hard way, it turns out. The very very hard way. Bear in mind that, to me, Ubuntu 7.04 is synonymous with Linux, since Ubuntu 7.04 is the only Linux distro that I've ever used, and only since a few days. Hence everything that follows is based on my confused stumblings and serve as a record of my journey, rather than a path to be trod by others. (Although, as I've discovered, many others have already trod a similar path.) My discoveries and growing pains thus far are documented below:
- My mouse clicks are better. One of the people who left a comment either yesterday or the day before told me about Places | Home Folder | Edit | Preferences. In there, you'll find a "Behavior" tab. I deactivated "Double click to activate items" and now, instead, I have "Single click to activate items" selected. That makes a significant difference, although there are still places where things are a bit wooden and unresponsive. Like, sometimes Alt-Tab isn't very smooth. But these are small problems, I have found Ubuntu 7.04 great thus far, despite what might seem like a long litany of complaints in the rest of this blog entry.
- Bye-bye Beryl. I'd read a lot about Beryl. Especially in Bill Beebe's blog, which is one of very few blogs that I always instinctively take very seriously. Simultaneously, I had come across Matthew Newton's well-titled Seven Post-Install Tips for Ubuntu 7.04. There I found out about the experimental Desktop Effects functionality, as well as more about Beryl. So I first tried out the experimental Desktop Effects, which were cool. When combined with NetBeans IDE 6.0 builds, you can not only undock windows, but make them look like their sides are made of rubber as you drag them across the screen:

The same for your own applications:

My understanding of Beryl is that it lets you do the same as the above, with the addition that you can configure more stuff (i.e., you have more options). So I installed that and soon encountered the white cube bug (which was quite freaky, because my entire screen turned white and, after a moment of horror, I had to restart my laptop, and then later it happened again several times). Next, I witnessed the black windows bug, in various guises. (Sometimes a whole browser window would turn black, sometimes a whole list of menu items. I read somewhere that I should upgrade my NVidia driver to solve this, possibly, because the default 'restricted' one does not offer the full capabilities or the maximum power or whatever.) These freaky occurrences were quite off-putting. So I removed Beryl. Then I still had the experimental Desktop Effects, which were fun but chewed up on performance (which is what one is clearly warned about, since these effects are experimental). So I disabled this functionality. Looking forward to fully adopting it when it becomes completely stable, though! The effect was a lot like I've seen on other people's Macs... really cool and funky u.i. acrobatics, although performance glitches are too high a price to pay for them.
- A movie, a movie, my kingdom for a movie! Next, I really wanted to set up FireFox to watch movies. Specifically, while working on documentation for NetBeans I often watch "streaming" Dutch TV programs on http://www.uitzendinggemist.nl/. (I found out much later that there are a lot of problems streaming those programs, because of spaces in the URL addresses.) On Windows, one can choose between watching programs in Windows Media Player or in Real Player. Of course, on Linux one cannot use Windows Media Player. So one must use Real Player, or something like it. But it does not appear as a choice when you start watching one of those TV programs. This was the problem that I had to solve, or switch back to Windows, because I really enjoy catching up on Dutch current affairs (and some great documentaries and so on) and without being able to do so on Ubuntu 7.04, I would ultimately return to Windows. So... the stakes were really high!
Anyone who has been through the process of setting up movie-watching functionality in FireFox on Ubuntu 7.04 (or possibly any other Linux distro as well), knows the inner circles of hell one needs to traverse before reaching one's goal. Especially when one uses Google. (By the way, Google in FireFox on Linux consistently thinks I'm German, because no matter what Google extension I type in, I always get redirected to www.google.de.) Only right near the end did I think to install Automatix, so one can imagine the hardship I suffered, the tears I shed. However, I learned many things, especially since in many cases I simply copied appropriate-seeming error messages into Google and then sent it on its merry way, running round the world to return with obscure and, more often than not, erroneous solutions. The main lessons I learned were as follows:
- Always start the browser from the terminal window. One of the most useful things I learned was how to debug the mplayer plugin (or any of the media players), which is one of the media players you could install on Ubuntu 7.04, but then embedded within FireFox. Discovering that pretty much marked the end of one era of frustration (and the beginning of the next). At some point I began using this site as the place where I would go to test whether I had installed the correct codecs. (Without having been continually redirected to www.google.de, as mentioned above, I would never have found that site, go figure.) Also, I found another excellent site for testing purposes and, if you've read this far and you don't know about it, you'll get a very pleasant surprise when you go there... http://beelinetv.com/. I imagine that readers of this blog entry will be more greatful for that one link than anything else I write here.
The trick I learned to testing my setup is really wonderful and is not only useful for testing. Start up the terminal window and then in the terminal window start the FireFox browser. Now all the output from the browser will go to the terminal window, including (and especially) all the failed attempts to get some movie file (or streaming or whatever) to play within the browser. So, I just type "firefox" in the terminal window. (Hence, I don't click its icon or use a menu item.) Then FireFox starts. Then I go to one of my testing sites (explained in the previous paragraph). Then I click a link to a movie or TV station or whatever. Then the output goes to the terminal window so that I can see what I've done wrong (and can then paste some relevant-seeming error message into Google).
However, this is even useful after succeeding with your set up. Here's a Dutch TV station in the player, with the terminal window in the background. Even though I know it is okay now, I can still use the terminal window, because it shows when something starts, shows how much is being cached, and other general info. Otherwise I'd have no way of knowing how long it's going to take before the player actually starts (because the terminal window shows output even before the player is up and running). So, this is what I see even now that I know it is all working correctly:

- SwiftFox is FireFox for Linux. Something else I learned while going through the process of setting up a movie player inside FireFox is that Linux has its own browser, based on FireFox, called SwiftFox. You can get it from the Synaptic Package Manager, just like everything else. I'm not sure exactly, yet, what the benefits of SwiftFox over FireFox are, but I gather that SwiftFox is basically optimized specifically for Linux. Hence, when things were going really badly and I was grasping at straws, I set up SwiftFox and stopped using FireFox. Shortly after that, things started working. But at that point I had grasped so many straws that I didn't know which was the longer one.
- Get Automatix right now, if you don't already have it. Right now this minute. Basically, speaking of the previous point above, a newbie in Ubuntu 7.04 without Automatix is a man in the desert without a compass and just the hot blazing sun for company, searing scorching destruction into his innocent skull, destroying his ego, and even his will to live. Without Automatix in Ubuntu 7.04, you are just a plain idiot and that's all there is to it. I can say this because I didn't have Automatix until very very late in my journey and then it seemed to be too late because I had already installed all sorts of stuff via the Synaptic Package Manager. Turning back seemed futile, I couldn't find a way to determine which packages had been installed by me and which ones were there when I started. But I limped across the finish line in the end and that's all that matters when the medals are being handed out. Here's what Automatix looks like, it's basically a vastly more useful Synaptic Package Manager, because it bundles related packages together in human-understandable categories:

There must be a very good reason why Automatix isn't included in Ubuntu 7.04 by default, because not having it is like... well.. that guy in the desert that I referred to at the start of this paragraph... that pretty much sums it up... Plus, maybe, that same dehydrated dude in the desert is spinning plates on long poles like in the circus.
- MediaPlayerConnectivity is useful, probably. I also downloaded and installed something called "MediaPlayerConnectivity". It's a plugin for FireFox (or SwiftFox). You get a new options window under the Tools menu. In this case, I don't know if setting this up has helped or harmed me. It's certainly given me an additional place to look around in whenever something goes wrong... It seems to be a user interface on top of MIME type definitions, which (most importantly) define the media player in which the various MIME types should be played. Still, I'm not sure how that relates to about:config, which you can type in the address field of a browser and then you can set MIME types and relate them to media players. So, that's why I presume that MediaPlayerConnectivity is some kind of u.i. on top of the about:config functionality.

By the way, the above are not my final settings, nor are they ones I would recommend. Not sure what I'd recommend. Whatever works... Judging from my Google explorations, many different things work in many different ways for many different people, when it comes to Linux and media players.
- Codecs are no fun. Another key learning for me was that JMF isn't so bad, in retrospect. I blogged about my experiences with JMF (the Java Media Framework) some months ago (several months ago) and pointed out the headaches that all those codecs cause. Well, that same issue will leap up and grab hold of you, just like a thing that leaps up and grabs hold of stuff. Maybe a leech. Or a tiger. Those codecs... how is anyone to know which ones are needed? Okay, the Automatix tool helps completely, I guess. However, since I hadn't set it up, it was pretty much hit and miss from the word go. There should really be some standard codec that all media types could adhere to. Right now, it's just really ridiculous.
And so, after a lot of trial and error, I arrived at the first stage, where everything except MMS and RTSP protocols (i.e., just the HTTP protocol) brings a successful result. On the TV page shown above, it turns out that in Holland mostly the local stations use HTTP while the national stations use MMS. This results in one being forced to watch rather inane programs, exemplified below:

After watching the so-many-eth cake sale or supermarket opening, one feels the need for more. And then the real work begins, because it is really a lot of tweaking and twiddling. And there are so many options, even so many media players. In the end, I settled for Totem for the MMS protocol. Prior to that, I tried XMMS, which seemed overly complex and just didn't work for me. There were sooo many things to set and tweak, fortunately Google was there to help me. For example, here is the tip for how to set MMS and RTSP. I haven't quite got those right yet, possibly because of conflicts between packages that I've installed, but I don't know for sure. And I've seen a lot of bizarre crazy error messages, which were fortunately unique enough to help me further, thanks to Google. For example, there was one about a PixMap and another, way back in the time of Beryl, stated ominously: "Beryl caught deadly signal 6". And somehow most media players seem to need to have the web proxy set, as if they couldn't be taken from the system settings. The people behind at least one of the media players have gone out of their way to hide the proxy settings. All very odd and confusing. But, hey, this is why it's Linux after all... no hand holding and confidence building like Windows. You're on your own, buddy, better make the best of it. That right there could be the Linux slogan. :-) But, from what I've been told and from what I can tell, Ubuntu 7.04 is friendliest of them all. Pity you need to install so many additional packages before you can do something that should be really simple... watch 'streaming' movies while you work.
- Always start the browser from the terminal window. One of the most useful things I learned was how to debug the mplayer plugin (or any of the media players), which is one of the media players you could install on Ubuntu 7.04, but then embedded within FireFox. Discovering that pretty much marked the end of one era of frustration (and the beginning of the next). At some point I began using this site as the place where I would go to test whether I had installed the correct codecs. (Without having been continually redirected to www.google.de, as mentioned above, I would never have found that site, go figure.) Also, I found another excellent site for testing purposes and, if you've read this far and you don't know about it, you'll get a very pleasant surprise when you go there... http://beelinetv.com/. I imagine that readers of this blog entry will be more greatful for that one link than anything else I write here.
And so, with these thoughts I end this blog entry. There are far (far far) more references and links I could have inserted above, with useful info on what to do when and how, but let's leave that for another day. I'm off to watch the opening of a library in a small place in Holland, followed by a visit to the retirement home, and an interesting interview with a town councillor's advisor... all streamed live from Holland to where I am in the Czech Republic, thanks to Ubuntu 7.04 and its plethora of media players.
May 02 2007, 01:59:14 AM PDT Permalink


