Hey all,
this is just to make you aware that the waypipe
tool has been accepted for the SailfishOS:Chum repo.
Now, this is not something huge and exciting, I just took the code, packaged it and found that it does indeed work. For some definitions of “work”.
So, if you are looking for another thing to play around with on your SFOS phone command line, this might be for you.
If you are only interested in stuff that is actually ready for prime time and can be used productively, you can probably stop reading this now.
You can read about waypipe here, but in short it’s a tool to run applications using Wayland running on one machine, and display and interact with it on another machine.
This is similar to what is known as “X11 forwarding” to Unix people.
What this can do:
- install waypipe on a SFOS phone
- install waypipe on another Linux computer
- call a command on the phone which launches an application on the computer, and have its display/output/window show up on the phone, where I can interact with it.
Here I use the example of kreversi
, a KDE game.
user@sailfishpone:~ $ waypipe ssh myuser@linuxbox env QT_QPA_PLATFORM=wayland-egl QT_SCALE_FACTOR=3 dbus-launch kreversi
which should display a new app window on the phone where you can play a game of Reversi.
As you can see there are some caveats:
- as you can see, I put
QT_SCALE_FACTOR
into the environment to have the UI appear large enough. You might have to play around with this to get proper display. Obviously this will work only for Qt applications. - the remote machine must be able to set up “proper XDG environment” for the user, i.e. must be running at least
systemd-logind
or PAM modules which set up a working XDG_RUNTIME_DIR and other stuff. (E.g. I was not able to launch any apps on a box which has no systemd stuff and also otherwise minimal/headless config.) - minimizing the window on the SFOS side sometimes makes the app not show anything again (although it is still running).
- performance: I found that enabling the built-in compression can make the performance much better than running it plain. Luckily there is a benchmark function that will determine the best value to use for you. Run
waypipe bench XX
where XX is the bandwidth on MB/sec the connection between the two devices. Depending your SFOS device and version, it will tell you to use something likewaypipe -c lz4=6
orwaypipe -c zstd=2
.
Potential other uses
In theory it should also be possible to do the reverse, i.e. have an SFOS app (or at least all of Lipstick) displayed on a remote computer running a wayland composer, but I have not found the right incantation to do that.
Maybe someone here can figure it out.
Another thing which came to mind is using this is for example install some kind of Linux-VM on the device (i.e. an lxc-container), and proxying wayland clients from that system locally to the Lipstick display.
Hacking
The original software repo is here: M. Stoeckl / Waypipe · GitLab
Packaging for SFOS is available at the Chum organisation: GitHub - sailfishos-chum/waypipe: Packaging for waypipe
And the package in chum-testing is here: Show sailfishos:chum:testing / waypipe - SailfishOS Open Build Service
One limitation of the current package is that both DMABUF and VAAPI functionality of waypipe is disabled, as we lack (afaik) the necessary dependencies, libvaapi and libgbm.