Saturday, December 22, 2007

I have been using XMonad as my primary window manager for a few weeks now. No problems whatsoever. But today, I felt like playing with Netbeans a little. That's when I discovered that Java applications don't seem to be able to draw their windows on the screen (except the splash screens) when under XMonad. I have seen that under GNOME/Metacity, the same application works fine. So, I googled for a bit and found this:

It seems that the problem appears only with apps using the swing toolkit. But the solution is simply to set an environment variable:
export AWT_TOOLKIT=MToolkit

Thats all that was required to solve the problem.

Friday, November 9, 2007

Manual install of a package and 'pkg-config'

I tried to install the rtorrent package manually. So I downloaded Now, rtorrent depends on libsigc++, libcurl and libtorrent. The required versions of libsigc++ and libcurl were already installed on my system. I decided to manually install (just for fun) libtorrent. So I downloaded

Next I did the routine "untar, configure, make, make install' cycle on libtorrent (I used the configure option --prefix=$HOME). No problems. When I tried the same on rtorrent, 'configure' complained that libtorrent was not found.

Well, after some poking around, I found that 'pkg-config' that is used for finding libraries needs the path to a file named "library_name.pc" to be added to the environment variable PKG_CONFIG_PATH for it to able to find the library. In my case, libtorrent.pc was in ~/lib/pkgconfig. So, once I added to
PKG_CONFIG_PATH, rtorrent compiled and installed fine.

Thursday, November 8, 2007

Skipping compiz blacklist check in Ubuntu Gutsy

Today, I upgraded one of our Ubuntu boxes at our lab from Feisty to Gutsy. I was expecting to see compiz-fusion in its full glory. But unfortunately, that was not to be.

Although the upgrade went smoothly. But after the upgrade (followed by a reboot), I found compiz was not enabled by default. So, I manually tried to enable compiz (System -> Preferences -> Appearence -> Visual Effects). But it failed with the message "Blacklisted PCIID '8086:29a2' found". Turns out that the Intel i965 Video chipset used by our Dell Dimension has been blacklisted by Compiz in Gutsy. Fortunately, fixing this was easy. A little google search turned up the workround.

Just put the line "SKIP_CHECKS=yes" in ~/.config/compiz/compiz-manager and then tried again. This time it succeeded. (The file 'compiz-manager' and the directory 'compiz' was not there. So I had to create it first).

Now, compiz is working! From what I read somewhere on the web, I might have problems playing videos with compiz enabled on this machine. But I also read that there is probably a compiz-fusion plugin to solve that problem too (didn't try it yet though)

Friday, November 2, 2007

Worked around a keyboard problem in our lab

Today, I had to work with a broken keyboard where all the Shift+(non-keypad number) keys were broken. So, I could not get !@#$%^&*() characters. To work around this problem, I created a ~/.Xmodmap file containing the following.

# This maps the keypad number keys so that they generate
# the exclam, at, etc. characters when pressed aong with
# the Shift key. This rectifies a keyboard problem where
# all the Shift+(non-keypad number) keys were dead!

keysym KP_1 = KP_1 exclam
keysym KP_2 = KP_2 at
keysym KP_3 = KP_3 numbersign
keysym KP_4 = KP_4 dollar
keysym KP_5 = KP_5 percent
keysym KP_6 = KP_6 asciicircum
keysym KP_7 = KP_7 ampersand
keysym KP_8 = KP_8 asterisk
keysym KP_9 = KP_9 parenleft
keysym KP_0 = KP_0 parenright

Now, instead of pressing Shift+2 for the @ character, I have to press Shift+KP_2 produce the @ character.

Tuesday, October 30, 2007

Emacs-23 can use great (Xft) fonts too

Check out the following link for details:

Basically you need to do the following if you are using ubuntu feisty like me (there is a repo for gutsy too):

Add the following lines to your /etc/apt/sources.list:
deb feisty main
deb-src feisty main

Then do a "
sudo apt-get update" followed by
sudo apt-get install emacs-snapshot emacs-snapshot-el"

This will install the required emacs package.

Then add the required font line to your ~/.Xresources file. In my case, I wanted to use "Bitstream Vera Sans Mono" at 10 points size. So I appended the following line to my
~/.Xresources file:
Emacs.font: Bitstream Vera Sans Mono-10

Then in order for this to take effect, I did an
xrdb -merge ~/.Xresources".

After that I fired up emacs, and lo and behold... the world's
greatest 'editor' now with Xft font support :-)

Saturday, October 27, 2007

Reason for creating this blog

Whenever I have some free time, I play with my Linux box at home. During these fun times, I do some stuff, install cool software, and in the process, often figure out how to do certain things in Linux. But till now, I never noted down the successfull attempts. So I tend to forget how I did certain things in the past. This blog is an attempt to rectify that situation.

From now on, I will note down those fun moments here (... maybe even the unsuccessfull ones so that someone reading this might be able to help me out)