Frequently asked questions

Author: BlinkGTK Project
Version: 1.2.0-build2

Questions we are asked, from people considering BlinkGTK through to people
already building with it.

If what you need is not here, try When things go wrong
or simply write to contact@blinkgtk.org.

About BlinkGTK

What is BlinkGTK?

A library that makes Chromium's rendering engine (Blink) usable as a GTK4
widget
.

Put a BlinkWebView in a window and a web page appears in it. You handle it the
way you handle a GTK button or label.

GtkWidget *view = blink_web_view_new();
gtk_window_set_child(GTK_WINDOW(window), view);
blink_web_view_load_uri(BLINK_WEB_VIEW(view), "https://example.com/");

What is it for?

Anywhere you want to build a screen with web technology. Areas where it is being
considered or used include e-book readers, in-vehicle information displays,
industrial control panels, digital signage and point-of-sale terminals.

See What BlinkGTK is for for more.

How does it differ from WebKitGTK?

The engine, most of all. BlinkGTK uses the same Blink as Chromium, so pages
look the way they look in Chrome.

BlinkGTK WebKitGTK
Engine Blink (Chromium) WebKit
Rendering matches Chrome Closer to Safari
Developer tools Chrome DevTools Web Inspector

As widgets they are handled similarly, but the function names differ. If you
are porting, Migrating from WebKitGTK
has the mapping table.

This is not a question of which is better. BlinkGTK suits you if you want to
develop against Chrome as your reference, or want Chrome DevTools.

Is this a new project?

Yes. It has not been public for long.

The upside is that reported problems get attention quickly. Points raised by
users have gone straight into the next build. Whatever you notice, however
small, please tell us.

What licence is it under?

BSD 3-Clause. Commercial use is fine.

The bundled Chromium-derived components carry their own licences. We ship
THIRD_PARTY_NOTICES with the distribution — please carry it along if you
redistribute.


Will it work for me?

Which languages can I use?

C is the baseline. On top of that it supports GObject Introspection, so
Python, Rust, JavaScript and Vala can call it too.

import gi
gi.require_version('BlinkGTK', '0.1')
from gi.repository import BlinkGTK

view = BlinkGTK.WebView.new()
view.load_uri('https://example.com/')

There are tutorials for Python and
Rust.

Does it run on X11?

No. It is Wayland only.

Today's major desktops (GNOME, KDE Plasma, Sway) default to Wayland, so it
usually just works. If you are on an X11 session, log back in under Wayland.

Which distributions are supported?

We ship RPM (Fedora family), DEB (Debian / Ubuntu family) and a tarball. The
tarball runs from wherever you unpack it, so you can try it on any distribution.

Install has the steps.

Do I need a GPU?

No. There is a CPU-only rendering path, and it works by default.

Where a GPU is available, BLINKGTK_GPU_MODE=egl switches to GPU rendering.
Which is faster varies by machine, so it is worth trying on your own hardware.

How much memory does it use?

Because Chromium spreads its work over several processes, budget a few hundred
MB per WebView
. If you are targeting embedded hardware, this needs to be part
of your design.


Building with it

Where should I start?

Build and run your first app is the entry
point. It goes end to end, up to something actually running.

After that, looking things up from your goal in the
How do I…? index is usually quickest.

Can I use it with GtkApplication?

Yes — with one caveat about the main loop.

g_application_run() does not turn Chromium's loop, so on its own it renders
nothing. Present your window, then turn blink_gtk_run_main_loop().

The shape is in Integrate into your application.
We wrote that section after a user told us their code "did exactly what the
documentation said and still did not work".

Can it do vertical Japanese text?

It can — and it is an area we put particular effort into.

Vertical writing, ruby, emphasis dots, tate-chu-yoko and line-breaking rules are
all supported. We aim to follow JLReq (Requirements for Japanese Text Layout),
and we contribute fixes upstream to Chromium.

If you find anything that is set differently from what you expect, please tell
us. Send the HTML that shows it and we will use it directly in our testing.

How do I serve my application's own content?

Register a custom URL scheme. Something like myapp:// can serve data from
inside your application, which is both safer and easier to work with than
file://.

See "Custom URL schemes" in the
App integration API.

Can I talk to the page's JavaScript?

Yes, in both directions.

Also in the App integration API.

Can I prevent copying or printing?

Yes. There are settings meant for cases like e-book readers and kiosks where the
content needs protecting.

See the Settings API.


Running it

How often is it updated?

We follow Chromium's stable releases. On top of that, fixes go out as builds as
they are made.

The release history records the updates, and
what changed in Chromium records what became
possible with each engine version.

Can I stay on an older version?

Behaviour will not change, but we do recommend updating a web browser engine,
because Chromium updates carry security fixes. If you display pages from the
internet, keep reasonably current.

On a closed network the calculus is different.

Can I ship it with my application?

Yes. You can bundle what is needed and produce something that runs on its own.

Ship as a portable application has the steps.

Can I use it in a commercial product?

Yes. Under BSD 3-Clause there is no restriction on embedding it in commercial
products.

For questions about adoption, or about tuning it for a particular environment,
write to contact@blinkgtk.org.


If you get stuck

There is no need to wonder whether a question is worth asking. Please just ask.