I want to create a home build lens for the 12.04 dash and liked to use one of the default lenses as example. I'm thus for looking where I can find the files of these lenses.

  • just the folders with lens locations won't be all you need. you also need .service files and a couple other things. you should either use the quickly lens template or follow along with some python lens tutorials you can find on google saravananthirumuruganathan.wordpress.com/2011/08/05/… expresses some other files to be concerned with – RobotHumans Jul 22 '12 at 18:32

There are three essential files that compose a lens.

  • A .lens file stored in /usr/share/unity/lenses. This details the name, icon, and D-Bus address of a lens for Unity.

  • A .service file stored in /usr/share/dbus-1/services. This points to the location of a lens' query executable; D-Bus will see this executable and act as IPC between it and Unity.

  • Finally, the executable of your lens may be placed anywhere in the filesystem (you specify where in the .service file), but canonically these are located in /usr/lib.

Look at /usr/share/unity/lenses/video/video.lens, /usr/share/dbus-1/services/unity-lens-video.service, and /usr/lib/unity-lens-video/unity-lens-video for a concrete example of how these files work together.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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