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.

  • SuperIce@lemmy.world
    link
    fedilink
    English
    arrow-up
    45
    ·
    4 months ago

    It sounds like you’re trying to update system-wide flatpak packages as non-root. Most distros use polkit to allow you to update those without a password from the desktop (i.e. a local user), but usually require a password for remote users (like ssh). Just run as root: “sudo flatpak update”.

    You could also migrate to a user flatpak installation instead a system-wide one. That’s what I’ve done. IMO that’s how it should be done, but that’s not the default on most distros for some reason.

  • graham1@lemmy.world
    link
    fedilink
    English
    arrow-up
    41
    arrow-down
    3
    ·
    4 months ago

    I know a lot of people enjoy flatpak, and I enjoyed it for a couple apps that had annoying update processes in other package managers, but I’m really not impressed with it overall. Maybe it’s an unpopular opinion

    • 👍Maximum Derek👍@discuss.tchncs.de
      link
      fedilink
      English
      arrow-up
      17
      arrow-down
      2
      ·
      4 months ago

      I’m convinced most of flatpack’s popularity is just it not being snap. When one is meh but you actively dislike the other, “meh” starts to look pretty good. Or maybe I’m just projecting my own feelings.

      • anyhow2503@lemmy.world
        link
        fedilink
        arrow-up
        5
        ·
        4 months ago

        They both solve a very similar set of problems and they each have their advantages, but canonical really managed to burn a lot of community goodwill with snap, so I’m just not willing to touch it personally (I also dislike having a hundred loop devices in my mounts).

    • li10@feddit.uk
      link
      fedilink
      English
      arrow-up
      11
      arrow-down
      2
      ·
      4 months ago

      Maybe I’m talking out my ass, but it seems to be something devs like because it makes their life easier.

      Flatpak/snaps are always a hard miss for me as a user, unless there’s no other option.

      • Kusimulkku@lemm.ee
        link
        fedilink
        arrow-up
        4
        ·
        4 months ago

        For users it can mean a lot better app availability since not every distro has enough maintainers to have timely updates for all their repo packages and the maintainer obviously doesn’t want to maintain it for every single distro. Less work for maintainers/devs all around, with the benefit of better app availability to the user.

      • taladar@sh.itjust.works
        link
        fedilink
        arrow-up
        2
        arrow-down
        1
        ·
        4 months ago

        it seems to be something devs like because it makes their life easier.

        It seems to be something some devs like because they get annoyed when distro maintainers point out problems in their software or implement workarounds for those issues.

    • stepanzak@iusearchlinux.fyi
      link
      fedilink
      arrow-up
      8
      ·
      4 months ago

      Given the shortage of people working on FOSS apps, I’m all in for anything that makes their lifes easier, so tgey can focus on the programming part and don’t have to care about packaging. That can be solved with community packaging like AUR, but that has it’s own problems.

      • taladar@sh.itjust.works
        link
        fedilink
        arrow-up
        4
        arrow-down
        1
        ·
        4 months ago

        But Flatpak is one of the technologies that explicitly has the developer deal with packaging, something they are usually quite bad at because they don’t do it very often, unlike distro maintainers.

        • stepanzak@iusearchlinux.fyi
          link
          fedilink
          arrow-up
          1
          ·
          4 months ago

          Yes, but developers can create only flatpak, where they make sure it works and they officially support it, and then completely stop caring about other formats and community packages. Just like Bottles project does.

          • taladar@sh.itjust.works
            link
            fedilink
            arrow-up
            1
            ·
            4 months ago

            where they make sure it works and they officially support it

            Citation needed

            completely stop caring about other formats and community packages.

            That seems to be the case every time developers package software in any way. Sometimes even if they don’t package it at all.

            • stepanzak@iusearchlinux.fyi
              link
              fedilink
              arrow-up
              1
              ·
              4 months ago

              I’ll try to reword it so it’s clearer what I meant: I think developers shouldn’t have to maintain more than one package format, and I think flatpak is the best format to be the one supported by the developer officially. Many developers officially support only .deb for example.

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

      Maybe you have your own reasons for not being impressed with flatpak and you just didn’t list them, but this post is just OP blaming the flatpak CLI for not using sudo for him. There are things that flatpak doesn’t do well, but there’s currently not a single comment under this post listing any genuine drawbacks.

  • Kerb@discuss.tchncs.de
    link
    fedilink
    arrow-up
    37
    arrow-down
    1
    ·
    edit-2
    4 months ago

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

    why would flatpack ask for your pw multiple times when every other package manager only needs to ask once?

    • SuperIce@lemmy.world
      link
      fedilink
      English
      arrow-up
      32
      arrow-down
      1
      ·
      4 months 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
        26
        ·
        4 months 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
      14
      arrow-down
      1
      ·
      4 months 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

  • quicksand@lemm.ee
    link
    fedilink
    arrow-up
    30
    ·
    4 months ago

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

  • corsicanguppy@lemmy.ca
    link
    fedilink
    arrow-up
    22
    arrow-down
    1
    ·
    4 months 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
    14
    arrow-down
    1
    ·
    edit-2
    4 months 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

    E: From the comments it looks like they didn’t use sudo to update either. With it it would’ve asked once. With --user that wouldn’t have been necessary ofc.

      • Arthur Besse@lemmy.ml
        link
        fedilink
        English
        arrow-up
        12
        ·
        4 months 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
          1
          ·
          4 months 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).

    • Samsy@lemmy.mlOP
      link
      fedilink
      arrow-up
      3
      ·
      4 months ago

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

  • KISSmyOS@feddit.de
    link
    fedilink
    arrow-up
    7
    ·
    4 months ago

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

  • Ilgaz@lemm.ee
    link
    fedilink
    arrow-up
    3
    ·
    4 months ago

    Really weird thing is, distros and flathub kinda pushes users to do system wide installs while most of the packages can work and get updated per user. They are pushing the thing which made Windows almost impossible to use without an administrator user. A dramatic example would be gnu guix, almost never requires root for updates or installs. It is also usable by normal users. From GNU… :-)

    • SuperIce@lemmy.world
      link
      fedilink
      English
      arrow-up
      4
      ·
      4 months 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.