Egmde: desktop session


I have been writing about a simple example shell based on Mir: egmde. This shell is just the code needed to illustrate these articles and, maybe, inspire others to build on it but it is not intended to be a product.

At the end of the last article we could run egmde as a “desktop” and launch Wayland apps.

In this article we use the latest Mir 0.32 release to provide a desktop session from the greeter.


The code in this article needs Mir 0.32 or later. At the time of writing this only exists in mir-team/release PPA.

On Ubuntu use:

$ sudo apt-add-repository --update ppa:mir-team/release
$ sudo apt install g++ cmake pkg-config
$ sudo apt install libmiral-dev mir-graphics-drivers-desktop libfreetype6-dev libboost-all-dev
$ sudo apt install qtwayland5

The full code for this example is available on github:

$ git clone
$ git checkout article-4

Naturally, the code is likely to evolve, so you will find other branches, but this branch goes with this article. Assuming that you’ve MirAL installed as described above you can now build egmde as follows:

$ mkdir egmde/build
$ cd egmde/build
$ cmake ..
$ make
$ sudo make install

This will install egmde and a “.desktop” file that enables it as an option in the greeter.

You can now reboot and select “egmde” in the greeter when you log in again.

The code

Most of the changes since the last article are removing workarounds for Mir’s inability to use logind. The main things are:

  1. Use Mir 0.32
  2. Install a .desktop file:
$ cat /usr/share/wayland-sessions/egmde.desktop 
[Desktop Entry]
Comment=The example Mir server


so… i see the session in the greeter but i’m bouncing back to lightdm when i run the egmde session

That’s a shame!

lightdm is not the default on 7.10 or 18.04 (which is what I’ve tried). What system are you running?

[Edit] for differential diagnosis you could also try running egmde-desktop.

18.04 + lightdm, so i just changed to gdm3? and it does load… so it’s probably something wrong with lightdm?
i have the same problem with unity8 session / mir 0.32 + lightdm (bounce back to login) but marius said it worked for him but with sddm?

In the first instance I’d suspect Mir. would you log a Mir issue as it shouldn’t matter what the DM is. (And if you’re trying DMs could you include which ones work.)


weird… changed back to lighdm and now the session started. so… the only difference is that now i restarted the pc and the first time when it didn’t load i just logged out. so maybe you actually need to reboot? (i followed how to from this thread, after installing the next instruction is to logout to greeter).
closing the issue for the moment

That’s still odd though.

Maybe the greeter simply needs restarting after installing egmde? Or Mir?

Experiments are needed.

Thanks for the feedback!

I’ve changed the instructions to “reboot” and will investigate further when I have a chance.

1 Like

i did however find a “real” bug. the login works only the first time.

  1. login from the greeter in egdme session
  2. exit session “ctrl-alt-backspace” this will bring you back to the greeter
  3. try to login again

at least on lightdm (that’s what i have now) it only works the first time, i have to reboot the PC to be able to login into the egdme session again

Curious. On 17.04 (GDM) which is what I have “to hand” I can log out and back in repeatedly. (I’m sure I’ve done it on 18.04 too.)

1 Like