Background-Story: I did a “flatpak update” on a remote client and every package wants the PW for downloading and for installing again. I had to enter the password like 30 times or more.

  • Kerb@discuss.tchncs.de
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    1 year ago

    huh?
    why would you need to enter a password to update flatpacks?

    why would flatpack ask you pw when every other package manager only needs to ask once?

    • SuperIce@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 year ago

      Because he tried to update a system-wide flatpak install as a non-root user. Flatpak uses polkit for root permissions. Polkit is usually set up to allow non-root local users to update flatpak without a password, but not remote ones, hence having to continually enter the password for polit when using SSH. He could just run the update with sudo like a normal package manager and would only have to enter the password once. But then he wouldn’t be able to complain on Lemmy.

      • Samsy@lemmy.mlOP
        link
        fedilink
        arrow-up
        0
        ·
        1 year ago

        Hm, next time when I run into a serious issue, I make a meme here and wait for the explanation.

        Thx, next time I just use sudo.

    • somethingsomethingidk@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      1 year ago

      For every sever install I’ve had, flatpak defaults to the system install which requires a password. You have to explicity pass the --user flag.

      I’m not sure how to make it the default

  • KISSmyOS@feddit.de
    link
    fedilink
    arrow-up
    0
    ·
    1 year ago

    I accidentally did a winget upgrade --all from a non-elevated powershell today. I know your pain.

  • quicksand@lemm.ee
    link
    fedilink
    arrow-up
    0
    ·
    1 year ago

    I love that this post just turned into people giving helpful solutions and not bullying. Lemmy be awesome

    • Samsy@lemmy.mlOP
      link
      fedilink
      arrow-up
      0
      ·
      1 year ago

      Maybe, I thought this couldn’t be end in another ask for password, and again, and again.

    • SuperIce@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 year ago

      Flatpak uses polkit for permissions. System level flatpak updates are typically permitted without password by polkit but only for local users. For SSH, most flatpak operations require a password, so it’s a mess if you try to run an update on system level flatpaks without sudo, which solves OP’s problem. They could also move everything to a user level install, which IMO makes more sense for flatpaks than the default system level mode.

  • corsicanguppy@lemmy.ca
    link
    fedilink
    arrow-up
    0
    ·
    1 year ago

    I like this.

    Flatpak is so bad for single-source-of-truth for install state that you should have to put in your password every time just to confirm you understand the pain you’re signing up for.

    My only advice here would be if they can change the prompt to say

    THANK YOU SIR!  MAY I HAVE ANOTHER!
    password:  *******
    
  • Kusimulkku@lemm.ee
    link
    fedilink
    arrow-up
    0
    ·
    1 year ago

    I update flatpak through ssh and haven’t had this issue. I think you installed it system wide and not for the user, since with user you don’t need password at all

    • Kusimulkku@lemm.ee
      link
      fedilink
      arrow-up
      0
      ·
      1 year ago

      This was rather an issue of flatpaks being installed for the system, so updating requires root. One option would’ve been to use sudo and another would’ve been --user. I guess flatpak could be blamed for defaulting to --system, which I’m not sure if the blame is on flatpak or distros, dunno.

      • Arthur Besse@lemmy.ml
        link
        fedilink
        English
        arrow-up
        0
        ·
        1 year ago

        Only with --user (I think)? Root can also update the “system installation” flatpaks, which are presumably what OP needed a password for.

        • Arthur Besse@lemmy.ml
          link
          fedilink
          English
          arrow-up
          0
          ·
          1 year ago

          That installs and or updates roots flatpaks

          Which is what flatpak will always do unless provided with the --user flag.

          By default it operates in system-wide mode, which is different from “root’s”.

          flatpak list and sudo flatpak list will both show you what is installed system wide, and flatpak list --user will show you your user’s, and sudo flatpak list --user will show you the root user’s flatpaks installed in per-user mode (of which there are typically none).