Firefox (Linux) : “Middle-click on page loads URL” annoyance

Firefox will load whatever URL is in the copy-paste buffer in the page if you middle click somewhere on a page. My mouse’s wheel also serves as the middle button, and I found it really annoying that when occasionally middle-clicking while scrolling the page, Firefox would try to load another page …

You can control this behaviour with this about:config property middlemouse.contentLoadURL. Set to true, the middle-click on the page will load the URL (if it is one) in the page, set to false it won’t.

Thanks Ayman !

Perl : Using the Finance::Quote module to get your stock prices

Finance::Quote is a Perl module which can be used to obtain stock information from various internet sources. I thought I’d rather share this code snippet as an example showing how easy it is to use, before I turn it into a bloatware with an SQL backend to compute average price per share and what not 🙂

So here is a simple snippet demonstrating how to get the price of a stock :
Continue reading Perl : Using the Finance::Quote module to get your stock prices

Gentoo : Xorg X Server 3D hardware acceleration

You need to have read/write permissions to /dev/dri/cardX to benefit from 3D hardware acceleration in Xorg X Server. On a Gentoo linux machine, this file has the following permissions set by default :

ls -l /dev/dri/card0 
crw-rw---- 1 root video 226, 0 2009-10-14 16:12 /dev/dri/card0

Continue reading Gentoo : Xorg X Server 3D hardware acceleration

Gentoo : Running Cacti with LigHTTPD

If you use Gentoo and tried to install Cacti with Lighttpd instead of Apache, chances are that you ran into this error message :

/usr/lib/python2.6/site-packages/WebappConfig/content.py:27: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import md5, re, os, os.path
* Fatal error: Your configuration file sets the server type "Apache"
* Fatal error: but the corresponding package does not seem to be installed!
* Fatal error: Please "emerge >=www-servers/apache-1.3" or correct your settings.
* Fatal error(s) - aborting

Continue reading Gentoo : Running Cacti with LigHTTPD

HAL + Xorg X server : Using HAL to set hardware specific configurations for Xorg Xserver

The Xorg X Server can now rely on HAL to get information about the hardware the machine is running. This allows the X Server to auto-configure most of its components such as keyboard / mouse / screen / graphic adapter. But there is still room for tweaking it if needed.

This post explains how to configure extra properties for a keyboard at the HAL level, so that X Server will correctly auto-configure it for you.

Continue reading HAL + Xorg X server : Using HAL to set hardware specific configurations for Xorg Xserver