• renzev@lemmy.worldOP
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    1
    ·
    3 months ago

    have to find weird corner cases

    Lol. Lmao even. I needed to do this because I wanted to learn the miryoku keyboard layout , and I wanted a way to quickly switch between Miryoku and standard QWERTY. The best way to do this that I could come up with was to bind a special key on my keyboard to toggle kmonad on and off. So I wrote a service for kmonad and gave my user permission to manage it. Running kmonad as my user wouldn’t work, because kmonad needs root to create a virtual input device.

    Luckily, I am running Void, so the solution was a single well-documented command. Out of curiosity I decided to take a look at what this would look like on systemd distros, leading to this meme. Honestly, I had to do a double take by the time the guy started talking about Javascript.

    I feel kind of useless typing this out because you’re just gonna ignore it anyway. In my post, I am talking about needing to do X. Your response is “why are you doing X, you should do Y”. Why am I not surprised that you’re a systemd user? Do you also use Gnome by any chance?

    • Solar Bear@slrpnk.net
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      3 months ago

      Your response is “why are you doing X, you should do Y”

      Because they’re right, you shouldn’t do X. I know that’s not a satisfying answer for most people to hear, but it’s often one people need to hear.

      If the process must run as root, then giving a user direct and unauthenticated control over it is a security vulnerability. You’ve created a quick workaround for your issue, and to be clear it is unlikely to realistically cause you problems individually, but on a larger scale that becomes a massive issue. A better solution is required rather than recommend everybody create a hole in their security like yours in order to do this thing.

      If this is something that unprivileged users reasonably want to control, then this control should be possible unprivileged, or at least with limited privilege, not by simply granting permanent total control of a root service.

      This is ultimately an upstream issue more than anything else.

    • redcalcium@lemmy.institute
      link
      fedilink
      arrow-up
      1
      ·
      3 months ago

      Wait, aren’t most desktop environment support switching keyboard layout these days? For example, gnome can do that with super+space or via the language switcher in the top bar. Using a user service to do this seems overkill.

    • mholiv@lemmy.world
      link
      fedilink
      arrow-up
      1
      arrow-down
      1
      ·
      3 months ago

      Hey. There is no reason to feel useless. Everyone has value. And the best part about Linux is that we all can make our own choices. If people hate systemd they don’t have to use it. That’s ok. Void linux I think is actually a pretty cool distro. It reminds me of the BSDs for some reason.

      I use systemd because I like how it works and I think it’s well designed. As for desktops I am a huge fan of sway. Gnome isn’t bad on a laptop or tablet though. What do you use?