jdev - 2026-03-15


  1. lovetox

    unix/linux is such a shitshow if you need anything from the system whats configured by distributions

  2. Cynthia

    > unix/linux is such a shitshow if you need anything from the system whats configured by distributions some platforms (steam, flatpak, etc.) solve that by running the game in a container

  3. Cynthia

    > unix/linux is such a shitshow if you need anything from the system whats configured by distributions some platforms (steam, flatpak, etc.) solve that by running the program in a container

  4. lovetox

    i rather meant stuff like getting the current timezone

  5. Cynthia

    ah

  6. lovetox

    on Windows or MacOS thats one method call

  7. lovetox

    on Unix you better check 15 different file locations, then write a algo to merge the results

  8. Cynthia

    there is no consistent environment in linux distributions

  9. Cynthia

    not unless you ship your program in a container

  10. Cynthia

    or rely on a library/framework for everything

  11. lovetox

    for stuff like this also flatpak does not help, because you need something from the host, it can even break it, if it does not symlink the correct locations into the env

  12. lovetox

    i like what they try to do with portals, which is basically a universal API

  13. Cynthia

    i have my qualms about portal

  14. Cynthia

    like the lack of an API to request permission to access a file you know the path to

  15. Cynthia

    like the lack of an API to request permission to access a file you know the host path to

  16. Cynthia

    which means if your program works with split files, you have to handle it in the most user-unfriendly way possible

  17. lovetox

    or store it inside your container

  18. lovetox

    you only need the permission if you want to escape the container

  19. Cynthia

    what if i'm packaging an emulator in a flatpak, and it works on BIN/CUE CD dump files

  20. Cynthia

    i emailed a emudev about this, and they stated this is why they don't use portals for choosing files

  21. lovetox

    im not arguing it cant be improved, if enough applications need this, they probably add more flexibility

  22. Cynthia

    yeah, but it's been an open issue in portal's github for years

  23. lovetox

    maybe i should add a issue to get the current timezone :D

  24. singpolyma

    python doesn't just have this in stdlib?

  25. sunglocto

    > python doesn't just have this in stdlib? `time`?

  26. lovetox

    singpolyma, as every distribution does their own thing, it would be quite the maintenance burden

  27. lovetox

    so the answer is, No

  28. singpolyma

    you're looking for the named timezone?

  29. lovetox

    yes

  30. moparisthebest

    isn't it /etc/timezone always?

  31. lovetox

    https://github.com/regebro/tzlocal/blob/8f4f260846713f2086f16d74901edd7895794dcc/tzlocal/unix.py#L16

  32. sunglocto

    > isn't it /etc/timezone always? iirc not on all distros

  33. moparisthebest

    what distro is that not true on

  34. singpolyma

    yeah getting the utc offset is easy but name is a whole thing

  35. lovetox

    favorite comment from that file

  36. lovetox

    ``` # For some reason some distros are removing support for /etc/timezone, # which is bad, because that's the only place where the timezone is stated # in plain text, and what's worse, they don't delete it. So we can't trust # it now, so when we have conflicting configs, we just ignore it, with a warning. ```

  37. lovetox

    but yeah, maybe i try to read etc/timezone and the rest needs to put it in manually

  38. detente

    i don't have /etc/timezone here moparisthebest

  39. moparisthebest

    detente: what distro

  40. detente

    NixOS

  41. Cynthia

    > detente: what distro i don't have /etc/timezone here either

  42. Cynthia

    and i'm running fedora atomic KDE

  43. moparisthebest

    ok so every normal distro then lol