Wednesday, 12 July 2023

My journey through BLFS - part 2

Continuing from where I left in part 1 with a functional X Windows System, it's time to aim for something closer to a usable system.

16 May 2022 - GTK+ 2

I cloned the VM to have a checkpoint to restart from in case anything went horribly wrong. At this point there are many possible paths but I decided to go for LXDE due to its small memory footprint and dependencies compared to other more mainstream desktop environments.

Building GTK+ 2

GTK+ is the centerpiece for all graphics used in LXDE. I started with version 2. As explained in the guide, some libraries will need to be rebuilt with extra support previously disabled. On that note I had to rebuild cairo, pango, harfbuzz due to the later addition of gobject-introspection.

GTK+ 2 up and running from the demo app.

Quick gotcha: ISO Codes source code was not available from the proposed location, instead I got it from http://ftp.debian.org/debian/pool/main/i/iso-codes/iso-codes_4.9.0.orig.tar.xz not a big issue but it required a bit of googling around.

I wanted to see if it was possible to build LXDE with GTK+ version 3, so I built GTK+ 3, here is how it looks from the demo app.

17 May 2022

LSB Tools link is broken it gives 404, instead of releases, I got it from Github repositor tags page https://github.com/djlucas/LSB-Tools/archive/refs/tags/v0.9.tar.gz

Building apps with GTK+ 3 support.

Building LXSession

./configure \
  --prefix=/usr \
  --enable-gtk3 \
  --enable-buildin-clipboard \
  --enable-buildin-polkit

Building PCManFM

./configure \
  --prefix=/usr \
  --sysconfdir=/etc \
  --with-gtk=3

Building libindicator-12.10.1

It has a bug which is allegedly fixed, however, I could find the issue in the source code I downloaded from https://launchpad.net/libindicator/+download as per this comment. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=806470.

CFLAGS=-Wno-error ./configure \
  --prefix=/usr \
  --with-gtk=3 \
  --enable-deprecations=yes

18 May 2022

I tried many different ways to get LXPanel built with GTK+ 3 to work. Long story short, I couldn’t.

Building LXPanel (not possible to install with GTK 3)

./configure \
  --prefix=/usr \
  --with-plugins=-netstat

It required wireless-tools-devel.

Building libwnck, download source from: https://download.gnome.org/sources/libwnck/3.24/libwnck-3.24.1.tar.xz

./configure \
  --prefix=/usr \
  --disable-static

Building keybinder, download source from: https://github.com/kupferlauncher/keybinder/releases/download/keybinder-3.0-v0.3.2/keybinder-3.0-0.3.2.tar.gz

./configure --prefix=/usr

End of LXPanel, at this point all dependencies were met and LXPanel is installed.

Building LXAppearance

./configure \
  --prefix=/usr \
  --sysconfdir=/etc \
  --enable-dbus \
  --enable-gtk3

9 June 2022

I gave up on LXPanel with GTK+ 3, the main reason being that even if it installed correctly in the system, it constantly crashed randomly and this seems to be a known bug. I built libfm-gtk as well so LXPanel has a GTK+ 2 dependency built before and ./configure is happy.

Unfortunately (or fortunately) I was very busy during the following months and I couldn't spend time on this. Finally I got some spare time and I went back to it.

3rd March 2023

Installed Lightdm and lightdm-gtk-greeter.

At this point, a new problem appeared, the VM integration didn't work until I log in which is when SPICE agent runs. I added a note for future research.

I need to find out how to run spice-vdagent with lightdm or the greeter. Potentially exploring more here: https://wiki.ubuntu.com/LightDM.

Copying the desktop entry to the relevant location works to autostart the SPICE agent when you log in to the session.

sudo cp \
  /sources/spice-vdagent-0.21.0/data/spice-vdagent.desktop \
  /etc/xdg/autostart/

I installed Mousepad without any trouble.

Important note: compiling Firefox requires a lot a lot of RAM, no less than 8GB!

It also requires send-notify program to complete installation

Gtkmm - it wouldn’t compile unless disabling building documentation in all subprojects:

meson --prefix=/usr --buildtype=release .. \
  -Dmm-common:use-network=true \
  -Dbuild-documentation=false \
  -Datkmm-1.6:build-documentation=false \
  -Dcairomm-1.0:build-documentation=false \
  -Dglibmm-2.4:build-documentation=false \
  -Dlibsigcplusplus-2.0:build-documentation=false \
  -Dpangomm-1.4:build-documentation=false