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 am wanting to find the Unity scope folder so that I can study how the scopes are set up and programmed. Where on the filesytem could I find the Unity scope files?

share|improve this question
up vote 7 down vote accepted

Documentation on the Unity scope API can be found here. That information should be current for 13.04, but there are some changes coming in 13.10 which merge the concepts of lenses and scopes.

Unity discovers its lenses and scopes by looking for files under /usr/share/unity/lenses (or /usr/share/unity/scopes for 13.10) with a suffix of .lens or .scope.

These files are similar to desktop entry files, but instead of specifying a command to execute, they specify a D-Bus endpoint to use to talk to the lens or scope through the DBusName and DBusPath keys.

If the scope or lens is not running when the shell tries to communicate with it, the D-Bus daemon will activate it. This is done by scanning /usr/share/dbus-1/services for a .service file whose Name key matches the desired bus name, and running the command in the Exec key. So it is not too difficult to discover what program implements a particular scope with a simple grep command.

If you are interested in writing a scope of your own, I would suggest looking at the documentation in the first link. But keep in mind that you may have to adjust your scope a bit when 13.10 comes out.

share|improve this answer
Thank you for are detailed and clear answer. This is the best answer I have ever received on the Internet. – Devyn Collier Johnson May 21 '13 at 12:35
This question is referenced on ( so it would be nice if the answer was updated now that 13.04 is history and we're getting closer to the next LTS. – Jo-Erlend Schinstad Feb 3 '14 at 12:25
It is still valid for the scopes framework being used by Unity 7. We're still working out the details for the new framework, so it's a bit premature to update the question just yet. – James Henstridge Feb 3 '14 at 13:29

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.