eXTReMe Tracker
Mar 032009
 

I had to create a movie/animation out of a series of images that I had in my folder. There were several methods described on several forums which suggested using GIMP for creating GIF files from JPG or PNG files when one is using Linux. Now the problem was that I had 70 files in total and it would have taken me a long to time to add all those images to GIMP in order to create my animation file.

Then I read somewhere that we can actually create GIF images in command line mode using Imagemagick. But to do so you need to have Imagemagick installed on your system. To install it in Ubuntu, run:

sudo apt-get install imagemagick

This program has several features that would let you do all sorts of things with images. I was interested in converting a bunch of PNG files into an animated GIF file. To do so, we need to  rename the files in a way that they would lie in a sequence when arranged alphabetically (if you plan on doing it the easy way). Suppose you have files named slide_01.png, slide_02.png, slide_02.png….slide_xx.png, and you want to convert them to movie.gif, we run:

convert -delay 10 -loop 0 slide*.png movie.gif

The parameter delay inserts a desired delay between two consecutive slides. The number x used for delay inserts 10x milliseconds of delay between two frames. Loop parameter 0 makes it repeat infinitely.

If you had files with non-uniform names, then you need to input each of them in a sequence after the delay and loop parameters. Suppose you have file summer.jpg, fall, winter.jpg, fall.jpg and spring.jpg and you want to order them as fall, winter, spring and summer in the gif image seasons.gif with a 1 second delay between each of them, use:

convert -delay 100 -loop 0 fall.jpg winter.jpg spring.jpg summer.jpg seasons.gif

Here are some animations of numbers from 0 to 9 with varying delays.

The delay values specified the above cases were: 1, 5, 15, 25, 50 and 100.

gif animation with 10 millisecond delay

GIF animation with 10 millisecond frame delay

gif animation with 50 millisecond delay

GIF animation with 50 millisecond frame delay

gif animation with 150 millisecond delay

GIF animation with 150 millisecond frame delay

gif animation with 250 millisecond delay

GIF animation with 250 millisecond frame delay

gif animation with 500 millisecond delay

GIF animation with 500 millisecond frame delay

gif animation 1 second delay

GIF animation 1 second frame delay

=================

Feb 112009
 

There were unmet dependencies (libx264-59) for vlc and mplayer in the latest release of Jaunty Alpha. A bug report was filed by several users on launchpad.net

One of the users posted this workaround to get both mplayer and VLC working in Ubuntu (9.04) Alpha 4.

To solve the problem, just get libx264 here:
http://packages.ubuntu.com/us/intrepid/i386/libx264-59/download
Just installed it manually (sudo dpkg -i libx264-59_0.svn20080408-0.0ubuntu1_i386.deb)
I then installed mplayer and vlc using medibuntu repos.

Running:

sudo apt-get install mplayer vlc

Gets these packages working!

Feb 102009
 

The system beep is one of the most distracting and annoying occurrences when you are doing some constructive work. Be it working in a text editor, or a terminal, or a program window – wherever a sound notification is programmed into any module, it emits a fairly audible beep. To disable the beep, we have to disable the PC speaker by adding it to the blacklist.

sudo gedit /etc/modprobe.d/blacklist

Add the following line to the end of that file:

blacklist pcspkr

Save and exit. Then in terminal,

sudo modprobe -r pcspkr

This completely turns off the speaker. You won’t hear your system beep, even if there is something truly wrong. If you are doing something critical and need to rely on the beeps, comment out the line from the blacklist and run the modprobe command. Beeping will restart.

Feb 102009
 

Recently I bought a student version of Matlab2008b. It was for Linux platform. Here’s my experience with installing the program on 64-bit Linux (Debian) architecture, what problems arose along the way and how they were addressed – with help from Mathworks tech support.

Matlab at work

Matlab at work

Installing Matlab 7.7 (i.e. Matlab2008b) the old fashioned way was a breeze, but getting it to actually run on 64-bit architecture involved a few steps, which I didn’t know. I sent a query to Mathworks tech support saying:

The installation files were able to successfully install Matlab2008b on Ubuntu 9.04 (Jaunty), however, the program failed to load since it cannot find the jre files for 64-bit architecture. Is there a workaround for running the 32-bit program on 64-bit platform?

And they replied with a procedure to be followed to make that happen:

Yes – here is a full walkthrough:

1) When running the MATLAB installer (install_unix.sh) use the -glnx86 flag.  This will allow it to install properly on a 64-bit Linux machine:

./install_unix.sh -glnx86 -t

2) Once the installer is finished, you will need to activate through mathworks.com, as the activation client will not work properly on 64-bit computers.  To do so, follow the instructions below:

http://www.mathworks.com/support/solutions/data/1-3YZBZ6.html?solution=1-3YZBZ6

3) Once MATLAB is installed and activated, you will need to run MATLAB using the same -glnx86 flag that you used to install:

$MATLAB/bin/matlab -glnx86

(where $MATLAB is the MATLAB installation folder)

NOTE: Some users have problems loading the JRE when running in this configuration.  Creating a symlink in $MATLAB/sys/java/jre named glnxa64 pointing to glnx86 should resolve this issue.  You can do this with the following command:

ln -s $MATLAB/sys/java/jre/glnx86 $MATLAB/sys/java/jre/glnxa64

And now it works. Haven’t had any GUI crash on me yet, but it been less than an hour since I’ve been using it. One way to avoid typing matlab -glnx86 before each launch is to create a local alias.

gedit ~/.bashrc

Under one of the listing for aliases, you can type in:

alias mat='matlab -glnx86 &'

Save and exit. Then onward, you can launch the program by simply typing in mat in the terminal.

In case your compiz is enabled, you might not see the menus correctly. To fix that problem, you have to run the following command at the terminal.

export MATLAB_JAVA=/usr/lib/jvm/java-6-sun/jre/
Feb 092009
 

Some of the repositories which hold the libraries for mplayer seem to be broken in the Alpha 4 release of Ubuntu 9.04 (Jaunty Jackalope). What’s surprising is that the mplayer installation in Alpha 3 meets all the dependencies and fetches the files correctly, however that for Alpha 4 don’t.

One workaround for vlc is to install libx264-dev, and then install VLC:

$sudo apt-get install libx264-dev vlc

This still leaves unmet dependencies for mplayer.

rick@lithium:~$ sudo apt-get install mplayer
Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
mplayer: Depends: libx264-59 (>= 1:0.svn20080408) but it is not installable
E: Broken packages
rick@lithium:~$

Feb 032009
 

After running the update commands yesterday:

sudo apt-get update && sudo apt-get upgrade

There were a few nvidia video card drivers that got installed. There were several of them;

fglrx-modaliases
nvidia-173-modaliases
nvidia-177-modaliases
nvidia-180-modaliases
nvidia-71-modaliases
nvidia-96-modaliases

Once these modaliases were installed, I performed a search for hardware drivers. This time the search showed that there were several drivers that could work with my Nvidia GeForce 7300 graphics card.

Nvidia graphics drivers after Jaunty update (Feb 2, 2009)

Nvidia graphics drivers after Jaunty update (Feb 2, 2009)

The recommended driver was version 180. After installing the driver, the computer needs to be restarted for the driver to take effect.  Accordingly, I restarted the computer and now the Nvidia graphics are fully enabled.

One of programs that I use frequently is still quite buggy. The gnome-do program, that performs the same functions as Quicksilver (Mac) was working really well under Intrepid. It keeps crashing all the time under Jaunty. By the time Jaunty is in Alpha 4, I think the problem would be sorted out.

While the nividia graphics card drivers have been release for Jaunty, the ones for ATI still aren’t. The graphics on my Toshiba Satellite that has an ATI graphics accelerator card are still using the system memory. We’ll have to wait for the ATI drivers in order for the card to start working in Ubuntu 9.04.

Jan 302009
 

Until today’s kernel update to 2.6.28.6, the Atheros wifi card was not functioning correctly. Since the update to new kernel, the wifi card can now be used with the ath5k module which can be found in linux-backports-modules.

In order to get the Atheros 5007EG card to work, you first need to disable the built-in hardware driver.

System >> Administration  >> Hardware Drivers > Deactivate “Support for Atheros 802.11 cards”

Selection of Hardware Drivers in Januty

Selection of Hardware Drivers in Januty

Disable the Support for Atheros 802.11 cards

Disable the Support for Atheros 802.11 cards

After the card has been deactivated, open the terminal and install the backports modules for Jaunty.

sudo apt-get update && sudo apt-get install linux-backports-modules-jaunty

Install Jaunty backports modules

Install Jaunty backports modules

This adds the ath5k module which supports the Atheros 5007EG card.

The computer needs to be Shutdown and powered back on. Somehow Restarting doesn’t work at times. The card has to be completely powered down for a few seconds and then started during power up.

You should be able to see the available wireless network list by clicking on the network manager icon. Thereon, you all know what to do 🙂

Jan 202009
 

The Alpha-3 version of Jaunty became available two days past the scheduled release date. It included the kernel 2.6.28.4. It’s the first (alpha) release to include a kernel that supports EXT4 filesystem. The EXT4 became officially available in Dec 2008, and in less than a month it was incorporated into the 2.6.28 kernel.

There are several sites which post the performance benchmarks for EXT4 compared with other filesystems.

1 2

EXt4 is supposed to be much faster than existing filesystems. Several people have reported a booting time between 21 and 25 seconds, which is the time taken from bootloader selection till the login screen appears.

But beyond fast loading the alpha leaves a lot of room for improvement. Its integration with the /home/user partition is pretty buggy. One of the least stable module appears to be the alsamixer. The interface of volume applet has been changed significantly and is actually a lot less intuitive and quite inefficient.

Screenshot of volume control applet

Screenshot of volume control applet

As you see, the controller has a horizontal slider instead of the conventional vertical slider. More interestingly, double clicking on the volume control icon doesn’t open up the mixer like it used to. I’ve yet to figure out the workings of this applet.

Perhaps I might have figured out its usage, but I can’t vouch for the accuracy. One way to do it is:

Volume control applet (right click) >> Preferences >> HDA xxxx (Alsa Mixer) >> Select the device you want to control >> Close

Screenshot of volume control prefernces

Screenshot of volume control prefernces

I was able to change the line-in volume for use with a TV tuner card by the procedure I described above.

However the alsa module is very unstable in its present state. It causes one or more applications to crash at random. Most crashes were encountered when playing some form of flash media. Skype fails to load altogether. As soon as the login information is entered, the program coredumps with the following errors:

user@user-computer:~$ skype
ALSA lib ../../src/conf.c:2700:(snd_config_hooks_call) Cannot open shared library libasound_module_conf_pulse.so
ALSA lib ../../../src/control/control.c:909:(snd_ctl_open_noupdate) Invalid CTL hw:0
Aborted (core dumped)
user@user-computerf:~$

The video drivers for nvidia cards have yet to be released. Searching for Hardware Drivers yields a blank window. The drivers nvidia-glx-17x and nvidia-glx-96 are present in the repositories but the installation messes up the X and gdm loading. The only way to get back to X, is to remove the nvidia drivers and install ubuntu-desktop along with xorg. Once its done, typing

startx

gets you back into GDM.

On wireless side, ath5k is not included in the default distribution and it is still quite a bit of hassle to obtain it from backports and blacklisting the ath_pci modules *.

All in all, there is a lot that needs to be done w.r.t. Ubuntu 9.04 before it is released as a beta and then finally as an official release in April. It would be nice to try out a fresh install including a brand new /home directory.

ETA: * The Alpha 4 release of Ubuntu and Kubuntu contained ath5k, even in the LiveCD, thus the part about Ubuntu (jaunty) not having support for Atheros cards out of the box is no longer valid. I haven’t heard other testers say anything since Alpha 4 came out, so I guess it must be working for quite a number of folks. Still no support for the ATI graphics card though.