Canonical Voices

Posts tagged with 'unity'

Nicholas Skaggs

Sprinting in to the finish! Unity 5.8 saw the introduction of the sticky edge being able to be turned off, and the addition of being able to control where the launcher appeared on which monitors.  Unity 5.10 has been released into the team's ppa. This release has been about bugfixes and polish as the precise cycle winds down to a close. Still, there are some notables changes:

  • New version of compiz 0.9.7.4
    • Bugfixes
    • Keybindings changes
      • Ctrl + Super + D Minimises all windows
      • Ctrl + Super + Cursor up Maximizes the current window
      • Ctrl + Super + Cursor down Restores or minimises current window
      • Ctrl + Super + Cursor Left or Right Semi-maximises current window
  • Unity 2D and Unity 3D has right edge support for sticky edge detection
In addition to the instructions below, Alan Pope (aka popey) has put together an awesome video walkthrough of how to do unity testing. Check it out! http://www.youtube.com/watch?v=AgL957zo5QM

Installing
Prerequisites: Make sure you are running the latest version of precise, and all your packages are up to date. Unfortunately this cannot be installed on oneiric or any previous ubuntu release. 

1) Add the unity ppa (https://launchpad.net/~unity-team/+archive/ppa). You can do this by issuing the following command:

sudo add-apt-repository ppa:unity-team/ppa

2) Update apt and run a dist upgrade -- this should prompt you to upgrade unity and some indicators as well as install checkbox-unity.

sudo apt-get update && sudo apt-get dist-upgrade

3) Restart your unity session by logging out and logging back in again.

Ok, hopefully the upgrade went smooth for you, but if not, head over to freenode #ubuntu-unity channel and let folks know what went wrong.

Testing
So, now that your up and running you can run the through the manual tests the unity team has prepared. Open the dash and type 'unity testing'. The Checkbox Unity Tests should launch. Checkbox will gather some information on your system and then ask you which tests you wish to run. Once complete you will see a link containing your system report and an option to publish it to launchpad. Use the text box below the link to enter your launchpad email address and then hit submit. This will ensure your results and feedback go to the unity developers.

Please ensure you have finished and submitted your testing results by Sunday evening April 8th. Unity 5.10 should land into precise sometime in the middle of next week.

Filing Bugs
Apport should automatically allow you to file crashes for any issues you find during testing. Please mention any bug reports you file in the comments of the failed tests. If you need to report a bug that didn't cause a crash, simply type 'ubuntu-bug unity' into a terminal window and follow the normal process.

Giving Feedback
If you'd like to give feedback on design for unity, Check out the awesome http://unity.ubuntu.com/getinvolved/ site. If your wanting to contribute code or patches, visit the folks on the #ubuntu-unity on freenode.

Getting Help
Don't hesitate to reach out to the wonderful folks on freenode @ #ubuntu-unity, the unity web site, the ubuntu+1 forums, or myself if you have questions. Thanks for helping test ubuntu!

Read more
Michael Hall

I spent some more time over the weekend working on Hello Unity.  If you haven’t already, be sure to read my first post about it.  In short, Hello Unity is a showcase application that demonstrates all the different ways an application developer can integrate their app with the Unity desktop.

The current version of Hello Unity sports a new syntax-highlighted code display, which makes it much easier to read and understand what the code is doing.  I also spent a significant amount of time going through and heavily commenting the code to explain what everything was doing.

In the Launcher section I added support for setting the “urgent” status of the application.  In Unity, this will cause the application’s icon in the Launcher to shake and, if the Launcher is set to auto-hide, will also cause the icon to slide out into view while it shakes.  This is a very useful way of telling a user that your application needs their attention.

A new section was added for integrating with the Message Menu.  It automatically adds a Hello Unity section to the menu, and allows you to add count indicators to it.  Clicking on an item in the menu will execute the code for removing it.  All of this is explicitly commented on in the source code.

Another new section is for Notifications.  While it uses the generic libnotify API, it does highlight how to use it with Ubuntu’s Notify-OSD display system, including how to updated and append text to the currently displayed notification.

Once again, if you are interested in contributing to this project, you can get the code from the Launchpad project page.  Also available there are source tarballs and installable .DEB files.

Read more
Michael Hall

David Planella and I have spent the past couple of weeks gathering, cleaning and verifying Unity integration documentation that has existed on the Ubuntu wiki, individual blogs and inside the source code itself.   After publishing those docs, a couple of people asked for some kind of simple “hello world” type of application to show off how all that integration works.

So, I made one.

You can get the code from Launchpad:

bzr branch lp:hello-unity

It’s not complete yet, but it’s a start.  Let me know if you’re interesting in contributing to it.

Read more
mark

In the open source community, we celebrate having pieces that “do one thing well”, with lots of orthogonal tools compounding to give great flexibility. But that same philosophy leads to shortcomings on the GUI / UX front, where we want all the pieces to be aware of each other in a deeper way.

For example, we consciously place the notifications in the top right of the screen, avoiding space that is particularly precious (like new tab titles, and search boxes). But the indicators are also in the top right, and they make menus, which drop down into the same space a notification might occupy.

Since we know that notifications are queued, no notification is guaranteed to be displayed instantly, so a smarter notification experience would stay out of the way while you were using indicator menus, or get out of the way when you invoke them. The design story of focusayatana, where we balance the need for focus with the need for awareness, would suggest that we should suppress awareness-oriented things in favour of focus things. So when you’re interacting with an indicator menu, we shouldn’t pop up the notification. Since the notification system, and the indicator menu system, are separate parts, the UNIX philosophy sells us short in designing a smart, smooth experience because it says they should each do their thing individually.

Going further, it’s silly that the sound menu next/previous track buttons pop up a notification, because the same menu shows the new track immediately anyway. So the notification, which is purely for background awareness, is distracting from your focus, which is conveying exactly the same information!

But it’s not just the system menus. Apps can play in that space too, and we could be better about shaping the relationship between them. For example, if I’m moving the mouse around in the area of a notification, we should be willing to defer it a few seconds to stay out of the focus. When I stop moving the mouse, or typing in a window in that region, then it’s OK to pop up the notification.

It’s only by looking at the whole, that we can design great experiences. And only by building a community of both system and application developers that care about the whole, that we can make those designs real. So, thank you to all of you who approach things this way, we’ve made huge progress, and hopefully there are some ideas here for low-hanging improvements too :)

Read more
Michael Hall

Everybody knows that programmers can contribute to Unity, and I’ve shown in my previous posts that non-developers can still contribute features and fixes that make applications integrate better.  But what if your skills lay more on the creative side of the spectrum?

Well it just so happens that you have something to contribute to Unity too.  In fact, we’re currently in need of some graphic design talent to put some extra polish on some areas of application integration.  Specifically, we need people to help create vector art for application icons that only have raster images, PNG, XPM, etc.

This wiki page contains a list of applications that have been identified as needing an SVG icon.

Now graphic creation isn’t my specialty, so I’m not going to write a step by step guide to creating these images, that’s up to you artists.  What I am going to do, however, is walk you through the process of coordinating with the upstream application developers and submitting your finished image to Ubuntu.

1) Contact the upstream

This is an important step, because even if an application doesn’t have an SVG icon in Ubuntu, there’s still a chance that one already exists.  Read over the first half of my post on upstreaming Quicklists for ways to get in contact with with them. Ask them if they have an SVG  source for their application’s icon.  If they do, that’s great! You can take that and skip down to step #3.  If they don’t, then you will need to work with the upstream project to create one that is right for them.

2) Work with the current image

It’s important that we don’t try and re-brand an application unless the authors want it re-branded.  What we want is a more flexible/scalable version of the image icon we already have.  If you are creating a new SVG file, try to keep as close to the raster image as possible, and be sure to talk to the upstream developers about any deviations or changes you need to make.  And finally, keep with the spirit of open source and make your new image available to both Ubuntu and the upstream project under a copy-left license like the CC-BY-SA or another permissive license of the upstream’s preference.

3) Preparing your image

Since we are getting close to the release of 12.04, the requirements for any further changes are getting stricter.  In order to get your image into the Precise packages, you will need to meet the following two criteria:

It must be approved by the upstream project.  Since your image will be representing their application in Ubuntu, we absolutely need their acceptance of it before it can be used.  This is why step #1 is so vitally important, make sure you are working and communicating closely with upstream from the very beginning.

It must be a plain SVG file.  This is because it will be added as a patch file against the package, and patch files don’t work well with binary data.  Since a plain SVG file is text, not binary, it makes it much easier to convert into a patch.

4) Submit your new image

The wiki page containing the list of applications has a link to the corresponding bug report filed in Launchpad.  When your image is ready, attach it to the bug report.

You will also need to add the upstream project to the bug report.  Click the “Also affects project” link on the bug page, and choose the Launchpad Project that matches your upstream.

That’s it!  Well, almost.  Once we have your image, the application’s package in Ubuntu will need to be updated to use it, but that will require some changes to packaging scripts and patch files, which will be the subject of a more technical post.  But getting the necessary image is itself a big step.

Read more
Michael Hall

Bazaar is a great tool for distributed development, but distros are built on packages, and so packages are what distro developer care about.  That’s why many of you who have followed my previous blogs have probably been asked for patches to the package itself, not to the bzr branch.

Why the difference?  Well for package maintainers, it’s easier and faster to import  upstream changes if they keep their source code clean.  To do that, any changes made by the distro are applied on top of the unmodified upstream code in the form of patches.  There are many tools designed specifically to make this easy for the package maintainers.

Below I’m going to show you how to turn your code change into a package patch that is easy for Ubuntu developers to add to the distro’s packages.  Only do this if your submitted branch is to a package in main and it hasn’t already been merged.

0) Check your source package format

The following instructions will only work on source packages using quilt 3.0 for managing patches.  Before you do anything else, check that the file debian/source/format contains the following:

3.0 (quilt)

 

1) Find your revisions

Starting from your existing code branch, we first need to identify which revisions in your branch we need to turn into a patch.  To do that, we simply check for revisions in your branch that don’t exist in the main one.  Here is what I used for geany:

bzr missing --mine-only ubuntu:geany

You just need to replace ‘geany’ with your application’s branch name (the same you bzr branched in my earlier articles).  The –mine-only will limit the result to only revisions in your branch just to keep things simple.  You’ll want to make note of the first and last revisions in this output.  If, like me, you only had one revision missing, that makes it even easier.

 

2) Generate the patch

Fortunately the package “bzr-builddeb” provides a command that makes this step easy.

mkdir -p debian/patches
bzr dep3-patch -d ubuntu:geany . > debian/patches/add_keywords.patch

Again, just replace ‘geany’ with your application’s branch name, and dep3-patch will find the differences in your branch and convert them into a patch file.

Now that you have a patch file, we need to add it to the list of patches for this package.  To do that, all you need is to add it’s name to the end of the debian/patches/series file like this:

echo add_keywords.patch >> debian/patches/series

 

3) Convert your source changes

Now that your changes are in a patch file, we need remove those changes from the source code itself.  This is where those revision numbers from step 1 come in, you will need the highest revision number and one less than the lowest.  Since I only had one revision, rev 32, my numbers are 32 and 31.

bzr diff -r 32..31 | bzr patch

This causes bzr to generate a reverse-diff of your changes (by going from the higher to the lower revision), and then apply that reverse-diff to your current code, effectively undoing your changes.

Now you need to apply your new patch file using quilt, so that quilt knows about it:

quilt push -a

Which should give you the following output if everything applies cleanly (if not, then your package is going to need some extra work, and you should ask for help from someone in #ubuntu-devel on freenode IRC).

Applying patch add_keywords.patch
patching file geany.desktop.in

Now at patch add_keywords.patch

 

4) Log your changes

Since you are making changes to the package itself now, you need to add that information to the debian/changelog:

export DEBFULLNAME="Michael Hall"
export DEBEMAIL="mhall119@ubuntu.com"
dch -i

You will, of course, want to replace my name and email with your own (Hint: you can put those 2 export lines into ~/.bashrc for future packaging work). This will create a new entry in the chanelog for you, with one higher version number.  All you need to do it add in the comments:

* Add search keywords to .desktop file (LP: #942154)

Be sure to use the proper bug number for your changes.  Also, if you are not running on Precise, you  will need to change the release target at the top of the file to ‘precise’.  Here’s what my new record looks like:

geany (0.21.dfsg-1ubuntu4) precise; urgency=low

* Add search keywords to .desktop file (LP: #942154)

-- Michael Hall <mhall119@ubuntu.com> Wed, 07 Mar 2012 14:40:32 -0500

 

5) Commit and push

Now it’s time to put everything back into your bzr branch.  First you need to add your patch file:

bzr add debian/patches/add_keywords.patch
bzr add debian/patches/series
bzr add .pc/

If your package branch didn’t already have a ‘series’ file, my instructions in step 2 will have created one, so I’m adding it here just in case.  If it already existed, bzr add won’t do anything.

Next, commit and push your changes back to your submitted branch:

bzr commit -m "Convert source changes into a package patch file"
bzr push lp:~mhall119/ubuntu/precise/geany/add_keywords

 

Read more
Michael Hall

It’s sometimes easy to talk about “Ubuntu developers” as if they are some faceless “others” who are separate from “Ubuntu users”.  But the reality is that the line between user and developer isn’t quite as clear as many people imagine.

In the response to my recent posts, this mixing of user and developer has become even more clear to me, and I wanted to share it with everybody.  These are the faces of some of the many non-developer users who make Ubuntu better for you.

Nekhelesh Ramananthan

Nekhelesh was one of the first contributors to respond to my postings, and he never slowed down.  He has contributed multiple additions of Quicklists and Keywords, improving the Unity integration for many popular applications.

Trenton Fox

Trenton was another early contributor, creating Quicklists for several of the applications I had targeted for better Unity integration.

David Baucum

David is a long-time member of of my own LoCo Team, so I was thrilled to see him submitting patches to Ubuntu apps.  He was also one of the first to have his contributions land in Ubuntu 12.04.

If you should happen to run into any of these guys online or in real life, be sure to thank them for making Ubuntu better for you.

Read more
Nicholas Skaggs


We're getting closer! The unity design list has been ablaze with discussions on unity recently. It's been great to watch and read. With that in mind, the unity developers have pushed out another point release for us to preview and test. Here's what's new:

  • A lot of bug fixes, especially in areas surrounding the HUD!
  • Unity-2d now includes HUD.
  • Compiz fixes -- including this awesome performance increase by Daniel https://bugs.launchpad.net/compiz-core/+bug/940139
  • Keybinding shortcut changes -- there was noise about switching the keybindings for switching workspace ones and moving windows. This has been reverted to the previous values again


Installing
Prerequisites: Make sure you are running the latest version of precise, and all your packages are up to date. Unfortunately this cannot be installed on oneiric or any previous ubuntu release. 

1) Add the unity ppa (https://launchpad.net/~unity-team/+archive/ppa). You can do this by issuing the following command:

sudo add-apt-repository ppa:unity-team/ppa

2) Update apt and run a dist upgrade -- this should prompt you to upgrade unity and some indicators as well as install checkbox-unity.

sudo apt-get update && sudo apt-get dist-upgrade

3) Restart your unity session by logging out and logging back in again.

Ok, hopefully the upgrade went smooth for you, but if not, head over to freenode #ubuntu-unity channel and let folks know what went wrong.

Testing
So, now that your up and running you can run the through the manual tests the unity team has prepared. Open the dash and type 'unity testing'. The Checkbox Unity Tests should launch. Checkbox will gather some information on your system and then ask you which tests you wish to run. Once complete you will see a link containing your system report and an option to publish it to launchpad. Use the text box below the link to enter your launchpad email address and then hit submit. This will ensure your results and feedback go to the unity developers.

Please ensure you have finished and submitted your testing results ASAP. As usual, the testing window will be closed at the end of this week in order to give the unity developers time to finish fixing the bugs found. Then Unity 5.6 will be pushed to precise.

Filing Bugs
Apport should automatically allow you to file crashes for any issues you find during testing. Please mention any bug reports you file in the comments of the failed tests. If you need to report a bug that didn't cause a crash, simply type 'ubuntu-bug unity' into a terminal window and follow the normal process.

Giving Feedback
If you'd like to give feedback on design for unity, Check out the awesome http://unity.ubuntu.com/getinvolved/ site. If your wanting to contribute code or patches, visit the folks on the #ubuntu-unity on freenode.

Getting Help
Don't hesitate to reach out to the wonderful folks on freenode @ #ubuntu-unity, the unity web site, the ubuntu+1 forums, or myself if you have questions. Thanks for helping test ubuntu!

Read more
Michael Hall

After all the terrific feedback and contributions we received from community contributors as a result of my Quicklists article, I’ve been asked to talk about how to contribute to improving another feature of Unity, the Applications Lens.

Search is the heart of the Unity Dash, and making search better is great way to contribute to the overall quality and usability of Ubuntu.  And just like Quicklists, there are ways you can do this without being a developer.  In this article, I will show you how to add Keywords to an application that will be used by the Dash’s search function.

Just like in my previous tutorial on Quicklists, I will once again be using Geany as my example application since it is one of my most-used programs.  Geany will be found in a search for “IDE” or “Development”, thanks to those words being in the Comment and GenericName fields of it’s .desktop file.  However, I think it should also be found in a search for “Code” and “Programming”, which it currently does not.

Step 0: File bug reports

This wasn’t part of the Quicklist tutorial, because I had already  filed bugs for the apps we were targetting.  But this time there is no list, so it’s up to you to make sure there is a bug report.  For ubuntu, you can file it against:

https://bugs.launchpad.net/ubuntu/+source/<source_name>/

It’s equally important to file a bug in the upstream’s Bug Tracker.  Refer to the stems up my post about upstreaming your quicklists for how to find your upstream.

Once you  have your bugs filed, post a link to them in the comments so that others know you are working on them.

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

If you followed the Quicklist tutorial, you’ll have already done this.  However, if your merge proposal hasn’t been accepted yet, it’ll be easier to do these changes on a clean branch.  You can give the name of a new directory for this checkout by running:

bzr branch ubuntu:geany ./geany-keywords

Step 2: Adding keywords

Again, just like with Quicklists, you first need to 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 Keywords item to the bottom of the file you shouldn’t have to worry about that.

Next you  should look for deprecated keyword fields.  ”Keywords” is a new part of the XDG specification, but your application may have already been using the desktop-specific field “X-GNOME-Keywords”.  If it does, go ahead and rename it to “Keywords”.  Also check for the existence of fields starting with an underscore, like “_Name”.  If your .desktop file has those, that means it’s probably setup for translations already, and you should use “_Keywords” instead, so that they can be translated as well.

For geany, there was no existing Keywords field of any kind, but it was setup for translations, so I used the following:

mhall@mhall-laptop:~/projects/Ubuntu/unity/quicklists/geany$ bzr diff
=== modified file 'geany.desktop.in'
--- geany.desktop.in	2012-02-24 19:30:41 +0000
+++ geany.desktop.in	2012-02-27 18:31:39 +0000
@@ -10,3 +10,4 @@
 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
+_Keywords=Code;Editor;Programming;

Step 3: Submitting to Ubuntu

Now you need to send your changes to Ubuntu.  This is very similar to what we did for Quicklists, but I’ve added one extra piece to the commit command.

bzr commit -m "Add Keywords to .desktop file" --fixes lp:942154
bzr push lp:~mhall119/ubuntu/precise/geany/add_keywords

By passing the –fixes flag, along with your Launchpad bug #, to the bzr commit command, you will automatically link your new branch with the bug report you created in step 0.

The next step is to once again propose that your changes be merged into the Ubuntu package. To do that, run the following command to open the Launchpad page for your new branch:

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: Submitting to Upstream

The final step is to send your changes upstream as well.  This is good practice whenever you are making changes, plus it makes it easier for Ubuntu’s package maintainers.  Since every upstream is different in how they want to get submissions, I recommend following my previous upstreaming tutorial for this step.

Read more
Michael Hall

There has been a fantastic amount of feedback and contributions being made by folks who have been following my recent posts, and we’ve already had some of those contributions landing in Ubuntu 12.04.  But we’re not done yet!

Ubuntu means “I am who I am, because of who we all are”.  In a very literal sense, Ubuntu is what it is, because of what other distros are.  We all bring together the best open source software from upstream developers, and we should all be giving our improvements back to those developers.  Unity may be the default desktop on Ubuntu, but it’s also been ported to ArchLinux and SuSe, and is making it way to Fedora too.  That means that your Quicklist contribution can help more than just Ubuntu, all you need to do is submit it upstream.

Step 1: Find your Upstream

While all of Ubuntu’s package sources use Launchpad, and are therefore all in the same place, your upstream developers will all of their own separate spaces.  Some are rather easy to find, for example Firefox is developed over on mozilla.org.  Others may use GitHub, SourceForge, or their own sites.  So you first task if to find out where the code is developed.

Step 2: Talk to your Upstream

Once you’ve found their development home, look for ways of contacting the developers.  Usually there will me an email/mailing list available, an IRC channel or a forum.  Whatever method they prefer, us it to ask the developers how they want you to submit your patch.  Most developers love being contacted by somebody who already has a patch written.

Step 3: Submit your changes

Depending on your upstream’s development process, they may want a patch file with your changes, or they might ask you to use their version control system of choice (svn, git, etc) to submit your change in a way that is easy for them to merge.  Some, especially Debian, may request a patch for the package itself.  This is why Step 2 is so important, you need to know how to submit it in order for it to be accepted.  Don’t worry if you don’t know how do what they want, ask them to help you learn it.  Again, developers like people who come to them with patches.

For Geany, I first found their website, geany.org, and from there a link to their Feature Tracker on SourceForge.  I also found their IRC channel, #geany on freenode, and was in contact with their developers there.  In the end, I was asked to create a fork of their code on GitHub, and submit my change as a Pull Request.

Step 4: Updated your Merge Proposal

Once you’ve submitted you changes upstream, leave a comment to that effect in your merge proposal.  Ubuntu developers don’t like to keep custom changes in Ubuntu, and your merge proposal is much more likely to be accepted if they know the change will eventually be made in the upstream project as well.

Step 5: Stay involved with your Upstream

If you were working on a program you like, don’t let this be the end of your contribution!  You now have experience making and submitting changes (to both Ubuntu and Upstream), and you are forming a relationship with the upstream developers.  Keep up with both of those, as they will be invaluable assets to you.

 

Read more
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
Nicholas Skaggs

How do I use Unity?

I know I use unity to launch applications and run a search thru an occasional lense, but I wasn't sure how else I might be using my ubuntu desktop. To solve my curiosity, I decided to watch my mouse movements and find out how I interact with the unity desktop. Does it help or hinder my workflow, etc. Check out the results below. The answer about which piece of unity I was using the most surprised me a bit. Looks like I <3 my indicators.  The first picture show both my desktops, with no background. In the second, I only show my left monitor with a background snapshot to show you where I was clicking and hovering in more detail in regards to unity itself :-)





To explain the picture a bit, the circles represent where my cursor stopped or rested, while the lines are my movements. You can see I am using the indicators often over the course of this hour. What I was actually doing (besides playing with this tool) was having a video meeting, writing some emails, browsing the web and a hacking around in a terminal session. This is pretty typical hour for me. If you want to make your own graph of your mouse usage habits, check out IOGraphica and share your own discovery about your unity habits.

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
Matt Fischer

Fun With Lenses and Scopes

I’ve been fooling around with lenses over the past couple of weeks in my spare time. My idea was to write a stock ticker lens/scope. I wrote a quick backend in python in an hour or so, but the lens/scope proved more difficult. The main issue was that as I made progress, Michael Hall announced Singlet and then Singlet 0.2. These were compelling enough to drop my work and start over. Initially I had some issues getting singlet based scopes to work (some of which I fixed), but then I got better at debugging them and figuring out file placement. (Of course after I was well into this project, Michael Hall announced another easier way of doing lenses and scopes!)

Announcing the Stock Quote Lens

The lens I’m pushing today is a stock quote & news lens and scope combo. It relies on Michael Hall’s singlet 0.2 and will only work for precise.

Here are some screenshots:
multi-symbols one_symbol

As you can see it has two modes. If you enter one symbol, you get a quote and news. If you enter more than one, you get quotes. I could not figure out a good wait to show news for multiple symbols in the constraints of a lens. However, all the icons are clickable and direct you to a page with more quote info and news for each ticker, so use that method to get more info. The icons themselves are static, they’re not real charts.

For now, this is US markets only and it’s only in English. Given the architecture, you could write your own scope back-end for this and populate results for the stock markets in whatever country you’re in.

Where to Get It

I pushed the code up to launchpad today. You can package it yourself, but I have not published the package. I will be doing so next week when I can get into the scopes packagers PPA. The package is published in the Scopes Packagers PPA. You can install it by doing:

sudo add-apt-repository ppa:scopes-packagers/ppa
sudo apt-get update
sudo apt-get install unity-stock-ticker-lens

You can also pull the code from bzr directly:

bzr branch lp:~mfisch/onehundredscopes/unity-stock-ticker-lens

Some tricks to debugging Unity scopes & lenses

These are some methods I used during development.

  1. Remember to run setsid unity and watch the terminal output. This is where you’ll see all your missing icons and broken .scope and .lens issues. You’ll need to re-run this when you change a .scope or .lens file IIRC.
  2. When debugging, fire up your scope in a terminal, then your lens in another terminal. Any errors or prints will dump to the terminal. Seeing a dumb error like a python indent error here is much more helpful than trying to use the scope and wondering why you have no output.
  3. If you want to run the scope/lens manually, be sure to kill the old processes first.
  4. Check your paths and dbus info. If the stuff runs fine manually, but won’t autostart, then something is wrong in your dbus service files.

PS – Thanks to Bob Davis for help with sourcing those icons.

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
Nicholas Skaggs

Unity 5.2: What's new, and a call for testing

It's been a few weeks since the last drop of unity, and now the unity team has readied the new version of unity 5.2. Let's walk through how to preview the new features unity 5.2 is bringing, and help test those features using checkbox! Checkbox allows you to get your feedback straight into the hands of the unity developers and report any problems your system may have with the new version of unity. First let's talk a little bit about what's new. Note that these features only exist for right now in Unity 3D.

  • Multi-monitor support
    • You will now see launchers on each of your monitor, and when you scroll across a monitor, you should feel some resistance in order to allow for you to use the launcher on that screen.
  • New screen edge detection
    • To invoke the launcher, you now need to push (or "scroll into") against the left of the screen, rather than hover for X seconds. No more hitting the back button in firefox and having the launcher pop up in your way!
Feedback is appreciated on these features especially. Utilize #ubuntu-unity on freenode and checkbox feedback form to let the developers know how they work for you.
      Installing

      Prerequisites: Make sure you are running the latest version of precise, and all your packages are up to date. Unfortunately this cannot be installed on oneiric or any previous ubuntu release. 

      Also, unity 5.2 did not ship with "the HUD" sadly. So if you have been testing the HUD you will need to use ppa-purge to remove and downgrade your packages. See this post for information on using ppa-purge if you need help doing so.

      1) Add the unity ppa (https://launchpad.net/~unity-team/+archive/ppa). You can do this by issuing the following command:

      sudo add-apt-repository ppa:unity-team/ppa

      2) Update apt and run a dist upgrade -- this should prompt you to upgrade unity and some indicators as well as install checkbox-unity.

      sudo apt-get update && sudo apt-get dist-upgrade

      3) Restart your unity session by logging out and logging back in again.

      Ok, hopefully the upgrade went smooth for you, but if not, head over to freenode #ubuntu-unity channel and let folks know what went wrong.

      Testing
      So, now that your up and running you can run the through the manual tests the unity team has prepared. Open the dash and type 'unity testing'. The Checkbox Unity Tests should launch. Checkbox will gather some information on your system and then ask you which tests you wish to run. Once complete you will see a link containing your system report and an option to publish it to launchpad. Use the text box below the link to enter your launchpad email address and then hit submit. This will ensure your results and feedback go to the unity developers.

      Please ensure you have finished and submitted your testing results ASAP. The testing window will be closed this Thursday at 8am UTC, in order to give the unity developers time to finish fixing the bugs found. Then unity 5.2 will be pushed to precise and coding on Unity 5.4 will begin.

      Filing Bugs
      Please file bugs against unity package in launchpad (https://bugs.launchpad.net/unity/+filebug). When filing, please make sure to tag your bug '5.2-rc1' and mention your running Unity 5.2-rc1 in your description.

      Final Thoughts
      Don't hesitate to reach out to the unity team on IRC #ubuntu-unity on freenode at any time or to follow the latest in unity development. Thanks for helping test ubuntu and unity!

      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