Friday, April 18, 2008

Compiled Metacity (from svn) to get drop shadows!

Yesterday I tried compiling metacity downloaded from subversion.

I read an article (from epologetics.org) containing some information on
compiling metacity from subversion. Following it, I first installed the
following packages on my Ubuntu 7.10 (Gutsy) system:
--------
sudo apt-get install gnome-common build-essential autoconf gnome-devel libtool
-------

Then, I tried to run:
-------
./autogen.sh
-------
which gave some errors about something like 'shift 370: can't shift that many'.
Then I tried reading the autogen.sh file and noted somewhere that I required
automake-1.10. My installed version was 1.9. So I installed 1.10 and tried again.

This time it progressed much further, but again bailed out while trying to run
aclocal-1.10. The error said something about '/usr/share/aclocal' being an invalid
option. I tried reading up on the aclocal manual page, and found that, to include
a directory of m4 files for aclocal, you need to use the -I option.
Another reading of autogen.sh showed that it was somehow calling gnome-autogen.sh.
Then I tried reading the relevant portion of gnome-autogen.sh where it was calling
aclocal-1.10. Turns out that it was calling aclocal as 'aclocal-1.10 /usr/share/aclocal'.
I tweaked this file a little so that it was now calling aclocal as
'aclocal-1.10 -I /usr/share/aclocal'. After that I again ran ./autogen.sh.
This time ran to completion... also invoking './configure' somehow, which also seemed
to run fine.

Now I ran 'make' and everything went smoothly. I was able to successfully compile
metacity from subversion on my system. Oh I forgot to mention, I used the enable
compositor option for configuring metacity, and now I get drop shadows in windows
and the gnome panel in metacity... cool :-)

By the way, I have the feeling that I would not have to do all these tweaking stuff
and everything would have gone smoothly if I had used gnome-common from
subversion (as was mentioned in one of the files I read) instead of the version
available from Ubuntu's gnome-common package.

Update: Just now (19th April, Saturday), I tried doing the same thing on a
different computer (this too, an Ubuntu Gutsy, but this one has access to the
internet and is regularly updated). Here, I did not need to put the '-I' option on the
aclocal line in gnome-autogen.sh file (as mentioned in my original post). In fact,
it gives me an error if I do so. But without that, the thing compiles just fine (with
automake 1.10 installed).

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: http://www.haskell.org/pipermail/xmonad/2007-June/001078.html

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 http://libtorrent.rakshasa.no/downloads/rtorrent-0.7.9.tar.gz. 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 http://libtorrent.rakshasa.no/downloads/libtorrent-0.11.9.tar.gz.

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.