you are viewing a single comment's thread
view the rest of the comments
[–] 12 points 1 year ago* (9 children)

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?

  • source
  • hideshow 9 child comments
  • [–] 11 points 1 year ago (4 children)

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

  • source
  • parent
  • hideshow 4 child comments
  • [–] 1 point 1 year ago* (last edited 1 year ago)

    Hmm I just tried editing some systemd service with Kate and it did actually give me an authenticator popup when I tried to save it

    Although then the prompt expired and now it does nothing when I try to save it. Restarted Kate and now it works again...

    I haven't tried that before

    When I try to go into the sudoers.d folder tho it just says I can't, and the same thing happens when I try to open the sudoers file in Kate. If I try to copy and paste a systemd service in dolphin tho it just says I don't have permission and doesn't give a prompt.

    lol if I open it with nano through sudo it says 'sudoers is meant to be read only'

  • source
  • parent
  • [–] 4 points 1 year ago (2 children)

    With arch+xfce4 I mostly don't. Except for when I do systemctl reload 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

  • source
  • parent
  • hideshow 2 child comments
  • [–] 3 points 1 year 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.

  • source
  • parent
  • [–] 2 points 1 year ago (1 child)

    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.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 2 points 1 year 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.

  • source
  • parent
  • [–] 1 point 1 year ago

    The GUI apps do (depends on your DE). Terminal apps like nano are designed to work without fancy desktop stuff, like Polkit. Any sort of graphical text editor should prompt you for your password.

    systemctl still asks for a password, though. Because it's systemd, and it's part of everything.

  • source
  • parent