When ever I restart (or logout and login) my laptop the LCD display brightness is set to the maximum value. Even if I set the brightness settings in the power to the value I need, they won’t be in effect when I restart the machine.
To solve this problem I wrote the following python script. First you need to add it to the startup applications list. The command to be given in the startup applications is “python /<path>/<to>/<script>/setBrightness.py”.
By default, the script will set the brightness to the minimum value. But if you want to change this, you can do that by editing the value 0 of the “value” variable to any value between 0 to 100.
Download::
http://ishans.info/attachments/category/40/setBrightness.py
PS:
It seems that D-bus interfaces have been changed recently (From Gnome 3 onwards). So if you use Ubuntu 11.10 or any other gnome 3 compatible OS, please use the following script.
http://ishans.info/attachments/article/65/setBrightness.py
All of the above code can now be conveniently accessed from Git-hub via https://github.com/ishanthilina/setBrightness . There are branches for every version of the script.
I have noticed that Empathy (the default multi-protocol chat client in Ubuntu 11.04) doesn’t re-login to the accounts after the network is dropped and re-connected. So I wrote the following python script to solve this problem. The script will be using D-bus signals to detect the network connection status.This will make empathy to,
- connect automatically when network connection is established (even when empathy is not running).
- re-login to accounts when the network gets dropped and reconnect again(very useful when using wireless connections).
To use this script add it to the startup applications. Command to be given is “python /<path>/<to>/<script>/empathyConnect.py”
Download:: http://ishans.info/attachments/article/64/empathyConnect.py
My operating system is Ubuntu Linux 11.04 and I am using Java Slick library to build a game in these days. I faced the following error when I tried to load sounds using Music backMus=new Music(“path/to/file”); .
INFO:Initialising sounds..
AL lib: oss.c:179: Could not open /dev/dsp: No such file or directory
ERROR:Sound initialisation failure.
ERROR:Could not locate OpenAL library. org.lwjgl.LWJGLException: Could not locate OpenAL library.
Searched everywhere for hours to find a solution for this and tried many guides which were written to solve this problem, but none of them were a success. Finally I got to know that this error is caused because Slick library uses a very old version of LWJGL (Light Weight Java Gaming Library). If you too are having this same problem use the following guidelines to rectify it.
- Download the latest version of LWJGL from http://lwjgl.org/download.php.(Download the file named lwjgl-x.x.x.zip).
- Extract the downloaded file.
- Copy the libraries that you are using from the jar folder in the extracted directory to your games Slick library folder. (Confirm file overwrites).
- Copy the relevant native files from the native folder to your games Slick natives folder. (Confirm file overwrites).
- Now reload the libraries in your IDE-if you are using any (For an example,in Net Beans remove all the slick libraries and add them again).
Now the game will play the sounds smoothly…!