Rendered at 07:00:58 GMT+0000 (Coordinated Universal Time) with Cloudflare Workers.
danudey 12 hours ago [-]
Noticed that when I build this it ends up with direct linking against a half-dozen libraries it doesn't actually use, at least on Ubuntu. Fixed it by replacing the linking commands with this:
In my case, at least, this doesn't change the full library tree because gtk-4 still links against all of the libraries that are removed from this binary's list, but it does mean that programs which calculate dependencies, like dpkg-shlibdeps, won't report spurious "required" dependencies when analyzing the binary.
When building on Ubuntu 26.04, the binary no longer directly links against lib{pango, cairo, pangocairo, cairo-gobject, harfbuzz, gdk_pixbuf, graphene, gio, vulkan}.
Can't create an account on the site so I figured I'd post this here. If you're going for absolute minimalism this seems like another step in the right direction for anyone building on a more 'gratuitous' GTK build (such as Ubuntu's)
DannyBee 13 hours ago [-]
Whenever someone writes "with hand-written bindings" I read "will stop working 8 minutes after the next release"
pseudony 12 hours ago [-]
There are tools to generate bindings. They probably meant it as a marker of quality.
And in languages like zig or odin which are quite similar to C in many ways, writing bindings to C code really isn’t bad.
It is so easy that I decided to write my own bindings in Odin to sqlite - bindings exist but it really was so very easy that I didn’t want to bring in a generator or another dependency.
gen2brain 15 hours ago [-]
Nice, I just use lxqt-openssh-askpass, but I am on X11. A lighter alternative (for single-text input) would be FLTK. Version 1.4 is really nice, with Wayland support, and they even draw custom window decorations on GNOME. Both Cairo and FLTK should be able to compile with -X; not sure, though, about the status of the Zig bindings.
zem 12 hours ago [-]
fltk is c++ based which makes language bindings significantly harder in general. gtk is c based which worked out really well in that aspect.
gen2brain 12 hours ago [-]
Sure, you need to wrap it in C, but there is also `cfltk` that is maintained and used in Rust bindings.
Btw., the difference in memory usage is huge with GTK4. FLTK hello world is ~10M, GTK3 is ~15M, GTK4 is 40M! With Cairo rendering, it's about 30M, but still a lot.
Levitating 10 hours ago [-]
GTK4 memory usage is ludicrous
zem 11 hours ago [-]
ah neat, I wasn't aware that cfltk was already used by rust.
porridgeraisin 14 hours ago [-]
I wrap `pinentry` (which is in the dependency trees of gnupg, pacman, gvfs, udisks2 and other software that you can de-facto depend on on desktops) inside my own simple askpass.
It automatically launches the GTK, TTY, or QT version depending on your environment.
It's also useful for agents to use sudo, you can write in instructions to tool-call `sudo -A` and you get a GUI popup to enter the password, and the agent continues from there.
And since the "prompt" in pinentry can be customised... you can get the agent to set up a temporary askpass, which replaces "Password:" in the prompt with questions like "Can I delete this old log file in /var?" and you enter your password to authorise.
hparadiz 15 hours ago [-]
These implementations really need to also include fingerprint sensor support
quotemstr 14 hours ago [-]
PAM really needs to be ravamped and support for (among other things) running multiple stacks in par@llel added. This way you could ask for a password OR a fingerprint
timhh 9 hours ago [-]
I'm vaguely considering rewriting PAM in Rust. It's definitely something that would benefit from Rust's extra security and the code quality isn't that great. Nor is the UX. What "among other things" were you thinking of?
quotemstr 5 hours ago [-]
Implementation language is incidental. Rust is... fine, I guess? But I wouldn't mandate modules use it. What's important is to move PAM out of process and sandbox the process host (using landlock, namespaces like bwrap, whatever) so we can run sensitive code with least-privilege on both ends.
hparadiz 12 hours ago [-]
Keypassxc does it perfectly.
quotemstr 12 hours ago [-]
Everyone doing parallel biometric and password authentication on Linux today is either running two PAM stacks in parallel (which is meta-policy that kind of defeats the purpose of PAM) or just bypassing PAM entirely.
xnickb 13 hours ago [-]
Fingerprint is an authentication mechanism, not an authorization one.
hparadiz 13 hours ago [-]
It's both.
bflesch 15 hours ago [-]
Love the tab title shenanigans when switching to and from the tab.
WD-42 15 hours ago [-]
Would love to see more projects using gtk and zig. Always nice to have another language option.
hackingboy298 14 hours ago [-]
this is realy good and helpfull information thanks.
When building on Ubuntu 26.04, the binary no longer directly links against lib{pango, cairo, pangocairo, cairo-gobject, harfbuzz, gdk_pixbuf, graphene, gio, vulkan}.
Can't create an account on the site so I figured I'd post this here. If you're going for absolute minimalism this seems like another step in the right direction for anyone building on a more 'gratuitous' GTK build (such as Ubuntu's)
And in languages like zig or odin which are quite similar to C in many ways, writing bindings to C code really isn’t bad. It is so easy that I decided to write my own bindings in Odin to sqlite - bindings exist but it really was so very easy that I didn’t want to bring in a generator or another dependency.
It's also useful for agents to use sudo, you can write in instructions to tool-call `sudo -A` and you get a GUI popup to enter the password, and the agent continues from there. And since the "prompt" in pinentry can be customised... you can get the agent to set up a temporary askpass, which replaces "Password:" in the prompt with questions like "Can I delete this old log file in /var?" and you enter your password to authorise.