Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to create a Lens for Unity in 11.10 using vala. This is my daemon.vala:

using Dee;
using Gee;

namespace PidginLens
    public class Daemon : GLib.Object, Unity.Activation
        public static void main(string[] args)


Now trying to compiling with valac --pkg gee-1.0 --pkg dee-1.0 --pkg unity just says

daemon.vala:6.40-6.55: error: The type name `Unity.Activation' could not be found
public class Daemon : GLib.Object, Unity.Activation
Compilation failed: 1 error(s), 0 warning(s)

libunity4 libunity6 libunity-dev libunity-core-4.0.4 libunity-core-4.0-dev gir1.2-unity-4.0 are all installed, and it obviously finds the unity package (since changing --pkg unity to something like --pkg unity-not-here yields another error. So what's my mistake? why is Unity.Activation not there?

Thanks guys!

share|improve this question
Could you provide a pointer to the documentation of Unity.Activation? I can only find Unity.ActivationResponse... – xubuntix Jan 17 '12 at 12:49
So did i, i checked unity.vala on my machine and the only hit i found for 'Activation' was ActivationResponse. I followed the example at which brought me to my current problem. :( – Leopard2A5 Jan 17 '12 at 13:29
Are you trying this on Oneiric (Unity 4) or Precise (Unity 5)? The API has changed slightly. – mhall119 Jan 17 '12 at 15:34
I'm running Ubuntu 11.10 (oneiric) x64 – Leopard2A5 Jan 17 '12 at 16:22

The Unity.Activation interface was dropped as of Unity 4 (Ubuntu 11.10). Instead you can hook into the activation callback using signals like this:


If you are not overriding the activation handling, you probably only need remove Unity.Activation and recompile.

Full documentation for Unity 4 (Ubuntu 11.10) can be viewed here:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.