Launching Eclipse in a Browser with the GTK Broadway backend

I recently published a video on my YouTube page showing what Eclipse looks like in a web browser when launched with the GTK Broadway backend on Linux. That video is embedded below and this article is meant to provide some more details on how you can run this on your own machine. The discussion below assumes that you have some familiarity with both Eclipse and the command line.

Special Thanks

I want to say thanks to my colleagues at Red Hat – Sopot Cela, Alexander Kurtakov and Eric Williams – who helped me do this. They are the experts and I’m just a guy with a video camera and a keyboard! 😉

Configuration

I used an up-to-date install of Fedora 23 that was running the latest version of GTK 3, KDE 5 and Firefox. Only the most recent versions of Eclipse will work for this, so make sure that you have the Neon M4a build (RCP or RAP developers version) or something more recent, like a nightly build (with Plugin Development Tools installed).

There may be some issues with this on the latest version of KDE. As you will see in the screenshots below, the menu and file bar didn’t render at all on my machine, but both rendered fine for Alex Kurtakov.

Running Broadway

You need to manually launch the Broadway server. You should also pick the port offset on which you want Broadway to run. By default it will launch on port 8080, so if you want it run on port 8085 use “:5” for the port offset. You can then launch Broadway with the following command at the prompt:

$ broadwayd :5

You should get a message that it is listening on a port that looks like this:

broadwayTerminal

Launching Eclipse on Broadway from Eclipse

The best way to launch Eclipse on Broadway is to actually use Eclipse! This is pretty straightforward since Eclipse can launch itself through its own run configurations menu if the Plugin Development Tools are installed. The important reason for launching Eclipse from Eclipse is so that you can get all the error logs and launch it in debug mode if necessary.

Open the run configuration menu, select the “Eclipse Application” section on the left with the Eclipse logo next to it. Above the search bar that says “type filter text” you will see a small icon that looks like a piece of white paper with a golden plus (+) sign on it. Click this to create a new Eclipse Application Run Configuration. The only thing left to do now is to edit the environment variables for your run configuration. See the picture below for a reference on how this should look and make sure that BROADWAY_DISPLAY=:5 (or whatever your port offset is) and GDK_BACKEND=broadway.

broadwayRunConfiguration

After that, just click “Apply” and “Run” and you’re off to the races! You can view Eclipse in your browser by going to http://localhost:8085 if your port offset is :5 and 8080 + your port offset if it is something else.

Here are a couple additional pics from Alex showing what it currently looks like in the latest nightly for the SWT devs.

Helping Out

I think this is a pretty cool way to use Eclipse and we are actively pursuing it at ORNL for use with Eclipse ICE and our internal cloud infrastructure, CADES. The Red Hat crew is working hard to get SWT up to snuff for Wayland. If you want to help out, just join in! The main bug for tracking SWT support for Wayland is on Bugzilla and it includes links to the smaller bugs on which it depends. We also hope that there are some brave souls out there that would be willing to try this on Windows with the latest win32 GTK build.

I hope you enjoyed this article and the video. Please send your questions or comments to me on Twitter where my handle is @jayjaybillings and please subscribe.

For more information, you might also checkout Eric Williams’ blog on Eclipse on Wayland.

Advertisements

Author: Jay Jay Billings

I'm a physicist with a serious addiction to computing. Most days you can find my bumming around ORNL and Twitter.

One thought on “Launching Eclipse in a Browser with the GTK Broadway backend”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s