Category Archives: Linux - Page 3

Remove all settings for Evolution

Here is a small script to remove all your Evolution settings:

Next time you open Evolution, you will be prompted to add a new account.

Fix Google Earth 5.0 user interface font on Linux

I installed Google Earth 5.0 and the ugly UI font from the beta is still here.
Based on the comments from Google Earth Help page from here I’ve created the following script wich will fix the user interface font issue.

HOWTO Force fsck on the Next Reboot

fsck is used to check and optionally repair one or more Linux file systems.
By creating /forcefsck file you will force the Linux system (or rc scripts) to perform a full file system check.
Create a file called forcefsck:

View Config Files Without Comments

Use this grep invocation to trim comments out of config files. Comments are great but can get in your way if you just want to see the currently running configuration. I’ve found files hundreds of lines long which had fewer than ten active configuration lines.
It’s really hard to get an overview of what’s going on when you have to wade through hundreds of lines of comments.

The regex ^[^#] matches the first character of any line, as long as that character that is not a #. Because blank lines don’t have a first character they’re not matched either, resulting in a nice compact output of just the active configuration lines.

Thinkpad HDAPS in Ubuntu 9.04 Jaunty

One of the cool features in a Thinkpad is IBM Active Protection System.
The system consist of two parts. The driver that enables reading the acceleration data and some sort of userspace software that does the actual parking of the harddrive heads, usually hdapsd.
The hdaps driver is part of the kernel but the driver maintainers actually recommend using the tp-smapi driver instead. So that’s what we’ll do.
Make sure you have the necessary tools installed:

The tp-smapi is in the package repository (universe):

This will fetch and install the tp-smapi-source package, unpack the source and then compile and install the kernel module.

Try loading it:

The kernel log should show something like this:

For some reason some configuration for udev is missing. Fix this by running:

Now for the userspace stuff. First let us test if APS is actually working.

This will install hdaps-pivot or hdaps-gl which you can use to verify that the sensors are working.
You can also test this by running this in your terminal (stop it with pressing CTRL + C):

Next we need to update the hdapsd. The one provided in Jaunty is old. There is a PPA with newer versions.

Add the PPA key:

Update the package list and install the package:

Install gnome-hdaps-applet (optional).
There is a PPA for this. You can add it like this:

Add the key:

Update the package list again and install the packages:

Enjoy!

Clear ALT+F2 history in Gnome

Use this command in your terminal to clear the “Run Program” dialogue box invoked by ALT+F2 in Gnome:

Random crash of the X server in Jaunty

I experienced a lot of random X server crashes using the proprietary driver for the NVIDIA graphic card on my Thinkpad T61 running Ubuntu 9.04 x86 with Compiz activated.
I managed to fix the problem by installing the lastest NVIDIA driver. I wrote a little script to automate the process and save time. I recommend you to run this in command line mode. Here it is:

Custom usplash resolution in Ubuntu

Recently I made a clean install of Ubuntu 9.04 on my Thinkpad T61.
I configured the figerprint, the accelerometer is reporting correct values.
I did not like the default resolution at boot. So I created a custom usplash.conf file:

I should contain these lines:

The next step was to update the “initial RAM disk”, that is used when the system boots up:

Next, I modified my /boot/grub/menu.lst file.
I added as a parameter for the current kernel the value vga=872:

Nice and clean!

Auto update for Debian/Ubuntu

I use the following script to automatically update my Ubuntu box.
I don’t recommend using this on your production servers!

Note that there are some dangers regarding automatic updates. You can read more about it here.

No LFE (Low-Frequency Effects) in Ubuntu 9.04 (Jaunty Jackalope)

There is a new catch if you want to enable 5.1 surround sound in Ubuntu 9.04. First you need to follow the same steps like you did for Hardy Heron. There is an old post I wrote about it.
In this new version of PulseAudio they don’t synthesize an LFE signal anymore by default.
They introduced this new option called disable-lfe-remixing.

When upmixing or downmixing ignore LFE channels. When this option is on the output LFE channel will only get a signal when an input LFE channel is available as well. If no input LFE channel is available the output LFE channel will always be 0. If no output LFE channel is available the signal on the input LFE channel will be ignored. Defaults to “on”.

The solution to get you bass back is to set this option to no.
As a result, here are the steps you need to take:

Uncomment the line containing:

and replace '2' with '6' (if you have a 7.1 card, replace '2' with '8').
Next, set disable-lfe-remixing option to no

Restart your computer and you’re in business.
NOTE: Documentation for this article is taken from here and here.