Feed aggregator

Rafael Carreras: Vivid release party in Terrassa

Planet Ubuntu - Mon, 05/25/2015 - 05:49

Catalan LoCo Team celebrated on May 9th release party of the next Ubuntu version, in this case, 15.04 Vivid Vervet. Sorry abaout the delay reporting.

This time, we went to Terrassa, near Barcelona, thanks to our friends of the Nicolau Copèrnic School.

As always, we started explaining what Ubuntu is and how it adapts to new times and devices, along with speeches from the school director and a Terrassa Councillor really understanding the Ubuntu meaning.



Quite a lot of people registering for the party.


Raspberry Pi and Open Source Hardware on Ubuntu were both present at the party.


And in another room, LibreOffice.


And, of course, Ubuntu Phone as well.


A lot of time passed since we offered a speech on Gimp.


Local TV came and made a report for the evening news.

Eric Hammond: Debugging AWS Lambda Invocations With An Echo Function

Planet Ubuntu - Mon, 05/25/2015 - 01:03

As I create architectures that include AWS Lambda functions, I find there are situations where I just want to know that the AWS Lambda function is getting invoked and to review the exact event data structure that is being passed in to it.

I found that a simple “echo” function can be dropped in to copy the AWS Lambda event to the console log (CloudWatch Logs). It’s easy to review this output to make sure the function is getting invoked at the right times and with the right data.

There are probably dozens of debug/echo AWS Lambda functions floating around out there, but for my own future reference, I have created a GitHub repo with a four line echo function that does the trick for me. I’ve included a couple scripts to install and uninstall the AWS Lambda function in an account, including the required IAM role and policies.

Here’s the repo for the lambda-echo AWS Lambda function:


The README.md provides instructions on how to install and test.

Note: Once you install an AWS Lambda function, there is no reason to delete it if you think it might be useful in the future. It costs nothing to let Amazon store it for you and keep it available for when you want to run it again.

Amazon has indicated that they may prune AWS Lambda functions that go unused for long periods of time, but I haven’t seen this happen in practice yet.

Is there a standard file structure yet for a directory with AWS Lambda function source and the related IAM role/policies? Should I convert this to the format expected by Mitch Garnaat’s kappa perhaps?

Original article and comments: https://alestic.com/2015/05/aws-lambda-echo/

Stuart Langridge: Unhappy about SPA frameworks

Planet Ubuntu - Sun, 05/24/2015 - 15:38

I’ve been looking at single-page-app frameworks and not keen on any of them. The list at http://todomvc.com/ has a bunch, and I think I’ve rejected them all — I concede that some of these reasons are just flat-out prejudice or reasonably baseless bad feelings or seem pretty trivial to whoever’s reading, so this is your chance to talk me into something you think is good and show me why my bad feelings are unjustified or wrong.

What I’d like is two-way data binding, routing, and some notion of making separate isolated components. I don’t have a pure REST put/delete/get API to back end onto, and I do not want a “framework” which has as a selling point that you can switch different routing or template components in and out; if I’m assembling my own preferences out of bits, then I won’t use a framework at all; I’ll stitch them together myself. The point of using a framework is exactly that it does everything, and I’m OK with using the framework’s methods to do X, Y, and Z, rather than cursing because I want to use a different routing library. I am a large believer in identifying the approach that a particular tool takes, and not using the tool if what you want to do doesn’t match that approach, even if it’s possible to use the tool in ways other than its expected that you will. Every time I’ve done this in the past I’ve ended up being burned by it. The thing I want is to identify something which wants to do the things I plan, and then use it; not to find something which doesn’t want to work that way and then make it work that way instead.

So, convince me I’m wrong on your preferred choice from this list, or mention something I don’t know about. And yes, I could write my own, but I’m massively resistant to that because that just makes the another-day-another-framework problem even worse.

There is one non-negotiable rule: JavaScript. No other languages which compile to JavaScript. I don’t mind things like React’s JSX, because that’s being used to write HTML (although I’m not sure about it), but no Coffeescript libraries, please.

  • Backbone.js - also requires underscore and jquery. Some ideal thing for this really ought to be self-contained. Concerned about “is pre-configured to sync with a RESTful API” too, and I have to plug in my own choice of templating library.
  • AngularJS - used it in the past for things. It makes me sad. There’s too much magic; it’s fine until something doesn’t work, and then you have to reverse-engineer all the magic.
  • Ember.js - is massive and confuses the hell out of me. I did a bit of hacking on Discourse, which is Ember, and it took me about a day just to work out how to change the simplest thing.
  • KnockoutJS - seems way, way verbose. function AppViewModel() { this.firstName = ko.observable("Bert"); this.fullName = ko.computed(function() { ... }, this); } ko.applyBindings(new AppViewModel());, seriously? Gnah. I hate that.
  • Dojo - old. I never liked it the first time around, really, and I have the feeling that the zeitgeist has not gone with it.
  • YUI - old, and pretty much abandoned upstream afaik. Used it at Canonical; “aspect-oriented programming” is basically computed COME FROM from Intercal, which puts invisible trapdoors in your code so following the thread of control is hell on legs.
  • Knockback.js - builds on Knockout, so see knockout.
  • CanJS - models stuff seems specifically designed to back end to a put/get/delete rest API, which I don’t have.
  • Polymer - seems like it may be ropy on iOS. Also, it has a nice big library of pre-built components, which is great, but they’re all Material Design components, which is not great at all; I’m not putting an Android-themed app on other platforms, for the same reason I wouldn’t put an app which looks like iOS on Android.
  • React - I fear React. It seems to be the popular thing, but it’s very much a thing where one steps out of the world and into the React World instead. Have spoken to a number of people using it for real projects and I don’t like the idea of it.
  • Mithril - I utterly utterly do not understand the m.prop stuff. I don’t know whether the docs explain it badly or I’m just not getting it, but I completely cannot grasp the Zen of Mithril. Shame, because it looks cool, if I could get it, which I can’t.
  • Ampersand - I’m in two minds about the “it’s a zillion small libraries” thing. More to the point, I have no sense of how to structure the overall application; individual bits I can see how to do, but I don’t have a good sense of how to put it together
  • Flight - I’m not sure this is the right thing for new apps. For restructuring an existing thing, I think it’d be good, but I’m building from scratch.
  • Vue.js - doesn’t do routing or provide large-scale structure; they have some notes saying “hey, that means you can do it your way” which I don’t want to do
  • MarionetteJS - depends on Backbone, so see Backbone.
  • TroopJS + RequireJS - lots of dependencies. I do not get how to actually structure an application with it, and the docs are not helpful at this.

I wish I were happy about any of these. To be honest, my secret worry is that all frameworks are either incomplete, so I don’t want them, or do do everything I want but are consequentially too magical and so I don’t like them. I hope I’m wrong and there’s either something I’ve missed or a framework I don’t know about. Speak on, readers: leave comments on Google Plus or on your own site by webmention.

Sujeevan Vijayakumaran: 9th Ubucon 2015 in Germany

Planet Ubuntu - Sun, 05/24/2015 - 14:45

This year we're going to organize the 9th Ubucon in Germany. This time it will be held in the capitol Berlin starting on the 23th and ending on the 25th October 2015. I was a member of the organization team for the since 2013, but this year I am the head of the organisation team.

We also started the „Call for Papers“. The main language is German, but we might also allow talks in English. I'm really looking forward to the event. And I'm also hoping that more people will visit the Ubucon. In the last years we had roughly 100-150 attendees. This years slogan is „Community in Touch“, which includes the opportunity of getting in touch with the community and „Ubuntu Touch“.

Randall Ross: Introducing the Juju Charmer

Planet Ubuntu - Sun, 05/24/2015 - 13:24

Today, Ubuntu Vancouver is proud to release our newest ubuntu-themed cocktail: the Juju Charmer!

The Juju Charmer cocktail has been meticulously crafted to meet the highest quality standards of the Juju Charmers team and community Charmers everywhere. After a full development cycle including rigorous testing, an alpha, and a beta, and numerous reviews we've refined this cocktail to match the quality and consistency that one would expect from the best Charms. Best practices distilled and mixed!

We've also worked extra hard to ensure that the taste and colour of this beautiful cocktail is something that you, your friends, and your family can enjoy regardless of whether they've ever heard of ubuntu or juju.

In fact, when you enjoy a Juju Charmer together, you might just find that they get quite curious about the world's friendliest and most collaborative development project. They may even get curious enough to sample the freedom that you enjoy every day, thanks to ubuntu and juju.

So raise a glass and cheer "Juju" (joo-joo), or even "Ubuntu" (oo-boon-too) and watch heads turn. Watch people wonder what all the fuss is about.

A full-resolution image suitable for printing is available at http://www.ubuntuvancouver.org/jujucharmer. Why not print a few thousand of these cards and hand them out to bartenders everywhere? That's how ubuntu spreads.

:~$juju deploy spin


Special thanks go to Joe Liau, co-creator.
The creators wish to thank Marco Ceppi for his superb choice of rum and also Canonical's Juju Ecosystems team for graciously providing feedback and for adding enough units to ensure spin!

Colin King: comparing cpuburn and stress-ng

Planet Ubuntu - Sun, 05/24/2015 - 09:03
The cpuburn package contains several hand crafted assembler "burn" programs to load x86 processors and to maximize heat production to stress a system.  This also is the intention of the stress-ng "cpu" stress test which contains a variety of methods to stress CPUs with a wide range of instruction mixes.   Stress-ng is written in C and relies on the the compiler to generate efficient code to hopefully load the CPU.  So how does stress-ng compared to the hand crafted cpuburn suite of programs on modern processors?

Since there is a correlation between power consumed and heat generated, I took the liberty to measure the CPU package power consumption measures using the Intel RAPL interface as one way of comparing cpuburn and stress-ng.  Recent versions of powerstat supports RAPL, so I ran each stressor for 120 seconds and took CPU package power measurements every 4 seconds over this interval with powerstat.

So, the cpuburn "burn" programs do well, however, some of the stress-ng CPU stress methods seem to do better.   The best stress-ng CPU methods are: ackermann, callfunc, hanoi, decimal128, dither, int128decimal128, trig and zeta.  It appears that ackermann, callfunc and hanoi do well because these are very localised deeply recursive function calls, so I expect register save/restores and some stack activity is the main power consumer.  The rest exercise the integer and floating point units and memory load/stores.

As it stands, a handful of stress-ng CPU stressors aren't as good as cpuburn. What is noticeable is that burnBX on an i3120M seems to do rather well in terms of loading the CPU.

One conclusion to draw from this is that modern C compilers such as gcc (in this case, gcc 4.9.2) with a suitably chosen mix of stores, loads and integer/floating point operations can outperform hand written assembler in terms of loading the full CPU package.  When I have a little more time, I will try and repeat this experiment with clang and gcc 5

El Acheche Anis: A new time slot for the Memebership Board meetings

Planet Ubuntu - Sat, 05/23/2015 - 13:26

Earlier this month Kilos (a Membership Board member) started a discussion on the Membership Board ML about adding a new slot to the board, the proposition is to have 2 boards on the 1st Thursday of the month, the 1st by 20UTC and the 2nd by 22UTC as usual..

After discussing the idea for almost two weeks & after 4 days of the last email in that thread, I believe that everyone is now OK to add that 3rd slot..

So I changed the Membership Wiki Page adding the new slot:

If you're want to know more about the Ubuntu Membership please visit the link.


Andrea Corbellini: Elliptic Curve Cryptography: finite fields and discrete logarithms

Planet Ubuntu - Sat, 05/23/2015 - 07:08

This post is the second in the series ECC: a gentle introduction.

In the previous post, we have seen how elliptic curves over the real numbers can be used to define a group. Specifically, we have defined a rule for point addition: given three aligned points, their sum is zero (P + Q + R = 0). We have derived a geometric method and an algebraic method for computing point additions.

We then introduced scalar multiplication (nP = P + P + · · · + P) and we found out an “easy” algorithm for computing scalar multiplication: double and add.

Now we will restrict our elliptic curves to finite fields, rather than the set of real numbers, and see how things change.

The field of integers modulo p

A finite field is, first of all, a set with a finite number of elements. An example of finite field is the set of integers modulo p, where p is a prime number. It is generally denoted as , GF(p) or . We will use the latter notation.

In fields we have two binary operations: addition (+) and multiplication (·). Both are closed, associative and commutative. For both operations, there exist a unique identity element, and for every element there’s a unique inverse element. Finally, multiplication is distributive over the addition: x · (y + z) = x · y + x · z.

The set of integers modulo p consists of all the integers from 0 to p – 1. Addition and multiplication work as in modular arithmetic (also known as “clock arithmetic”). Here are a few examples of operations in :

  • Addition: (18 + 9) mod 23 = 4
  • Subtraction: (7 – 14) mod 23 = 16
  • Multiplication: 4 · 7 mod 23 = 5
  • Additive inverse: –5 mod 23 = 18
    Indeed: (5 + (–5)) mod 23 = (5 + 18) mod 23 = 0
  • Multiplicative inverse: 9–1 mod 23 = 18
    Indeed: 9 · 9–1 mod 23 = 9 · 18 mod 23 = 1

If these equations don’t look familiar to you and you need a primer on modular arithmetic, check out Khan Academy.

As we already said, the integers modulo p are a field, and therefore all the properties listed above hold. Note that the requirement for p to be prime is important! The set of integers modulo 4 is not a field: 2 has no multiplicative inverse (i.e. the equation 2 · x mod 4 = 1 has no solutions).

Division in modulo p

We will soon define elliptic curves over , but before doing so we need a clear idea of what x / y means in . Simply put: x / y = x · y–1, or, in plain words, x over y is equal to x times the multiplicative inverse of y. This fact is not surprising, but gives us a basic method to perform division: find the multiplicative inverse of a number and then perform a single multiplication.

Computing the multiplicative inverse can be “easily” done with the extended Euclidean algorithm, which is O(log p) (or O(k) if we consider the bit length) in the worst case.

We won’t enter the details of the extended Euclidean algorithm, as it is off-topic, however here’s a working Python implementation:

def extened_euclidean_algorithm(a, b): """ Returns a three-tuple (gcd, x, y) such that a * x + b * y == gcd, where gcd is the greatest common divisor of a and b. This function implements the extended Euclidean algorithm and runs in O(log b) in the wrost case. """ s, old_s = 0, 1 t, old_t = 1, 0 r, old_r = b, a while r != 0: quotient = old_r // r old_r, r = r, old_r - quotient * r old_s, s = s, old_s - quotient * s old_t, t = t, old_s - quotient * t return old_r, old_s, old_t def inverse_of(n, p): """ Returns the multiplicative inverse of n modulo p. This function returns an integer m such that (n * m) % p == 1. """ gcd, x, y = extened_euclidean_algorithm(n, p) assert (n * x + p * y) % p == gcd if gcd != 1: # Either n is 0, or p is not a prime number. raise ValueError( '{} has no multiplicative inverse ' 'modulo {}'.format(n, p)) else: return x % p Elliptic curves in

Now we have all the necessary elements to restrict elliptic curves over . The set of points, that in the previous post was {(x, y) ∈ ℝ2 | y2 = x3 + ax + b, 4a3 + 27b2 ≠ 0} ∪ {0}, now becomes:

where 0 is still the point at infinity, and a and b are two integers in .

The curve y2 = (x3 – 7x + 10) mod p with p = 19, 97, 127, 487. Note that, for every x, there are at most two points. Also note the symmetry about y = p / 2. The curve y2 = x3 mod 29 is singular and has a triple point in (0, 0). It is not a valid elliptic curve.

What previously was a continuous curve is now a set of disjoint points in the xy-plane. But we can prove that, even if we have restricted our domain, elliptic curves in still form an abelian group.

Point addition

Clearly, we need to change a bit our definition of addition in order to make it work in . With reals, we said that the sum of three aligned points was zero (P + Q + R = 0). We can keep this definition, but what does it mean for three points to be aligned in ?

We can say that three points are aligned if there’s a line that connects all of them. Now, of course, lines in are not the same as lines in ℝ. We can say, informally, that a line in is the set of points (x, y) that satisfy the equation (ax + by + c) mod p = 0 (this is the standard line equation, with the addition of “mod p“).

Point addition over the curve y2 = (x3 – x + 3) mod 127, with P = (16, 20) and Q = (41, 120). Note how the line y = (4x + 83) mod 127 that connects the points “repeats” itself in the plane.

Given that we are in a group, point addition retains the properties we already know:

  • Q + 0 = 0 + Q = Q (from the definition of identity element).
  • Given a non-zero point Q, the inverse –Q is the point having the same abscissa but opposite ordinate. Or, if you prefer, –Q = (xQ, –yQ mod p).
    For example, if a curve in has a point Q = (2, 5), the inverse is –Q = (2, –5 mod 29) = (2, 24).
  • Also, P + (–P) = 0 (from the definition of inverse element).
Algebraic sum

The equations for calculating point additions are exactly the same as in the previous post, except for the fact that we need to add “mod p” at the end of every expression. Therefore, given P = (xP, yP), Q = (xQ, yQ) and R = (xR, yR), we can calculate P + Q = –R as follows:

If PQ, the the slope m assumes the form:

Else, if P = Q, we have:

It’s not a coincidence that the equations have not changed: in fact, these equations work in every field, finite or infinite (with the exception of and , which are special cased). Now I feel I have to provide a justification for this fact. The problem is: proofs for the group law generally involve complex mathematical concepts. However, I found out a proof from Stefan Friedl that uses only elementary concepts. Read it if you are interested in why these equations work in (almost) every field.

Back to us — we won’t define a geometric method: in fact, there are a few problems with that. For example, in the previous post, we said that to compute P + P we needed to take the tangent to the curve in P. But without continuity, the word “tangent” does not make any sense. We can workaround this and other problems, however a pure geometric method would just be too complicated and not practical at all.

Instead, you can play with the interactive tool I’ve written for computing point additions.

The order of an elliptic curve group

We said that an elliptic curve defined over a finite field has a finite number of points. An important question that we need to answer is: how many points are there exactly?

Firstly, let’s say that the number of points in a group is called the order of the group.

Trying all the possible values for x from 0 to p – 1 is not a feasible way to count the points, as it would require O(p) steps, and this is “hard” if p is a large prime.

Luckily, there’s a faster algorithm for computing the order: Schoof’s algorithm. I won’t enter the details of the algorithm — what matters is that it runs in polynomial time, and this is what we need.

Scalar multiplication and cyclic subgroups

As with reals, multiplication can be defined as:

And, again, we can use the double and add algorithm to perform multiplication in O(log n) steps (or O(k), where k is the number of bits of n). I’ve written an interactive tool for scalar multiplication too.

Multiplication over points for elliptic curves in has an interesting property. Take the curve y2 = (x3 + 2x + 3) mod 97 and the point P = (3, 6). Now calculate all the multiples of P:

The multiples of P = (3, 6) are just five distinct points (0, P, 2P, 3P, 4P) and they are repeating cyclically. It’s easy to spot the similarity between scalar multiplication on elliptic curves and addition in modular arithmetic.
  • 0P = 0
  • 1P = (3, 6)
  • 2P = (80, 10)
  • 3P = (80, 87)
  • 4P = (3, 91)
  • 5P = 0
  • 6P = (3, 6)
  • 7P = (80, 10)
  • 8P = (80, 87)
  • 9P = (3, 91)

Here we can immediately spot two things: firstly, the multiples of P are just five: the other points of the elliptic curve never appear. Secondly, they are repeating cyclically. We can write:

  • 5kP = 0
  • (5k + 1)P = P
  • (5k + 2)P = 2P
  • (5k + 3)P = 3P
  • (5k + 4)P = 4P

for every integer k. Note that these five equations can be “compressed” into a single one, thanks to the modulo operator: kP = (k mod 5)P.

Not only that, but we can immediately verify that these five points are closed under addition. Which means: however I add 0, P, 2P, 3P or 4P, the result is always one of these five points. Again, the other points of the elliptic curve never appear in the results.

The same holds for every point, not just for P = (3, 6). In fact, if we take a generic P:

Which means: if we add two multiples of P, we obtain a multiple of P (i.e.: multiples of P are closed under addition). This is enough to prove that the set of the multiples of P is a cyclic subgroup of the group formed by the elliptic curve.

A “subgroup” is a group which is a subset of another group. A “cyclic subgroup” is a subgroup which elements are repeating cyclically, like we have shown in the previous example. The point P is called generator or base point of the cyclic subgroup.

Cyclic subgroups are the foundations of both ECC and RSA. We will see why in the next post.

Subgroup order

We can ask ourselves what the order of a subgroup generated by a point P is (or, equivalently, what the order of P is). To answer this question we can’t use Schoof’s algorithm, because that algorithm only works on whole elliptic curves, not on subgroups. Before approaching the problem, we need a few more bits:

  • So far, we have the defined the order as the number of points of a group. This definition is still valid, but within a cyclic subgroup we can give a new, equivalent definition: the order of P is the smallest positive integer n such that nP = 0.
    In fact, if you look at the previous example, our subgroup contained five points, and we had 5P = 0.
  • The order of P is linked to the order of the elliptic curve by Lagrange’s theorem, which states that the order of a subgroup is a divisor of the order of the parent group.
    In other words, if an elliptic curve contains N points and one of its subgroups contains n points, then n is a divisor of N.

These two information together give us a way to find out the order of a subgroup with base point P:

  1. Calculate the elliptic curve’s order N using Schoof’s algorithm.
  2. Find out all the divisors of N.
  3. For every divisor n of N, compute nP.
  4. The smallest n such that nP = 0 is the order of the subgroup.

For example, the curve y2 = x3 – x + 3 over the field has order N = 42. Its subgroups may have order n = 1, 2, 3, 6, 7, 14, 21 or 42. If we try P = (2, 3) we can see that P ≠ 0, 2P ≠ 0, …, 7P = 0, hence the order of P is n = 7.

Note that it’s important to take the smallest divisor, not a random one. If we proceeded randomly, we could have taken n = 14, which is not the order of the subgroup, but one of its multiples.

Another example: the elliptic curve defined by the equation y2 = x3 – x + 1 over the field has order N = 37, which is a prime. Its subgroups may only have order n = 1 or 37. As you can easily guess, when n = 1, the subgroup contains only the point at infinity; when n = N, the subgroup contains all the points of the elliptic curve.

Finding a base point

For our ECC algorithms, we want subgroups with a high order. So in general we will choose an elliptic curve, calculate its order (N), choose a high divisor as the subgroup order (n) and eventually find a suitable base point. That is: we won’t choose a base point and then calculate its order, but we’ll do the opposite: we will first choose an order that looks good enough and then we will hunt for a suitable base point. How do we do that?

Firstly, we need to introduce one more term. Lagrange’s theorem implies that the number h = N / n is always an integer (because n is a divisor of N). This number h has a name: it’s the cofactor of the subgroup.

Now consider that for every point of an elliptic curve we have NP = 0. This happens because N is a multiple of any candidate n. Using the definition of cofator, we can write:

Now suppose that n is a prime number (for reason that will be explained in the next post, we prefer prime orders). This equation, written in this form, is telling us that the point G = hP generates a subgroup of order n (except when G = hP = 0, in which case the subgroup has order 1).

In the light of this, we can outline the following algorithm:

  1. Calculate the order N of the elliptic curve.
  2. Choose the order n of the subgroup. For the algorithm to work, this number must be prime and must be a divisor of N.
  3. Compute the cofactor h = N / n.
  4. Choose a random point P on the curve.
  5. Compute G = hP.
  6. If G is 0, then go back to step 4. Otherwise we have found a generator of a subgroup with order n and cofactor h.

Note that this algorithm only works if n is a prime. If n weren’t prime, then the order of G could be one of the divisors of n.

Discrete logarithm

As we did when working with continuous elliptic curves, we are now going to discuss the question: if we know P and Q, what is k such that Q = kP?

This problem, which is known as the discrete logarithm problem for elliptic curves, is believed to be a “hard” problem, in that there is no known polynomial time algorithm that can run on a classical computer. There are, however, no mathematical proofs for this belief.

This problem is also analogous to the one used with RSA (it’s not a coincidence that they have the same name). The difference is that, with RSA, we use modulo exponentiation instead of scalar multiplication. RSA’s discrete logarithm problem can be stated as follows: if we know a and b, what’s k such that b = ak mod p?

Both these problems are “discrete” because they involve finite sets (more precisely, cyclic subgroups). And they are “logarithms” because they are analogous to ordinary logarithms.

What makes ECC interesting is that, as of today, the discrete logarithm problem seems to be “harder” for elliptic curves, if compared to the same problem with modulo exponentiation. This implies that we need fewer bits for the integer k in order to achieve the same level of security as with RSA, as we will see in details in the fourth and last post of this series.

More next week!

Enough for today! I really hope you enjoyed this post. Leave a comment if you didn’t.

Next week’s post will be the third in this series and will be about ECC algorithms: key pair generation, ECDH and ECDSA. That will be one of the most interesting parts of this series. Don’t miss it!

Canonical Design Team: To converge onto mobile, tablet, and desktop, think Grid Units

Planet Ubuntu - Sat, 05/23/2015 - 04:12

In the converged world of Unity-8, applications will work on small mobile screens, tablets and desktop monitors (with a mouse and keyboard attached) as if by magic. To achieve this transformation for your own app with little to no extra work required when considering the UI, simply design using grid units for a few predetermined virtual screen targets. Combined with Ubuntu off-the-shelf UI components built with convergence in mind, most of the hard work is done, freeing developers and designers to focus on what’s most important to their users.

What’s a grid unit? And why 40, 50, or 90 of them?

A grid unit (GU) is a virtual measure of screen space that’s independent of device hardware details like pixels or aspect ratio: those complexities are mapped under the covers by Ubuntu. Instead, by targeting just three ‘fixed’ virtual GU portrait widths—40, 50, and 90 GU— you’re guaranteed to be addressing the largest number of devices, including the desktop, to a high degree of design quality and consistency where relative spacing and content sizing just works.

The 40, 50, and 90 GU dimensions correspond to smaller smartphones, larger smartphones/phablets, and tablets respectively in portrait mode. These particular panel-widths weren’t chosen arbitrarily: they were selected by analyzing the most popular device specs on the market and picking the portrait dimensions that would embrace the largest number of possibilities most successfully, including for the desktop (more on that later).

For example, compact phones such as the BQ Aquarius E4.5 are best suited to the 40 GU-wide virtual portrait screen, offering the right balance of content to screen real estate for palm-sized viewing. For larger phones with more screen space such as the Meizu MX4, the 50 GU layout is most fitting, allowing more room for content. Finally, for edge-to-edge tablet portrait layouts for the N7 or N10, the 90 GU layout works best.

Try this exercise

Having trouble envisioning the system in action? Close your eyes and imagine a two-dimensional graph paper divided into squares that can adapt according to just three simple rules:

  • It can only be 40, 50, or 90 whole units along the short edge but the long edge can be variable
  • The long edge (in landscape mode or on the desktop) will be the whole number of GUs that carves out the maximum area rectangle that will fit within any given device’s physical screen in landscape mode based on the physical dimension of the GU determined from portrait mode (in pixels)
  • The last rule is simple but key: the squares of the graph paper must always be square—the graph paper, just to push the image a bit too far—is made of something more like graphene than polypropylene (no squeezed or stretched GUs allowed.)

Try it for yourself here: https://dl.dropboxusercontent.com/u/360991/canonical/grid-units/grid-units.html

There is one additional factor that can impact the final available screen area, but it’s a bit of a technical convolution. The under-the-covers pixels to grid unit mapping can’t include fractional pixels (this may seem like an obvious point, admittedly). But at the end of the day, the user sees the largest possible version of the 40, 50, or 90 GU wide virtual screen that’s possible on any given device. That means that all you have to do as a designer or developer is plan for the virtual dimensions we’ve been talking about, and you’re assured your user is getting the best possible rendering.

Though the system may seem abstract at first, the benefits of this system are all to easy to understand from a developer or designer standpoint: it’s far more predictable and simpler to design for layouts that follow rules rather than trying to account for a universe of idiosyncratic device possibilities. In addition, by using these layouts as the foundation, the convergence goal is much more easily achieved.

What about landscape & desktop? Use building blocks

By assembling these key portrait views together, it’s far easier to achieve landscape and desktop layouts than ever before. For example, if your app lends itself to a two panel layout, simply join together 40 and 50 GU phone layouts (that you’ve already designed) to achieve a landscape layout (or even a portrait tablet layout!)

Similarly, switching from portrait to landscape mode on tablet—also a desktop-friendly layout—could be as simple as joining a 40 GU layout and a 90 GU layout for a total of 130 GU, which fits nicely within both 16:9 and 16:10 tablet landscape screens as well as on any desktop monitor.

Since landscape and desktop layouts are the least predictable due to device variations and manual stretching by users, you can designate that of one of your panel layouts be of flexible width to fill the available space using one of these strategies:

  • Center the layout in the available space
  • Stretch or squeeze the layout to fit the available space
  • Combine these two, depending on the individual components within the layout

More complex layouts can also be achieved by joining three or more portrait layouts, too. For example, three 40 GU layouts can be joined side by side, which happen to fit perfectly into a 4:3 landscape tablet screen.

Columns, too

To help developers even further with one of the most common layouts—columnar or grid types—we’re adding a capability that maintains column-to-content size relationships across devices and the desktop the same way that type sizes are specified. This makes it very simple to achieve the proper content readability and density regardless of the device. For example, by specifying a “medium” sized column filled with “small” type, these relative relationships can be preserved throughout the converged-device experience without having to manually dig into pixel measurements.

The column capability can also adapt responsively to extra wide, variable landscape layouts, such as 16:10 aspect ratio tablets or manually stretched desktop layouts. This means that as more space becomes available as a user stretches the corners of the app window on the desktop, additional columns can be added on cue, providing more room for content.

Putting it all together across all form factors

By making screen dimensions virtual, we can minimize the vagaries of individual hardware specs that can frustrate device-convergent thinking and help developers focus more on their user’s needs. A combination of snap-together layouts, automated column layouts, and adaptive UI toolkit components like the header, list component, and bottom edge component help ensure users will experience a consistent, elegant journey from mobile to desktop and back again.




José Antonio Rey: UbuConLA 2015: Call for Papers // UbuConLA 2015: Llamado a Charlas

Planet Ubuntu - Thu, 05/21/2015 - 09:26


¡Y llega la hora del año en la que abrimos el llamado a charlas para la UbuConLA 2015!

La conferencia se va a realizar en Lima, Perú el 7 y 8 de agosto. Tendremos slots para ponentes en Inglés y Español, con charlas en formato Plenario y Workshop.

El día miércoles se va a abrir el registro de asistentes, donde se publicará más información sobre la conferencia.

Si deseas proponer una charla, por favor rellena el siguiente formulario.


And it’s this time of the year when we open the UbuConLA 2015 CFP!

The conference will take place in Lima, Peru, the 7th and 8th of August. We’ll have slots for speakers in both English and Spanish, with Plenary and Workshop talks.

The attendee registration will open on Wednesday, where more information about the conference will be published.

If you want to propose a talk, please fill out the following form.

Sean Davis: LightDM GTK+ Greeter 2.0.1 and Settings 1.2.0 Releases

Planet Ubuntu - Wed, 05/20/2015 - 20:00

LightDM GTK+ Greeter and it’s accompanying configuration application have been updated!  A number of bugs have been fixed in the greeter, and a new multihead configuration dialog has been added to LightDM GTK+ Greeter Settings.

New in LightDM GTK+ Greeter 2.0.1
  • New Features
    • Support for multiple configuration files (LP: #1421587)
  • Bugs Fixed
    • Multihead setup: black/white/grey screen at startup (LP: #1410406, #1426664, #1449567, #1448761)
    • Switching active monitors with Onboard on-screen can leave it’s window in an invalid state
    • Onboard does not react to mouse clicks
    • Window focus is lost after changing monitor configuration
    • Every lock activates a new virtual terminal with GTK 3.16 (LP: #1445461)
    • Broken delayed autologin (LP: #854261)
    • Message label can remain hidden when it must be visible (GTK: #710888)
New in Greeter Settings 1.2.0
  • Support for LightDM GTK+ Greeter 2.0.1
  • New Features
    • xembed mode: Run app without privileges if pkexec fails
    • New multihead setup dialog
    • Support for multiple configuration files (see above)
  • Bugs Fixed
    • Infinite loop in IndicatorsEntry (LP: #1435635)
    • Table column title hard to understand (LP: #1428224)
  • New and Updated Translations
    • Arabic, Brazilian Portuguese, Catalan, Croatian, Finnish, French, German, Japanese, Lithuanian, Polish, Portuguese, Russian, Serbian, Spanish
Screenshots Downloads

The latest versions of LightDM GTK+ Greeter and Settings can be downloaded from Launchpad:

Both applications will be updated for supported Ubuntu releases at the Stable PPA this week, and will make their way into Ubuntu 15.10 as regular updates.


Thanks to all the translators who have worked diligently to translate these projects into their native languages.  Also, a huge thanks to Andrew P., who has largely taken over maintenance of the greeter and is solely responsible for the existence of the settings application.

If you want to contribute to these projects, head over to each project page on Launchpad:

Laura Czajkowski: What I’ve learned from working from home in a distributed team and organisation

Planet Ubuntu - Wed, 05/20/2015 - 14:24

Working from home in a distributed team within and organisation can definitely be a plus but with it comes some hurdles to get used to. This is my 3rd role in which I’ve been fortunate to have the ability to work from home (WFH) and I personally love it. No more dealing with crazy morning starts fighting to get on the train and then battling to get a seat. Instead each morning I go into my home office and start work.

For me it’s ideal and I still have the option of going to London when needed to the office to meet people. Best of both worlds really. It does take some getting used to and for some it’s not suitable as they need the office style environment. The benefit of being able to work from my garden during the summer when it’s hot is an added bonus of not having to deal with working indoors!

Things I’ve found that work

Creating an office space – carving out something that I consider my work place. Where I can do my job and close the door away from distractions has been very good especially when there are others in the house.

Daily conversations with your team – have one central place that you join daily and say hi. Hang out there and ask questions. You’d do this in real life in the canteen or going for lunch so you need to try and find in your virtual world. The best example of this was when I worked on Canonical. Everyone from HR to Payrole, Engineers to CEO were on IRC so you could ping them and ask them questions. It was really great to see people with various technical abilities all in one place. It was the online office!

Be professional! Don’t work from home in your Pjs! Get up and get to your desk. One tip I was told years ago when I worked for GE was have a mirror on your desk that way when you talk to someone you don’t see you are can see the faces you make and this is conveyed over the phone by your tone.

Obstacles to over come

The biggest thing I’ve found hard to wrap my head around is the amount of tools each team or person uses. Nobody seems to want to standardise the tools!

One day you are having meetings using one tool and the next day you have to download another tool and get it to work. On a given day I use hip chat for my team conversations, Skype for calls, Bluejeans for group calls or GoTo meeting and then there are the conversations I have on hangouts. Each are interchangeable depending on which team you work with. I have found more engineering types of people use one tool over another compared to Sales and Marketing but perhaps this is just because people work a certain way.

Frustrations of communicating and following up on items! In organisations that are spread out you need to track what’s being done where and when, and any activity linked to it. This can be done via RT, Jira, burn down charts, khanban boards. What ever it is again it should be set in stone in a company this is the tool we use. All teams no matter their discipline should use them. Asking people to send requests via email is not scalable, it leads to items not being done and it’s not possible to get an overview on how progress is being made.

People assume when you work from home it’s ok to pop over. It’s not and that’s often hard for them to understand. You have a working day and when you have guests they assumed you can just down tools. It’s not as easy as that and best to just close the door however rude it may seem, you wouldn’t do this to someone who was in an office.

Downside to timezones and people being in various locations and needing to talk to people in different teams means you often have early morning or late night calls. Avoid being on late always try and alternate with people so the onus doesn’t always fall to the same people to stay back late. They have a life also. If you do have to ask someone to stay back for a meeting in their timeszone even if it’s for lunch, make sure you say Thank you, show some appreciation. It makes a difference.

Things that are hard!

I struggle daily to take a break or get up and stretch things you’d take for granted when working in an office environment. Take that lunch break, I’ve started to walk Bash in this time as has become useful to getting me to leave my desk!

Closing the lid and logging off. I think this is next to impossible. All Geeks are connected now more so than ever before, twitter, facebook, skype email notifications it’s harder to separate work from non work so you remain connected. Try and avoid to replying to mails late at night it means you’re always on and always reachable and people get used to that.

Being visible – This is tricky how do you let the powers that be know that you’re working and accomplishing a lot. If you go for that promotion you want to be in with a fair chance and not have the fact you WFH and not based in HQ held against you. I think this is the hardest bit for a person who works from home is up against. It’s great to get the job but for many organisations the ability to change to other roles is dependent on your location.

The list isn’t exhaustive it’s based on my experience over the last 5 years. I do love working from home with my snoring little pug Bash and wouldn’t change it for anything. I’m sure over time I’ll come across obstacles or find other things that work well. Many organisations are moving towards WHF and it does work – but it’s also dependent on the person. It’s not for everyone. 

Randall Ross: We're Going to Party in a Charming Way!

Planet Ubuntu - Wed, 05/20/2015 - 11:58

Folks, I've noticed many of you are either in Vancouver or on your way to party with us. That's a good thing!

Our party is tomorrow (Thursday May 21st). You've made the right decision to join us.

Tickets are going fast. I recommend that you grab some while you can.

Remember the Ubuntini? On Thursday, we'll be unveiling something the world has not seen (or tasted) yet; the perfect encore to our now globally famous Ubuntini.

Be there for the world premiere of our latest ubuntu-themed cocktail!

Wear orange, dress as a cosmonaut, or simply come as you are. We're going to dance, socialize and celebrate the community that is ubuntu.

See you soon.

Jonathan Riddell: Protocols Plugfest Europe 2015

Planet Ubuntu - Wed, 05/20/2015 - 09:06

Last week I had the pleasure of speaking at Protocols Plugfest Europe 2015.  It was really good to get out of the bubble of free software desktops where the community love makes it tempting to think we’re the most important thing in the world and experience the wider industry where of course we are only a small player.

This conferences, and its namesakes in the US, are sponsored by Microsoft among others and there’s obviously a decent amount of money in it, the venue is a professional conference venue and there’s a team of people making sure small but important details are taken care of like printed signposts to the venue.

What’s it all About?

In 2008 Microsoft lost an EU antitrust case because they had abused their monopoly position in operating systems.  This required them to document their file formats such as MS Office and protocols such as SMB.  This conference is part of that EU requirement meaning they have to work with anyone who wants to use their formats and protocols.  They have a website where you can file a request for information on any of their documents and protocols and everyone said they were very responsive in assigning engineers getting answers.

Since 2008 Microsoft have lost a lot of ground in new areas in the industry such as mobile and cloud.  Because they’re not the dominant player here they realise they have to use formats and protocols others can use too otherwise they lock themselves out.

The Talks

I spoke about Interoperability on the Linux Desktop which seemed well received, the reason Linux desktop hasn’t taken off is there are many other systems we need to interoperate with and many of them don’t want to interoperate with us. (Of course there are financial reasons too.) It was well received with many people thanking me for a good talk.

I went to talks by people working on Samba, LibreOffice and Kolab which all gave pleasing insight into how these project work and what they have to do to workaround complex proprietary protocols and formats.  LibreOffice explained how they work with OpenDocument, they add feature and for any feature added they submit a request for it to be added to the standard.  It’s a realistic best practice alternative.

I went to a bunch of Microsoft talks too about changes in their file formats, protocols and use of their cloud service Azure.

The inter-talks

It was great meeting some people from the free software and MS worlds at the conference.  I spoke to Christopher about how he had been hired to document SMB for MS, to Dan about taking over the world, to Miklos about LibreOffice and many others.  On the MS side I spoke to Tom about file formats, Darryl about working with Linux, to Jingyu about developing in MS.

I hope I won’t offend anyone to say that there’s a notable culture difference between the open source and the MS sides.  Open Source people really do dress scruffy and act socially awkward.  MS people reminded me of the bosses in Walter Mitty, strong handshakes, strong smiles and neat dress.

culture difference

One part of the culture that depressingly wasn’t difference was the gender ratio, there was only half a dozen women there and half of those were organising staff.

The Microsoft people seemed pretty pleased at how they were open and documented their protocols and formats, but it never occurred to them to use existing standards.  When I asked why they invented OOXML instread of using OpenDocument I was told it was “MS Office’s standard”.  When I asked if Skype protocols were open they seemed not to know.  It probably doesn’t come under the EU court requirements so it doesn’t interest them, but then all their talk of openness is for nothing.  When I suggested Skype should talk XMPP so we can use it with Telepathy I was given largely blank faces in return.

Talking to Samba people and OpenChange people about my opinion that their products should be stop gaps until a better open protocol can be used was met with the reasonable argument that in many cases there are no better open protocols.  Which is a shame.

I went into the MS testing lab to test some basic file sharing with Samba and reminded myself about the problems in Kubuntu and discovered some problems in Windows.  They had to turn off firewalls and twiddle permissions just to be able to share files, which was something I always thought Windows was very good at.  Even then it only worked with IP address and not browsing.  They had no idea why but the Samba dudes knew straight away that name browsing had been disabled a while ago and a DNS server was needed for that.  Interesting the MS interoperability staff aren’t great at their own protocols.


I had a great time in Zaragoza, only spoiled by travellers flu on the last day meaning I couldn’t go to the closing drinks.  It’s on the site of a 2008 world fair expo which feels like one of those legacy projects that get left to rot, 2008 wasn’t a great year to be trying to initiate legacy I think.  But the tapas was special and the vermut sweet.  The conference timetable was genius, first day starts at 9:00 next at 10:00 and final at 11:00.  The Zentyal staff who organised it was very friendly and they are doing incredible stuff reimplementing exchange.  It’s lovely to see MS want to talk to all of us but they’ve a way to go yet before they learn that interoperability should be about an even playing field not only on their terms.



Rhonda D'Vine: Berge

Planet Ubuntu - Wed, 05/20/2015 - 02:21

I wrote well over one year ago about Earthlings. It really did have some impact on my life. Nowadays I try to avoid animal products where possible, especially for my food. And in the context of vegan information that I tracked I stumbled upon a great band from Germany: Berge. They recently started a deal with their record label which says that if they receive one million clicks within the next two weeks on their song 10.000 Tränen their record label is going to donate 10.000,- euros to a German animal rights organization. Reason enough for me to share this band with you! :)
(For those who are puzzled by the original upload date of the video: Don't let yourself get confused, the call for it is from this monday)

  • 10.000 Tränen: This is the song that needs the views. It's a nice tune and great lyrics to think about. Even though its in German it got English subtitles. :)
  • Schauen was passiert: In the light of 10.000 Tränen it was hard for me to select other songs, but this one sounds nice. "Let's see what happens". :)
  • Meer aus Farben: I love colors. And I hate the fact that most conference shirts are black only. Or that it seems to be impossible to find colorful clothes and shoes for tall women.

Like always, enjoy!

/music | permanent link | Comments: 3 |

Daniel Holbach: More Help App design ponderings

Planet Ubuntu - Tue, 05/19/2015 - 23:53

Daniel McGuire is unstoppable. The work I mentioned yesterday was great, here’s some more, showing what would happen when the user selects “Playing Music”.


More feedback we received so far:

  • Kevin Feyder suggested using a different icon for the app.
  • Michał Prędotka asked if we were planning to add more icons/pictures and the answer is “yes, we’d love to if it doesn’t clutter up the interface too much”. We are going to start a call for help with the content soon.
  • Robin of ubuntufun.de asked the same thing as Michał and wondered where the translations were. We are going to look into that. He generally like the Ubuntu-like style.

Do you have any more feedback? Anything you’d like to look or work differently? Anything you’d like to help with?

Stuart Langridge: Burning trees

Planet Ubuntu - Tue, 05/19/2015 - 16:58

Today I made a little thing, which I find rather more fascinating than I probably should. You see, Joey said, “I wonder if this still works?”

That’s quite cool — sand dunes in front of a clock — and it made me remember that years and years ago you used to get these programs where you could click and it would create sand which accumulated at the bottom of the window. The very first one I saw was on the Archimedes. But what came along a little later was one where you could click to produce various different substances — sand, oil, water, fire — and oil floated on water, fire set the oil alight, and so on. It was all rather amazing back when the phrase “particle system” hadn’t been invented. Anyway, I thought: hey, what’d be cool is if the clock in that picture was obscured by actual moving sand, rather than just a static picture of sand dunes. A tiny bit of poking around brought me to Dust, an implementation of precisely the sand/oil/water thing with WebGL in the browser. So I completely forgot about the clock thing and just played with Dust. Which is rather fun.

After some faffing around I discovered that it had two things I liked: “lava”, which is like a static piece of fire in that it ignites things that touch it but is not itself consumed, and “Life Itself” which is stuff that grows, like bacteria in a petri dish. But the life stuff is ignited by lava. so if you drop a couple of tiny bits of lava into the world, and then some green fungus life stuff, the fungus grows and takes over the whole window until it touches the lava, and then it gets burned up and vanishes… but, critically for this, it isn’t entirely consumed. A few specks remain, and those specks start growing again. Very cool. I spent ages just watching it!

Then I thought, well, this is nice and all, but this Dust thing uses WebGL, which is hassle, and it can’t actually cope with filling its whole window up with particles because it runs out of memory or space or shaders or something. So I figured I’d lash together a quick version myself.

Burning Trees on jsbin.com

And lo, it is so: a noddy version in JavaScript. This is superbly inefficient; it regenerates the whole grid and then innerHTMLs it into the page at every clock tick, and it’s completely character-based, like some sort of BBC Micro program. (At least it’s using requestAnimationFrame so it doesn’t hammer the CPU in a background tab!) But I could still sit there and watch it for ages. I really like it; the sense of watching the green take over and then get burned back.

I think what I’d like to do with it is make it considerably more efficient and then try to make it a sort of “live wallpaper” for my Ubuntu desktop. For that, I need to read about Life rendering algorithms; this Life implementation at pmav.eu uses a JS port of Tony Finch’s List Life algorithm to do the calculations. There’s also Golly, the Life simulator, which can do things ridiculously fast, and it’s possible to program your own ruleset (rather than just follow John Conway’s original rules), and if I understood how to do this (I do not) then I could probably turn my little Burning Trees thing into something that’s renderable by Golly at a much bigger size than my inefficient JavaScript can manage. There seems to be a quite large community of people working on Life, still, to my amazement. Where do these people hang out, I wonder? So I can ask them how to write a Golly ruleset. And then see if I can make Golly run fullscreen and render to the root window and have the coolest desktop background imaginable, especially once it’s graphics rather than block characters, and maybe the green is different colours depending on how old it is, and the fire has a slightly cooler effect, and… well, you can see, I like this idea, so making it look pretty would be wonderful. Maybe I’ll even put a clock behind it. But if I did it’d either be this one which I pinched from an imgur idea or my favourite clock that I wrote, which is this:

Stuart’s cool clock on jsbin.com

Anyway, none of this is what Joey wanted. Sorry, Joey. I hope the thing you wanted still works, even if it is waaaay complex to set up. Someone should step up and make that easier for you, because I like it when we have pretty things, and there aren’t enough of them on our desktop.

Call for UbuCon Speakers at SELF

The Fridge - Tue, 05/19/2015 - 11:31

Ubuntu is sponsoring the South East Linux Fest this year in Charlotte North Carolina, and as part of that event we will have a room to use all day Friday, June 12, for an UbuCon. UbuCon is a mini-conference with presentations centered around Ubuntu the project and it’s community.

I’m recruiting speakers to fill the last three hour-long slots, if anybody is willing and able to attend the conference and wants to give a presentation to a room full of enthusiastic Ubuntu users, please email me at mhall119@ubuntu.com. Topic can be anything Ubuntu related, design, development, client, cloud, using it, community, etc.

Originally posted by here by Michael Hall on May 19, 2015


Subscribe to Ubuntu Arizona LoCo Team aggregator