Sivecano's Homepage

Window Management as a Service

Some people seem confused as to why my window manager Rhine is licensed under AGPL and not just GPL. In this blog post I try to substantiate this choice ;).

Requirements

To try this yourself will need the following:

Setting up the window manager

I am using this commit of rhine. Since my Server is a raspberry pi 4 we can cross-compile rhine with the following command.

$ zig build -Doptimize=ReleaseSmall -Dnotifications=false -fno-sys=wayland  -Dtarget=aarch64-linux -fno-sys=xkb -Dstrip=true -Dcpu=baseline

This gives us an approximately 800 KB static ARM executable. We transfer this to the server using scp:

$ scp zig-out/bin/rhine <server>:rhine/rhine

And let’s not forget our config file:

$ scp .config/river/config.rh <server>:.config/river/config.rh

This concludes our WM setup.

Configuring the Client

Since we need waypipe to set up a connection we need to make the following changes to our ssh config. If you’re like me and not running a dbus session daemon on your IRC bouncer, you’ll need to add the following line to ~/.ssh/config

SetEnv XDG_RUNTIME_DIR=/tmp

Now is also a good time to install waypipe on your client (if you haven’t already).

Configuring the Server

Since we’re going to be connecting to the server via ssh, we need to add the following lines to /etc/ssh/ssh_config on the server:

AcceptEnv XDG_RUNTIME_DIR
AllowTcpForwarding yes

After this you should restart the ssh daemon running on the server. This can look something like the following:

$ doas rc-service sshd restart

If you haven’t installed waypipe on your server yet, do it now.

Running the Window Manager

We start by running a river on our client. We wish to replace the window manager so we should kill it with the following:

$ pkill rhine

river should keep the same terminal window in focus so we can use this to start the new window manager:

$ waypipe ssh <server> ./rhine/rhine

Behold, it lives.

If you have animations enabled you may be experiencing some lag now. This depends on your ping. Get a better connection to your server if you want a more stable experience.

Finally, window management as a service (short WaaS???)

Ending Note

This is obviously not a very smart idea. Neither rhine nor most decent window managers are very heavy and there is no reason to do is except as a shit-post.

You can follow the same steps to try other window managers remotely. They will probably work better the less rendering they do.

Until next time.

Post list