livebook
livebook copied to clipboard
Adds a Linux "desktop app"
Adds a Linux "desktop app" for AMD64 and ARM64 platforms that builds into it Livebook and all its dependencies, with similar Just Works Without Knowing How To Install All The Dependencies kind of intent to the Mac and Windows apps. Namely, it includes:
- The Livebook server
- A GTK / Rust based app indicator app made for the purpose (https://github.com/mz2/livebook-indicator) that should work in various popular Linux desktop environments that support libappindicator.
- Elixir 1.14 RC 1 (since I noticed 1.14 is a requirement on the
mainbranch), built from source. - Erlang OTP 25.0.4, from packages.erlang-solutions.com.
- git, wget, cmake that were noted in the Dockerfile as useful dependencies to have around depending on packages users would use (I have not really tested any of this yet).
The build configuration is right now for Livebook 0.6.3, but I have also tested building the current main branch head, and it is simple enough to make the built Livebook version configurable (it is also not necessary at all to keep this source in the Livebook repo btw, the source code is pulled by snapcraft at build time completely independently).
Known issues
- The indicator app's livebook server process management is, shall we say, quick and dirty. It really is intended to demonstrate the concept more so than to be production ready, so if you otherwise like this sort a solution for Linux, please advise how the OS processes for the app indicator and the server should be arranged (how should they communicate? should the server be a systemd managed service perhaps instead?).
- I don't know what I'm doing with the
COOKIEfile. I wrote it in the released build, but I'm not sure that's the way to do it? - The Livebook icon is duplicated inside the repo, whereas it probably can just by symlinked in place.
Testing it out
The app is available as a test as an unlisted package on the Snap Store. It can be installed as follows on any Linux system with snapd installed:
sudo snap install livebook --edge
After installing, you can run the app either from the command line with the command livebook which should launch the browser window and insert a desktop launcher in your libappindicator enabled task bar of choice (GNOME, KDE, MATE, ...) or using the desktop launcher that the package installs.
You can also build the package locally using snapcraft (optionally using a LXD managed system container with the --use-lxd flag):
snapcraft # --use-lxd
sudo snap install ./livebook_0.6.3_amd64.snap --devmode # ... or arm64.snap if you built it on ARM64
If this package is something you'd be interested, I'm naturally happy to hand over the livebook app name on Snap Store for you to manage publishing the application and managing its metadata. I'm also happy to help automate the Snap publishing with some GitHub actions.
It pains to say this but it is impractical for a small team like ours to develop and maintain Livebook Desktop for multiple platforms. Therefore, the simplest way is for us to try to use a cross-platform toolkit.
This was our first attempt but WxWidgets fell short of this goal. So we wrote a small kit around Swift and DotNet. Therefore, the best option to get Linux support is by running either the Swift or dotnet toolkits on Linux (and it seems the dotnet one is the most accessible thanks to mono).
So if anyeone wants to give us a hand, you can get started by trying to run the dotnet demo app on Linux. It may currently use some Windows APIs but our hope is that they can be replaced by https://www.mono-project.com/docs/gui/gtksharp/.
Thanks for the PR, the insights, and we will be glad to answer further questions.
That makes a lot of sense (and DotNet sounds more practical).