Archive for May, 2008

Sound problem on Hardy Heron

Saturday, May 31st, 2008
After the upgrade to Hardy Heron you may have noticed a problem in your sound. Specifically, you may notice that you cannot simultaneously listen to both Youtube video and other audio applications. You have to close the one or the other, for the sound to come up.

The problem is caused because since Hardy Heron the PulseAudio is used by default as an audio server, and flash exhibits a faulty behavior because of that.

To fix the problem is as simple as typing:



sudo apt-get install libflashsupport



Then close all application that play audio, including web browsers, like FireFox; make sure that you close all browser windows, or yet better do it from File → Quit.

Restart the PulseAudio server:



sudo /etc/init.d/pulseaudio restart



and you're done.

Smoke-Free Banner

Friday, May 23rd, 2008
I just came up with a small PHP script that generates a simple "smoke free" banner that you can freely use in your website, or signature, or whatever.

Based on the information that you provide, the banner displays the number of days you have been smoke-free, the number of cigarettes you avoided and the amount of money you saved. For example, this is my smoke-free banner:




You can create your personal smoke-free banner here.

The idea is actually stolen from the "Smoke-Free QuitMeter Banner" originally created by "Josh Houghtelin of burnmytime.com & Erin S. Leadbetter", and you can find it here. The main difference is that QuitMeter generates a static image of your smoke-quitting statistics, while mine is generated on the fly (thus, the numbers will automatically be updated every time someone sees your banner).

what to do if Kino fails to import video files

Tuesday, May 13th, 2008
If you are trying to import non-DV files (such as AVI or OGG) into Kino, but you are only getting an error message, probably that's becuase you're missing ffmpeg, a program that is used by Kino to convert video file from non-DV formats to DV.

To fix this you only have to type:

# sudo apt-get install ffmpeg

The most likely is that you don't even have to restart Kino, just go ahead and just load the file, it should be working by now.

ubuntu: arrow keys make mouse pointer to move around

Saturday, May 10th, 2008
Today I discovered a nice feature in Ubuntu which allows you to move the mouse pointer using your numpad's arrow keys. You can even click using the middle '5' button.

However, this can be very annoying if you want to play a game or something, not only because you will have a mouse pointer running around the screen, but also because this feature actually steals the keyboard events, and possibly will cause your program to work improperly.

You can easily disable this feature by going to System → Preferences → Keyboard. Then go to the Mouse Keys tab. You will see a checkbox labeled as Allow to control the pointer using the keyboard. All you have to do is to make sure that you have this box unchecked. It should look like this:

disable-keyboard-mouse.png

GNOME Terminal ignores font rendering settings

Monday, May 5th, 2008
In the latest Ubuntu release, Hardy Heron, a bug in the GNOME Terminal causes the program to ignore the system's font rendering settings and instead uses its own.

I don't really know how to fix this in a proper manner, but I found something which is rather a work around on this problem, than a real solution.

You should try the following:

# cd /etc/fonts/conf.d
# sudo mv 10-no-sub-pixel.conf 10-no-sub-pixel.conf.1


The above command takes the 10-no-sub-pixel.conf out of the game. I prefer to rename the file than completely remove it, in case I want to get it back when the bug is fixed.

Restart your X Windows and try to open GNOME Terminal, which should be using your system-wide settings this time.

ubuntu: HP LaserJet 1018 is found but does not print

Monday, May 5th, 2008
Symptom:
You plugged in your printer. Ubuntu recognized it and displayed a message that your printer is ready for use. Then you send something for printing. Cups says that the job is being processed and eventually removed from the printing queue. However, you never see your printout coming. Your printer stays silent and idle all the time.

Diagnosis:
Some printers (including LaserJet 1018) are shipped with an incomplete firmware. These printers expect a working firmware to be sent from the operating system. However, due to licensing issues and restrictions the driver that comes with Ubuntu for this printer (foo2zjs) does not contain a firmware. Thus, the printer is essentially unusable.

Cure:
You will have to download the foo2zjs source code and build it yourself. You will also have to get yourself an appropriate firmware file. And that will fix it.

Here is the exact commands you have to type to get everything done:

wget -O foo2zjs.tar.gz http://foo2zjs.rkkda.com/foo2zjs.tar.gz
tar zxf foo2zjs.tar.gz
cd foo2zjs
sudo make uninstall
make
./getweb 1018
sudo make install
sudo make install-hotplug


The same procedure can be followed for all printers that are supported by the foo2zjs driver. The models currently supported are:

  • Minolta/QMS magicolor 2300 DL

  • Minolta/QMS magicolor 2200 DL

  • Konica Minolta magicolor 2430 DL

  • Minolta Color PageWorks/Pro L

  • HP LaserJet 1022

  • HP LaserJet 1020

  • HP LaserJet 1018

  • HP LaserJet 1005

  • HP LaserJet 1000

ubuntu: how to disable window snapping

Sunday, May 4th, 2008
The wobbling window effect is by far my favorite one from the plethora of compiz-fusion plugins. However, the window snap effect can be a bit of annoying sometimes and personally I prefer to disable it.

You may have tried to disable this feature by disabling the "Snapping Windows" plugin, but without the desired effect. Well, this is what you have to do: Start CompizConfig Settings Manager, go to System → Preferences → Advanced Desktop Effects Settings. The find the Wobbly Windows plugin (which should be enabled) and click on it to go to the plugin's setting screen. From the General tab, make sure you disable Snap windows and uncheck Snap Inverted. You should disable them both. It should look something like this:

disable-window-snap.png


And now you will be able to enjoy your wobbly windows without the annoying snapping.

compiz-fusion: switch from Metacity to Emerald

Thursday, May 1st, 2008
You can easily change your window manager from Metacity, compiz's default window manager, to the much more promising Emerald.

First you have to install Emerald:

sudo apt-get install emerald

Then you will have to tell compiz to load Emerald instead of Metacity. Edit your ~/.config/compiz/compiz-manager configuration file (create it if necessary):

gedit ~/.config/compiz/compiz-manager

Add the following line into the file:

USE_EMERALD="yes"

and save it. The next time your restart X you will have Emerald loaded instead of Metacity.

aftetris 1.11 (tetris clone for X11)

Thursday, May 1st, 2008
Since there is no "official" place for aftetris, my tetris clone for the X Window System, I'm posting a copy right here for whoever might be interested.

This is the download link: aftetris-1.11.tar.gz

Here you can watch a short video demonstration of the game:




To build the program simply type:

tar xvzf aftetris-1.11.tar.gz
cd aftetris-1.11
make


To install it in your system type:

sudo cp aftetris /usr/local/bin

To run the program type:

aftetris

The first time you run the program you will be asked to configure your keyboard settings. If you ever want to reconfigure the keyboard settings, type:

aftetris -customize

The game is good (I think) but the code sucks. However, I'm freely unfolding it in front of your eyes for you to revolt at the sight of it. Have tons of fun!