Previewing the New Unity

Canonical announced a while ago — maybe measurable in multiple dozens of months — that they were rewriting their flagship Unity desktop shell so it can converge the mobile phone and tablet experience with the desktop and laptop experience.  The new Unity is dubbed Unity 8, for which I apologize because the name was my suggestion and now sounds a little dated after both Apple’s Mac OS and Microsoft’s Windows are up to version 10 now.  Unity 8 has been shipping on phones and tablets for at least a year now but it isn’t quite ready for the more demanding desktop consumer yet.

This is where you come in.  Our current goal is to make the Unity 8 desktop available in the Ubuntu 16.10 release coming up this October as an alternative login session on the ISO (installation image).  Before we get even that far we want to get more widespread testing and feedback from daring and confident Ubuntu users, users like you.

Installing and testing is easy, and if you really don’t like it you can just remove it and carry on, no harm done.  I recommend using the command line to install the shell, because I haven’t yet figured out how to use Ubuntu Software to find and install the appropriate packages — I’m really not a GUI guy at heart.

Installing Unity 8

I’m going to assume you’re either running Ubuntu 16.04 LTS or the pre-release Yakkety Yak version of Ubuntu.  Those are the only Ubuntu versions that support Unity 8 on desktop at the moment.  The procedure is the same for both.

First, you need to open a command-line terminal.  From Unity, pressing the control-alt-T combination should do the trick, but advanced users may have their own favourite technique.  From the terminal, just type the following commands.

sudo add-apt-repository ppa:ci-train-ppa-service/stable-phone-overlay
sudo apt update
sudo apt install unity8-desktop-session

If you don’t have the command add-apt-repository, it’s in the package software-properties-common which you may need to install first.

That’s it.  Log out, then from the LightDM prompt click on the circle-of-friends logo beside your name and select the entry that says “Unity 8”, enter your password, and you’re good to go.  Unity 8 on the desktop, baby, yeah! screenshot20160704_110655089

Oh, a word of caution.  The proprietary binary blob video drivers from AMD, nVidia, and some VMs still do not support the Mir display server used by Unity 8, so you’re probably going to suffer a bit of disappointment.  Try using the open source video drivers for your card instead.

Reporting problems

Yeah, we know there are problems, that’s why Unity 8 is not the default on your desktop yet.  We know the window management is still a work in progress, that most of your favourite desktop programs aren’t available out of the box, and that there are still session management issues.

If you do run into a problem, errors get logged to various files in $HOME/.cache/upstart.

You can contact developers in the #ubuntu-unity irc channel on Freenode and file bugs in Launchpad (don’t forget to check to see if the bug has already been reported first).

Removing Unity 8

If you really don’t like Unity, or for some reason it’s messed up your system, the following commands will remove it and restore things to the way they were previously.

sudo apt-get remove unity8-desktop-session
sudo add-apt-repository --remove ppa:ci-train-ppa-service/stable-phone-overlay

 

Advertisements

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.

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.

Ubuntu Phone and the Ubuntu Desktop

Canonical announced today that there are phones running natively with the Ubuntu experience. I’m excited by this, because I think the Ubuntu experience on the phone is well thought out and coherent. I applaud the teams involved for their hard work and success in getting a working Ubuntu phone into peoples hands for some serious testing.

I’d also like to emphasize that the work that Canonical is doing for the phone form factor will not be affecting the work my team is doing on the Ubuntu desktop, at least not for Raring Ringtail. We have a single common Unity that runs across all the form factors, but part of the expression of Unity is that it works appropriately under different circumstances and what’s appropriate for the desktop is not always appropriate for the phone, and vice-versa. This is not Microsoft Windows 8, we’re not going to try to turn your desktop into a big touch-based phone without the dialy-talky bits. I fully expect improvements and enhancements that are a result of the work done for the phone to make their way onto the desktop over the next few releases, but for 13.04 we’re a team focused on bug fixes and usability enhancements.

But I am very excited about the phone.