May 11 2009

Window Resizing Woes

Graphical desktop environments and window abstractions have been around for at least 25 years (if we limit ourselves to the 1984 release of the Apple Macintosh, the first commercial product to sport such an environment).

Even though we have seen improvements to the original ideas, all the basic funcionality is still in place. The ability to resize windows is one such basic funcionality which is (and should be) taken for granted by all kinds of users.

pixel-accuracyThat being the case, it’s hard to accept the fact that a window manager like Metacity (the standard choice within the popular Gnome environment and, therefore, an important player) can’t seem to get it right. If you have not done it yet (unlikely), try resizing your windows from the sides or top/bottom and see how you perform. It takes a very good quality pointing device and a firm hand to grab those pixel-wide regions. As a side note, resizing from the bottom-right corner is not as difficult, at least in some applications.

Sure I appreciate the fact that there are very nice keyboard+mouse shortcuts to help the user manipulate windows. I often get frustrated at work as I try to move windows (the MS kind) around by using the ALT <drag> combination. Makes me feel like coming back home to Linux. The ALT+<middle button> combination for resizing windows sure rocks too! But none of that is an excuse for not getting the basics right.

The issue is certainly not new. Some people have pointed it out years ago. The bug #160311 on Launchpad provides some information and discusses a possible solution involving making the window borders thicker. I definitely disagree with any solution that goes in that direction, though. Resizing must not be related to nor depend on the visual characteristcs of the windows. Put another way, one should not have to cope with heavy, ugly 10px-wide borders just to be able to grab them more comfortably. Ideally, window borders should be left as thin as the user likes and the window manager should be the one responsible for “seeing” a virtual, say, 10px-wide border that would serve as a hot spot for the resizing cursor. Is that really hard to accomplish?


May 9 2009

Audio Rip

The Objective

To create a collection of MP3 files from the audio tracks of existing VOB files. The VOB files had been previously extracted from the original DVD with the help of dvd::rip which, by the way, is a great and very well put-together tool for what it sets out to do. It is a tool meant to assist one in extracting and converting video and audio streams from DVD discs to a variety of other encoding formats. I could not, however, use it to accomplish the task at hand.

The Solution

After a brief initial consideration about using ffmpeg on the command line, I decided to go GUI with Avidemux. To extract the audio tracks, I simply opened the VOB files (I did it one by one, because there were just a few of them; still to be tried is the tool’s ability to define a job list) and chose Audio > Save. I had thought I could do the extraction and conversion to MP3 right there with Avidemux but, for some reason, the configuration dialog box for MP3 lacks a VBR setting. So I chose to encode the files manually, using the following command:

lame -h --vbr-new -V 2 <audio file>

I’m sure people can point out a handful of simpler ways I could have achieved the same results. In any case, what really matters is that the experience was nice and I’m more than satisfied with the outcome.


May 5 2009

Installing Ubuntu 9.04 (Part 2)

Da First Boot

The booting process did go faster than previous versions and I really appreciated the new looks of the login screen. After logging in, I was able to see my usual desktop (since personal application settings are kept in the home directory, they survive the installation). Some aspects of the theme (mainly window borders) were not exactly as they were before, but I could recognize the desktop as my desktop, nevertheless.

Hardware Drivers

After a while, just as I started exploring the Preferences and Administration menus, Ubuntu popped up a dialog box telling me about the availability of restricted hardware drivers for my video card. I was pleasantly surprised. The driver version suggested was described as “NVIDIA accelerated graphics driver (version 180)”. After I chose to download and install the suggested driver, I noticed that the progress bar on the download dialog box took a rather long time to actually show some progress; I would have aborted the process and started over, had I not seen this same behavior before, on Intrepid. This kind of faulty feedback can make a user feel lost. Following the installation of the new hardware driver, Ubuntu requested a system restart.

Logging into the desktop with the new driver in place, I already expected to have to adjust the system video properties to get back to my usual 1600×1200@85Hz setting; using my monitor’s OSD, I checked the settings had been reset to 1280×1024@85Hz. When I tried to launch the Display applet from the Preferences menu to get back to my native resolution, I was shown the following dialog box:

Ubuntu asking me if I'd like to use the graphics card vendor's control panel instead of its own.

I chose to do so and was able to adjust the settings to my liking with ease. One thing I forgot to do was saving the changes to the disk. That caused my new settings to be lost when the desktop manager was terminated. I then tried to repeat the process, using the save button this time around. Surprisingly, that did not solve the problem; the display settings were still not being kept across system restarts. Actually, that was not so surprising, as there was a message saying that the settings could not be saved. I’m still wondering why I insisted on ignoring it. But anyway, the solution to the issue was simply to run the nVidia applet as root, i.e. gksudo nvidia-settings. And that finally did it.

Catching a New Wave

The next thing I did was choosing the new, fancy New Wave theme. It was the first time I could actually feel comfortable with a so-called dark theme for more than a couple of minutes. This theme seems to have been designed in a way that it won’t hurt your eyes due to the high contrast between the dark areas and the default white background of pages and editors. Or at least, it feels less agressive than its counterparts.

Everything looked really good and I was already thinking about what I would do next in my new Ubuntu. It was then that something grabbed my attention: the menus in Firefox looked out of place, having black text instead of the theme’s default white color. I then realized that the same thing also happened with OpenOffice applications. There is more than on way of working around this problem, but the one I found best was downloading and installing a variation of the New Wave theme including dark menus. Installing a theme is as simple as dragging the theme’s archive onto the theme tab of the Appearances applet. Download the New Wave Pack and extract the darkmenus archive from it.

Flash and Java

I went to Adobe’s website for the latest version of the Flash plugin. After downloading it, I tried to install it with dpkg, but got the following dependency error (snipped):

adobe-flashplugin depends on libcurl3; however:
    Package libcurl3 is not installed.

Simply installing the required libcurl3 did it. The package manager was happy that the dependency of the broken package had finally been met and was able to finish its configuration. I would probably not have gone through any of this if I had used the version from the repositories.

Installing Java went much smoother. I simply installed a couple of packages, namely sun-java6-sdk and sun-java6-plugin and voila.

Multimedia CoDecs

No real surprise here. Due to legal (calling it philosophical too wouldn’t be pushing it, I guess) issues, non-free formats won’t play out of the box. However, the system assists you on fetching the necessary software, not without classifying them as bad and ugly. :) But nothing to worry. That’s a one-time operation. After the CoDecs are installed, you may play your mp3 (do consider ogg, though) and divx (don’t miss xvid too) files as much as you like.

Brasero Did Bug Me

How about inserting a CD or DVD into your drive only to realize that all your desktop icons have gone missing and that you are no longer able to navigate your files? That’s just what I (and a whole bunch of other people) experienced. It so happens that there is a bug on the setup of the Brasero libs that causes this nasty behavior. The solution, or should I say, a temporary workaround is to simply tamper with the permissions of a dynamic library. I wonder how this situation managed to slip through testing.

Impressions and a Bit of Rambling

To finish off this post, I’d like to say that, despite the few problems I have mentioned, the overall experience has been just great. Jaunty does feel snappier and more polished. I would recommend it to anyone seeking a nice-looking and usable Linux distribution. At the very least, try the Live CD. And, while we are at it, let me add one more thing: when trying a different OS, do try to allow yourself to Think Different™. Don’t just go “How come there is no Add/Remove Programs in the Control Panel? Oh, damn! Actually, I can’t even find a Control Panel option!” Or “Where can I find my trusty brown cute little file-retriever puppy? How am I supposed to locate my files without it?” Jokes aside, remember that we humans (as most other animals) have a natural tendency to save energy. We are resistant to change simply because doing things differently require learning and learning requires energy. So, don’t be an animal, or human or anything that fears learning something new! :)