this post was submitted on 06 Mar 2024
397 points (95.6% liked)

linuxmemes

21421 readers
1097 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack members of the community for any reason.
  • Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
  • These rules are somewhat loosened when the subject is a public figure. Still, do not attack their person or incite harrassment.
  • 3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn. Even if you watch it on a Linux machine.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, and wants to interject for a moment. You can stop now.
  •  

    Please report posts and comments that break these rules!


    Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't fork-bomb your computer.

    founded 1 year ago
    MODERATORS
    397
    submitted 8 months ago* (last edited 8 months ago) by [email protected] to c/linuxmemes
     

    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.

    top 50 comments
    sorted by: hot top controversial new old
    [–] SuperIce 45 points 8 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 39 points 8 months ago (7 children)

    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

    [–] [email protected] 32 points 8 months ago (2 children)

    Nah, it's pretty popular. Flatpack for the things you can't / won't use your regular package manager is the most common behavior.

    [–] [email protected] 11 points 8 months ago (6 children)

    I dunno. A lot of stuff is switching over to flatpak these days. And it is the right direction. Regular repo stuff for the system and flatpak for apps is the way to go. You can have solid base separate from the applications.

    [–] [email protected] 6 points 8 months ago (1 children)
    [–] [email protected] 5 points 8 months ago (7 children)

    It's good that there's options for everyone. I feel like flatpak is to desktop systems what docker is to servers.

    The situation right now is good in that both are maintained, but in the future it might be that distro repos get slimmer while flatpak becomes the norm. But we'll see. I bet there's people out there willing to maintain packages in the distro repos if nothing else then out of spite hah.

    load more comments (7 replies)
    load more comments (5 replies)
    [–] [email protected] 2 points 8 months ago (1 children)

    Noob question: lately I've been using flatpaks for most things because of the packaged dependencies. I am under the impression that as you add and remove programs over time, you'll run into less issues with flatpak than with the distro package manager because the dependencies will come and go with the flatpaks and not sit in the host accumulating my mistakes. Am I wrong about this?

    [–] [email protected] 2 points 8 months ago (1 children)

    Any package manager worth its CPU cycles should take care of orphaned dependencies for you. Whether your package manager is decent or not is matter of heated debate, but the problem of orphaned dependencies has been largely solved.

    TLDR, you're likely wrong about it. You're also paying to have a neat filesystem by using more storage (which is cheap, spend away), memory (a bit or a big bit, depending), and performance (there are comparisons online, only you can decide if it's significant for you).

    Now, my opinion is that you're overtaxing yourself. The reason you mentioned for adopting flatpack is better addressed by familiarizing yourself with your main package manager. People that defend widespread use of flatpacks usually have other reasons (mostly newer versions, faster bug fixes and security fixes, etc.).

    The combination of which distribution and how to use side-loaded software isn't a one size fits all. There are pros and cons to each approach, and they differ based on your needs, your distro, your threats...

    [–] [email protected] 2 points 8 months ago (1 children)

    Thanks for answering! I'll do some reading on how package managers work.

    load more comments (1 replies)
    [–] [email protected] 15 points 8 months ago (1 children)

    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 5 points 8 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).

    [–] [email protected] 9 points 8 months ago (2 children)

    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.

    [–] [email protected] 4 points 8 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.

    load more comments (1 replies)
    [–] [email protected] 8 points 8 months ago (1 children)

    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.

    [–] [email protected] 3 points 8 months ago (3 children)

    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.

    load more comments (3 replies)
    [–] [email protected] 6 points 8 months ago

    I agree. I prefer using native package manager, nix in my case.

    [–] anyhow2503 3 points 8 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.

    load more comments (1 replies)
    [–] [email protected] 36 points 8 months ago* (last edited 8 months ago) (2 children)

    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 31 points 8 months ago (1 children)

    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.

    [–] [email protected] 26 points 8 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 13 points 8 months ago (2 children)

    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

    [–] [email protected] 4 points 8 months ago

    Remove --system repos and install them as --user. For me it defaults to --user

    load more comments (1 replies)
    [–] [email protected] 31 points 8 months ago

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

    [–] [email protected] 21 points 8 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:  *******
    
    [–] [email protected] 13 points 8 months ago* (last edited 8 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.

    [–] [email protected] 12 points 8 months ago (1 children)

    next time you can use su or sudo

    [–] [email protected] 4 points 8 months ago (2 children)

    That installs and or updates roots flatpaks

    [–] [email protected] 12 points 8 months ago (1 children)

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

    [–] [email protected] 3 points 8 months ago

    Ah, I've never tried

    [–] SuperIce 4 points 8 months ago* (last edited 8 months ago) (1 children)

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

    load more comments (1 replies)
    [–] NoLifeGaming 12 points 8 months ago* (last edited 8 months ago) (1 children)

    Wouldn't you just be able to terminate and then run sudo flatpak update ?

    [–] [email protected] 3 points 8 months ago

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

    [–] Linkerbaan 9 points 8 months ago (1 children)
    [–] [email protected] 7 points 8 months ago (2 children)

    Sudo su

    ... for a brief period exposes you to risk. And its double-child kills a lot of context you may want. And it's ghetto like

    cat file | grep string | cat | more

    try sudo -i and join us in this millennium.

    [–] federatingIsTooHard 2 points 8 months ago
    load more comments (1 replies)
    [–] [email protected] 7 points 8 months ago

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

    [–] [email protected] 7 points 8 months ago

    Polkit rule, if you remove the requirement on subject local then it should work without

    [–] [email protected] 7 points 8 months ago

    sudo flatpak upgrade

    [–] [email protected] 3 points 8 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... :-)

    [–] EpicFailGuy 2 points 8 months ago
    [–] [email protected] 2 points 8 months ago (2 children)

    Reminds me of updating aur

    [–] Overtheveloper 6 points 8 months ago

    yay --sudoloop

    load more comments (1 replies)
    [–] [email protected] 2 points 8 months ago (1 children)

    Omg. That doesnt sound great. I‘m using discover on my machine and it works seamless.

    [–] SuperIce 4 points 8 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.

    load more comments
    view more: next ›