• AdrianTheFrog@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    6 days ago

    Is there a technical reason that Linux apps can’t/don’t just pop up an authenticator thing asking for more privileges like Windows apps can do? Why does nano just say that the file is unwriteable instead of letting me increase the privileges?

    • black0ut@pawb.social
      link
      fedilink
      arrow-up
      0
      ·
      5 days ago

      Linux apps follow simplicity principles. If you don’t have permission to delete a file, why assume you may know the password of the user who has permission?

      You can preface sudo to any command to execute it with root privileges, which would be similar to running as admin in windows.

      Graphical apps do tend to ask for authentication if it makes sense. No userland apps should need more permissions than the current user’s in order to run.

      • NiHaDuncan@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        4 days ago

        Small pedantic correction, but you can’t preface every command with sudo; only executables can be invoked with sudo as it can’t elevate your current shell. Naturally, the way to execute non-executables such as builtin routines as root is to just spawn into a root shell with sudo su.

    • Mohamed@lemmy.ca
      link
      fedilink
      arrow-up
      0
      ·
      6 days ago

      Some do. I’m sure it is possible with terminal programs. In KDE, you do get authenticator pop-ups.

      • dubyakay@lemmy.ca
        link
        fedilink
        arrow-up
        0
        ·
        6 days ago

        With arch+xfce4 I mostly don’t. Except for when I do systemctl reload <service> in a cli without sudo and it pops a surprise elevation password request gui in my face. I haven’t figured out what makes it behave like that.

        I use Arch btw 👉🧐 eats booger

        • m0stlyharmless@lemmy.zip
          link
          fedilink
          arrow-up
          0
          ·
          edit-2
          5 days ago

          That’s the result of polkit (policy kit) authentication agents. These are typically DE-specific for their GUIs.

          pkexec is comparable to sudo and can be used from the terminal to get the graphical prompt for elevated commands.