Subject: Native GTK apps in Mir

From: Daniel van Vugt <[email-masked]>
Date: Mon, 04 Aug 2014 10:17:39 +0800

Following on from the proof of concept in May, native Mir support for 
GTK apps has landed in utopic-proposed (3.12.2-0ubuntu6):

   https://launchpad.net/ubuntu/+source/gtk+3.0

Basic stuff works but more work is required, if anyone wants to help out 
with the immediate major stuff:

1. Cursor API not implemented (several GTK apps think this as a reason 
to crash).

2. Menus and dialogs not displayed correctly.

- Daniel

---

From: Daniel van Vugt <[email-masked]>
Date: Mon, 04 Aug 2014 14:49:24 +0800

Also note this means there are projects "outside the silo" that depend 
on MIRCLIENT_ABI 8 by direct linkage to "libmirclient.so.8". Be very 
wary if you ever want to change the client ABI from now on...

---

From: Robert Carr <[email-masked]>
Date: Mon, 4 Aug 2014 09:43:10 -0700

Yay :) Thanks for letting us know.

On Sun, Aug 3, 2014 at 7:17 PM, Daniel van Vugt <
[email-masked]> wrote:

> Following on from the proof of concept in May, native Mir support for GTK
> apps has landed in utopic-proposed (3.12.2-0ubuntu6):
>
> 1. Cursor API not implemented (several GTK apps think this as a reason to
> crash).
>
> --
> Mir-devel mailing list
> [email-masked]
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/mir-devel
>

---

From: Daniel van Vugt <[email-masked]>
Date: Wed, 06 Aug 2014 10:43:31 +0800

And it's been promoted now! If you're running utopic then your GTK apps 
can render directly to a Mir server (with the right environment variables).

Still, please consider this a tech preview. There are significant bugs 
that need fixing yet.

---

From: Oliver Ries <[email-masked]>
Date: Tue, 5 Aug 2014 21:59:57 -0600

> can render directly to a Mir server (with the right environment variables).

do we have the magic sauce documented somewhere?

> Still, please consider this a tech preview. There are significant bugs

bugs or missing features (I'd consider the absence of sub menu rendering a
missing feature... but that might be nitpicking;)

good job everyone,
O.

---

From: Daniel van Vugt <[email-masked]>
Date: Wed, 06 Aug 2014 12:11:09 +0800

OK, a full example is:

sudo apt-get install mir-demos
sudo mir_demo_server_shell --vt 1
sudo env XDG_RUNTIME_DIR=/run/user/1000 MIR_SOCKET=/tmp/mir_socket 
/usr/games/gnome-mahjongg
# Ctrl+Alt+F1

It was working all weekend and up to yesterday. But for some reason 
today all GTK apps are now crashing (SIGSEGV) for me. So I'll have to 
look into what has changed.

On 06/08/14 11:59, Oliver Ries wrote:
> On Tue, Aug 5, 2014 at 8:43 PM, Daniel van Vugt
> <[email-masked] <mailto:[email-masked]>>
> wrote:
>
>     And it's been promoted now! If you're running utopic then your GTK
>     apps can render directly to a Mir server (with the right environment
>     variables).
>
>
>     Still, please consider this a tech preview. There are significant
>     bugs that need fixing yet.
>
>
> bugs or missing features (I'd consider the absence of sub menu rendering
> a missing feature... but that might be nitpicking;)
>
> good job everyone,
> O.
>
>
>
>
>         https://launchpad.net/ubuntu/+__source/gtk+3.0
>         <https://launchpad.net/ubuntu/+source/gtk+3.0>
>
>     [email-masked] <mailto:[email-masked]>
>     Modify settings or unsubscribe at:
>     https://lists.ubuntu.com/__mailman/listinfo/mir-devel
>     <https://lists.ubuntu.com/mailman/listinfo/mir-devel>
>
>

---

From: Daniel van Vugt <[email-masked]>
Date: Wed, 06 Aug 2014 13:23:28 +0800

That's odd. GTK apps are running fine on my cleanly installed utopic 
laptop. It's just the desktop that's crashing. I could easily have 
broken that desktop, somehow. So assume it still works. Certainly it 
does work on a clean utopic laptop I've just tried.

Amending the instructions so they're more likely to work:

sudo -s
apt-get install mir-demos
mir_demo_server_shell --vt 1 &
env XDG_RUNTIME_DIR=/run/user/1000 \
     DISPLAY="" \
     MIR_SOCKET=/tmp/mir_socket \
     /usr/games/gnome-mahjongg
# Ctrl+Alt+F1

Incomplete features you are expected to encounter:
   * Menus
   * Dialogs
   * Non-arrow cursors
   * Mir touch event support not implemented - mouse only?
   * Random crashes/non-starting apps

But it's still nice to have something on screen. And to be able to run 
utopic's desktop apps unmodified inside Mir is quite nice.