Palettes, Monaco and Terminals…

May 28, 2009

After a long time of trying to the Monaco font to play nicely with any terminal under Linux, I recently found a version of the Monaco font for a Linux OS. The regular Monaco True Type font behaves quite differently under a Linux OS and doesn’t quite render properly in terminals(it displays properly in some text editors though). You can get it here.

To make things a little nicer I changed the color palette to use the Tango palette. The Tango pallete is available by default for the more recent versions of gnome-terminal. My OS still uses Gnome 2.16.0 though.

$ gconftool-2 --type string --set /apps/gnome-terminal/profiles/Default/palette "#2E2E34343636:#A4A400000000:#4E4E9A9A0606:\

Here's What the Tango palette kinda looks like on white bakground

Here's What the Tango palette kinda looks like on white bakground

That should give you a nicer palette, do note that if your using a different “profile” in gnome-terminal you will have to change the word Default in the above to your profile name. Eg. If your profile is called black_hacks in gnome-terminal you’ll end up with something like this…

gconftool-2 --type string --set /apps/gnome-terminal/profiles/black_hacks/palette "#2E2E34343636:#A4A400000000:#4E4E9A9A0606:\

For my terminals with a black background I use the below setting for everything else I use the tango palette.

gconftool-2 --type string --set /apps/gnome-terminal/profiles/Default/palette "#000000:#FF6C60:#A8FF60:\

Here's how it looks

I use xterm from time to time as well, So I stick this in my .Xdefaults.

xterm*color0: #000000
xterm*color1: #FF6C60
xterm*color2: #A8FF60
xterm*color3: #FFFFCC
xterm*color4: #96CBFE
xterm*color5: #FF73FE
xterm*color6: #C6C5FE
xterm*color7: #EEEEEE
xterm*color8: #000000
xterm*color9: #FF6C60
xterm*color10: #A8FF60
xterm*color11: #FFFFB6
xterm*color12: #96CBFE
xterm*color13: #FF73FE
xterm*color14: #C6C5FE
xterm*color15: #EEEEEE

Here's what xterm looks like

“Why would you do all of this?” you may ask, If you’re like me and spend a considerable amount of time on the command line or editing code, it makes things alot lighter on the eyes and more readible.


Vw’s, Coolant, Inginition Locks…

February 9, 2009

It’s the first post for the year and I’m not going to talk about linux. Instead I am going to tell about my experience with VW Golf’s and replacing parts, specifically the thermostat, coolant pump (water pump), ignition lock and steering column. That’s a mouthful for me. Had you asked me what any of these automotive parts were last year, I would have stared at you blankly. Lately I’ve taken an interest in what goes on in my car and how the engine works which I am ashamed to say I have not in the past.

For those who don’t know I own a 1990(it might actually be older) Citi Golf that requires alot of body work. Nonetheless, my car got stolen and recovered just down our road, but was in a bad condition. The ignition lock was broken off, the indicator/light/wiper switch was broken the dash as pretty damaged. Usually I would have just taked this sorta thing in and have it fixed by someone. My brother and I decided to DIO(Do It Ourselves). It was a fairly easy process and everything worked as did before, only with newer parts. Disconneted the battery cables, removed the Steering wheel, broken indicator with weird mechanism thing. The tricky bit was getting the little top of the sterring which had a spring just below it. We got it out the way successfully though. I was suprised to find how easy it was.

I’ve had an overheating problem for sometime and each time I take my car in a week later the problem surfaces again. So I did some research, and figure there’s a my car appears to either have blockage in the water system caused by a water pump whose impeller’s blades might be damaged, a thermostat which is stuck close or there’s something wrong with the head. I opted for the thermostat issues over head. So I removed the thermostat which was located within the bracket of my water pump and started testing, cars in this climate don’t really need thermostats. My girlfriends brother was kind enough to lend a hand as he previously worked for a Golf Mechanic/Repair Shop. We noticed water was still not flowing effeciently and replaced the water pump ( the braket is located just under the alternator, you have to remove the belt first and shift the alternator upwards to make it easier for yourself ) flushed the radiator to make sure no air is in the block, and started testing further. It made a substantial difference only it didn’t solve the problem( and no it was not my radiator or my radiator fan nor the 2 speed switch for it they had previously been replaced by the mechanic and are brand new ). So it looks like my head gasket might actually be blown or the is a problem with the head of my engine. No, my car is not puffing out white smoke which is a comman symtom , but that would depend on where it blew. It’s unfortunate that the head is the hardest problem to debug as there are only so few things you can do to test for it, either a leak down test or compression test(which usually gets done by engineers). These jobs are generally passed on to engineers that have the tools available to do such testing. So if the head is warped(because of heat), or needs scheming, they would be able to tell.

New Water Pump In Car

New Water Pump In Car

Though the experience in debugging the car was interesting, I found myself saving quite the buck replacing the coolant pump myself, with some guidence and help from a professional.


October 22, 2008

Lately I’ve been less active within mailing-lists, irc etc… so what exactly have I been up to? Well for the most part I’ve been working hard,
but I’ve been learning a bit of Ruby too, given that my current employer is a pretty much a Rails house. Yes, I said it. I’ve been learning Ruby. I’ll say it again, I… have… been… learning… Ruby. Yes, me , and I was enjoying it too. I’ve learned quite a bit whilst with my current employer and it saddens me that I have to leave as we’re closing business end of October. I guess I have to look forward to another learning opportunity up ahead. I’ve secured myself a nice position within another company which I hope will afford me the same learning opportunity.
That said, I have to get back to learning some more…

When APT complains about

September 16, 2008

Shortly after responding to Jonathan Groll on the CLUG’s mailing list about BADSIG errors. I’ve had the pleasure of experiencing it again.

pants:~$ sudo aptitude update 
W: GPG error: lenny/updates Release: The following signatures were invalid: BADSIG A70DAF536070D3A1 Debian Archive Automatic Signing Key (4.0/etch)
W: You may want to run apt-get update to correct these problems

I often have to remind myself to use Acquire::http::No-Cache=True when my machines are behind a SAIX proxy.

pants:~$ sudo aptitude -o Acquire::http::No-Cache=True update
it lenny/updates/non-free Sources
Fetched 14B in 12s (1B/s)
Reading package lists... Done

I should probably just put the below code in my apt.conf or in a file in apt.conf.d to safe me from future occurrences.

    No-Cache "true";

Installing Gentoo from a LiveCD or Desktop using LVM

September 14, 2008

Its been a while since I have manually had to install Gentoo on a host, as we use our own custom Gentoo build called “fatboy”. Since I had no cd at the time. I figured I’d give the manual route a go which I haven’t since gentoo’s 2005 release. So I give you a brief description of how to get lvm under a live cd working whilst building gentoo.

If you’re using a live environment you’d probably want to install lvm2, Well if your gonna use it anyway. Once installed run the command “modprobe dm-mod” to load the appropriate kernel module.

modprobe dm-mod

We’ll execute a vgscan to scan all disks for volume groups, rebuild caches and will return to any volume groups found. We then activate any existing volgroups (if any) with vgchange.

vgchange -a y

vgchange activates and makes available “-a” the volume groups. The vgchange tool is commonly used to activate and de-activate volume groups but also yields a plethora of other capabilities. I didn’t have any volume groups since this was a fresh install.

My partition layout looks as follows:

boot	100Mb
root 	900Mb
swap	512Mb
usr	10Gb
tmp	1Gb
var	5Gb
home	5Gb

Use fdisk and create a partition based on what you want, but if you’re gonna use lvm make sure you leave an appropriate segment for your volume group depending on what you’ve chosen.

I created three partitions using fdisk. One for boot, swap and the last to be used for lvm.
So I ended up with the following:

/dev/hda1	boot
/dev/hda2	swap
/dev/hda3	for use by lvm,

To initialize the 3rd partition of this drive for lvm we use the command pvcreate.

pvcreate /dev/hda3

If you intend using more that one partition or drive and you want to extend it over different partitions, you can seperate the arguments with a space and initialize it like so:

pvcreate /dev/firstdevice /dev/seconddevice
vgcreate volgrp /dev/sda3

The vgcreate command will create us a volume group with the name volgrp on our partition we chosen to use for lvm.

So now we create our logical volumes using a tool called lvcreate and name them accordingly.

lvcreate -L900M -nroot volgrp
lvcreate -L10G -nusr volgrp
lvcreate -L1G -ntmp volgrp
lvcreate -L5G -nvar volgrp
lvcreate -L5G -nhome volgrp

As you may notice the -L option takes the size as an argument, the -n option for the name and the last argument being the volume group on which you would like create your logical volume.

If we do a lvscan it’ll now show us the active logical volumes we’ve just created, alternative you could run lvdisplay as it displays the atrributes and various other information about our logical volumes.

Now we’ll have to create our directories to which we’ll build our gentoo environment, The gentoo hand uses /mnt/gentoo, so we’ll use it too. So we create a directory called gentoo in /mnt. Before we continue creating mount points for our logical volumes we’ll need to create filesystems on for our logical volumes and partitions and mount the root partition first. We do this by using the e2fsprogs utilities and since I am going to use ext3 for all my partitions aside from boot I can do the following.

for i in /dev/volgrp/* ; do mke2fs -j $i ; done

This will create ext3 filesystems for all my logical volumes. The only outstanding partitions are swap and boot for which I do the following.

mke2fs /dev/hda1
mkswap /dev/hda2

Now we’re ready to create our mount points and mount our filesytems.
We mount root first then create our mount points of course.

mount /dev/volgrp/root /mnt/gentoo
for i in boot usr tmp var home ; do mkdir /mnt/gentoo/${i} ; done

We mount boot.

mount /dev/hda1 /mnt/gentoo/boot

We mount the rest of our filesytems and activate our swap partition.

for i in usr tmp var home ; do mount /dev/volgrp/${i} /mnt/gentoo/${i}

From here on out its safe to follow the gentoo handbook at chapter 5 and just do the regular download and unpack of stage3 tarballs and the latest portage snapshot which you can find on your local gentoo mirror.

When you mount your /proc filesystem you should rather use the bind option.

mount -o bind /proc /mnt/gentoo/proc

Also, before you reboot you might wana de-activate your volume groups with vgchange.

vgachange -a -n

Make sure that when you compile your kernel you compile it with device mapper support, and edit your fstab correctly.

I forgot to mention that you’ll probably need to create an initrd image if your root partition is an logical volume.
A useful script to do this can be found here.
The syntax for the script is as follows.

sh lvm2create_initrd -M gentoo

or tell it to look for a specific kernel

sh lvm2create_initrd -M gentoo 2.6.25-gentoo-r7


June 29, 2008

Just what I have been looking for, a simple, lightweight, rails based CMS that offers everything I need. Its called Radiant.

Andreas and Gnome…

May 28, 2008

The creation of gtk and metacity themes and engines is not as trivial as it appears to be. Someone who, in my opinion,  has made some great contribution to the look and feel of Gnome is 22 year old, Andreas Cimitan, who’s contribution to creating a unified looking gnome has been outstanding.  He is the creator of Murrine GTK+ Engine, The new author of the the Clearlooks GTK+ engine shipped in since Gnome’s 2.20 release and also the maintainer of gnome-theme-extras. His work on Murrine is particularily interesting as it will be the first RGBA GTK+ Engine. What does this mean? In a nutshell the ability to have transparent widgets/alpha capable windows etc.

alpha capable

I had a chat with him yesterday ( on IRC ), asked him if he could identify a font in a screenshot that I had been looking for, for quite some time. Not only was he able to identify the font, he could tell me what style of hinting was in the persons .fonts.conf.

Ubuntu Hardy Heron Ships with the Murrine engine and a Human-Murrine Theme by Default. Andreas has only published Screenhost of these new feautres as the source code has not been released yet. You can read more about his approach here. Keep up the awesome work Andreas.

Less interesting things you probably know about Hardy Heron

April 23, 2008

So we say good bye to 6.10 as it’s reached its end of life cycle but welcome yet another astonishing release of the worlds most popular distro. So whats new this time around? For this release the community looks to have focused more on fixing/extending current features as apposed to implementing new ones, making sure the release is robust. Some work has been done on Ubiquity, the ubuntu installer, that checks wheather there are exiting partitions and at minimum preserves permissions of /home, /srv, /root. Amoung others are X/AutodetectMonitorFrequency, HardyDesktopEffects, HardyFullDiskHandling, MultiMonitorConfig, Prefetch, HardyAppArmor, Firewall and probably the most notable the HardyTheme.

This release is shipping with Xorg 7.3, Gnome 2.22, Linux kernel 2.6.24, Firefox 3 beta, Transmission ( Bit Torrent Client ) , Vinagre ( New VNC client ), Brasero ( Which will replace Serpentine ), Pulse Audio and the World Clock Applet.

With less than a day to go I am looking forward to the new release.


January 4, 2008

I had some trouble with a non-standard VCD or KVCD and it had been given to me in .cue/.bin image files. Though Mplayer can play .cue/.bin files, KVCD is unsupported as far as I know (you’ll get video but no sound). Vcdxrip which ships with vcdimager helped me out quite a bit.

vcdxrip -p –nosegments –nofiles -o /dev/null -b bin-file



November 30, 2007

I wrote a mencoder script back when I was still running Ubuntu 6.06 Dapper to which I could pass various options in order to convert videos from avi to dvd. Three upgrades later, and I seem to have lost the script. I had two choices; one spend a considerable amount of time remembering and re-writing the script, or two look at at using a gui application. I chowse option two. The one that struck me most (other than the front-end to transcode) was DeVeDe. Its a nice simple application that can encode a number of different video formats to DVD, VCD, sVCD formats suitable for playback on your home dvd player (provided you have the dependencies which are mplayer, mencoder, vcdimager, dvdauthor, mkisofs). It has a really simple interface yet provides a fair amount of options for video conversion . You just tell it what you want it to do and it does the conversion and creates a ready to burn iso for you. I found it quite useful.

One thing to note:

“for Ubuntu Gutsy users: by default (as November 21, 2007) Gutsy comes with Mplayer/Mencoder buggy version 1.0RC1 (like Feisty); but fortunately there’s the version 1.0rc2 avaiblable in the backports repository, which fixes the sound bug.”

So had I found my script, I think I would have run into a problem anyways 😉