Locally Integrated Menus for Ubuntu 14.04 LTS

Over the last few months some of the Unity team members have been working hard to get some new features landed in time to be included in the Trusty Tahr due out this April.  One of the most important features that Marco Trevisan has been working on has been what we call “locally integrated menus,” which refers to having application menus appear in the application window title bar (“locally”) as opposed to in the top panel bar (“globally”).  You can choose to use this new configuration on larger screens or on the newer higher-DPI screens so application menus are closer to where you’re working, or you can choose the current configuration.  It will be your choice.  I can tell you I miss the local menus when I go use my machines running older versions of Ubuntu.  this is an exciting change.

I think Marco is better at describing the history and technical issues behind this effort. I recommend you read his post.

The user interface is a dynamic thing and a description of this change in words does not do it justice.  If you’d like to see the locally integrated menus in action, we’ve prepared an introduction video for your viewing enjoyment as well.

Kudos to Marco for his persevering work on this and to Brandon Schaefer and Chris Townsend for their reviews, testing, and support.

More Trusty Excitement

I have another bit of exciting news on the Ubuntu 14.04 LTS front.

dota2One  of the things we’ve done is managed to port the Simple Direct Media layer (SDL) to the Mir display server.  For those of you fortunate enough to not have a clue what the means, SDL is a portability layer used by many games, including many available on Valve’s Steam platform.  The consequences of that work is that a whole slew of really good games are going to be available immediately on Unity8 when it finally hits the desktop.

Wait!  There’s more.  SDL autodetects the actual video layer.  That means you can install a game from Steam on Unity7 running on X11 today on Ubuntu 13.10, and when you log in to your Unity8 session running on top of Mir on Ubuntu 14.04 LTS, it will just work.  Isn’t that just the bee’s knees?

There’s still more.  The SDL layer isn’t just used for games.  It’s used for professional applications like remote desktop interfaces and various visualizers.  They will all just work on the Unity8 desktop running on Mir.  I’m really excited by this, and you should be too, because it just might mean next year will really be the year of the Linux desktop. Heh.  Humour me.

The screenshot here is the game DOTA2 running on Mir, taken by Brandon Schaefer. He’s the wizard who did most of the work of making the wonderful and widespread SDL library work on Mir in cooperation with Valve and the SDL maintainers.  I’m sure it was tough having to play games during work hours, but he made the valiant effort out of a sense of duty when asked.  Unfortunately, now he has to get back to work fixing high-DPI issues in Unity7.

The Mir back end will be released with libSDL 2.0.2 in the very near future.

Edit: Brandon also has a video capture.

Progress on the Converged Desktop

It’s still very early days in Canonical’s efforts to unify the experience from phone to tablet to desktop to TV, but results are starting to trickle in.

Picture of Unity8 home screen

Unity8 home screen on a Lenovo Yoga 2 Pro

One of the side projects on my plate is a Unity8 login session you can install alongside the regular Unity7 desktop (or other desktops, your choice). The idea is to have a preview session available for the Trusty Tahr that lets Unity 8 developers and Touch App developers tune the experience on the desktop. For example, there’s evidently still some work to be done to make Unity8 useful on high-DPI screens like my Lenovo Yoga 2 Pro (3200×1800 pixels on a 13″ laptop).

Sorry for the potato. I haven’t got screen capture working yet so I had to use an actual physical camera. Early days. You can see the high-DPI issues in this picture.  For example, see the teeny-tiny indicators at the top?  Didn’t think so.

The cool thing about this session is it runs on the Mir display server with no X11 in sight. LightDM (the program that accepts your password and logs you in in Ubuntu) uses X11 to run the Unity7 greeter, then shuts it down gracefully and starts a Mir server, then uses Upstart to run a Unity8 session. Gee whiz.

Right now you could just install this from a PPA and go at it, but there are some big wrinkles that still need to be worked out. For instance, there’s no cursor support so mouse and trackpad support is a little troublesome (works swell with a touchscreen), and keyboard input seems to have no effect — Unity8 has been developed with phones and tablets in mind, they don’t generally have a mouse, trackpad, or keyboard. It’s OK, there are plans in the works to add those, and that’s one of the reasons we have this session at this point in the Ubuntu release cycle.

Also, there is no way to log off from Unity8 (phones and tablets don’t generally support that concept) so that pretty much requires a reboot of the whole system unless you have an SSH session open.

Finally, there seems to be some trouble actually launching applications. No worries, that’ll get fixed too.

I think this is pretty exciting. That’s why I’m letting you all in on this project in its infancy. The Ubuntu community deserves to be kept abreast of the coming excitement that will be available in Ubuntu 14.04 LTS.

The future looks very small.

I have a new toy. I didn’t get it because I’m hip, although I am, I got it because we’re trying to prepare Unity 7 on the Trusty Tahr (Ubuntu 14.04 LTS) for the next generation of hardware that will be sitting on everyone’s desk (or lap, or table in the coffee shop) within a few years. I got a laptop with a high-DPI (dots per inch) 4K display and a sensitive touchscreen.

This particular piece of furniture is a Lenovo Yoga 2 Pro, sporting a 3200×1800 pixel 10-touch touchscreen in a 13 inch form factor. That works out to a pixel density of about 280 pixels per inch, much more refined than my main laptop (a Lenovo ThinkPad T410, 1440×900 at 14 inches) which sits at 120 pixels per inch and the external monitor I have attached to it (a Benq FP22W, 1680×1050 at 22 inches) at 95 pixels per inch. Sure, spec ennui, but it’s germane to the topic here.

The problem is that out of the box, most GUI software assumes it’s running on a display device, regardless of its dimensions, with a dot pitch of 96 dots per inch. It’s true for Microsoft Windows and it’s true for GNU/Linux, although I’ve been out of the Apple Macintosh world long enough to plead ignorance there. I know it’s true of Microsoft Windows because the Yoga 2 Pro came with Microsoft Windows 8.1 preinstalled by the manufacturer, and I had a brief chance to test it out before I got to work. IE displayed web pages in teeny weeny characters, and when I opened COMMAND.COM (or whatever the name of the command console is these days) to create a rescue image, it defaulted to using 8×8 bitmapped fonts. The eyestrain finding the reconfiguration option felt like it caused my corneas to bleed.

We have the same problem in Ubuntu. When I installed a prelease image of Trusty on the Yoga 2 Pro the GRUB2 menu was so tiny I couldn’t read it (bitmapped fonts again). Fortunately, the default was sensible and the system booted OK. Unity 7, of course, was similarly unusable, as was the Terminal, the Browser, and pretty much everything else. Ouch.

The problem is rooted in the fact that it’s an invalid assumption that all display devices have a dot pitch of 96 pixels per inch. I already experience this with my dual monitor setup, but it’s less noticeable with 120 vs. 95 DPI. This is just not a valid assumption.

See, a character in a 12 point font needs to appear to be 12 points. That’s 1 pica. One sixth of an inch. The size of a 12 point character should not vary depending on the resolution of your monitor. There’s a caveat, though, in that when I said ‘appear’ what I meant was at a comfortable viewing distance. Turns out that for the best human interface we do in fact want the absolute size of text to change depending on the viewing distance so that there is a constant angle subtended by the display. Er, that means things that are father away need to be bigger so they seem the same size. Got it? Think: projectors. Turns out people use phones and tablets up close, so smaller is OK, but they use their laptops and desktops farther away so smaller is no good.

This is where I need a diagram as a visual aid, but I’m afraid my drawing skills have rusted out and are at the shop for repairs. If someone wants to contribute one, that’d be great.

So, what we need to do for Unity running on the desktop is to figure out the physical dot pitch for each physical display connected to the system, and calcluate the scaling factor that would convert to a fixed 96 pixels per inch, then scale the fonts by that much. Other metrics need to be expressed in terms of ems (another measure based on the current font size — a term that comes from the days of hot metal) and graphics scaled accordingly.

But wait, we don’t want to scale windows if we don’t have to. We don’t want to waste the “retina” display, we just want text to be readable (and controls to be usable). At this point, we’re looking at making sure the Unity Launcher, the Unity panel, the Quicklists, and the Shortcuts are all usable out of the box on a high DPI display, because I have one and I tell you it’s not too usable right now.

A lot of applications are not going to work perfectly on high DPI, including the browsers and the office suites. We’re thinking of adding some optional window scaling through Compiz to help out with those but time is rapidly flowing and there’s a lot of work to do. Stand by for updates. As always, patches are welcome.

Ubuntu Desktop Convergence

This is where it starts to get exciting, folks.  The future starts now.

Ubuntu is an operating system for the server, the cloud, the desktop, and the mobile device.  One single OS.  That makes it different from Apple’s OSes (Mac OS X on the desktop, iOS on the mobile) and Microsoft’s current OSes (Windows 8 on the desktop, Windows RT on the mobile, and Windows Server 2012 on the server and in the cloud).

screencap

Screenshot of Unity7 running on Mir (click to embiggen).

At least that’s the plan.  It’s not yet the reality because there isn’t really a shipping Ubuntu for mobile.  Sure, there’s lots of preview releases, but only a shipping version is a shipping version.

So what needs to be done before we have full convergence to a single OS?

Well, one of the things Canonical has been working on is a replacement for the venerable X11 display server traditionally used in most GNU/Linux environments.  They’re developing something they’ve called Mir, from the Russian мир meaning “world” or “peace” (but not “world peace”) and the name of the Soviet space station, in keeping with a general space-exploration theme in and around Ubuntu, for reasons.  It’s also a German language pronoun (first person singular dative case), as in “show me,” because the original architect was a German national.  Really, I’m making this up as I go along and if you’re not one of the tl;dr crowd consider yourself appreciated. This new display server has been discussed in great detail elsewhere and is under active development.  The important take away is that in order to run effectively on the mobile form factors, the X11 server needs to be replaced.

This is where Unity8 comes in to the picture.  You may have read elsewhere about “Unity Next”, which was a working title for the new Unity in the queue.  It’s now more formally known as Unity 8, because it supersedes the current Unity 7 as the one single Unity (there can be only one).  Unity 8 is designed to run natively on the Mir compositor, fancy term for what X11 called a display server.  That’s what will be on the mobile offering, currently dubbed “Ubuntu Touch”.  It’s also what will be on the desktop in the fully converged world.

A replacement for X11 is fine for a phone or a tablet and all, but Ubuntu already has a good thing going with the classic GNU/Linux milieu on the desktop, which is heavily dependent on X.  We can’t just throw all that away.  So, we need an X11 server running on top of the Mir compositor so all those legacy applications folks and grown to know and love will continue to run just like forever.  This is where something dubbed Xmir comes in to play:  It’s an x.org driver that fits in to the x.org X11 server just like the nVidia, AMD, and Intel drivers do and lets the X11 server run on top of Mir.  Cast your gaze at the screencap in this article:  you’re seeing Unity 7 running on Mir on Saucy (the clue is the unity-system-compositor line in the process tree seen in the screencap).  This is just like magic.  And, because accelerated graphics are still a work in progress, it’s mighty slow magic at this pre-release point.  Oh, and yes I see the crash reporter running in the process listing.  I do these things so you don’t have to.

What we’re going to do for the Saucy Salamander release of Ubuntu is make a Unity8 Desktop preview available for those who want to take it for a test drive.  You’re going to be able to choose to have the option of logging in to either a regular Unity7 session with X11 running, or a Unity8 session without X11.  And that, folks, is where the excitement starts.

Unity Maintenance for Ubuntu “Saucy Salamander”

Once again Canonical has tasked a team with performing maintenance of the Unity (desktop shell) stack for the upcoming Saucy Salamander release of Ubuntu.  Once again, the focus is on user interface polish and bug fixes.  My team was dedicated exclusively to that effort for the Ubuntu 13.04 release cycle and judging from the complaints in the media (and, um, elsewhere involving a naked truth few of us wish to see) about how there was nothing exciting in Unity and it just worked, it was a big success.  Kudos go to Andrea, Brandon, Chris, Marco, Nick, the tireless Sam, to John and Didier, and to the many other faceless members of the Ubuntu community who did what they did to make Unity snappy and smooth.

We shipped Unity 7.0 in Ubuntu 13.04.  The version we’re going to ship in Ubuntu 13.10 is Unity 7.1.

screenshot

Screenshot of “100 scopes” in action in Saucy Salamander (click to embiggen).

I don’t want to mislead you here:  there is some new functionality coming and in fact has already landed in release previews.  What most people will notice is something we’ve been calling “100 scopes”, which is a greatly expanded set of sources for your searches.  I’m not sure if there are actually one hundred sources or if it’s a good deal more or less, it’s just a name, but it does seem like there are significantly more data sources that are used to satisfy your queries.

One of the other aspects of this “100 scopes” work is that many of the back ends — processes that run in the background performing searches for you so the graphics user interface will continue to operate smoothly — were rewritten to reduce the amount of memory and CPU they consume.

Some of the other upcoming new functions being added include the ability to purchase items from their source directly through the Dash.  In other words, you can search for what you desire using the Dash, select a result, and purchase it directly from, say, Amazon, without even opening up your browser.

Some other changes are going on behind the scenes, mostly related to the exciting mobile-desktop convergence store that’s at the heart of Ubuntu’s future.  That, however, is another story for another day.

The bees are all wrapped snugly in their little home. hive-in-winter I used a modified water heater jacket and the handyman’s secret weapon to give them extra protection from the anticipated cold since it often goes below -30 C here for at least a few days and sometimes weeks here in winter, and the hive is a little bit exposed to the wind.

The snow is added insulation.

The only concern is about moisture inside the hive, especially with the hive entrance buried beneath the snow cover.  We’ll find out in the spring.