An example Mir desktop snap

We’ve made some progress in creating a confined desktop environment. Specifically, I have created a fully confined egmde snap:

This shows egmde running a few sample applications on Ubuntu Core on a Raspberry Pi 3B.

snap install --edge egmde-confined-desktop

The snap contains a few sample applications that can be launched as usual in egmde.

It is also possible for other snaps to connect using the “wayland” interface. In the above picture you can see the “photoviewer” example from the mir-kiosk-apps snap.

snap install --beta mir-kiosk-apps
snap connect mir-kiosk-apps:wayland egmde-confined-desktop:wayland
snap restart mir-kiosk-apps

There are some limitations as it is not currently possible for to launch applications that are not in the same snap. This is a known issue with snaps and there are plans to address it (I’ll update the snap when that becomes possible).

Memory Requirements

Here’s “top” from the system shown:

top - 14:36:59 up 3 min,  1 user,  load average: 1.71, 1.21, 0.53
Tasks: 138 total,   2 running, 136 sleeping,   0 stopped,   0 zombie
%Cpu(s): 26.5 us,  2.6 sy,  0.0 ni, 70.9 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem :   941912 total,    27688 free,   449636 used,   464588 buff/cache
KiB Swap:        0 total,        0 free,        0 used.   435620 avail Mem 

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                                                              
 1831 root      20   0  492160 284108  56168 R  72.5 30.2   1:56.03 stellarium                                                           
 1848 root      20   0  297420 124616  83312 S   0.0 13.2   0:11.65 qtcreator                                                            
 1809 root      20   0  237136  57036  42136 S   0.0  6.1   0:01.03 rssnews                                                              
 1394 root      20   0  221600  52128  39008 S   8.3  5.5   0:18.42 egmde                                                                
 1839 root      20   0   98444  34424  24468 S  32.8  3.7   0:49.98 neverball                                                            
 1164 root      20   0  894144  21492  11512 S   0.0  2.3   0:04.90 snapd                                                                
 1720 root      20   0    9404   4736   4020 S   0.0  0.5   0:00.13 sshd      

So it looks as though, even with stellarium it will run comfortably in 1Gb

Disk requirements

I’ve done nothing to optimize the size of the snap, but here’s “df”:

$ df -h | grep -v ^tmpfs
Filesystem      Size  Used Avail Use% Mounted on
udev            330M     0  330M   0% /dev
/dev/mmcblk0p2   58G  2.0G   53G   4% /writable
/dev/loop0       75M   75M     0 100% /
/dev/loop1      129M  129M     0 100% /lib/modules
/dev/loop5      129M  129M     0 100% /snap/pi2-kernel/78
/dev/loop2       40M   40M     0 100% /snap/core18/445
/dev/loop3      111M  111M     0 100% /snap/pi2-kernel/48
/dev/loop11      75M   75M     0 100% /snap/core/5881
/dev/loop4      6.0M  6.0M     0 100% /snap/pi3/22
/dev/loop10     6.2M  6.2M     0 100% /snap/pi3/27
/dev/loop7      308M  308M     0 100% /snap/egmde-confined-desktop/11
/dev/loop8       75M   75M     0 100% /snap/core/5869
/dev/loop9       75M   75M     0 100% /snap/core/5875
/dev/loop6       68M   68M     0 100% /snap/mir-kiosk-apps/44
/dev/loop12      26M   26M     0 100% /snap/mir-kiosk/564
/dev/mmcblk0p1  127M   30M   97M  24% /boot/uboot
cgmfs           100K     0  100K   0% /run/cgmanager/fs

You can see from the size of the mir-kiosk snap that Mir is a small part of egmde-confined-desktop most of which comes from the sample applications included.

The source for this snap is here:


I’ve tested egmde-confined-desktop successfully on Ubuntu Core 16, Ubuntu 16.04LTS, Ubuntu 18.04LTS and Ubuntu 18.10. (Unlike the previous egmde snap this is not limited to 18.04LTS.)

It fails to install on Fedora 29 (because snapctrl appears to be missing).

I’ve a report (thanks @Wimpress) of problems when installed on MATE. (I know Mir has previously had problems with the logind integration on this setup - I thought they were all served.)

1 Like

In another forum @Conan_Kudo says:

"This should be fixed in snapd-2.36-1.fc29, which should be hitting stable updates in less than a day.

“You can get it now by doing sudo dnf --enablerepo=updates-testing upgrade --advisory=FEDORA-2018-84d647b87e.”

@alan_g can you guide me to hide / change keyboard shortcut text and add custom app?
especially, where is the line of code to do that?

The egmde source is here: - the text is hard-coded in the wallpaper and launcher files, a PR making that configurable would be gratefully received.

The snap source is here: - that’s where the applications are pulled in from the archive. You can use that as a starting point for your own snap with your customised set of applications.