monovergent 🛠️

  • 9 Posts
  • 45 Comments
Joined 2 years ago
cake
Cake day: November 27th, 2023

help-circle











  • My desktop text editor has an autosave feature, but it only works after you’ve manually saved the file. All I wanted is something like the notes app on my phone, where I can jot down random thoughts without worrying about naming a new file. So here’s the script behind my text editor shortcut, which creates a new text file in ~/.drafts, names it with the current date, adds a suffix if the file already exists, and finally opens the editor:

    #!/bin/bash
    
    name=/home/defacto/.drafts/"`date +"%Y%m%d"`"_text
    if [[ -e "$name" || -L "$name" ]] ; then
        i=1
        while [[ -e "$name"_$i || -L "$name"_$i ]] ; do
            let i++
        done
        name="$name"_$i
    fi
    touch -- "$name"
    pluma "$name" #replace pluma with your editor of choice
    



  • As others have suggested, QubesOS is a good one to have on your list. I’d probably use if it weren’t for its crippling effects on battery life.

    Immutable distros are much friendlier to laptops and, as I understand, update in a way not unlike an Android device would. But I insist on some system-level customizations and I haven’t been motivated to learn how such customizations can be made to survive updates and the like.

    I’ve also been eyeing NixOS, but with everything up and running on Debian smoothly for a few years, I haven’t found the excuse to switch yet. Along with customizing it to be a comfortable daily driver, I’ve also been trying to see how secure I can make my system as a fun exercise. While it’s not immutable, Debian is a good base considering the team behind it and how much is riding on its security, including internet-facing servers.

    What I’ve done to harden Debian, if anyone’s interested:

    • Apply Madaidan’s hardening guide judiciously. Roughly 2/3 of the measures made sense for my use case and it’s almost unnoticeable in my daily workflow.
    • Have as few closed-source components as possible. In my case, intel-microcode is the only non-free package on my system.
    • Install the hardening-runtime package, but remove its included slub_debug=FPZ kernel argument, which in recent kernels forces less secure unhashed pointers.
    • XFCE is still not fully ported to Wayland, so I use slock, the X11 screen locker with fewest lines of code.
    • Install the ufw firewall and default to deny
    • Enable unattended-upgrades
    • Everything including the /boot partition is encrypted. I have built coreboot with just the GRUB2 payload, which I configured to immediately bring up the LUKS password prompt. All other options are behind a password.

    I also put together and maintain a ~16 GB clean system image of Debian set up exactly to my taste, which I clone to my machines as needed. This probably wouldn’t have been a thing if I knew about NixOS earlier, and it certainly hasn’t helped me switch over either.




  • Whatever comes with your distro or desktop environment ought to be enough for anybody.

    Unless you have a minimal window manager that comes with only xterm. Then I’d install xfce4-terminal to get tabs and more reasonably sized text. If for some reason the distro or OS only has sh, I’ll also go ahead and install bash, but nothing fancier than that.






  • Also have been using Debian for the past 3 years. It just works on all of my machines and comes with just enough features to make life easy. Also love the variety of packages and compatibility with pretty much anything I need that isn’t in the official repo.

    Many would beg to differ but I love how stable and predictable it is. I have a very particular taste in UI and the less work to maintain that cozy look, the better. Having been a holdout on old Windows versions in the years before I moved to Linux, getting new features at all is already very exciting. I had thought for several years that nothing would beat the comfort and reliability of Windows 2000, but Debian proved me wrong.