Hi everybody,
here's a hackish way to collect all of gretl's appearing windows in a
single meta window. This could be useful for example if you want to
share only a single window in a video conference. (But note that some
video call tools handle gretl's multiple windows just fine, I've seen
and done it myself, without having to share the whole desktop.)
Another use case might be for people who want to keep gretl's windows
somehow separate from the rest.
Again beware, this is a hack, but so far it seems to work for me.
cheers,
sven
-----------------------------------------------------------------------
Longer title: How to run gretl (from Linux) on Windows 10 in a single
(browser) window
-----------------------------------------------------------------------
The trick is to use the Windows Subsystem for Linux (WSL) which comes
directly from Microsoft with Windows 10. See MS's documentation for how
to activate it or how to upgrade to version 2 which I'm using here. (It
might also work with WSL version 1, don't know.)
Inside WSL you need to install a Linux distro such as Debian or Ubuntu
or whatever - the important thing is that the included gretl version is
built with GTK3, not GTK2. I think this should apply to most modern
distros. MS offers some pre-configured distros as apps in the MS app store.
Of course, if you're already on Linux things are even simpler, so this
explanation is restricted to Windows 10.
The Linux system on WSL is command-line based, you cannot directly start
a graphical app there (yet). However, it turns out that you can use the
GTK3 feature called broadway to send the app's windows to a web browser,
and this even works when the browser is running natively on Windows 10
(which I found somewhat surprising).
So:
1) Start the Linux distro that is installed inside WSL. This works just
like starting any other program on Windows. You get a terminal window.
2) In that terminal window, type:
"broadwayd"
(with a "d" at the end, but without the quotes, and hitting Enter). You
should get a response line like "Listening on ... socket". You don't get
the terminal prompt back, this is just running "forever".
3) So start another Linux terminal just like the first one. Type:
"GDK_BACKEND=broadway gretl_x11"
Again, you shouldn't get the prompt back (unless there's an error).
4) Open a browser window in Windows (I used Firefox), and go to the
pseudo-page:
"localhost:8080"
-- Voilà: You get gretl's main window inside the browser window. It
looks different from the regular Windows version because it uses GTK3
instead of GTK2. The amazing thing is that you can click the menus and
so forth and new gretl windows are also shown inside the browser.
I'm attaching a screenshot as proof ;-)
I was even able to access my files on the C: drive from the WSL side
through the path /mnt/c.
One glitch that I observed is when I wanted to change gretl's language
setting I could not see the alert window saying "Changes will take
effect after a restart". I had to hit enter blindly to dismiss it. (But
then quitting gretl and restarting it did actually give me gretl in German.)