Archive for the 'Ubuntu' Category

Qt and Fontconfig

After upgrading to Lucid Lynx I found that all Qt based applications would not have anti-aliased fonts anymore. For example Skype would look awful with these pixelated fonts. Unfortunately Google didn’t help me out, so I started a little research of my own into this issue. I was previously able to tweak font settings using ~/.fonts.conf so I thought to start there.

To make a very long story a whole lot shorter; assigning pixelsize turns off font hinting for Qt apps. I wasn’t able to figure out why, but I did find a solution for my particular setup, resulting in the following ~/.fonts.conf:




  
    Arial
    12
    13
  

You really have to look carefully to notice the difference with the original: it’s the qual="all" attribute in both test nodes. That did the trick for me.

Ubuntu, setuptools and --install-layout=deb

I wanted to start out with some wxPython GUI testing and was trying to get dogtail installed on my Ubuntu 10.04 system. The current dogtail version that you can install with Synaptic is 0.6.1, while I want to try out 0.7.0. So I grabbed the source from dogtail’s website, unpacked it into /usr/local/src and ran:

$ cd /usr/local/src/dogtail-0.7.0
$ sudo setup.py install

However, when I tried to run sniff for example, it can’t find it’s image files, because it’s looking explicitly in /usr/share instead of /usr/local/share. Ok, so let’s try again:

$ sudo setup.py install --prefix=/usr

This time, sniff start complaining that there’s no module named dogtail.config. A bit of Googling tells me that Ubuntu doesn’t have /usr/lib/pythonx.y/site-packages in its path by default. Only site-packages inside /usr/local/lib/pythonx.y and dist-packages in /usr/lib/pythonx.y are added to Python’s path by default. This is to clearly separate the place for packages that are included in the Ubuntu distribution (dist-packages) and those you install yourself (site-packages).

Now there’s a special argument for distutils if you want to install a “distribution” package manually, namely --install-layout=deb. Passing this argument will put the package using /usr as prefix and using dist-packages instead of site-packages, as if you were installing a deb package. So:

$ sudo setup.py install --install-layout=deb

That did the trick for me. Now back to what I was originally wanting to figure out: wxPython GUI scripting and testing with dogtail.

Gnome Keyring Password Problem Fixed in Ubuntu 10.04

After I wrote up my post about problems changing my Ubuntu’s user account password, which didn’t automatically updated Gnome’s keyring, I found that I was not the only one suffering from this problem.

A while ago I upgraded to 10.04, and not long after that I had to change my password again (the half-yearly password-will-expire-soon emails started coming in on the account I use on that system). So I did. And as charlesb points out in a comment on my earlier post, I can also confirm that the keyring password problems have been fixed by the Ubuntu team in 10.04.

Thanks Ubuntu!