Contributing to Unity for non-developers: Quicklists

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!

 

This entry was posted in LoCo, OpenSource, Programming, Work and tagged , , , , , . Bookmark the permalink.

50 Responses to Contributing to Unity for non-developers: Quicklists

  1. Ian Nicholson says:

    Is there a list of things you’d like added in the quicklists? I didn’t see a list anywhere, and I’m not creative enough to think of anything to add.

    • Michael Hall says:

      Run –help for a list of possible things you can add.

    • joseph mills says:

      Hello there,
      The New York State Ubuntu Local Community (LoCo) Team is having there Ubuntu Jam today and I/we would like to work on
      filezilla
      virtualbox-ose
      smplayer
      supertuxkart

      Maybe more. One of us will post when we have finished each one.

      • Joseph Mills says:

        Hello there after putting together a bunch of quick tags I got stuck at Step 3: Submitting your changes
        I keep on getting error that I can not write to your ppa that I am not Michael or something like that. Should I upload to my own ppa? Then try to merge with yours ?Thanks for your time. I also looked at what Jorge Castro had to say and would like to help out with some of the work that they have already done on ask-ubuntu aka uploading/pushing there changes.
        Thanks again,
        Joseph & the New York LoCo team

        • Michael Hall says:

          You will need to change the “push” location, using your own launchpad username and the name of the project you are working on. It takes the following form:

          lp:~<launchpad_username>/ubuntu/precise/<project_name>/add_quicklist

  2. I am especially glad for step 4!

  3. didrocks says:

    Don’t forget the “submit upstream” part. Some upstreams took this kind of patch like gnome-screenshot :)

  4. jokerdino says:

    I tried making a quicklist for Tomboy but it didn’t work as I would like it to be. If the application wasn’t already open, I could create a new note. But if it is already running, it doesn’t create a new note.

    And, the network here blocks every port other than 80. So, pushing through bzr is not the preferable way to submit patches for me. I am still looking for alternative, better solution to the problem in hand.

    • Michael Hall says:

      Yeah, not all programs will let you run them again with a different flag. If Tomboy won’t, file a bug against it for that and try another one.

  5. Prateek says:

    This misses important steps like adding one’s SSH keys to launchpad and so on, if one has not done so!

  6. Nekhelesh says:

    I really want to submit quicklist patch for totem and brasero. However I have some questions.

    - For brasero, the option are to open a project file, or cover image which requires a url path in the arguments. But this cannot be implemented in a quicklist, can it?

    - For totem, there are arguments for play, pause, mute, full screen etc. But these are only valid when totem is open. When totem is closed, these are redundant. What do I do in this case?

    • Michael Hall says:

      Unfortunately with static Quicklists, you really are limited to hard-coded values, so you can’t pass URLs or filepaths.

      I think it’s okay to leave the player controls in the Quicklist, even if the app isn’t open. The music player Clementine does the same thing. Clicking on one of them just open the app.

      • Nekhelesh says:

        I have one more question (more a request), the ubuntu software center should have the following quicklist.

        Update Manager
        Add/Edit PPA
        ———————————
        Ubuntu Software center
        ———————————-
        unlock from launcher

        Can I implement this?

        • Michael Hall says:

          If you can do those things from the command line (update-manager I know you can, not sure about a GUI for add/edit PPAs), then you sure can, and it would be a very nice addition too!

  7. Nekhelesh says:

    Michael, I really need your help. I finished the totem quicklist. I also committed it. Now, in this line bzr push lp:~mhall119/ubuntu/precise/geany/add_quicklist do I replace your name with mine or just use this command?

    Looking forward to getting my first upload :)

    • Michael Hall says:

      Replace my Launchpad username (mhall119) with yours, and then replace “geany” with “totem”, and you should be all set

  8. Jorge Castro says:

    Here’s a bunch of community donated ones; it’d be swell if someone went through these and worked on shipping the sane ones in Ubuntu!

    http://askubuntu.com/questions/35488/what-custom-launchers-and-unity-quicklists-are-available

  9. Pingback: Nekhelesh Ramananthan makes Ubuntu | Michael Hall's Blog

  10. Nekhelesh says:

    Uploaded Brasero quicklist. DONE

  11. Trenton Fox says:

    I have pushed a quicklist for GIMP as well as Empathy. I may do another in a bit. Cheers!

  12. Nekhelesh says:

    I cannot branch libreoffice. The command bzr branch ubuntu:libreoffice gives me the error message “Not a branch”. I tried different combinations like libreoffice-writer but to no success.

    Also Empathy only provides option to start minimized and to not connect on startup. Is a quicklist still necessary? If yes, I can get started on this.

  13. Pingback: More Unity Quicklist Targets | Michael Hall's Blog

  14. Pingback: Awesome Unity Contributions | jonobacon@home

  15. I’m going to work on K3B.

    • Added these quicklist items to K3B:

      Create a new video DVD project
      Create a new data CD project
      Create a new audio CD project
      Create a new video CD Project
      Create a new mixed mode CD project
      Create a new eMovix CD project

      • Michael Hall says:

        Wow, that’s a great list! Don’t forget to propose your branch for merging when you’re done with it.

  16. Pingback: Swimming Upstream: What to do next with your Quicklists | Michael Hall's Blog

  17. taltos says:

    added Quicklist Create new File in Scribes Editor

  18. Jared says:

    I had a heart attack when I first read #4. You dirty rascal.

  19. Nathan W says:

    as far as I can tell, Unity in Precise currently lacks support for the new XDG specification. :(

    hopefully this gets fixed soon, it would be nice to have a healthy set of quicklists ready (for base image installed applications at the least) by the time Precise ships.

  20. Marti says:

    Wow, thank you!
    gedit-common
    [ Nekhelesh Ramananthan ]
    * debian/patches/02_add_keywords.patch:
    – add new keywords for unity and gnome-shell
    * debian/patches/03_add_unity_quicklist.patch:
    – add static quicklist for unity

  21. Pingback: Faces of Ubuntu: The non-Developers | Michael Hall's Blog

  22. Pingback: Interesting Bug Fix « thejeffreydecker

  23. Danillo says:

    Hey, Michael, what do you think about these quicklists?
    http://www.theopensourcerer.com/2012/03/16/unity-window-quicklists/

    • Michael Hall says:

      Alan Bell is such an awesome dude, what can I say?

      There are two problems I do see with trying to do this:

      1) Multi-tabbed windows, you only get the title of the active tab (if you’re lucky), so for things like Firefox/Chromium, and even gnome-terminal, you’re only getting a part of the information about the window.

      2) Context, or lack thereof. As you see in Alan’s screenshots, he has several terminal windows with the title “alanchicken@alanlaptop:~”, which really doesn’t help you find the one you want. For that you’d need clues like bash history, windows location and even window size.

      This isn’t to say Alan’s work is bad, on the contrary I think it’s really cool what he’s been able to do, especially as an add-on package and not a hack into Unity itself. But Quicklists are a pretty narrowly scoped feature, and they just don’t have the ability to give a really good window switching experience. I think the upcoming Spread feature is going to make window switching a much nicer and easier experience.

      • Danillo says:

        I see, those are two good points I haven’t thought about… But I agree, it still is pretty cool! Cheers!

  24. Pingback: Contributing to Unity for Artists: SVG Icons | Michael Hall's Blog

  25. Pingback: Softuto :: Free Computer Tutorials :: » Michael Hall: Contributing to Unity for Artists: SVG Icons

Comments are closed.