Canonical Voices

Posts tagged with 'work'

Michael Hall

Since almost all of recommended packages in my original post have been tackled already thanks to Nekhelesh Ramananthan and David Baucum, here’s a new list for those of you who are still itching to knock a few out.

This list contains some of the most popular downloads from the Ubuntu Software Center that don’t have a Quicklist in Precise.  Not all of them will have useful command line options to make shortcuts for, so if you run across one of those just mention it in the comments and I’ll take it off the list.

Available

Done

Not Available

  • firefox doesn’t properly handle command line options
  • vlc doesn’t support command line options
  • skype does not support command line options
  • gparted only supports 1 commandline option which is useless
  • gtk-recordmydesktop does not support command line options
  • openshot only supports 1 commandline option which is useless
  • eclipse does not support command line options
  • ubuntuone-control-panel needs dynamic quicklist (required coding)

Jorge Castro has also linked to an AskUbuntu page that lists many pre-made Quicklists for various apps that just need to be made in a bzr branch and turned into a merge proposal, which is another great and simple way to contribute to Ubuntu.

Read more
Michael Hall

Last night I posted about how non-developers can directly contribute to the Unity desktop experience, and this morning I was greated by not one, but two contributions already made by Nekhelesh Ramananthan.

First he added player controls to Totem, then he added shortcuts for Update Manager and PPA management to the Software Center launcher. That is some awesome work.

Thanks Nekhelesh!

Read more
Michael Hall

So you want to contribute to Ubuntu’s Unity desktop, but you’re not a software developer?  No problem, there are still plenty of things you can do.  And not just in terms of documentation and translations either, there are ways to contribute directly to the desktop without having to know any programming languages.  One of these is adding Quicklists to application launcher.

Quicklists can be added dynamically from within the program code, but they can also be defined statically outside of it, in a simple text file.  It’s these static Quicklists that anybody can contribute.

For this post, I’m going to walk through the process of adding a Quicklist to Geany, my personal programming editor of choice.  You can add one for your favorite app, of choose from one of the following popular applications that are in need of a Quicklist:

IMPORTANT! Leave a comment before you start on one of these, we has 2 people working on a Brasero Quicklist because of a lack of communication.
If you chose one of these, be sure to update the linked bug report with your work.  If you choose something different, it would be a good idea to file a bug for adding a Quicklist.  Either way, I’d like to know what you’re doing, so please leave a comment on this post.

Step 1: Getting the package code

Everything in Ubuntu exists in bzr, which makes getting the source for the package easy.  just “bzr branch ubuntu:<project>”.  For geany, this is what I ran:

bzr branch ubuntu:geany

 Step 2: Add your Quicklist items

The first think you need to do is locate the .desktop file for your application.  For me, it was located in the root of the branch in a file called “geany.desktop.in”.  If you don’t see it in the root of your project’s branch, try running this command:

find ./ -name "*.desktop*"

This may not look exactly like the file in your /usr/share/applications/, since some processing is done to add translated strings for the application name and comments.  But as long as you are just adding the Quicklist items to the bottom of the file you shouldn’t have to worry about that.

The next step is to add your Quicklist shortcuts following this specification:

mhall@mhall-laptop:~/projects/Ubuntu/unity/quicklists/geany$ bzr diff
=== modified file 'geany.desktop.in'
--- geany.desktop.in 2011-05-28 19:49:19 +0000
+++ geany.desktop.in 2012-02-22 01:18:55 +0000
@@ -10,3 +10,9 @@
Categories=GTK;Development;IDE;
MimeType=text/plain;text/x-chdr;text/x-csrc;text/x-c++hdr;text/x-c++src;text/x-java;text/x-dsrc;text/x-pascal;text/x-perl;text/x-python;application/x-php;application/x-httpd-php3;application/x-httpd-php4;application/x-httpd-php5;application/xml;text/html;text/css;text/x-sql;text/x-diff;
StartupNotify=true
+Actions=New
+
+[Desktop Action New]
+Name=Open a New Instance
+Exec=geany --new-instance
+

(UPDATE 2012-02-28: A new XDG spec has been approved to make Quicklists desktop agnostic.  The Unity documentation has the new examples, and I have update the snippet above to match.)

As you can see in the example above, there isn’t much you need to do to add a Quicklist shortcut.  Calling the application’s binary with a different argument (as I did here with –new-instance) is a common and easy shortcut.  You can usually find all the available arguments to your application by calling with with –help.

 Step 3: Submitting your changes

Now that you’ve made your changes, we need to get them back into the main package.  Chances are you don’t have permission to apply them directly (otherwise you wouldn’t need this tutorial), so instead you’re going to put it somewhere else.

bzr commit -m "Add a Unity Quicklist"
bzr push lp:~mhall119/ubuntu/precise/geany/add_quicklist

This will put your changes on Launchpad in a place that the people who actually can apply it to the main packages can see your work.  But just because they can see it doesn’t mean they will see it, at least not without a little prompting from you.

To open the page on Launchpad that you just created (with your bzr push), run the following:

bzr lp-open

On that page you’ll see a link labeled “Propose for merging”, click that and fill out the form on the next page to create your merge proposal.

Step 4: Recompiling your kernel

Just kidding, there is no step 4.  You’re done!  You’ve contributed to making Ubuntu and Unity a better experience for millions of users.  Congratulations, and thank you!

 

Read more
Michael Hall

There have been some recent accusation that the Ubuntu community isn’t taking criticism well.  However, those making the accusations seem to have a misunderstanding about what exactly criticism is.  In an effort to improve the quality of that feedback, I’ve put together a short, simple list of things you can check to make sure your criticism is in fact criticism.

1) “It sucks” is not criticism

It’s an insult.  It means “I have no respect for you, your time, or your talents”.  Don’t be surprised when the recipient of this message is not inclined to help you, or even listen to you, afterwards.

2) “I don’t like it” is not criticism

It’s complaining.  In order to elevate complaining to criticism, you need to explain why it is bad in a way that gives enough information for it to be improved.  If you are not capable of explaining why it is bad, then you don’t fully understand why you don’t like it.  And if you don’t understand why you don’t like it, what hope do we have of knowing how to fix it?

3) “It’s not perfect” is not criticism

We know it’s not perfect.  It’s not perfect because we are not perfect.  Another consequence of our being mortal is the fact that we don’t necessarily know where it’s not perfect, so please go back and read #2 again.

4) “Make it more like X” is not criticism

If what you  really want is X, then use X.  If you  think X is doing something better, then explain what it is and why it is better in a way that is more than just “It is better because X has it, and X is better”.  Again go back and re-read #2.

5) “Turn it into something different” is not criticism

Just because something isn’t what you want, doesn’t mean it’s not what it is supposed to be.  Don’t ask for changes to the fundamental nature of something. If something is fundamentally different from what you want, look for something else.

If your feedback doesn’t fall into one of these five areas, then there’s a very good chance that it will be welcomed and worked on by the Ubuntu community.  If it does, then I would seriously recommend going back and re-thinking your position.

Read more
Michael Hall

One of the most requesting things since I first introduced Singlet was to have a Quickly template for creating Unity Lenses with it.  After weeks of waiting, and after upgrading Singlet to work in Precise, and getting it into the Universe repository for 12.04, I finally set to work on learning enough Quickly internals to write a template.

It’s not finished yet, and I won’t guarantee that all of Quickly’s functions work, but after a few hours of hacking I at least have a pretty good start.  It’s not packaged yet, so to try it out you will need todo the following:

  1. bzr branch lp:~mhall119/singlet/quickly-lens-template
  2. sudo ln -s ./quickly-lens-template /usr/share/quickly/templates/singlet-lens
  3. quickly create singlet-lens <your-lens-project-name>
  4. cd <your-lens-project-name>
  5. quickly package

Read more
Michael Hall

We’re coming up on the next Ubuntu Global Jam, the point in every cycle where the community gets together for a weekend of contributing to the next release of Ubuntu.  And this time we’re shaking things up a little bit.

Every cycle we help people organize their jams, and suggest the same generic topics: Bug triaging, packaging, translations, documentation, testing, etc.  This time, in addition to these topics, we will be reaching out to the various teams both in Canonical and the Community, and picking some very specific activities that will directly help them make the Precise Pangolin the best release of Ubuntu ever.

Another change this cycle is a focus on bringing all of the global jam activities together so that we can all see, in real time, the work being done by contributors around the world.  To that end, we’ve added a Global Jam Dashboard to the LoCo Teams Portal, which features an integrated webchat, updating twitter/identi.ca stream, and photo feed.  So while you are jamming locally, be sure to tweet about it using the #ubuntu hashtag, and upload photos to Flickr, Picasa or pix.ie, again using the #ubuntu hashtag.

Read more
Michael Hall

Starting today at 1500 UTC, we’ll be conducting a series of online classes for Ubuntu Developer Week.  Whether you are interest in developing new applications for Ubuntu, or want to make an existing app take advantage of all of Ubuntu’s features, this is definitely something you should attend.

This cycle Daniel Holbach will kick things off with a overview of Ubuntu development, using Bazaar and Launchpad to collaborate both online and off with teams of developers all over the world.

After that I will be giving an overview of the unique collection of technologies and services that Ubuntu offers application developers, including Unity integration, Ubuntu One cloud storage, and the Software Center.  Then I will be joined by Micha? Sawicz to talk about Ubuntu TV, and how you can get a development environment setup and start hacking on it yourself

Later, David Callé and Michal Hruby will be showing you how to integrate with the Unity Dash by writing custom lenses and scopes for your content.  And if you are interested in that, be sure to come back Thursday for my session on writing simple lenses and scopes in Python using the Singlet library.

Mark Mims and Dustin Kirland will both by presenting on different ways Ubuntu lets you take advantage of the latest cloud technology to improve the development, testing and deployment of your application and stack.  And Stuart Langridge will be talking about the latest developments in the Ubuntu One Database (U1DB), and then showing how you can integrate our file and data syncing infrastructure into your own application.

You will also learn how to work upstream with Debian (both pulling changes in and sending them back), how to properly and easily package your application for distribution, and of course how to work on contributing changes back to Ubuntu itself.

Read more
Michael Hall

If you have written or know how to write a Quickly template, I’d like to get some help making one for Singlet Lenses and Scopes.

Read more
Michael Hall

I’ve finally had a little extra time to get back to working on Singlet.  There’s been a lot of progress since the first iteration.  To start with, Singlet had to be upgraded to work with the new Lens API introduced when Unity 5.0 landed in the Precise repos.  Luckily the Singlet API didn’t need to change, so any Singlet lenses written for Oneiric and Unity 4 will only need the latest Singlet to work in Precise[1].

The more exciting development, though, is that Singlet 0.2 introduces an API for Scopes.  This means you can write Lenses that support external scopes from other authors, as well as external Scopes for existing lenses.  They don’t both need to be based on Singlet either, you can write a Singlet scope for the Music Lens if you wanted to, and non-Singlet scopes can be written for your Singlet lens.  They don’t even have to be in Python.

In order to make the Scope API, I chose to convert my previous LoCo Teams Portal lens into a generic Community lens and separate LoCo Teams scope.  The Lens itself ends up being about as simple as can be:

from singlet.lens import Lens, IconViewCategory, ListViewCategory 

class CommunityLens(Lens): 

    class Meta:
        name = 'community'
        description = 'Ubuntu Community Lens'
        search_hint = 'Search the Ubuntu Community'
        icon = 'community.svg'
        category_order = ['teams', 'news', 'events', 'meetings']

    teams = IconViewCategory("Teams", 'ubuntu-logo')

    news = ListViewCategory("News", 'news-feed')

    events = ListViewCategory("Events", 'calendar')

    meetings = ListViewCategory("Meetings", 'applications-chat')


As you can see, it’s really nothing more that some meta-data and the categories.  All the real work happens in the scope:

class LocoTeamsScope(Scope):

    class Meta:
        name = 'locoteams'
        search_hint = 'Search LoCo Teams'
        search_on_blank = True
        lens = 'community'
        categories = ['teams', 'news', 'events', 'meetings']

    def __init__(self, *args, **kargs):
        super(LocoTeamsScope, self).__init__(*args, **kargs)
        self._ltp = locodir.LocoDirectory()
        self.lpusername = None

        if os.path.exists(os.path.expanduser('~/.bazaar/bazaar.conf')):
            try:
                import configparser
            except ImportError:
                import ConfigParser as configparser

            bzrconf = configparser.ConfigParser()
            bzrconf.read(os.path.expanduser('~/.bazaar/bazaar.conf'))

            try:
                self.lpusername = bzrconf.get('DEFAULT', 'launchpad_username')
            except configparser.NoOptionError:
                pass

    def search(self, search, model, cancellable):


I left out the actual search code, because it’s rather long and most of it isn’t important when talking about Singlet itself.  Just like the Lens API, a Singlet Scope uses an inner Meta class for meta-data.  The most important fields here are the ‘lens’ and ‘categories’ variables.  The ‘lens’ tells Singlet the name of the lens your scope is for.  Singlet uses this to build DBus names and paths, and also to know where to install your scope.  The ‘categories’ list will let you define a result item’s category using a descriptive name, rather than an integer.


 model.append('http://loco.ubuntu.com/events/%s/%s/detail/' % (team['lp_name'], tevent['id']), team['mugshot_url'], self.lens.events, "text/html", tevent['name'], '%s\n%s' % (tevent['date_begin'], tevent['description']), '')

It’s important that the order of the categories in the Scope’s Meta matches the order of categories defined in the Lens you are targeting, since in the end it’s still just the position number that’s being passed back to the Dash.

After all this, I still had a little bit of time left in the day.  And what good is supporting external scopes if you only have one anyway?  So I spent 30 minutes creating another scope, one that will read from the Ubuntu Planet news feed:

The next step is to add some proper packaging to get these into the Ubuntu Software Center, but you impatient users can get them either from their respective bzr branches, or try the preliminary packages from the One Hundred Scopes PPA.

[1] Note that while lenses written for Singlet 0.1 will work in Singlet 0.2 on Precise, the reverse is not necessarily true.  Singlet 0.2, as well as lenses and scopes written for it, will not work on Oneiric.

Read more
Michael Hall

In an effort to increase the exposure of the work being done to improve the Unity desktop, we are moving discussions from the code-named #ayatana channel on freenode to the more discoverable #ubuntu-unity channel (still on freenode).  If you want to talk to Unity developers, find out what’s happening, or join the growing ranks of community contributors, this is a good place to start.

Read more
Michael Hall

By now you should have heard that Canonical is branching out from the desktop and has begun work on getting Ubuntu on TVs.   Lost in all the discussion of OEM partnerships and content distribution agreements is a more exciting (from my perspective) topic: Ubuntu TV shows why Unity was the right choice for Canonical to make.

The Unity Platform

Ubuntu TV doesn’t just look like Unity, it is Unity.  A somewhat different configuration, visually, from the desktop version, but fundamentally the same.  Unity isn’t just a top panel and side launcher, it is a set of technologies and APIs: Indicators, Lenses, Quick Lists, DBus menus, etc.  All of those components will be the same in Ubuntu TV as they are on the desktop, even if their presentation to the user is slightly different.  When you see Unity on tablets and phones it will be the same story.

The Developer Story

Having the same platform means that Ubuntu offers developers a single development target, whether they are writing an application for the desktop, TVs, tablets or phones.  There is only one notifications API, only one search API, only one cloud syncing API.  Nobody currently offers that kind of unified development platform across all form factors, not Microsoft, not Google, not Apple.

If you are writing the next Angry Birds or TweetDeck, would you want to target a platform that only exists on one or two form factors, or one that will allow your application to run on all of them without having to be ported or rewritten?

The Consumer Story

Anybody with multiple devices has found an application for one that isn’t available for another.  How many times have we wanted the functionality offered by one of our desktop apps available to us when we’re on the go?  How many games do you have on your phone that you’d like to have on your laptop too?  With Ubuntu powered devices you will have what you want where you want it.  Combine that with Ubuntu One and your data will flow seamlessly between them as well.

A farewell to Gnome 2

None of this would have been possible with Gnome 2.  It was a great platform for it’s time, when there was a clear distinction between computers and other devices.  Computers had medium-sized screens, a keyboard and a mouse.  They didn’t have touchscreens, they didn’t change aspect ratio when turned sideways.  Devices lacked the ability to install third party applications, the mostly lacked network connectivity, and they had very limited storage and processing capabilities.

But now laptops and desktops have touch screens, phones have multi-core, multi-GHz processors.  TVs and automobiles are both getting smarter and gaining more and more of the features of both computers and devices.  And everything is connected to the Internet.  We need a platform for this post-2010 computing landscape, something that can be equally at home with a touch screen as it is with a mouse, with a 4 inch and a 42 inch display.

Unity is that platform.

Read more
Michael Hall

Back when I first started writing Unity lenses, I lamented the complexity required to get even the most basic Lens written and running.  I wrote in that post about wanting to hide all of that unnecessary complexity.  Well now I am happy to announce the first step towards that end: Singlet.

In optics, a “singlet” is a very simple lens.  Likewise, the Singlet project aims to produce simple Unity lenses.  Singlet targets opportunistic programmers who want to get search results into Unity with the least amount of work.  By providing a handful of Python meta classes and base classes, Singlet lets you write a basic lens with a minimal amount of fuss. It hides all of the boilerplate code necessary to interface with GObject and DBus, leaving the developer free to focus solely on the purpose of their lens.  With Singlet, the only thing a Lens author really needs to provide is a single search function.

Writing a Singlet

So what does a Singlet Lens look like?  Here is a sample of the most basic lens, which produced the screenshot above:

#! /usr/bin/python

from singlet.lens import SingleScopeLens, IconViewCategory, ListViewCategory
from singlet.utils import run_lens

class TestLens(SingleScopeLens):

    class Meta:
        name = 'test'

    cat1 = IconViewCategory("Cat One", "stock_yet")

    cat2 = ListViewCategory("Cat Two", "hint")

    def search(self, phrase, results):
        results.append('http://google.com/search?q=%s' % phrase,
                             'file',
                             self.cat1,
                             "text/html",
                             phrase, phrase, '')

        results.append('http://google.com/search?q=%s' % phrase,
                             'file',
                             self.cat2,
                             "text/html",
                             phrase, phrase, '')

if __name__ == "__main__":
    import sys
    run_lens(TestLens, sys.argv)

As you can see, there isn’t much to it.  SingleScopeLens is the first base class provided by Singlet.  It creates an inner-scope for you, and connects it to the DBus events for handling a user’s search events.  The three things you need to do, as a Lens author, is give it a name in the Meta  class, define at least one Category, and most importantly implement your custom search(self, phrase, results) method.

Going Meta

Django developers will notice a similarity between Singlet Lenses and Django Models in their use of an inner Meta class.  In fact, they work exactly the same way, though with different properties.  At a minimum, you will need to provide a name for your lens.  Everything else can either use default values, or will be extrapolated from the name.  Everything in your Meta class, plus defaults and generated values, will be accessible in <your_class>._meta later on.

Categorically easy

Again borrowing from Django Models, you add categories to your Singlet Lens by defining it in the Class’s scope itself, rather than in the  __init__ method.  One thing that I didn’t like about Categories when writing my previous lenses was that I couldn’t reference them when adding search results to the result model.  Instead you have to give the numeric index of the category.  In Singlet, the variable name you used when defining the category is converted to the numeric index for that category, so you easily reference it again when building your search results.  But don’t worry, you category objects are still available to you in <your_class>._meta.categories if you want them.

The search is on

The core functionality of a Lens is the search.  So it makes sense that the majority of your work should happen here.  Singlet will call your search method, passing in the current search phrase and an empty results model.  From there, it’s up to you to collect data from whatever source you are targeting, and start populating that results model.

You can handle the URI

Unity knows how to handle common URIs in your results, such as file:// and http:// uris.  But often times your lens isn’t going to be dealing with results that map directly to a file or website.  For those cases, you need to hook into DBus again to handle the URI of a selected result item, and return a specifically constructed GObject response.  With Singlet, all you need to do is define a handle_uri method on your Lens, and it will take care of hooking it into DBus for you.  Singlet also provides a couple of helper methods for your return value, either hide_dash_response to hide the dash after you’ve handled the URI, or update_dash_response if you want to leave it open.

Make it go

Once you’ve defined your lens, you need to be able to initialize it and run it, again using a combination of DBus and GObject.  Singlet hides all of this behind the run_lens function in singlet.utils, which you should call at the bottom of your lens file as shown in the above snippet.

Lord of the files

There’s more to getting your Lens working that just the code, you also need to specify a .lens file describing your lens to Unity, and a .service file telling dbus about it.  Singlet helps you out here too, by providing command line helpers for generating and installing these files.  Suppose the code snippet above was in a file called testlens.py, once it’s written you can run “python testlens.py make” and it will write test.lens and unity-test-lens.service into your current directory.  The data in these files comes from <your_lens>._meta, including the name, dbus information, description and icon.  After running make you can run “sudo python testlens.py install”, this will copy your code and config files to where they need to be for Unity to pick them up and run them.

More to come

You can get the current Singlet code by branching lp:singlet.  I will be working on getting it built and available via PyPi and a PPA in the near future, but for now just having it on your PYTHONPATH is enough to get started using it.  Just be aware that if you make/install a Singlet lens, you need to make the Singlet package available on Unity’s PYTHONPATH as well or it won’t be able to run.  I’ve already converted my Dictionary Lens to use Singlet, and will work on others while I grow the collection of Singlet base classes.  If anybody has a common yet simple use case they would like me to target, please leave a description in the comments.

Read more
Michael Hall

My year in review

You never know where you’re going to end up in 12 months.  This time last year I was writing down resolutions for myself about things I wanted to accomplish at my job over the course of 2011.  I accomplished almost none of them.  In fact, I wouldn’t even be working at the same place a scant 4 months later.

I’m not one to publicly list what was on my resolutions list, but I will tell you what wasn’t on it:

  • Get hired by the company that makes the most popular (and my favorite) Linux Desktop
  • Work from home, every day, with people all over the globe
  • Fly to Budapest, Hungary for a week
  • Hang out and work with a couple hundred of the smartest, coolest people I know

And I most certainly didn’t have:

  • Transition from a web developer to a very public, community facing role

To say that 2011 has been an exciting year for me would be an understatement in the extreme.  And yet 2012 promises to be even more exciting, as I transition from a heads-down software developer to a far more public and people facing role as the Upstream Liason for Canonical and Ubuntu.  I’ve spent the last month subscribing to upstream mailing lists, IRC channels and blog feeds, so I can keep track of what is going on in the Ubuntu and upstream communities.  I’m really looking forward to having an increased focus on the community side of Ubuntu, the new types of challenges I will face, and the people I will meet and get to know over the course of the next year.

Read more
Michael Hall

Unity certainly has been getting a lot of attention in the past year.  Love it or hate it, everybody seems to have something to say, whether it’s about the Launcher, application indicators, or the window control buttons being on the left.  But with all the talk about Unity, good and bad, one very unique aspect that hasn’t been getting nearly enough attention are Lenses.

Lenses are a central part of the Unity desktop, and anybody who’s used it will be familiar with the default Application and File lenses, maybe even the Music lens.  But there’s so much more to this technology than you might think.  In fact, David Callé has recently been spearheading an effort to build out a large number of small but incredibly useful lenses.  I first took notice of David’s work when he released his Book lens which, being a huge ebook fan, really brought home the usefulness of Unity Lenses for me.

More recently, David has been writing Scopes for the One Hundred Scopes project.  A Scope is the program that feeds results into a Lens.  While the Lens defines the categories and filters, it’s the Scopes that do the heavy lifting of finding and organizing the data that will ultimately be displayed on your Dash.  If you follow David on Google+, chances are you’ve seen him posting screenshots of one scope after another as he writes them, often multiple of them per day.

Seeing how quickly he was able to write these, I decided to dive in and try it out myself.  You can write Lenses in a variety of languages, including Python, my language of choice.  I decided to start of with something relatively easy, and something that I’ve personally been missing for a while.  I used to use a Gnome2 applet called Deskbar, which let you type in a short search word or phrase, and it presented you with search results and various other options.  Included among those was the option to lookup the word in the gnome-dictionary, and I used this option on a startlingly frequent basis.  Unfortunately Deskbar fell out of favor and development even before the switch to Gnome 3, and I’d been lacking a quick way to lookup words ever since.  So I decided that the Lens I wanted was one that would replace this missing functionality, a Dictionary lens.

My first task was to find out how to write a lens.  I checked the Ubuntu Wiki and the Unity portal, both of which offered a lot of technical information about writing lenses, but unfortunately not very much that I found helpful for someone just starting off.  In fact, I had to get a rather large amount of one-on-one help from David Callé before I could even get the most basic functionality working.

Lenses and Scopes all communicate with each other and with the Unity Dash via DBus, and for anybody not familiar with DBus this makes for a very steep learning curve.  On top of that, writing it in Python means you’ll be relying on GObject Introspection (GI), which is a very nice way of making APIs written in one language automatically available to another, but it also means you’re going to be using the lowest common denominator when it comes to language features.  I found that learning to work with these two technologies accounted for 90% or more of the time it took me to write my Dictionary lens.  Before I write another Lens or Scope, I plan on wrapping much of the DBus and GI boilerplate and wiring behind a simple, reusable set of Python classes.  I hope this will help developers, both newbies and seasoned Unity hackers, in writing simple Scopes by allowing them to focus 90% of their time on writing the code that does the actual searching.

But by the end of the day I had a working Dictionary lens.  It uses your local spellcheck dictionary, via python-enchant, to both confirm whether or not the word you typed in is spelled correctly, as well as offer a list of suggested alternatives.  I also dug through the gnome-dictionary code and found that it was pulling its definitions from the dict.org online database using an open protocol.  Using the python-dictclient I was able to query the same database, and include the start of a word’s definition in the Lens itself.

This lens turned out to be more complex than I had originally envisioned, not just for the features listed above, but also because I needed to override what happened when you clicked on an item.  When you build up your results, you have to give each item a unique URI, which is often in the form or an http:// or file:// URL that Gnome knows how to handle.  But for results that were just words, I needed to do the handling myself, which meant more DBus wiring to have the mouse click event call a local function.  From there I was able to copy the word to the Gnome clipboard or launch gnome-dictionary for viewing the full definition.

After seeing that first Lens running in my Dash, I felt an urge to try another.  Since I already had all of the DBus and GI code, I wouldn’t have to mess with all of that and I could focus just on the functionality I wanted.  Jorge Castro has been trying to get me to write a lens for the LoCo Teams Portal (formerly LoCo Directory) since the concept was first introduced to Unity under the name “Places”.  Since LTP already offers a REST/JSON api, this turned out to be remarkably simple to do.  Between the existing DBus/GI code copied from my previous lens, and an existing python client library for the LTP, I was able to get a working lens in only a couple of hours.

For item icons, you can use either a local icon, or a URL to a remote image.  For this lens, I used the team’s mugshot URL that LTP pulls from the team’s Launchpad information.  When you search, it’ll show matching Teams, as well as Events and Meetings for those teams, and any Event or Meeting that also matches your search criteria.  I’ve also added the ability for this lens to lookup your Launchpad username (by checking for it in your bazaar.conf) and defaulting it to display the LoCo Teams you are a member of, as well as their upcoming Events and Meetings.

Both the Dictionary Lens and the LTP Lens lump the Lens and Scope code in the same Python class, but it doesn’t have to be this way.  You can write a Scope for someone else’s Lens, and vice versa.  In fact, plan on separating the LTP lens into a general purpose Community Lens, with an LTP Scope feeding it results about LoCo Teams.  From there, others can write scopes pulling in other community information to be made available on the Dash.  This will also be my prototype for a Python-friendly wrapper around all of the DBus and GI work that scope writers probably don’t need to know about anyway.

Read more
Michael Hall

As promised in my previous post about my Unity Phone Mockups, here’s a look at the TV mockups I’ve been playing with over the last week, along with the reasons behind some of the designs.  Links to the source files for these mockups, as well as the mockups by other community contributors, can be found on this wiki page.

These aren’t as innovative as my phone mockups, partly because I didn’t have much of a reference to start from like I did with IOS and Android for phones.  I have a DVR from my cable company, but no HTPC or other media center software.

The TV frame and choice of movie (Big Buck Bunny) came from Alan Bell’s template.  I added a remote control to that, and added buttons as I found a need for them.  In the mockups, I’ve highlighted the buttons you would use to interact with the given screen.

The basic concept was to overlay the Unity components when the user presses the Circle-of-Friends button on the remote, but to otherwise leave whatever they are watching full screen.  On this mockup I used applications in the Launcher, and pressing the CoF would put the focus on them the same way Alt-F1 does on the desktop.  You could then navigate through them using the arrow buttons on the remote, pressing OK to make your selection.

In this alternate mockup, I replaced the applications with Unity lenses, which I think makes more sense for a TV, since you will more often than not be interested in finding content, not selecting which application to run.  Luckily Unity already supports both, so this is just a matter of what the default initial configuration should be, after that the user can put whatever they want in the Launcher.

For opening the dash I envision being able to double-tap the CoF button (or selecting a Lens).  In fact, I would like to have this on desktop Unity, since I want quick access to the Launcher more often than I want the Dash.  Once the Dash is open, you would use the remote’s arrow buttons to navigate through the items listed, again pressing OK to make your selection.

For accessing the Dash’s filters, I added the “context menu” button to the remote which, when pressed while on the Dash screen, will open the filter sidebar, letting you navigate through the filtering options using the remote’s arrows.  Pressing the context menu button again would collapse the filter sidebar and return arrow navigation to the results table.

Likewise I added a Search button to the remote to send focus to the Dash’s search field and activate the on-screen keyboard.  Text input from a remote like this will be cumbersome (unless we come up with a monstrosity of a remote like this), so we’ll want to avoid the need for this as much as possible.  But since the Dash is highly search-focused, I felt that there needed to be a mockup for this aspect.

This is a screenshot of Shotwell taken from my laptop and scaled to fit a resolution it might be at on a TV screen.  I did this to demonstrate how an existing desktop app might look and work without modification on a 10 foot interface.  Here again I added a new button to the remote, which is a kind of next/last panel or, more accurately, the tab key on a desktop keyboard.  This lets you navigate through widgets and panels on a traditional application like you can using the tab key on a desktop.

I think with some small enhancements to GTK and QT, we can allow application developers to make navigating apps this way easier.  Alternately, a new library similar to uTouch could act as an interface between remote control input and applications.

Someone pointed me to YouTube’s LeanBack interface, an HTML5 webapp designed for 10 foot displays.  This is a very promising way to deliver applications and contents to internet connected TVs, especially if we ship with a fully functional, HTML5 supporting web browser optimized for control with a remote.

Finally I wanted to show off Media Explorer, a media center application built on the same Gnome technologies as the rest of the Ubuntu desktop.

Feedback

Just like I did in my last post, I’d like to solicit discussion and feedback on these mockups, and also ask what other scenarios/mockups you would like to see.  You can either leave comments here, or join the live conversation in #ubuntu-tv on Freenode.

Read more
Michael Hall

I’ve been expanding on my earlier Unity TV mockups lately, which I will post more about later, but I’ve also been working on some Unity Phone mockups, and I wanted to put a couple of ideas out for wider discussion and feedback.

Launcher Position

OMG!Ubuntu! highlighted some other mockups for Unity on a Phone where the designer kept the launcher on the left hand side, as it is on the desktop.  While this is keeping with the look of desktop Unity, I didn’t think it was in line with the reasons for it.  The primary reason for the launcher’s position is to use up screen width (which is abundant on desktops) and free up screen height (which is scarce on desktops).

Keeping that in mind, I came up with a design that keeps the launcher on the narrowest screen edge, regardless of orientation.  When holding the phone in portrait mode, the launcher sits along the bottom, the way is traditionally does on Android interfaces.  When rotated to landscape, the launcher sits along the left edge, the way it does in Unity on the desktop.  This was the launcher is only ever taking up space in the dimension you have the most to spare, while providing a familiar interface in both modes.

The top panel, however, always stays up along the top edge of the screen.  This matches Android in portrait mode, and desktop Unity on landscape.  This is because it contains the time, which would either have to be rotated or left at 90 degrees in landscape, but also because having the panel at the top gives consistency in the next feature I looked at.

Accessing Indicators

There is a video on YouTube showing a new Acer Iconia W500 running Ubuntu 11.10, and watching the user try and land a touch event on an indicator icon was particularly painful, even on a tablet the indicator icons are far to small to be easy touch targets.  How much worse would it be when they’re on a screen a quarter of the size?

Instead I thought about the way Android lets you drag-down the top bar to access your list of notifications, and how easy of a gesture that is.  Applying that to Unity, I came up with the idea of a drag-down gesture activating the indicator menus, much like you can by pressing F10 on desktop unity.  Only instead of popup menus, these would use a full-screen overlay, again like Android does for notifications.

Unlike Android, however, you would be able to access all of your indicators from here, not just notifications.  Swiping left or right will move you to adjacent indicators (just like left and right keyboard buttons do on desktop Unity).  So you would have quick, easy, always available access to your networking, sound (including playback controls) and calendar.

Feedback

Like my earlier TV mockups, these are all done using the Pencil mockup tool.  You can see the full exported version here, and download the source files here.  If you are interested in the discussions going on, join the #ubuntu-phone channel on Freenode.  Please let me know what you think of these mockups, and what other areas of Unity on a phone you would like to see designs for.  And remember, none of these are official designs, they’re just what I’ve been doing for fun in the evenings.

Read more
Michael Hall

Inspired my Mark Shuttleworth’s recent post about Alan Bell’s Unity TV mockups, I’ve decided to try my hand at some.  Alan did his using Pencil, which is an awesome tool for UI mockups that I wrote about previously, so it was easy enough for me to get started.  Here is my first one, a mockup where just the Launcher and Unity panel are showing (no Dash):

You can see other people’s mockups, and add your own on the Ubuntu Wiki.  Instructions for getting setup with Pencil can be found in the mailing list archive.

Read more
Michael Hall

(Update 1: There seems to be some confusion about what I’m saying in this post, so let me be absolutely clear from the start: I am not questioning or criticizing Distrowatch’s data.  Their data is, as far as I know, 100% accurate.  What I’m questioning is whether or not this data is a measure of the “popularity” of any given distro, as so many news stories are claiming it is.)

(Update 2: If anybody else wants to run a story about this post, please contact me before making it sound like my blog article is somehow an official Canonical response.  I’m more than happy to have a conversation with you for the sake of accuracy.)

It seems that the tech blogs both inside and outside the Linux sphere have picked up on a graph supposedly showing a decline in the popularity of Ubuntu based on statistics from Distrowatch.  I’m not going to point out all of the flaws in these reports, or the basis of the graph in general, that has been done already here and here (especially in their comment threads).

Instead I want to take a step back for a moment and examine what the statistics are actually counting, and what that actually means for both Ubuntu and LinuxMint.

Hits per day

The numbers themselves come from the number of page views per day on Distrowatch’s page for each distro.  So if you go to http://distrowatch.com/arch you’ve added to the count for Arch.  Now the first thing this tells us is that the statistic is in no way tied to the actual number of users a distro has, just the number of people looking at that distro’s page on Distrowatch.  Now there are three possible reasons why a user might visit one of these pages:

  1. Curiosity about a distro
  2. Following a link from somewhere else
  3. Attempting to boost the hits-per-day count for a distro

I’m going to disregard #3, because I don’t believe that anybody involved with Mint is doing anything underhanded to boost these numbers.  But an examination of the other two will shed some light on what exactly is happening.

Follow that link

Even though a Distrowatch ranking isn’t connected to number of users, it’s still exciting to see your distro rise in the list, and it’s natural to want to tell people about it.  Mint does it, Ubuntu does it, lots of distros do it.  There’s nothing wrong with this, and if enough people are reading your announcement to impact the ranking, then it most likely deserves to be impacted.

But something all together different happens when 3rd party sources start sending people to your distrowatch page because of your rank.  When the Register and PC World run articles about you being on top, their readers will naturally visit your Distrowatch page, further increasing your rank, which will in turn prompt more stories about it, sending more people to your page, etc.

While I have no doubt that Mint deserves the top spot (more on that below), I think the amount of its increase has been affected by this positive feedback loop.  This cyclic reaction will likely continue for a few weeks until people finally get bored with the story, at which point I expect Mint’s numbers to fall back down into the 2500-3000 range, comfortably at #1, but well below the 7728 it’s at as I’m writing this.

The Buzz

All of which brings us back to the first reason for visiting a distrowatch page: Curiosity.  Distrowatch is a great resource for finding out about a distro, and it’s how a lot of young distros get attention.  When Qimo got a mention there, we saw a huge traffic increase, and we also rose pretty sharply in the ranking (nowhere near #1, but still something I was proud of).

But there comes a point, when a distro has become established, where the vast majority of those curious people will be going directly to the distro’s own website, rather than Distrowatch.  Nobody would deny that Red Hat is one of the most used Linux distros, but it currently ranks at #42 on Distowatch.  Suse ranks at #64.  Even the free-as-in-beer CentOS, which we all know is widely used, is only at #9.  As a general rule then, we can assume that as a distro becomes more established and gains more market and mind-share, fewer people will be going to Distrowatch to learn about it.

So what does that leave us?  I like to call it “Young Buzz”, a large amount of excitement about a relatively new (in terms of mindshare) distro.  This is something that absolutely describes LinuxMint.  As the seemingly anti-Unity distro of choice, it has been getting a lot of talk and attention and, while I disagree with the anti-Unity sentiment, Mint is certainly deserving of attention.  Its user base is growing rapidly and I hope its community is too.  They are doing some interesting work with both Gnome-Shell and the Mate, the Gnome 2 fork.  Every other distro will be keeping an eye on them, seeing what gains traction and what doesn’t, and I expect some of that to make its way upstream and into other distros as well.

What does it all mean?

Is LinutMint more popular that Ubuntu?  No, not by any measure I have seen.  Will it become more popular than Ubuntu?  I don’t know, but my gut says not anytime soon.  But Mint certainly has the most momentum, at least for the moment, and will continue to grow at a faster rate for at least the near future.

But they aren’t the first to be in the position, PCLinuxOS had much the same buzz a few years ago, but wasn’t able to maintain it.  The challenge for Mint is to keep this momentum going, and to do that they’re going to need a strong, open, supporting community that gives new users somewhere to belong in the way the Ubuntu community does.

Read more
Michael Hall

Recognition is the currency of the open source community.  When somebody does something that helps you, the proper way of paying them for their time and effort is, quite simply, to thank them and let other people know that they helped you.  This is why the most popular Creative Commons licenses include attribution.  This is why even the most permissive open source licenses ask that attribution notices be kept and distributed with the code.  And this is why members of the Ubuntu community is celebrating everybody else in the community in our first ever Community Appreciation Day.

I was a member of the Ubuntu community long before I became an employee of Canonical, and I’ll be getting much more community focused in my new role as Upstream Liason on the Community Team in January.  Suffice it to say, I owe a lot of people thanks for their work, support and encouragement over the years.  But Community Appreciation day isn’t about repaying old debts of gratitude, it’s about letting people know that their work doesn’t go unnoticed, that it does make a difference, and that people do appreciate it.  Without that, it’s very easy for a community member to burn themselves out.  So consider Community Appreciation day to be a day of investing your gratitude, because while it may just feel like you’re being thankful, you are in fact building up a fellow contributor.

I will be sharing my appreciation with people either privately, or in the medium where I usually interact with them, either mailing lists of IRC, because I feel that I should show my appreciation in the place where I received their contribution.  But you should share your thanks in whatever manner you feel is most appropriate, and most sincere.  Just make sure that you do.

Read more
Michael Hall

It’s late, I’m tired, so this is going to be brief.  But if I didn’t put something up now, chances are I’d procrastinate to the point where it didn’t matter anymore, so something is better than nothing.

JuJu

So the buzz all week was about Juju and Charms.  It’s a very cool technology that I think is really going to highlight the potential of cloud computing.  Until now I always had people comparing the cloud to virtual machines, telling me they already automate deploying VMs, but with Juju you don’t think about machines anymore, virtual of otherwise.  It’s all about services, which is really what you want, a service that is doing something for you.  You don’t need to care where, or on what, or in combination with some other thing, Juju handles all that automatically.  It’s really neat, and I’m looking forward to using it more.

Summit

Summit worked this week.  In fact, this is the first time in my memory where there wasn’t a problem with the code during UDS.  And that’s not because we left it alone either.  IS actually moved the entire site to a new server the day before UDS started.  We landed several fixes during the week to fix minor inconveniences experienced by IS or the admins.  And that’s not even taking into consideration all the last-minute features that were added by our Linaro developers the week prior.  But through it all, Summit kept working.  That, more than anything else, is testament to the work the Summit developers put in over the last cycle to improve the code quality and development processes, and I am very, very proud that.  But we’re not taking a break this cycle.  In fact, we had two separate sessions this week about ways to improve the user experience, and will be joined by some professional designers to help us towards that goal.

Ubuntu One eBook syncing

So what started off as an casual question to Stuart Langridge turned into a full blown session about how to sync ebook data using Ubuntu One.  We brainstormed several options of what we can sync, including reading position, bookmarks, highlights and notes, as well as ways to sync them in an application agnostic manner.  I missed the session on the upcoming Ubuntu One Database (U1DB), but we settled on that being the ideal way of handling this project, and that this project was an ideal test case for the U1DB.  For reasons I still can’t explain, I volunteered to develop this functionality, at some point during the next cycle.  It’s certainly going to be a learning experience.

Friends

Friends!  It sure was good to catch up with all of you.  Both friends from far-away lands, and those closer to home.  Even though we chat on IRC almost constantly, there’s still nothing quite like being face to face.  I greatly enjoyed working in the same room with the Canonical ISD team, which has some of the smartest people I’ve ever had the pleasure of working with.  It was also wonderful to catch up with all my friends from the community.  I don’t know of any other product or project that brings people together the way Ubuntu does, and I’m amazed and overjoyed that I get to be a part of it.

Read more