Using multimedia keys in GDM

I currently use MPD as my preferred media player, as it runs on my central machine, and I can easily control it from any other machine on our home network.

Now, occasionally, one wishes to just turn on the computer, and without logging in and doing all that admin, get some music playing / skip a song or two and adjust the volume to the correct settings.

The problem is that the first thing that loads up is GDM, which does not know what to do when you press one of the multimedia key on a multimedia keyboard.

Fortunately, this can be fixed easily using the accessibility framework built into GDM.

Edit the following lines in /etc/gdm/gdm.conf:

AddGtkModules=true
GtkModulesList=/usr/lib/gtk-2.0/modules/libkeymouselistener

Next, you need to add entries for each of your multimedia keys in /etc/gdm/modules/AccessKeyMouseEvents.

The entry format is as follows:

keycode num_keypresses keypress_duration timeout command command_args

Where, the command with it’s arguments is executed when the key given by keycode is depressed as many times as specified by the number of keypresses for longer than the keypress duration. Note, the command will be run as root, so be sure that it can’t do anything destructive!!

For example, my configuration which uses the mpc command to control the mpd daemon is as follows:

XF86AudioNext 1 0 1000 /usr/bin/mpc next
XF86AudioPrev 1 0 1000 /usr/bin/mpc prev
XF86AudioStop 1 0 1000 /usr/bin/mpc stop
XF86AudioPlay 1 0 1000 /usr/bin/mpc toggle
XF86AudioLowerVolume 1 0 1000 /usr/bin/mpc volume -2
XF86AudioRaiseVolume 1 0 1000 /usr/bin/mpc volume +2
XF86AudioMute 1 0 1000 /usr/bin/mpc volume 0

Then restart gdm by executing /etc/init.d/gdm restart

Voila, your multimedia keys should work in GDM!!

The 2006 running season

Back in 2003 I hung up my running shoes, due to a lack of time, as I was completing my final year. It ended up being so, not due to a lack of time from running, which I could handle. What I couldn’t handle was not being able to recover adequately between training sessions (read: lack of time to sleep!!).

Last year, I started thinking about running again, and with much dabbling at a few races here and there. With loads of encouragement with my, then to be, new training partner, Cathrin, we decided to give running more seriously a bash again. The initial goal was to get Cathrin to do a Marathon, while my personal goal was to go on and do the Two-Oceans Ultra (56km), for the third time, which would have been my first time on the old ‘classic’ route through Chapmans Peak and over Constantia Nek. As a result, since the end of last year, I took up running as my sport of choice again.

Training

For me, training started seriously in the first week of January, and continued daily until a week before the Two-Oceans, in mid April. Training was really hard at times, with many battles fought.

The hardest at the beginning was the battle of discipline. Last year, my main excuse for not doing much training was that my evenings were generally busy. At first, 3 nights a week were taken up due to my participation by playing for UCT in the 13′th Western Province squash league, and then when that finished most evenings were taken up by social commitments. The new year brought the opportunity to change my life in a way, so as to re-prioritise my evenings towards running. Other changes in this regard was my intake of alcohol. I severely cut down on the amount of alcohol that I consumed in the evenings, and even when I ‘went out’. I would limit myself to a single drink, and then to no drinks. I started feeling really healthy, and went on to reduce my caffeine intake. At the moment, I can’t have more than a couple drinks before I feel the effect. Also, I am finding certain drinks, particularly beer, unsatisfying. Even when I crave them. This is very frustrating, however, it is currently being remedied, by a strict drinking fitness and training program :).

The next battle was to continue training. Due to the intense training programme, there were many times where I felt that quitting was the only way forward. It is really tough having sore legs for weeks on end. Every stair climbed was tough. Fortunately this state only lasted a few weeks, until a certain amount of endurance was attained until daily life and training could co-exist happily.

The finally battle was to keep pushing, and continue challenging ourselves. It is very easy to fall into a rut, where one becomes comfortable with a certain distance and pace. Gains can only be achieved by expanding the horizon, and pushing yourself further.

Our training program started by running 3 x 5km + 2 x 10km runs a week. It ended up where we would do 3 x 10km and 2 x 15km runs a week. Also, in addition to our training programme, we would run a race every week on the weekend. Our only rest day would be the non-race day on the weekend.

Since the Two-Oceans race, we have cut down our training sessions to 1 x 10km / 1 x sprint training and 1 x 15km run a week. The current training goal is to maintain our fitness, until preparation starts for the next big event, where we will revert to daily training.

Races

To date, I have participated in 11 races. These races have seen me break myPersonal Best times over 5 different distances, one of which I broke twice. These achievements alone make my training feel worth it, and this is before the enjoyment, exhilaration, beautiful views, awesome atmosphere that each race brings.

Below is a recollection of each of these races.

Key:

key

14 January 2006 – Bay to Bay (30km)

Route: Start at Camps Bay, run to Hout Bay and back to Camps Bay over Suikerbossie.
Time: 3:07:24 (06:14.8 min/km)

Talk about throwing one’s self into the deep end!! As the first race of the season, starting with a 30km one is a bit stiff!! This race was mostly good, until the run back up Suikerbossie, where I slowed down quite a bit. All in all, this was a spectacular race, especially running back along the Atlantic seaboard below the Twelve Apostles. This race served as awesome motivation towards the goal of completing the Two-Oceans Ultra.

22 January 2006 – Cape Point Half Marathon

Route: Start at Buffelsbaai, Head out to Cape of Good Hope, double back towards the entrance, complete a loop and finish at Buffelsbaai.
Time: 1:59:11 (05:38.9 min/km)

Started this one with a sore calf. I think I was over-training a bit. The race started really slowly, and towards half way, I thought I was in for a shocking time. Somehow, after the mid point, my calf stopped worrying me, and I was able to increase my speed significantly. I then saw that I could make a sub 2 hr half marathon, and managed to remain motivated down to the last few kilometres, where I ended up sprinting towards the end. I finished the race with a 4:04.2 minute split for the last km. This is where I demonstrated to myself that this year I was going to do well with this distance race.

2006_cape_point_half_marathon

28 January 2006 – Red Hill Classic (36km)

Route: Start at Fish Hoek sports ground. Out towards Kommetjie. Up Kommetjie hill, through Misty Cliffs and Scarborough, over Red Hill, down towards Simons Town, and ending at Fish Hoek sports ground.
Time: 3:37:25 (06:02.4 min/km)

Started out very consistently. Managed to keep up with Cathrin up until Kommetjie hill, where she powered ahead. Slowed down going up Red Hill. Used my heart rate to pull me up the hill by walking when my heart rate increased above a certain threshold, and running when it dropped past a lower threshold. Coming down the hill was easy. I really struggled towards the end averaging 6 min/km over the last 6 km’s. The kilometres felt longer towards the end of this race.

2006_red_hill_classic

5 February 2006 – Kloef Nek Classic Half Marathon

Route: Start at Camps Bay high school, up towards Kloef Nek, along Tafelberg road turn at Platterkip gorge, back towards Kloef Nek, towards Signal Hill, turn at parking lot, end at Camps Bay high school.
Time: 1:58:59 (05:38.3 min/km)

This race has been rated by some as the hardest half marathon in South Africa, and started out with very bad conditions. There was a very strong wind, which literally picked my up and moved my half a meter as we were walking to the start. The uphill to Kloef Nek went rather un-noticed, as we were just trying to cope with the wind and keep warm. As we hit Tafelberg road, we were met with even stronger gusts of wind. To make matters worse, the wind was carrying a large amount of ash, as a couple of weeks ago, one of the most devastating fires on Table Mountain took place. The one bit of hilarity was looking ahead and seeing runners leaning at almost 45 degrees to their side to compensate for the wind. The upside of this was the run back after the turn at Platterkip Gorge was fast. The run out to Signal Hill was up and down, however I regained some of my lost time on the way back. The downhill from Kloef Nek was very painful on the knees. Unfortunately my freshly gained confidence on the half marathon distance was not realised, however, given the conditions, I felt that I did very well to achieve a sub 2hr time.

2006_kloef_nek_classic

19 February 2006 – Peninsula Marathon

Route: Start at Green-point Stadium, head into town and out towards Muizenburg via Main road. End at the Simons Town Naval base.
Time: 4:22:00 (06:12.5 min/km)

This race was plagued from the beginning. The bad omen was the big power cut which was the start of the power crisis in Cape Town. As a result, the race was delayed by half an hour, as it would have been too dangerous to start the run in the dark. The upside of this was that the freak shower that occurred, and caught us by surprise enabled us to get into shelter for the most of it’s duration. However, we still started very cold, wet and miserable. The next issue with this race was that my watch battery decided to die on me. I couldn’t take my split times, and as a result, my pacing through the race was a bit off. I think I overextended myself a bit in the beginning.

Once the teething problems were over, things went a bit more smoothly. I can’t say much about this race, as over half of it is very boring, as Main Road is not very scenic. Unfortunately this race was required, as we needed to qualify for the Two Oceans. Also, this was the fulfilment of Cathrin’s goal of achieving a marathon.

23 February 2006 – UCT 6×7

Route: 7 times around UCT athletics field. Consume a beer at the end of every lap, except the final one.
Time: about 27 minutes

Hmm… mixing drinking and running. This ‘race’ was more of a throwing up event than a drinking or running event. I had decided that I needed to try this at least once, however I can now say that I will never again do it. At least there were two other suckers (Chris and Dave) that did this insane deed with me :). The beers went down smoothly until number 4. Everything then became not fun. Needless to say, I finished before the cut-off time of 30 minutes. I was relatively sober at the end of the race. By the time Matthew had driven me home, I was very drunk. So much so that I managed to destroy our kettle, whilst trying to make myself a cup of tea!!

2006_6x7_1
Lambs before the slaughter.
2006_6x7_2
Maybe this has something to do with my current aversion to alcohol?!?!
2006_6x7_3
No prizes for what happened next.

4 March 2006 – Koeberg Nature Reserve (15km)

Route: Random 15km route through the Koeberg nature reserve.
Time: 1:19:32 (05:18.1 min/km)

This was the third time I participated in this particular race. Not quite my best time for this race (1:14:29). I struggled during the middle of this race. I couldn’t maintain a fast pace. I suspect this was another symptom of over training. My muscles just couldn’t sustain a decent pace. This is not one of my favourite races, we did it because there wasn’t anything else decent available for that weekend. While the nature reserve is beautiful in it’s own particular way, I just couldn’t appreciate it. I do recall the sunrise being rather spectacular, and then rather annoying, as the race started off in it’s direction!!

2006_koeberg_nature_reserve

12 March 2006 – Argus cycle tour

Route: Around the peninsula, Argus style – (ie. on a bike…)
Time: 4:31:46.0

The Argus was the only big event that I have never taken part in around Cape Town. I decided to do this on minimal bike training. To my detriment. All I will say about this is that whilst I achieved a reasonably respectable time, I did end up having an accident en-route. Coming down Chapmans Peak, at a speed of about 50-60 km/hr, going around a bend where the road surface changed from tarmac to cement, I used my back breaks to slow down, and on the turn my back wheel locked and slid out. I bounced and bounced. I used my left knee and whole right side of my body to slow me down from 50 km/hr to a stop. I was very lucky to walk away from this accident with grazes, and a working bicycle. I went on to finish the race with a lot less confidence, and a lot more wobbling.

2 April 2006 – Milkwood Half Marathon

Route: Start at Soetwater Recreation Area, through Kommetjie, up Kommetjie hill, through Misty Cliffs, turn around at Scarborough, end at Soetwater Recreation Area.
Time: 1:46:54 (05:04.0 min/km)

Finally, the conditions were perfect, though a tough half marathon, I managed to break my Personal Best (previous: 1:52:31). This was an awesome race where from the beginning I felt very strong. I was a bit slow up Kommetjie hill, but managed to regain and maintain a relatively constant pace throughout the race. I ended up rather tired towards the end, and slowed down ever so slightly. I came in strong, but fully spent. I think I paced myself perfectly in this race.

2006_milkwood

15 April 2006 – Two-Oceans Ultra Marathon (56km)

Route: Two-Oceans classic route, starting in Newlands, out along Main Road, turn off at Fish Hoek, through Chapmans Peak, over Constantia Nek, along Rhodes drive, then M3, finish at UCT.
Time: 5:55:27 (06:20.8 min/km)
Splits: 42.2km – 4:07:00, 28km – 2:38:23, 9km – 0:53:14

My season goal. I felt that I had prepared perfectly, and set out to do a sub 6hr time, which I achieved. I managed to maintain a very consistent pace through the race, starting at 5:30 minute splits, and increasing them to 6:00 minute splits. Chapmans peak was very easy. This was largely due to a training run where we ran up and down chappies from each side. The big unknown in this race was Constantia Nek. This is where I took a bit of a hit. I really struggled up the hill. I then timed the remainder of my race to ensure that I made my target of sub 6 hrs.

I managed to prevent any cramp, which was a huge change from my previous runs. However, towards the end, I felt a bit of a groin strain. Managing this properly was the key to me achieving my goal, as I could have run faster, however, this was at a higher risk of spraining it. I did ensure that I had some spare time at the end in case I ran into problems over the last couple of kilometres, which, fortunately I didn’t have.

My achievements in this race were breaking my Personal Best’s for 56 (previous: 6:31:39), 42.2 (previous: 4:16:00) and 28 (previous: 2:44:22) km runs. I think it is phenomenal that I managed to break my marathon PB in the Ultra. I can’t wait for my next marathon race.

2006_two-oceans

For comparison, below is my chart for my previous Two-Ocean run. Note the increase in consistency in the 2006 split profile, compared to the 2002 profile.

2002_two-oceans

1 May 2006 – Wellington Half Marathon

Route: Out of Wellington, through some wine estates, and back into Wellington.
Time: 1:56:24 (05:31.0 min/km)

We participated in this run, more as a fun run, and set out to take it easy. This proved to be difficult, as the conditions were rather bad. We got to a very slow start, as this is a very popular race. On the run out of Wellington, we were fighting a very strong head wind. It was so bad, that a fellow runner kindly asked me if she minded drafting me!! My target for this race was to make sub 2hrs, and I specifically did not push myself, as I had not fully recovered from the Two-Oceans.

21 May 2006 – Durbanville Half Marathon

Route: Start at Durbanville sports ground, out of Durbanville, through a wine farm on a dirt track, back into Durbanville, finish at Durbanville sports ground.
Time: 1:44:02 (04:55.8 min/km)

When run’s start really cold, and slightly damp, and on a flat course, you know something good is going to happen. As it turned out, I managed to break my Personal Best that I set at the beginning of April. The pace remained consistent at about 4:30, with the occasional 5 minute split. An annoying thing were misplaced kilometre markers, skewing the split times at certain parts of the race. Fortunately experience gives you a good feel for how fast you’re going, and I managed to maintain a relatively constant speed. The dirt track was rather muddy, and very slippery at times. This did require a bit of caution, and a few slower sections. Once we reached the last stretch of tarmac, I realised that I would easily achieve a time below 1:45:00, and took it easy into the finish. I gotta leave some more to shave off my Personal Best for next time :).

2006_durbanville

There’s nothing quite like a good spelunking on Christmas Eve

Seasons Greetings

Merry Christmas everyone. I hope you have a fantastic holiday and manage to spend your time with loved ones.

May the New Year bring you bigger and better things.

Spelunking

Yesterday I went spelunking with Gordon, Nani and Dinko. We went to the caves at Kalk Bay, and ended up doing Ronan’s Well, exiting at Robin Hood Cavern.

Ronans_well_1
Gordon, Myself, Dinko and Nani preparing to get into small spaces

This is the second time I have been caving, and it was far more pleasant than the first time. I can’t figure out why, as we had just as many tight spots, and they were between rock, and not rock and sand. Perhaps it was due to me knowing what to expect, and also knowing that it would take a lot for us to have as big an epic as Dinko had when they got lost in Ronan’s Well and ran out of torch power.

Ronans_well_2
A Dinko wedgie

As far as the experience goes, there were quite a few cruxes on the Ronan’s Well side. I did manage to get my hips stuck often, and I recall being in one position for about 10 minutes very slowly edging millimeter by millimeter through and resting every so often.

The technique I used for these passages was the classic ‘Superman’ technique, where you have one arm extended forward, and one behind. Apparently the crux here is to not bend your front arm’s elbow!!

Ronans_well_3
Stuck hips, Superman style

I found that because I have unstable shoulders, they popped a couple of times. Since the adrenaline was pumping, I didn’t feel the pain that I should have. Perhaps this is not the sport for me, but then again, neither are climbing or squash good for my shoulder.

The other annoyance was wearing a single piece overall. This further restricted my arm movement, but in certain places, it helped me use my arms to pull my hips and legs forward.

Ronans_well_4
Hug that wall Nani

Our slight (almost) epic was not being able to find the exit, despite passing people who entered through it!! This turned out to be fun though, as we ended up doing more exploring than we planned to. Many dead ends were encountered where the rocks looked unstable, and it was rather damp.

Ronans_well_5
Gordon, on a good day

Ponta Malongane

In November, Gordon, Liza and I decided to take a week off and go diving in Mozambique. Well, actually, we had been planning this for quite a while.

Ponta_Malongane_1
Gordon, hanging around

Ponta_Malongane_2
Myself and Liza

We flew up to Johannesburg, where Liza’s sister kindly lent us her car for the week. We drove to the Kozi Bay border post, where we parked the car. The resort picked us up and deposited us at our accommodation.

Ponta_Malongane_3
Nemo’s, or Clown fish

All in all, we spent each day, apart from the first doing at least one dive, but normally two. I did 7 dives in total, with two of them at advanced sites. The resort is absolutely fantastic for diving. They are very well kitted out as far as facilities go and run the dive camp well.

Ponta_Malongane_4
Emperor fish

The diving was awesome. Definitely the best diving I’ve ever had. The memorable things that we saw were Sting rays, Morey eels, Potato bass, Turtle, Angel Fish, Clown Fish, Emperor Fish…

Ponta_Malongane_5

Random other stuff

Other things that I should have blogged about, but didn’t here, here and here.

Clockwise

Today I went clockwise. The majority of people normally go anti-clockwise. I normally go anti-clockwise. The one positive is that everything you see is new. It’s a change of scenery, but nothing has changed.

It’s a strange thing. I kinda feel like I’ve gone against the grain. Perhaps it’s the energy of the place. It was slightly harder. Like I was fighting. Swimming upstream perhaps.

It is a nice change. If sometimes you go anti-clockwise, go clockwise or conversely, if you go clockwise, try anti-clockwise.

(I’m being obscure, so you think about it :))