Archive for the 'Linux' Category


Xserver-xorg Core Update Problem 0

Apparently there is a bug in the recent xserver-xorg core update package, if you happen to run apt-get upgrade lately and are experiencing problems in getting the xserver to start then the fix is to *downgrade* the xserver-xorg package to a earlier stable version by issuing the following command:

sudo apt-get install xserver-xorg-core=1:1.0.2-0ubuntu10

Only God knows how this bug slipped through and ended up in the main repository!! 😐

Strange Layout in Mac OS X… 0

Well, I guess it is a good thing of having an alternative OS (Mac OS X) at my disposal!!

The new theme I applied to my blog looks fine under both Linux (Debian & (K)Ubuntu) and Windows XP. However, I recently acquired a 2nd-hand Powerbook 15″ G4 (absoultely a beauty!!) and when I first visited the blog using Firefox on OS X, the layout of my blog looks slightly different.

Here is what it looks like before:
before.png

and here is what it looks like after I fixed the CSS:
afetr.png

As you can see the header appears to be on top of the calendar when viewing in the Mac machines even though using the same browser, i.e. Firefox. I’m guessing that Firefox mac port has been designed slightly different to its Linux and Windows counterparts…

Well, nevertheless, it’s fixed now and hopefully no more surprises in that department!! 🙂

Right-click on Apple’s PowerBook and (K)Ubuntu Linux 2

Apple’s PowerBook built-in touchpad has no middle or right mouse button. Under Mac OS X, right-click is simulated by holding down the Control key and then clicking. However, this doesn’t work on (K)Ubuntu Linux.

Googling around, I found that, by default, the F11 key is mapped to a mouse middle-click while the F12 key is mapped to a mouse right-click.

It is also possible to change this behavior by editing /etc/sysctl.conf and mapping dev/mac_hid/mouse_button2_keycode and dev/mac_hid/mouse_button3_keycode to their corresponding key scan codes. The scan code for a key can be retrieved by running

sudo showkey

then pressing the key or keys for which the scan codes are to be printed. To exit, press Control-D.

Killing a Linux Process 2

A very handy tip from Ryan on how to kill the unwanted Linux process.

From the “I always need this but never remember how to do it” file – How to kill a Linux process from the command line:

ps -A | grep processname | cut -c0-5 | xargs kill

This gets a listing of the process in question from ps -A that looks like this:

17468 ? 00:00:00 processname

and cuts the first five characters to get the process id and passes that straight to kill.

For extra crispiness, use kill -9.

Update: As my fellow readers have pointed out – the killall command already does this. So, don’t write your own and don’t listen to me, just use killall processname

However, if you’re looking to kill only certain processes, and not all processes of the same executable, you can modify the command like this for a more generic matcher patter:

ps -aux | grep process pattern | cut -c10-15 | xargs kill

« Previous Page