As people who have followed the work on sandboxed applications know, we have promised a developer preview for GNOME 3.16. Well, 3.16 has now been released, so the time is now!

I spent last week setting up an build system on the GNOME infrastructure, and the output of this is finally available at:

http://sdk.gnome.org/repo/

This repository contains the gnome 3.16 runtimes, org.gnome.Platform, as well as a smaller one that is useful for less integrated apps (like games) called org.freedesktop.Platform. It also has corresponding develoment runtimes (org.gnome.Sdk and org.freedesktop.Sdk) that you can use to create applications for the platforms.

This is a developer preview, so consider these builds weakly supported. This means I will try to keep them somewhat updated if there are major issues and that I will keep them API and ABI stable. I will probably also pick up at least some 3.16.x minor releases as they are released.

I also did the first official release of xdg-app. For easy testing this is available for Fedora 21 and 22 as a copr repo.

Testing the SDK

Using the repo above makes it really easy to test this. Just install the xdg-app package from copr, log out+in (needed update the environment for the session), then follow these instructions (as a regular user):

Install the Gnome SDK public key into /usr/share/ostree/trusted.gpg.d, (or alternatively, use –no-gpg-verify when you add the remote below). Install the basic Gnome and freedesktop runtimes: $ xdg-app add-remote --user gnome-sdk http://sdk.gnome.org/repo/ $ xdg-app install-runtime --user gnome-sdk org.gnome.Platform 3.16 $ xdg-app install-runtime --user gnome-sdk org.freedesktop.Platform 1.0 Optionally install some locale packs: $ xdg-app install-runtime --user gnome-sdk org.gnome.Platform.Locale.se 3.16 $ xdg-app install-runtime --user gnome-sdk org.freedesktop.Platform.Locale.se 1.0 Install some apps from my repository of test apps: $ xdg-app add-remote --user --no-gpg-verify test-apps https://people.gnome.org/~alexl/test-apps/repo/ $ xdg-app install-app --user test-apps org.gnome.gedit $ xdg-app install-app --user test-apps org.freedesktop.glxgears Run the apps! You should find gedit listed among the regular applications in the shell as it exports a desktop file. But you can also run them manually like this: $ xdg-app run org.gnome.gedit $ xdg-app run org.freedesktop.glxgears I also packaged the latest gnome builder from git. It requires the full sdk which takes a bit longer to download: $ xdg-app install-runtime --user gnome-sdk org.gnome.Sdk 3.16 $ xdg-app install-app --user test-apps org.gnome.Builder

All the above install the apps into your home-directory (in ~/.local/share/xdg-app) . You can also run the commands as root and skip the –user arguments to do system-wide application installs.

Future work

With the basics now laid down to run current applications in a minimally isolated environment the next step is to work on the sandboxing aspects more. This will require lots of work, both in the system side (things like kdbus), the desktop (add sandbox aware APIs, make pulseaudio protect clients from each other, etc) and in modifying applications.

If you’re interested in this, you can follow the work on the wiki.

Building your own apps

If you download the SDKs you have enough tooling to build your own applications. There are some documentations on how to do this here.

I also created a git repository with the scripts I used to build the test applications above. It uses the gnome-sdk-bundles repostory which has some tooling and specfiles to easily bundle dependencies with the application.

Building the SDK

If you ever want to build the SDK yourself, it is available at:

https://git.gnome.org/browse/gnome-sdk-images

This repository contains the desktop specific parts of the SDK, which is layered on a core Yocto layer. When you build the SDK this will be automatically checked out and built from:

https://git.gnome.org/browse/freedesktop-sdk-base

However, if you don’t want to build all of this you can download the pre-build images from http://sdk.gnome.org/images/x86_64/ and put them in the freedesktop-sdk-base/images/x86_64 subdirectory of gnome-sdk-images. This can save you a lot of time and space.