Posts

Showing posts from June, 2025

Taking out the trash, or just sweeping it under the rug? A story of leftovers after removing files

Image
 There are many things that we take for granted in this world, and one of them is undoubtedly the ability to clean up your files - imagine a world where you can't just throw all those disk space hungry things that you no longer find useful. Though that might sound impossible, turns out some people have encountered a particularly interesting bug, that resulted in silent sweeping the Trash under the rug instead of emptying it in Nautilus. Since I was blessed to run into that issue myself, I decided to fix it and shed some light on the fun. Trash after emptying in Nautilus, are the files really gone? It all started with a 2009 Ubuntu launchpad ticket , reported against Nautilus. The user found 70 GB worth of files using disk analyzer in the ~/.local/share/Trash/expunged directory, even though they had emptied it with graphical interface. They did realize the offending files belonged to another user, however, they couldn't reproduce it easily at first. After all, when you try to m...

Using Portals with unsandboxed apps

Image
Nowadays XDG Desktop Portal  plays an important part in interaction between apps and the system, providing much needed security and unifying the experience, regardless of the desktop environment or toolkit you're using. While one could say it was created for sandboxed Flatpak apps, portals could bring major advantages to unsandboxed, host apps as well: - Writing universal code: you don't need to care about writing desktop-specific code, as different desktops and toolkits will provide their own implementations - Respecting the privacy of the user: portals use a permission system, which can be granted, revoked and controlled by the user. While host apps could bypass them, user can still be presented with dialogs, which will ask for permission to perform certain actions or obtain information. Okay, so they seem like a good idea after all. Now, how do we use them? More often than not, you don't actually have to manually call the D-Bus API  - for many of the portals, toolkits an...