Beautify gitk font on Debian/Ubuntu

Install tk8.5, if not yet installed:

# apt-get install tk8.5
# update-alternatives --config wish

There are 3 alternatives which provide `wish'.

  Selection    Alternative
-----------------------------------------------
          1    /usr/bin/wish8.4
*+        2    /usr/bin/wish-default
          3    /usr/bin/wish8.5

Type in the number that corresponds to tk8.5 (in my case was 3) then hit enter.
Change fonts in ~/.gitk to DejaVu Sans Mono.

set mainfont {{DejaVu Sans Mono} 9}
set textfont {{DejaVu Sans Mono} 9}
set uifont {{DejaVu Sans Mono} 9 bold}

How to replace default fonts in MIUI rom

MIUI (1.7.22) uses Arial as the default font.  If you hate it as I do, here is how to change it.

I assume you have ‘adb’ working. We are going to replace only 2 fonts – Arial.ttf and Arial-Bold.ttf.

First, let’s back up the old fonts just in case thing didn’t go well as we want to. (I learned this the hard way, and keen to avoid it at all cost)

$ adb pull /system/fonts/Arial.ttf
$ adb pull /system/fonts/Arial-Bold.ttf

You should have a copy of the above 2 fonts on your local computer. Next is to connect to your phone and replace those fonts with DroidSans.ttf and DroidSans-Bold.ttf respectively.

$ adb shell
# cd /system/fonts
# cp DroidSans.ttf Arial.ttf
# cp DroidSans-Bold.ttf Arial-Bold.ttf

Restart your phone. Voila, your text doesn’t look as ugly as before; well at least that’s what I think.

[FIXED] bind9 is running bind9 status reports failed!

bind9 runs in a chroot environment on lenny. The service can be started as usual:


# /etc/init.d/bind9 start
Starting domain name service...: bind9.

Let’s check bind9 status:

# /etc/init.d/bind9 status
bind9 is not running failed!

Well, the first thing I did was to check the log file, in which I found no error related to named. So I tried another way to check the status:

# rndc status
version: 9.6-ESV-R3
CPUs found: 1
worker threads: 1
number of zones: 17
debug level: 0
xfers running: 0
xfers deferred: 0
soa queries in progress: 0
query logging is OFF
recursive clients: 0/0/1000
tcp clients: 0/100
server is up and running

I was convinced that dns service was running. So what went wrong? It must be something in the /etc/init.d/bind9 script that incorrectly reports bind9 status. Opened up this file, I found:

...
PIDFILE=/var/run/bind/run/named.pid
...

Ah ha, the default location of named.pid is in /var/run/bind/run. In my case, named.pid is located in /var/chroot/var/run/bind/run/named.pid. Therefore in order to fix this, we just need to point PIDFILE to the correct file.

PIDFILE=/var/chroot/var/run/bind/run/named.pid

Save bind9 script, and check bind9 status again:

# /etc/init.d/bind9 status
bind9 is running.