<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><description>The thought-stream of Tom Medhurst</description><title>Pura Coding</title><generator>Tumblr (3.0; @tommed)</generator><link>http://tommed.tumblr.com/</link><item><title>Building my own Desktop Manager</title><description>&lt;a href="http://www.linux.com/community/blogs/blogger/Tom%20Medhurst/"&gt;Building my own Desktop Manager&lt;/a&gt;: &lt;p&gt;Follow my journey as I write my own Desktop Manager on top of the Linux/GNU operating system. I attempt to write a beautiful, fast, lightweight, modern, and feature-rich wm written using various libraries such as: X11 (xlib), opengl, cairo, etc..&lt;/p&gt;</description><link>http://tommed.tumblr.com/post/129588165</link><guid>http://tommed.tumblr.com/post/129588165</guid><pubDate>Wed, 24 Jun 2009 22:53:49 +0100</pubDate></item><item><title>Using dmenu to access your delicious.com account</title><description>&lt;p&gt;I really like dmenu. It’s like Quicksilver or GNOME DO, but much smaller, faster, and easier to extend!&lt;/p&gt;
&lt;p&gt;The common dmenu command to quickly run a program from your path would be something like:&lt;/p&gt;
&lt;pre&gt;dmenu_path | dmenu&lt;/pre&gt;
&lt;p&gt;The dmenu_path command quickly fetches all programs from your $PATH and sends the list (newline-separated) into dmenu for user-selection.&lt;/p&gt;
&lt;p&gt;Because of the great de-coupled design of dmenu, we can easily hack it to do something slightly cooler!&lt;/p&gt;
&lt;p&gt;So what I thought I would try is to grab a list of all my delicious.com tags and display them in dmenu. When I select a tag and hit the return key; I want Firefox to launch and show me all my links associated with that tag…&lt;/p&gt;
&lt;p&gt;First step is to grab the list of tags, this can be done with curl, using the command:&lt;/p&gt;
&lt;pre&gt;curl -u MY_USERNAME:MY_PASSWORD &lt;a href="https://api.del.icio.us/v1/tags/get"&gt;https://api.del.icio.us/v1/tags/get&lt;/a&gt;&lt;/pre&gt;
&lt;p&gt;This should then return the list of tags, however it returns them in XML format. :S&lt;br/&gt; To grab only the tags, I thought I would pipe the xml into awk and extract the tags this way:&lt;/p&gt;
&lt;pre&gt;curl -u MY_USERNAME:MY_PASSWORD &lt;a href="https://api.del.icio.us/v1/tags/get"&gt;https://api.del.icio.us/v1/tags/get&lt;/a&gt; | \&lt;br/&gt;
awk '{t=substr($3, 6, 30); t=substr(0, index(t, "\"")-1); print t}'&lt;/pre&gt;
&lt;p&gt;This should now give you only the tags in a newline separeted format, just like we need for dmenu!&lt;/p&gt;
&lt;p&gt;So the next step would be launch firefox and view the links associated to the selected tag. To do this; save the command above into a file called: &lt;code&gt;delicious-get_tags.run&lt;/code&gt; (remember to specify a shebang and chmod +x). &lt;br/&gt;We then need to create a new script file called &lt;code&gt;delicious-get_tags-dmenu.run&lt;/code&gt; (again chmod +x and specify a bash shebang) and enter this code:&lt;/p&gt;
&lt;pre&gt;firefox "http://delicious.com/MY_USERNAME/`/path/to/delicious-get_tags.run | dmenu`"&lt;/pre&gt;
&lt;p&gt;Now when you run this script you will get dmenu appear, select a tag and firefox should launch! :) &lt;br/&gt;If you would like to launch this command using your standard dmenu instance; create a link to this script in a folder in your path, like so:&lt;/p&gt;
&lt;pre&gt;ln -s /path/to/delicious-get_tags-dmenu.run /usr/bin/delicious_get_tags&lt;/pre&gt;
&lt;p&gt;Now you can run your new dmenu from dmenu by selecting &lt;code&gt;delicious_get_tags&lt;/code&gt; ! enjoy! ;)&lt;/p&gt;</description><link>http://tommed.tumblr.com/post/103038984</link><guid>http://tommed.tumblr.com/post/103038984</guid><pubDate>Sun, 03 May 2009 20:47:39 +0100</pubDate></item><item><title>Formulae for getting the point co-ordinates for a circle</title><description>&lt;p&gt;Here’s how to get the co-ordinates of a given point in a circle…
&lt;br/&gt;&lt;i&gt;&lt;b&gt;NOTE:&lt;/b&gt; this code is written in C#&lt;/i&gt;&lt;/p&gt;

&lt;pre&gt;
Point GetPointPos(int numofpoints, int pointNum, int radius, int offset)
{
  double angle = 2*Math.PI * ((double)pointNum / numofpoints);
  double x = radius * Math.Cos(angle) + offset;
  double y = radius * Math.Sin(angle) + offset;
  return new Point((int)x, (int)y);
}
&lt;/pre&gt;

&lt;p&gt;With this code, we can now create a geometric pattern by calling the method above like so..
&lt;br/&gt;&lt;i&gt;&lt;b&gt;NOTE:&lt;/b&gt; this code has been tested on MS .NET 2.0&lt;/i&gt;&lt;/p&gt;

&lt;pre&gt;
Random r = new Random();
e.Graphics.Clear(Color.White);
const int numofpoints = 30;
const int radius = 200; // pixels
const int offset = 0; // pixels

for (int i = 0; i &lt; numofpoints; i++)
{
  Point pos1 = GetPointPos(numofpoints, i);
  Color colour = Color.FromArgb(r.Next(255), r.Next(255), r.Next(255));

  for (int y = i; y &lt; numofpoints; y++)
  {
    Pen pen = new Pen(colour, 1);
    Point pos2 = GetPointPos(numofpoints, y, radius, offset);
    e.Graphics.DrawLine(pen, pos1, pos2);
  }
}
&lt;/pre&gt;

&lt;p&gt;Which generates this…&lt;/p&gt;
&lt;img src="http://dl.getdropbox.com/u/577250/blog-tommed-couk-geometric_pattern.jpg" alt="Geometric Pattern" align="center"/&gt;</description><link>http://tommed.tumblr.com/post/101809563</link><guid>http://tommed.tumblr.com/post/101809563</guid><pubDate>Thu, 30 Apr 2009 10:57:00 +0100</pubDate></item><item><title>OpenGL programming on Ubuntu (8.10 Intrepid)</title><description>&lt;h3&gt;Installing all dependencies&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;sudo aptitude install mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev freeglut3-dev libglut3-dev&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Mesa is an open-source implementation of the OpenGL spec.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;NOTE: freeglut3-dev is only required if you wish to use &lt;/b&gt;&lt;a href="http://www.opengl.org/resources/libraries/glut/"&gt;&lt;b&gt;GLUT&lt;/b&gt;&lt;/a&gt;&lt;b&gt; for your creating your hosting windows and handling user input. &lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;NOTE: (If you wish to use apt-get instead of aptitude, you will also need to specify &lt;/b&gt;&lt;i&gt;&lt;b&gt;freeglut3&lt;/b&gt;&lt;/i&gt;&lt;b&gt;)&lt;/b&gt;&lt;/p&gt;
&lt;h3&gt;Compiling a simple OpenGL/GLUT test&lt;/h3&gt;
&lt;p&gt;Mesa uses pkg-config, but if you run pkg-config (&lt;code&gt;pkg-config --cflags --libs gl&lt;/code&gt;), you’ll notice that it’s not really worth using as all it outputs is &lt;i&gt;-lGL&lt;/i&gt;! So for probably for the first time ever; I have chosen to manually specify the build libraries in our compilation command:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;gcc -o bin/program main.c -lGL -lGLU -lglut&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Then you can create a file named main.c and use the following test program (obtained from the &lt;a href="http://www.glprogramming.com/red/"&gt;OpenGL redbook&lt;/a&gt;):&lt;/p&gt;
&lt;pre&gt;#include &lt;GL/gl.h&gt;
#include &lt;GL/glut.h&gt;

void display(void)
{
    glClear (GL_COLOR_BUFFER_BIT);
    glColor3f (1.0, 1.0, 1.0);
    glBegin(GL_POLYGON);
        glVertex3f (0.25, 0.25, 0.0);
        glVertex3f (0.75, 0.25, 0.0);
        glVertex3f (0.75, 0.75, 0.0);
        glVertex3f (0.25, 0.75, 0.0);
    glEnd();
    glFlush ();
}

void init (void) 
{
    glClearColor (0.0, 0.0, 0.0, 1.0); // note this line is incorrect in the red-book
    glMatrixMode(GL_PROJECTION);
    glLoadIdentity();
    glOrtho(0.0, 1.0, 0.0, 1.0, -1.0, 1.0);
}

int main(int argc, char** argv)
{
    glutInit(&amp;argc, argv);
    glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB);
    glutInitWindowSize (250, 250); 
    glutInitWindowPosition (100, 100);
    glutCreateWindow ("hello");
    init ();
    glutDisplayFunc(display); 
    glutMainLoop();
    return 0;
}
&lt;/pre&gt;</description><link>http://tommed.tumblr.com/post/97250983</link><guid>http://tommed.tumblr.com/post/97250983</guid><pubDate>Fri, 17 Apr 2009 19:10:00 +0100</pubDate></item><item><title>My Perfect Desktop (or.. How to create a Frankenstien Linux Distro!) PART #2</title><description>&lt;p&gt;So now I have the perfect minimal OS running (as explained in my &lt;a href="http://blog.tommed.co.uk/post/93004391/my-perfect-desktop-or-how-to-create-a-frankenstien"&gt;previous article&lt;/a&gt;), we need to add some components and start making a beautiful desktop!&lt;/p&gt;
&lt;p&gt;The first thing we are going to need is a UI for handling our X11 Sessions and logging in. The mainstream choices are &lt;a href="http://projects.gnome.org/gdm/"&gt;GDM&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/KDE_Display_Manager"&gt;KDM&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;As I’m more of a &lt;a href="http://www.gnome.org/"&gt;GNOME&lt;/a&gt; man so I went for GDM. I will install this together with my Window Manager (which we need to manage our windows, obviously!), so I also need to choose one of these…&lt;/p&gt;
&lt;p&gt;There are plenty of choices, &lt;a href="http://xwinman.org/"&gt;as you can see for yourself&lt;/a&gt;, and through a bit of experience with the majority of Windows Managers; I decided that I would use &lt;a href="http://icculus.org/openbox/2/"&gt;OpenBox&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I chose OpenBox because it is lightweight, easy to configure, and just generally felt (&lt;a href="http://www.box-look.org/"&gt;and can look&lt;/a&gt;) better (IMHO) than the others.&lt;/p&gt;
&lt;p&gt;To install GDM and OpenBox (and some config tools) I ran the following command:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sudo apt-get install gdm openbox obmenu obconf&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;When this is done, I restarted the machine.&lt;/p&gt;
&lt;p&gt;GDM can be made beautiful using gdmsetup (installed with GDM) and you can grab loads of different themes from: &lt;a href="http://www.gnome-look.org/index.php?xcontentmode=150"&gt;&lt;a href="http://www.gnome-look.org"&gt;www.gnome-look.org&lt;/a&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;OpenBox can be made beautiful too, using themes from &lt;a href="http://www.box-look.org/"&gt;&lt;a href="http://www.box-look.org"&gt;www.box-look.org&lt;/a&gt;&lt;/a&gt; and obconf (we installed it earlier, with openbox).&lt;/p&gt;
&lt;p&gt;Here is my GDM login screen:&lt;/p&gt;
&lt;p&gt;&lt;img height="312" width="400" src="http://dl.getdropbox.com/u/577250/blog-tommed-couk-gdm1.png" align="middle"/&gt;&lt;/p&gt;
&lt;p&gt;The next task is to install VirtualBox additions and get my desktop looking like this:&lt;/p&gt;
&lt;p&gt;&lt;img height="312" width="400" src="http://dl.getdropbox.com/u/577250/blog-tommed-couk-openbox1.png" align="middle"/&gt;&lt;/p&gt;</description><link>http://tommed.tumblr.com/post/96614058</link><guid>http://tommed.tumblr.com/post/96614058</guid><pubDate>Wed, 15 Apr 2009 23:53:56 +0100</pubDate></item><item><title>My Perfect Desktop (or.. How to create a Frankenstien Linux Distro!)</title><description>&lt;p&gt;For Linux beginners there is no denying that Ubuntu is the weapon of choice at the moment. I think the main reason I believe that is because of APT and how up-to-date and complete their default repositories are.&lt;/p&gt;
&lt;p&gt;I really enjoy using Ubuntu as installing a program is as simple as installing it from Synaptic and then launching it! Sometimes building stuff from source can get you into a version-control nightmare, and updating versions can be risky.. not that I shy away from this; stuff like WebKit &lt;b&gt;should&lt;/b&gt; be build from the source as it is constantly moving. I am talking about programs which generally release every 6 months+.&lt;/p&gt;
&lt;p&gt;The one dislike about Ubuntu is that it feels a little bloated. Say you want to understand how Linux works; where would you start? There is SOO much going on under the covers in Ubuntu it can all be so confusing/overwhelming?!&lt;/p&gt;
&lt;p&gt;So I challenged myself to build my own perfect desktop. The idea was to take the minimal Ubuntu install (installed takes about 1Gb of precious HD space) and then slowly build up from there until I have something I can use daily for development and general email/chat/web social functions. All this would happen from inside a Virtualbox VM, so I would also have to make sure everything was compatible with the Virtualbox kernel modules.&lt;/p&gt;
&lt;p&gt;A successful project means I would achieve the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I would be happy to use it everyday, replacing my beloved Ubuntu Desktop 8.10&lt;/li&gt;
&lt;li&gt;It looks sexy, without getting in the way of my geek-y ways!&lt;/li&gt;
&lt;li&gt;Be able to list the parts of the OS and how they work together&lt;/li&gt;
&lt;li&gt;Be comfortable with configuring/tweaking my desktop&lt;/li&gt;
&lt;li&gt;Install should take up less than 3.5Gb of disk space&lt;/li&gt;
&lt;li&gt;Have something which runs significantly faster than Ubuntu&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Installing Ubuntu Minimal&lt;/h3&gt;
&lt;p&gt;Ubuntu Minimal Install is a version of Ubuntu with no GUI whatsoever, and barely enough apps to boot the system!!! You can &lt;a href="https://help.ubuntu.com/community/Installation/MinimalCD"&gt;download it here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;As I was using &lt;a href="http://www.virtualbox.org/"&gt;Virtualbox&lt;/a&gt;, all I needed to do was to create a new Ubuntu VM (&lt;i&gt;remembering to check the 3D exceleration checkbox and I know I wanted to get compiz running at some point&lt;/i&gt;) and mount the install ISO to get going with a command-line install.&lt;/p&gt;
&lt;p&gt;Once the install was out of the way, all I had was a blining cursor and bash to keep me company :S&lt;/p&gt;
&lt;p&gt;&lt;b&gt;To be continued…&lt;/b&gt;&lt;/p&gt;</description><link>http://tommed.tumblr.com/post/93004391</link><guid>http://tommed.tumblr.com/post/93004391</guid><pubDate>Sun, 05 Apr 2009 00:29:36 +0100</pubDate></item><item><title>Installing VirtualBox Guest Additions 2.1.4 on Fedora 10</title><description>&lt;p&gt;This can be a bit of a pain. The first time I attempted to run the installer I got the following message:&lt;/p&gt;
&lt;pre&gt;Please install the build and header files for your current Linux kernel...&lt;/pre&gt;
&lt;p&gt;Here are the steps required to get VirtualBox Guest Additions installed on Fedora 10. They begin with a freshly installed version of Fedora.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Run a system update. Make sure you have the lastest version of Fedora.&lt;/li&gt;
&lt;li&gt;Reboot (this is an &lt;b&gt;extremely&lt;/b&gt; important step!!)&lt;/li&gt;
&lt;li&gt;Open a Terminal window and type:    
&lt;ul&gt;
&lt;li&gt;
&lt;pre&gt;su -&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt; type the root password&lt;/li&gt;
&lt;li&gt;
&lt;pre&gt;yum install -y kernel-headers kernel-devel&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;leave this terminal open and return to your host OS&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Now mount the VirtualBox Guest Additions CDROM&lt;/li&gt;
&lt;li&gt;Go back to the Terminal in your guest OS and type: 
&lt;ul&gt;
&lt;li&gt;
&lt;pre&gt;cd /media/VBOXADDITIONS_2.1.4_42893&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;(&lt;i&gt;this may differ slightly, use tab to auto-complete the mount-name&lt;/i&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;pre&gt;./VBoxLinuxAdditions-{&lt;i&gt;YOUR_ARCHITECTURE&lt;/i&gt;}.run&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Once this is complete, reboot again and you should get higher resolutions, mouse swapping, and all the other goodies that come with this kernel extension!&lt;/li&gt;
&lt;/ol&gt;</description><link>http://tommed.tumblr.com/post/91340178</link><guid>http://tommed.tumblr.com/post/91340178</guid><pubDate>Mon, 30 Mar 2009 22:59:05 +0100</pubDate></item><item><title>Multithreading in C++ using POSIX Threads Tutorial</title><description>&lt;p&gt;As C++ doesn’t have any native multi-threading support, you will need to rely on a system APIs to achieve multithreading. M$ has their own APIs, but I want to concentrate on the POSIX threading library as it is more widely compatible.&lt;/p&gt;
&lt;h3&gt;The Theory&lt;/h3&gt;
&lt;p&gt;So what does the POSIX threading APIs look like then? Well a bit of bad news first of all to C++ developers; these are C functions (doh!), the main one in question is:&lt;/p&gt;
&lt;pre&gt;pthread_create(pthread_t *handle, const pthread_attr_t *attr, void *(*start_routine)(void*), void *arg);&lt;/pre&gt;
&lt;p&gt;Nothing too scary looking, but as it takes a C function as the &lt;i&gt;start_routine&lt;/i&gt; you may be wondering how on earth this could be integrated into a C++ member method? Well, that’s exactly what I’m going to show you now?!&lt;/p&gt;
&lt;h3&gt;The Code&lt;/h3&gt;
&lt;h4&gt;Thread.hpp&lt;/h4&gt;
&lt;pre&gt;#include &lt;pthread.h&gt;

class Thread {
public:
    void start();
    virtual void execute();
    void wait_for_exit();
private:
    pthread_t handle;
};&lt;/pre&gt;
&lt;p&gt;Here we have defined the Thread class, telling it to hold onto a POSIX thread instance in the field handle and also prototyping three methods:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;start, which will launch the new thread&lt;/li&gt;
&lt;li&gt;execute, which will contain the code to execute on the new thread&lt;/li&gt;
&lt;li&gt;wait_for_exit, which will join the thread to the main thread&lt;/li&gt;
&lt;/ol&gt;
&lt;h4&gt;Thread.cpp&lt;/h4&gt;
&lt;pre&gt;#include &lt;pthread.h&gt;
#include &lt;iostream&gt;
#include "Thread.hpp"
using std::endl;
using std::clog;

extern "C"
{
    // this C function will be used to receive the thread and pass it back to the Thread instance
    void* thread_catch(void* arg) {
        Thread* t = static_cast&lt;Thread*&gt;(arg);
        t-&gt;execute();
        return 0;
    }
}

// method which starts the new thread
void Thread::start() {
    pthread_create(&amp;handle, 0, thread_catch, this);
}

// code which will be run on the new thread
void Thread::execute() {
    clog &lt;&lt; "Thread:Hello From a new Thread!" &lt;&lt; endl;
}

// wait until this thread has finished executing
void Thread::wait_for_exit() {
    pthread_join(handle, NULL);
}
&lt;/pre&gt;
&lt;p&gt;The first thing you’ll notice is the C function thread_catch, this will be our C function which pthread_create will execute on the new thread, the argument will be the instance of the Thread class, so we can call it’s execute method.&lt;/p&gt;
&lt;p&gt;The start function creates the POSIX thread and sends it the `this` pointer, so the C function can call execute on the correct instance.&lt;/p&gt;
&lt;p&gt;wait_for_exit simply calls pthread_join which joins the main thread with this spawned thread, so the program doesn’t terminate before the thread has finished.&lt;/p&gt;
&lt;h4&gt;main.cpp&lt;/h4&gt;
&lt;pre&gt;#include "Thread.hpp"
#include &lt;pthread.h&gt;
#include &lt;iostream&gt;
using std::cout;
using std::clog;
using std::endl;

class MyThread : public Thread {
public:
    void execute();
    int i;
};
void MyThread::execute() {
    sleep(i);
    cout &lt;&lt; "Execute:" &lt;&lt; i &lt;&lt; endl;
}

int main() {
    const int THREAD_COUNT = 3;
    
    // create threads
    MyThread t[THREAD_COUNT];
    for (int i=THREAD_COUNT-1; i&gt;=0; i--) { // start the threads in the opposite order to prove multi-threading
        cout &lt;&lt; "Start:" &lt;&lt; i &lt;&lt; endl;
        t[i].i = i;
        t[i].start();
    }
    
    // wait until all threads have finished
    for (int i=0; i&lt;THREAD_COUNT;i++) {
      t[i].wait_for_exit();
    }
    return 0;
}
&lt;/pre&gt;
&lt;p&gt;So what I’ve done here is to write a program that creates three instances of a derived Thread class which waits for x number of seconds. The program loops through the numbers 0-2 backwards, so they are instantiated in reverse. When the start method is called on the instance it spawns the Thread immediately, however the execute command makes the instance sleep for x seconds. This should all mean that the threads are instantiated in reverse order; but the cout in execute should be execute in the correct order. Here is the output:&lt;/p&gt;
&lt;pre&gt;Start:2
Start:1
Start:0
Execute:0
Execute:1
Execute:2&lt;/pre&gt;
&lt;h4&gt;Compiling&lt;/h4&gt;
&lt;p&gt;The first trick is to find out where pthread.h is. On my Mac it’s on /usr/include/pthread.h but you can find it using:&lt;/p&gt;
&lt;pre&gt;locate pthread.h&lt;/pre&gt;
&lt;p&gt;So to compile the code use the following command:&lt;/p&gt;
&lt;pre&gt;g++ -o program Thread.cpp main.cpp /usr/include/pthread.h&lt;/pre&gt;
&lt;p&gt;If you would like to know more about pthread.h, check out &lt;a href="http://en.wikipedia.org/wiki/POSIX_Threads"&gt;this site&lt;/a&gt;.&lt;/p&gt;</description><link>http://tommed.tumblr.com/post/90393657</link><guid>http://tommed.tumblr.com/post/90393657</guid><pubDate>Fri, 27 Mar 2009 17:21:00 +0000</pubDate></item><item><title>Using the new OSD Notification system in Ubuntu Jaunty in C++ (libnotifymm)</title><description>&lt;p&gt;Wanna add the new OSD Notification system to your C++ (gtkmm) program, but don’t know where to start? Noticed all the tutorials on wiki.ubuntu.com are in C, Python, and C#?&lt;/p&gt;
&lt;p&gt;Have no fear, uncle Tom is here with a quick-start guide to getting libnotifymm running on your system!&lt;/p&gt;
&lt;h3&gt;Installing libnotifymm and it’s prereqs&lt;/h3&gt;
&lt;p&gt;Open up Synaptic Package Manager and install the following packages and their dependencies:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;libnotifymm-1.0-7&lt;/li&gt;
&lt;li&gt;libnotifymm-doc&lt;/li&gt;
&lt;li&gt;libnotifymm-dev&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Creating a test app&lt;/h3&gt;
&lt;p&gt;Once these are installed you can create a new file called test-notify.cc and open it in your editor/IDE.&lt;/p&gt;
&lt;p&gt;Add in the following code:&lt;/p&gt;
&lt;pre&gt;#include &lt;libnotifymm.h&gt;
#include &lt;iostream&gt;

int main() {
   Notify::init("Basic");
   Notify::Notification n("Title", "Content goes here", "notification-device-eject");
   if (!n.show()) {
      std::cerr &lt;&lt; "Could not show notification" &lt;&lt; std::endl;
      return 1;
   }
}
&lt;/pre&gt;
&lt;h3&gt;Compiling&lt;/h3&gt;
&lt;p&gt;This app can be compiled by linking it to the libnotifymm and gtkmm libraries using the following command:&lt;/p&gt;
&lt;pre&gt;g++ -o test-notify test-notify.cc `pkg-config gtkmm-2.4 --libs --cflags` `pkg-config libnotifymm-1.0 --libs --cflags`&lt;/pre&gt;
&lt;h3&gt;Customization&lt;/h3&gt;
&lt;p&gt;The last argument in the Notification constructor is the name of the icon to use. You can get the &lt;a href="https://wiki.ubuntu.com/NotificationDevelopmentGuidelines#How%20do%20I%20get%20these%20slick%20icons"&gt;list of slick new notify available icons here&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;More Help&lt;/h3&gt;
&lt;p&gt;You installed the libnotifymm-doc package, so you’ll find help and sample source code at: /usr/share/doc/libnotifymm. Enjoy! ;o)&lt;/p&gt;</description><link>http://tommed.tumblr.com/post/89979604</link><guid>http://tommed.tumblr.com/post/89979604</guid><pubDate>Thu, 26 Mar 2009 09:48:00 +0000</pubDate></item><item><title>How to programmatically create GNOME start menu items in Ubuntu 8.10 Intrepid (using .desktop config files)</title><description>&lt;p&gt;This will probably work with operating systems (and desktop managers, such as KDE) other than Ubunutu &amp; GNOME as the schema is a standard one (&lt;a href="http://www.freedesktop.org/"&gt;&lt;a href="http://www.freedesktop.org/"&gt;http://www.freedesktop.org/&lt;/a&gt;&lt;/a&gt;). However directories may vary slightly; so I can only confirm this works with Ubuntu 8.10…&lt;/p&gt;
&lt;p&gt;There are &lt;a href="http://www.freedesktop.org/wiki/Specifications/menu-spec"&gt;.menu files&lt;/a&gt; which create the menu structure. Your current logged-in user’s local .menu files can be found at: &lt;b&gt;~/.config/menus/&lt;/b&gt;&lt;br/&gt;There are other .menu files dotted around.. you can find these using &lt;b&gt;locate .menu&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;However the .menu files do not contain menu items (I am assuming you are happy to place your shortcut in one of the &lt;a href="http://standards.freedesktop.org/menu-spec/latest/apa.html"&gt;pre-defined categories&lt;/a&gt; available to the GNOME &amp; KDE menus); shortcuts to programs are in files with the .desktop extension.&lt;/p&gt;
&lt;p&gt;In Ubuntu, the easiest way to add a new menu item is to add a new &lt;a href="http://www.freedesktop.org/wiki/Specifications/desktop-entry-spec"&gt;.desktop file&lt;/a&gt; into: &lt;b&gt;/usr/share/applications/&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;This file should contain name/value pairs separated by the equals sign and new-lines. The schema can be found here. Below is an example .desktop file:&lt;/p&gt;
&lt;p&gt;&lt;code&gt; 
[Desktop Entry]&lt;br/&gt;Version=1.0&lt;br/&gt;Name=Application Name&lt;br/&gt;Name[es]=Application Name in Spanish&lt;br/&gt;Comment=Description of Application&lt;br/&gt;Exec=COMMAND_AND_ARGS_HERE&lt;br/&gt;Terminal=false&lt;br/&gt;Type=Application&lt;br/&gt;Icon=applications-office&lt;br/&gt;Categories=Application;System;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;I have found little or no documentation regarding how to do this on Google (plus the free-desktop-org web site is not the easiest to follow!); so I hope my findings has helped a few people out! :)&lt;/p&gt;</description><link>http://tommed.tumblr.com/post/84365710</link><guid>http://tommed.tumblr.com/post/84365710</guid><pubDate>Sat, 07 Mar 2009 15:14:00 +0000</pubDate></item><item><title>My Recent Projects web-site</title><description>&lt;a href="http://www.tommed.co.uk/"&gt;My Recent Projects web-site&lt;/a&gt;: &lt;p&gt;Keeps track of all my recent projects and web-sites. Also contains a copy of my CV.&lt;/p&gt;</description><link>http://tommed.tumblr.com/post/71827828</link><guid>http://tommed.tumblr.com/post/71827828</guid><pubDate>Tue, 20 Jan 2009 16:39:14 +0000</pubDate></item><item><title>iDvd Error during rendering/encoding of the menu/slideshows</title><description>&lt;p&gt;You might get this error constantly in iDvd for one of these reasons:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Do have less than 25Gb memory left on your primary partition&lt;/li&gt;
&lt;li&gt;Your movies have inconsistent ratios (Widescreen/Standard/Phone)&lt;/li&gt;
&lt;li&gt;The movie was initially referenced from one hard-disk and now lives on another&lt;/li&gt;
&lt;li&gt;One of the movies now cannot be found&lt;/li&gt;
&lt;li&gt;The &lt;i&gt;Media browser version&lt;/i&gt; of one of the movies now cannot be found &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Feel free to add any more in the comments if you find any more reasons?! I thought it was Microsoft who were good at posting cryptic error messages?!!!! :S&lt;/p&gt;</description><link>http://tommed.tumblr.com/post/64478370</link><guid>http://tommed.tumblr.com/post/64478370</guid><pubDate>Fri, 12 Dec 2008 13:46:00 +0000</pubDate></item><item><title>New site I am working on: www.groopi.co.uk</title><description>&lt;a href="http://www.groopi.co.uk"&gt;New site I am working on: www.groopi.co.uk&lt;/a&gt;: &lt;p&gt;I built Groopi as there is currently a real lack of decent sites out there for bands to collaberate, create, promote, and share all in one, integrated place.&lt;/p&gt;
&lt;p&gt;Groopi is completely free, so feel free to create an account!&lt;/p&gt;</description><link>http://tommed.tumblr.com/post/61736966</link><guid>http://tommed.tumblr.com/post/61736966</guid><pubDate>Wed, 26 Nov 2008 23:18:53 +0000</pubDate></item><item><title>A new site I just finished writing: Pga-Lessons</title><description>&lt;a href="http://pgalessons.co.uk"&gt;A new site I just finished writing: Pga-Lessons&lt;/a&gt;</description><link>http://tommed.tumblr.com/post/47937048</link><guid>http://tommed.tumblr.com/post/47937048</guid><pubDate>Fri, 29 Aug 2008 18:07:15 +0100</pubDate></item><item><title>CSS - Have DIV fill remaining space in IE</title><description>&lt;p&gt;It will come to no-ones surprise when I say that IE sucks when it comes to CSS. Apparently I’ve been well informed that IE8 will finally be CSS 2.1 compliant (but no CSS 3 at all)?!&lt;/p&gt;
&lt;p&gt;A huge problem on the web, is people wanting to have a number of DIV elements with a fixed pixel height, and another which fills the remaining page like the image below:&lt;/p&gt;
&lt;p&gt;IE makes this almost impossible due to it’s lack of compliancy.. But I have a fix which exploits the lack of compliance to get this to work!! (This has been tested in Firefox, IE7, and Safari)&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://cid-c28fc12a0112eb67.skydrive.live.com/self.aspx/Public/tommed.tumblr.com/css%7C_grail.png"&gt;&lt;img height="375" width="600" src="http://upqjsq.blu.livefilestore.com/y1p-pi2OoTxGTpOxJZsGNMBzF5BIbG2hq2_CoStCYeBNBqD1U_GBNGeQcyQ9K47uksmTCc9o2BGEP5_bRW4PbKnDw/css_grail.png"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Summary&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;IMPORTANT, for this fix to work do NOT add a doctype, leaving IE in quirks mode will make IE incorporate the padding into it’s box sizing model, which is key to this fix.&lt;br/&gt; &lt;/li&gt;
&lt;li&gt;First set the height of the HTML and BODY elements to 100% via CSS, this will make any elements with a height of 100% fill the screen (rather than ignore it like it usually does):&lt;br/&gt;&lt;code&gt;html, body { height: 100% }&lt;/code&gt;&lt;br/&gt; &lt;/li&gt;
&lt;li&gt;Now add your two divs in (first will be fixed height, second will be the one that fills the screen:&lt;br/&gt;&lt;code&gt;&lt;br/&gt;&lt;div id="masthead"&gt;MASTHEAD&lt;/div&gt;&lt;br/&gt;&lt;div id="main-container"&gt;CONTENT&lt;/div&gt;&lt;/code&gt;&lt;br/&gt; &lt;/li&gt;
&lt;li&gt;Set the fixed height of the masthead (you might want to add a bg-color to prove the fix):&lt;br/&gt;&lt;code&gt;masthead { height: 90px; width:100%; position:absolute; }&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Now set the main-container’s CSS to fill the area and offset it’s content by the size of the masthead:&lt;br/&gt;&lt;code&gt;#main-container { &lt;br/&gt;   height: 100%; &lt;br/&gt;   padding-top: 93px;&lt;br/&gt;   -webkit-box-sizing: border-box; /* Safari/WebKit */ &lt;br/&gt;   -moz-box-sizing: border-box; /* Firefox */&lt;br/&gt;   -ms-box-sizing: border-box; /* IE8 */&lt;br/&gt;   box-sizing: border-box; /* W3C Property */&lt;br/&gt; }&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;And shazam!! You get a fixed size div with another div filling the remaining content!&lt;/p&gt;</description><link>http://tommed.tumblr.com/post/43946180</link><guid>http://tommed.tumblr.com/post/43946180</guid><pubDate>Tue, 29 Jul 2008 16:14:00 +0100</pubDate></item><item><title>New Site Developed: YoungGolf (Barry Young PGA Golf Tuition)</title><description>&lt;a href="http://www.younggolf.co.uk"&gt;New Site Developed: YoungGolf (Barry Young PGA Golf Tuition)&lt;/a&gt;: &lt;p&gt;This is my latest creation. A web site for PGA Golf Professional Barry Young. Barry gives tuition to players of all capabilities in the&lt;/p&gt;
&lt;p&gt;Woking Surry UK area.&lt;/p&gt;</description><link>http://tommed.tumblr.com/post/43931627</link><guid>http://tommed.tumblr.com/post/43931627</guid><pubDate>Tue, 29 Jul 2008 14:09:46 +0100</pubDate></item><item><title>Explore MobileMe on Vista (in Windows Explorer!)</title><description>&lt;p&gt;Here are some steps to get MobileMe working inside Vista (even works on the 64bit version.. unlike most apps!)
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Download &amp; Install the &lt;a href="http://is.gd/VIV"&gt;webDAV KB fix&lt;/a&gt; from Microsoft&lt;/li&gt;
&lt;li&gt;Start &gt; Computer&lt;/li&gt;
&lt;li&gt;Click Map Network Drive&lt;/li&gt;
&lt;li&gt;Enter in the address box (replacing USERNAME with your MobileMe username): &lt;a href="http://idisk.me.com/USERNAME"&gt;http://idisk.me.com/USERNAME&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;You should get an authentication challenge box appear, enter your MobileMe email address as the username and your password&lt;/li&gt;
&lt;li&gt;Sometimes Vista gets it’s knickers in a twist, but I think a restart after you install the KB fix (above) should sort that out&lt;/li&gt;
&lt;/ol&gt;</description><link>http://tommed.tumblr.com/post/42564260</link><guid>http://tommed.tumblr.com/post/42564260</guid><pubDate>Thu, 17 Jul 2008 10:20:00 +0100</pubDate></item><item><title>Flash just got better than Silverlight...</title><description>&lt;a href="http://is.gd/JtN"&gt;Flash just got better than Silverlight...&lt;/a&gt;: &lt;p&gt;All links and text in Adobe Flash content can now be indexed by Yahoo and Google search engines! The business decision to choose Silverlight over Flash just got more unlikely!!&lt;/p&gt;</description><link>http://tommed.tumblr.com/post/40534676</link><guid>http://tommed.tumblr.com/post/40534676</guid><pubDate>Tue, 01 Jul 2008 11:41:22 +0100</pubDate></item><item><title>I realise that a hyphen denotes a negation, but how am I getting...</title><description>&lt;img src="http://6.media.tumblr.com/97GJVONg9an8elzqpfqhl0Jz_500.png"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;I realise that a hyphen denotes a negation, but how am I getting a Bob Dylan and a Snoop Dog video back from this query?!?&lt;/p&gt;</description><link>http://tommed.tumblr.com/post/39757678</link><guid>http://tommed.tumblr.com/post/39757678</guid><pubDate>Wed, 25 Jun 2008 09:46:00 +0100</pubDate></item><item><title>Your Password Must Be at Least 18770 Characters and Cannot Repeat Any of Your Previous 30689 Passwords</title><description>&lt;a href="http://support.microsoft.com/kb/276304"&gt;Your Password Must Be at Least 18770 Characters and Cannot Repeat Any of Your Previous 30689 Passwords&lt;/a&gt;: &lt;p&gt;Now that’s a secure pass-phrase!! :P &lt;/p&gt;</description><link>http://tommed.tumblr.com/post/33104297</link><guid>http://tommed.tumblr.com/post/33104297</guid><pubDate>Mon, 28 Apr 2008 14:26:42 +0100</pubDate></item></channel></rss>
