• 0 Posts
  • 8 Comments
Joined 7 months ago
cake
Cake day: July 1st, 2025

help-circle

  • I like zram! It has pretty low overhead and usually compresses data quite well (~2/3x). I have it set to the size of my total ram and I can’t notice when it starts to kick in.

    Some small amount of swap is also nice to have, but it gets rarely used for me, because zram gets used first.

    One trick that might be useful is that you can create a normal swap file and enable swap to it in cases where you want more. For example recently I needed to load 64GB of data on a 32GB laptop, so I created a 64GB swap file on the filesystem and used swapon to enable it. (just disable it before hybernation if you use it!)

    It just takes a bit longer to run, but if you don’t need all the data loaded at once it’s much faster than moving the code on a more powerful pc (or fixing it)…





  • If you have some malicious code running on your computer, you have already lost. Nothing stops it from impersonating another app and asking the permissions to see your screen, accessing local secrets from the files or doing who knows what.

    You can still download a tar file with an static executable inside, and double clicking that exe will happily run it unsandboxed, and it’ll be able to do whatever with your secrets or files of other apps, unlike firefox, which is not able to share your screen easily. If you get a really malicious app, it could probably also exploit debugging tools to inject itself into the memory of processes that do have the permission to access the screen without asking…

    Preventing apps from accessing what you see on screen or sending keypresses, or stealing your focus, is not going to protect you against anything, but it’s just going to make it impossible to use legacy tools, autohotkey-equivalents (look up how to send a key programmatically to a wayland app… wayland provides no interface for that. You have to create virtual evdev devices and run your app with root permissions…) or making it clunky to have a calendar appointment notification pop up right in front of the screen (grand theft focus luckily fixes that on gnome…).

    Performance on 3d games is also much better on X for me.


  • I really don’t get all this attention to focus prevention. I personally can’t remember the last time I had a window popping up without it being something I want and expect. IMHO It looks like a theorethical attack vector (steal focus right when typing a password), but in practice I’ve never heard of it happening, not even on windows were focus stealing is fully allowed and expected.

    If I had any app stealing focus randomly, the app would be nuked out of existance in no time.

    I did experience though focus stealing prevention breaking apps (for example the open folder dialog in vscode not appearing in the front). It also breaks some interruptions that I really really want, like the evolution calendar notification window popping up on top of everything telling me I really should be in a meeting right now (and no, a slowly fading notification on the corner of the second screen I’m not looking at right now won’t work)

    A big thank you to the authot of grand theft focus for bringing a bit of sanity back.