Gtk+ 3.2 Runs Any Gtk+ Application in a Browser

I’ve been ragging on GNOME a little bit lately, so let’s balance things out by talking about something I found quite fascinating: the Gtk+ HTML back-end. This will enable you to run any Gtk+-application inside Firefox 4.0 (only Firefox 4.0 is supported at the moment).

It’s far from complete at this point, and as such, it’ll be part of Gtk+ 3.2. Gtk+ 3.0 introduced support for multiple back-ends, and this new HTML5 gdk back-end makes use of that feature. After compiling Gtk+ with –enable-x11-backend –enable-broadway-backend, you’re almost good to go.

The second step is to enable web sockets in Firefox 4.0. This feature is disabled by default by Mozilla due to security concerns, but here’s how to turn it on. Once that’s done, you can enable the HTML5 back-end at runtime using the GDK_BACKEND enviroment variable.

The next step is to run a Gtk+-application, like so:

GDK_BACKEND=broadway your-application&<br/ >
firefox http://127.0.0.1:8080/

Alexander Larsson made a screencast of how this works.

The video is HTML5 video in WebM, which only works in browsers that support this open standard (at the moment, Chrome, Firefox 4.0 beta/RC, and Opera 11 beta). You can watch this video in Internet Explorer 9 using Google’s Media Foundation codecs. You can always download the source file and play it in your favourite media player. Alternatively, you can resort to watching the video on Vimeo in the closed H264 format wrapped in Flash.

59 Comments

  1. 2011-03-18 7:35 pm
    • 2011-03-18 8:15 pm
    • 2011-03-18 8:21 pm
    • 2011-03-18 10:26 pm
  2. 2011-03-18 8:01 pm
    • 2011-03-18 8:35 pm
      • 2011-03-18 9:41 pm
      • 2011-03-19 11:35 am
        • 2011-03-19 11:47 am
          • 2011-03-19 6:07 pm
          • 2011-03-19 7:10 pm
          • 2011-03-19 10:02 pm
          • 2011-03-19 11:34 pm
          • 2011-03-20 1:21 am
          • 2011-03-20 9:36 am
          • 2011-03-20 10:25 am
          • 2011-03-20 10:53 am
          • 2011-03-20 8:27 pm
          • 2011-03-20 1:16 pm
          • 2011-03-20 7:09 am
          • 2011-03-20 12:39 pm
          • 2011-03-20 1:19 pm
        • 2011-03-19 2:05 pm
        • 2011-03-20 9:45 am
          • 2011-03-21 3:42 pm
          • 2011-03-21 4:13 pm
          • 2011-03-21 7:56 pm
          • 2011-03-22 12:35 pm
    • 2011-03-19 12:28 pm
    • 2011-03-19 9:25 pm
  3. 2011-03-18 8:46 pm
    • 2011-03-19 10:55 pm
  4. 2011-03-18 10:28 pm
    • 2011-03-18 11:01 pm
      • 2011-03-19 6:46 am
    • 2011-03-19 12:51 pm
    • 2011-03-19 2:10 pm
      • 2011-03-19 11:55 pm
    • 2011-03-20 9:18 am
  5. 2011-03-18 10:31 pm
  6. 2011-03-18 11:05 pm
    • 2011-03-19 3:19 am
      • 2011-03-19 11:52 am
  7. 2011-03-19 12:53 am
  8. 2011-03-19 1:54 am
    • 2011-03-19 2:54 am
      • 2011-03-19 7:05 am
    • 2011-03-21 7:50 am
      • 2011-03-21 4:53 pm
    • 2011-03-21 5:32 pm
  9. 2011-03-19 10:48 am
    • 2011-03-19 12:26 pm
      • 2011-03-19 3:35 pm
      • 2011-03-19 5:27 pm
        • 2011-03-19 7:08 pm
          • 2011-03-20 5:27 am
          • 2011-03-20 1:41 pm
  10. 2011-03-19 1:01 pm