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

    When you hate something so much you have to find weird corner cases to support your views. Even then the way described isn’t how someone who knows that they are doing would do.

    The best way for an unprivileged user to manage a service is for that user to run it. That way you inherit the correct permissions / acls / selinux contexts.

    The command to do so is:

    systemctl --user start the_service.service

    • renzev@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      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?

      • mholiv@lemmy.world
        link
        fedilink
        arrow-up
        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?

      • 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.

  • Vilian@lemmy.ca
    link
    fedilink
    arrow-up
    2
    ·
    3 months ago

    he’s trying to run the service as a user without run sudo, good luck trying that with runit

      • Possibly linux@lemmy.zip
        link
        fedilink
        English
        arrow-up
        1
        ·
        3 months ago

        Ok, just stop complaining. Almost everyone else disagrees and most of the community doesn’t even know that there is a different init system. Systemd was widely accepted 6 years ago and we have moved on.

        The good news is that you don’t have to use it. The bad news is pretty much everyone expects you to be using it.

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

            Don’t bother arguing with systemd bots. They spent time and effort learning the ins and outs of their overcomplicated init system, so naturally when someone suggests that there is a simpler solution, they interpret it as a personal attack.

  • duviobaz@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    1
    ·
    3 months ago

    I’m using Debian without ever having been involved in the init-wars. What’s wrong with Systemd and why should i not use it?

    • anarkatten@lemmy.ml
      link
      fedilink
      arrow-up
      0
      ·
      3 months ago

      I’d like to know too, a ELI5 version if possible. Somethingsomething monolithic, but what does that actually mean for me as an end user?

      • phoenixz@lemmy.ca
        link
        fedilink
        arrow-up
        1
        ·
        3 months ago

        In my personal opinion, correct me if I’m wrong:

        Systemd was created to replace the init system, then through extreme scope creep took over way more than wanted and needed, the main developer was “problematic” to say it politically correct, and in practice it has over complicated many super easy tasks to the point that I hate it. Other init systems were intuitive, systemd is all but.

        Few weeks ago I setup a systemd server ssh server. Changing the port would be 5 seconds in changing a line in the sshd config, but now with the new and improved systemd I need to follow some nightmare documentation into creating systemd files in unrelated places and reload configs or something and I’m done with it

  • ancap shark@lemmy.today
    link
    fedilink
    arrow-up
    1
    ·
    3 months ago

    I’m not yet convinced that “violating the unix philosophy” is a bad thing. I’m not saying that it’s not, I don’t have a defined opinion about this yet

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

    Big news (from 2017): debian held back software features because someone doesn’t like the new way of doing things. Let’s blame systemd for this unprecedented case.

    What’s wrong with giving access to the specific sudo command, as suggested in the other answers?

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

    Is it r-unit, or run-it?

    I’ve read it as r-unit for so long and now I’ve only just realised that run-it makes far more sense

    • renzev@lemmy.worldOP
      link
      fedilink
      arrow-up
      2
      ·
      2 months ago

      lol I’ve been pronouncing nginx as “enn-jinx” for so long before I learned that it was “engine-ex”.

    • brian@programming.dev
      link
      fedilink
      arrow-up
      1
      ·
      3 months ago

      one is giving the permission to manage the system service to a specific user, the other is running the service as the current user so they have permission to manage it by default

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

      your job security

      I think I finally understand why systemd bots defend their init system so aggressively.

    • renzev@lemmy.worldOP
      link
      fedilink
      arrow-up
      0
      ·
      edit-2
      3 months ago

      I don’t support calling people who volunteer their time to develop free software “just shit”, but I can’t help but agree at least a little bit about redhat. Redhat is kind of like Richard Nixon: if you just assume that eveything you dislike is their fault, you would be right surprisingly often.

      • “Predictable” interface naming
      • avahi
      • dbus

      That being said, they did also contribute to a lot of kickass software, from btrfs to Firefox to linux namespaces to qemu to pipewire, as well as to software that you can’t really live without like glibc or gdb. So I guess the converse also holds: if you just assume that everything you like is there thanks to redhat, you would be correct pretty often as well. Can’t really say that about Nixon though.

      • ᕙ(⇀‸↼‶)ᕗ@lemm.ee
        link
        fedilink
        arrow-up
        0
        arrow-down
        3
        ·
        3 months ago

        hitler built the autobahn. enough to not call him shit? doubt that.

        what lennart and red hat have done is just terrible.