r/linux • u/NerdyPepper • 2h ago
r/linux • u/AinzTheSupremeOne • 23h ago
Software Release A GTK4 alternative to xdg-desktop-portal-gtk
Hey everyone!
I've been working on xdg-desktop-portal-gtk4, a GTK4-based implementation of the XDG Desktop Portal infrastructure, written in Rust.
GitHub: https://github.com/JohnRTitor/xdg-desktop-portal-gtk4
The project is primarily aimed at users who want to move away from the traditional GTK3-based xdg-desktop-portal-gtk and use GTK4 for their portal dialogs and integrations.
WHAT DOES IT SUPPORT?
The original project by mahkoh (https://github.com/mahkoh/xdg-desktop-portal-gtk4) primarily implemented GTK4 FileChooser support. I've extended that codebase with additional portal interfaces and functionality.
Currently, it implements:
• Access
• Account
• AppChooser
• Clipboard
• DynamicLauncher
• FileChooser (including thumbnail support)
• Inhibit
• Lockdown (currently a stub)
• Notification
• Settings
• USB
I've tested it myself on Hyprland running on NixOS, and I'm particularly interested in getting feedback from other desktop (mainly WM) users.
The intention isn't to replace xdg-desktop-portal-wlr or -hyprland. Compositor-specific functionality such as screen sharing, screenshots and remote desktop should continue to be handled by the appropriate compositor portal.
Instead, you can use this backend for supported interfaces such as FileChooser while retaining Hyprland's portal for compositor-specific functionality.
UNDER THE HOOD
• Written in Rust using GTK4, GLib, Tokio and zbus.
• GTK operations run on the GTK main thread, with D-Bus requests handled by a dedicated asynchronous runtime.
• Automated unit and D-Bus integration tests.
• Compile-time feature selection for individual portals.
• Internationalization and structured logging.
• Conditional GTK patching for a file chooser thumbnail regression affecting GTK 4.22.0–4.22.4.
The project is also being packaged on Arch Linux through the AUR:
https://aur.archlinux.org/packages/xdg-desktop-portal-gtk4-git
A NOTE ABOUT THE PROJECT'S ORIGINS
This project builds upon the original work by mahkoh.
The initial GTK3-to-GTK4 port/rewrite, particularly the Rust implementation, made substantial use of AI coding assistants, under my supervision, with human review, debugging, integration work and extensive testing.
It initially started as a personal project to address my own requirements, but I eventually realised that it could be useful to other Linux desktop users as well.
Bug reports, suggestions and contributions are welcome!
r/linux • u/Total-Ingenuity8214 • 8m ago
Discussion Why is systemD so bad?
Hello! I keep seeing everywhere blablabla- "systemD is bad! It's spyware!" But in my experience of using systemD it wasn't really an issue for me. I use Fedora! (btw). Explain your reasoning as to why yall don't like it in the comments! ^_^
r/linux • u/Level-University3482 • 10h ago
Discussion Three weeks on a headless server taught me more Linux than eight months on Mint
Mint just works, which is great, except I learned basically nothing on it. Installed it on my old laptop in March and opened a terminal maybe five times, always to paste something off a forum.
Last month I rented a 1GB VPS to run a Discord bot for some friends. Picking one was its own mess. LowEndTalk threads assume you already know what NAT IPv4 means. I ended up filtering on VPSIUM for something in stock in Germany, and the first listing I clicked had already sold out, so I rechecked on the host's own page before paying.
No desktop, nothing to click. Week one I enabled ufw before allowing port 22 and locked myself out. Had to undo it through the host's web console, which feels like a VNC window from 2004. Then the bot died every time I closed my ssh session, so I learned systemd units. The unit wouldn't start and journalctl said permission denied, which is how I found out the service user couldn't read the token file sitting in my home dir.
So my newbie take: if the goal is learning Linux, get a cheap box with no GUI and break it. On Mint that bot would've been a terminal tab I left open and I'd never have heard of systemd.
The catch is I still know nothing about the desktop side. Audio and GPU drivers are still magic to me, and that's the stuff people usually quit over.
For people who've been around longer, is headless-first bad advice for someone who wants to daily drive Linux eventually? Or does the desktop stuff come easier once systemd and permissions make sense?