Skip to content

Instantly share code, notes, and snippets.

@lidgnulinux
lidgnulinux / Static-linked-exectables-build.md
Last active June 28, 2025 08:14
Static-linked executables collection.

Static-linked Executables build.

What are these ?

These are my static-linked executables I'm building, which I think are interesting.

They consist of tools I use daily. As the name suggest, the static-linked executables don't rely on libraries (CMIIW), so you can just run it (tested in glibc and musl environment).

@lidgnulinux
lidgnulinux / Build-static-android-platform-tools-without-go.md
Last active June 18, 2025 08:53
How to build static android-platform-tools without GO.

Build Static Android Platform Tools without GO.

Some days ago, I found an interesting repository about android tools which can be built without GO compiler (check it here). If you're familiar with adb, fastboot, etc, you know what I'm talking about. It suits me because I have no GO compiler or won't bother to download one because I already have GCC. After firts successful build which result on dynamic linked binaries, I'm curious on building the static linked one. Here is how I did it !

Preparations

Before we go deep into building stuffs, we need to prepare some stuffs.

  • Make sure you have GCC / Clang !
  • Satisfy the dependencies, check on the README !
@lidgnulinux
lidgnulinux / Running-Android-Platform-Tool-Musl.md
Created June 11, 2025 11:50
Running Android Platform Tools on musl.

Running Android Platform Tools on Musl.

Opening

Since I moved to source-based linux distro with musl (Dragora GNU/Linux & LFS Musl), I always wondering about how to run android platform tools on musl. Android platform tools seems built againts glibc so running it on musl is almost impossible. Not until I discovered about patchelf. Turns out, we can use patchelf to make android platform tools binary tool (adb, fastboot, etc) to run on musl, with a bit of trick of course.

@lidgnulinux
lidgnulinux / thunar_4.20_remove_set_as_wallpaper.patch
Created May 30, 2025 09:09
Patch to remove set as wallpaper option.
--- plugins/thunar-wallpaper/twp-provider.c 2025-05-30 15:44:12.534952614 +0700
+++ plugins/thunar-wallpaper/twp-provider.c.new 2025-05-30 16:00:50.899096470 +0700
@@ -145,17 +145,6 @@
/* get the mime type of the file */
mime_type = thunarx_file_info_get_mime_type (files->data);
- if (g_str_has_prefix (mime_type, "image/")
- && (thunarx_file_info_has_mime_type (files->data, "image/jpeg")
- || thunarx_file_info_has_mime_type (files->data, "image/png")
- || thunarx_file_info_has_mime_type (files->data, "image/svg+xml")
@lidgnulinux
lidgnulinux / 00-Kumpulan-kulak-kulik.md
Last active April 22, 2025 00:25
Kumpulan Kulak Kulik.

Kumpulan Kulak Kulik.

Linux related.

How to build gettext and libintl.so on musl.

Gettext with libintl.so.

After did some trials and errors I found a way to build gettext library + its libintl.so library on musl. I need the library so cosmic-files will work properly. Before I finally built gettext + libintl.so, everytime I build gettext I only get libgnuintl.so instead of libintl.so. Turns out, the solution is pretty simple. I just need to rename libintl.h header file from musl build and boom, gettext build will produce libintl.so instead of libgnuintl.so.

Prepare.

  • Musl (obviously).
  • gettext, I use 0.24 version.
@lidgnulinux
lidgnulinux / 00.vanity-gaps-and-foreign-toplevel.patch
Last active May 24, 2025 09:46
Vanity gaps & foreign toplevel management patch for dwl.
diff --git a/Makefile b/Makefile
index 578194f..887a0f8 100644
--- a/Makefile
+++ b/Makefile
@@ -21,7 +21,8 @@ dwl: dwl.o util.o
$(CC) dwl.o util.o $(DWLCFLAGS) $(LDFLAGS) $(LDLIBS) -o $@
dwl.o: dwl.c client.h config.h config.mk cursor-shape-v1-protocol.h \
pointer-constraints-unstable-v1-protocol.h wlr-layer-shell-unstable-v1-protocol.h \
- wlr-output-power-management-unstable-v1-protocol.h xdg-shell-protocol.h
+ wlr-output-power-management-unstable-v1-protocol.h xdg-shell-protocol.h \
@lidgnulinux
lidgnulinux / Firefox-appimage.md
Last active May 29, 2025 05:41
Build firefox appimage for musl based distro.

Build Firefox Appimage for Musl Based Distro.


Preparation.

  • Musl based distro archive.
  • Appimagetool.
  • Text editor.

@lidgnulinux
lidgnulinux / Celluloid.txt
Created March 18, 2025 22:17
Celluloid backtrace.
backtrace:
#0 0x00007ffff297ad95 in pixman_transform_point_3d () from /usr/lib/libpixman-1.so.0
No symbol table info available.
#1 0x00007ffff297d1d8 in radial_get_scanline_narrow () from /usr/lib/libpixman-1.so.0
No symbol table info available.
#2 0x00007ffff2976b74 in general_composite_rect () from /usr/lib/libpixman-1.so.0
No symbol table info available.
#3 0x00007ffff28d5a52 in pixman_image_composite32 () from /usr/lib/libpixman-1.so.0
No symbol table info available.
#4 0x00007ffff67c6f31 in _inplace_spans (abstract_renderer=0x7fffecc36430, y=3, h=1, spans=0x7fffecc34a28, num_spans=1) at ../src/cairo-image-compositor.c:2547
@lidgnulinux
lidgnulinux / fix-echo-error-invalid-argument-ssh-lfs.md
Created March 13, 2025 13:53
Simple fix for echo error invalid argument on sshd init service LFS.

How to Fix "echo: error invalid argument" for sshd init service on LFS.

Why does it happen ?

Honestly, I don't really know.

Prerequisites

  • Editor text, I use vim.
  • Sshd init service file, It usually exist at /etc/rc.d/init.d/sshd.