Skip to content

Instantly share code, notes, and snippets.

@imobachgs
Last active November 10, 2023 15:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save imobachgs/b4ffd318d022ed78c80def31823f6fc7 to your computer and use it in GitHub Desktop.
Save imobachgs/b4ffd318d022ed78c80def31823f6fc7 to your computer and use it in GitHub Desktop.
[Hack Week 23] Relm4-based user interface for Agama

Relm4-based user interface for Agama

This document summarizes the result of the Relm4-based user interface for Agama which was part of SUSE’s Hack Week 23. It was just an experiment and I do not plan to continue working on it.

However, I will keep the branch in my fork in case anyone is interested, but bear in mind that the code quaility is far from production-ready.

Achievements

The initial idea of the project was to play around with Relm4 and build a simple user interface for Agama. At the end of the, the following features were implemented:

  • Select a device to install the system.
  • Enable/Disable LVM enabling/disabling LVM.
  • Set a user name and a password.

Support for performing the real installation (starting the process and importing about the progress) was not implemented.

agama-gtk

Discarded features

I implemented other eatures that, for different reasons, I decided to drop.

  • Selecting a different product for installation. As I wanted to keep everything in a same page, it introduced some complexity to other components (like the one about storage). So I decided to go for single-product scenarios.
  • Refreshing the UI when something changed in the D-Bus interface (e.g., changing the disk using the web UI while the Relm4 interface was open). It worked, but it was weird that the UI changes on user’s back.

Other considerations

  • I really enjoyed working with Relm4. The book is a great resource to get you started.
  • However, I would need to learn more about Gtk and libadwaita before trying to build another Gkt-based project 😃
  • On the Agama's side, we should consider adding some meaningful signals instead of relying always on PropertiesChanged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment