Totem Without PulseAudio on Jaunty

Since I quit PulseAudio, I’d a problem with Totem, it was not having sound anymore. In order to solve this I uninstalled gstreamer for pulseaudio with the following command

 sudo apt-get remove gstreamer0.10-pulseaudio

Restart, and sound will be working in Totem.

Installing Lexmark Printer 2600 Series on Linux

In this tutorial I will show how to install the Lexmark printers 2600 series. In my case I have one printer model x2695 and it is up and running on Ubuntu 9.04, even the scan feature. Looks like there is a lack of information about Lexmark drivers, even in the OpenPrinting project the 2690 series is tagged as “Paperweight”.

First download the driver here, or in this backup link. Extract it and, on the terminal, type


Now you will be guided by screens to …

… the error that happened in the last screen, “The installer package is not supported by your system. Installer will exit.”. In order to know where this message came from, and to try to understand what happened I needed to check the source of the installer. In order to do that I needed to go to the terminal and type:

./ --noexec --target lexmark

It created a folder called lexmark containing the source of the installer. There I found the run.lua file that was the source the message that was displayed in the error. As soon as I analysed the code in this script, I changed a piece of it:

vim /lexmark/config/run.lua

on the line 16 from

g_usetar = false


g_usetar = true

So, I needed to run the installer again but using the changed file:

cd lexmark

Now the instalation was finished succesfully, and I could even use XSane to scan documents. You can find here the output from the succesful installation because maybe it can gives you some insights if your installation was not fine. Now, in my printers configuration screen I have two 2600 printers, one created by the installer, and another created when the system found the printer right after the driver was installed:

Well, I had not even one printer working, now I have two :¬)

Compiz Instead Metacity When Starting Gnome

Suddenly Metacity was being loaded in lieu of Compiz when starting Gnome. I tried restart compiz with:

compiz --replace

but it did not work and Metacity kept itself up and running.

What worked for me was open gconf-editor (Alt+F2 > “gconf-editor” > Enter) and navigate trough “desktop > gnome > session > required_components and set windowmanager key as “compiz”. The next time you start Gnome, Compiz will be loaded.

Ant Compile With rJava library

This is pretty simple but for the sake of “I-will-not-forget-it-anymore” I will write it here. I copied some files of a Java project to a new machine. When I tried to execute it in the new place, “Exception in thread “main” java.lang.UnsupportedClassVersionError: Bad version number in .classa file”. Recompiling everything should make it work. Since my code requires rJava it is necessary to inform this to the ant (I’m using ant by the way).  The command which made my day is:

ant clean compile -lib ~/R/i486-pc-linux-gnu-library/2.9/rJava/jri/JRI.jar

2.9: be aware about the version you’ve installed, if you’ve compiled the packages in a version < 2.10, you will need to reinstall ’em. In my case I did reinstall nlme, mgcv, spatstat, and igraph.

cannot mkdir R_TempDir (não é possível criar um diretório em R_TempDir)

I’m constantly using rJava/JRI for a large amount of simulations. Repently it was not working anymore, and since I’d not change anything in the main code, it was a quite weird behavior. My rJava binding looks like this and the first line was the only being executed:

System.out.println("Creating Rengine (with arguments)");
re = new Rengine(args.split(" "), false, null);
if (!re.waitForR()) {
System.out.println("Cannot load R");
System.out.println("R loaded");

That was awkward so I tried to use R in the console. When I execute the “R” command I received “cannot mkdir R_TempDir”. So I dug into the R source code to know when it happens. So I figured out that R tries to read environment variables TMPDIR, TMP, and TEMP before set “/tmp” as default one. Since this variables were not set, the “/tmp” is the destiny of the temporary stuff.

When I saw my “/tmp” directory was full, I mean, filled with the maximum number of directories possible in an Ext3 File System, 32K. I realized that all the problem was that R was not getting space for the new “Rtmp…” directories.

To solve that, “rmdir Rtmp*” inside “/tmp” dir. And the world is a happy place again.

wget output conflicting options

I was trying to download some image with wget and set both a name and directory for its output. Reading the wget man page, it shows different options to deal with each one of the situations, -O to set the downloaded file’s name and -P to set its directory.

Anyway, if you try to use both one there is a kind of overwriting options. Let’s try the following example to realize this unexpected behavior, at least in my opinion:

I want to download the Google’s logo with a customized name “downloaded.gif” and also want that the output file to be take to /tmp directory. So, the following command should do the work:

wget -P /tmp -O downloaded.gif

What we have here is, wget (google logo) -P (the directory where I want the downloaded logo output) -O (the name of the output file). But the resulting file “downloaded.gif” goes to ‘.‘ directory. It seems that the default output directory did not change even when using the -P parameter. The parameters order does not matter, i.e., the following command does the same unwanted thing:

wget -O downloaded.gif -P /tmp

To solve this problem I did forget the -P parameter, and used just the -O writing together both the output directory and file name. So, the following command solved my problem:

wget -O /tmp/downloaded.gif

Linux no sound after resuming from suspend/hibernate

This problem was annoying me under a Debian-based distro. I read a lot of tricks to solve that, some of them like to “install the latest kernel version”.

Anyway, at least for me the command below solved the problem:

sudo alsa force-reload