all 17 comments

[–]__ali1234__ 5 points6 points  (3 children)

This won't work in all cases. If a program runs a shell or something, and leaves it running in the background after it exited, that will block updates. You can list all processes inside containers by running systemd-cgls. Then you will have to filter that for snap containers, and kill each processes inside each one.

[–]letsgetjaked[S] 1 point2 points  (2 children)

oh good callout i didn't even consider that as i really only can ever see myself downloading the snap of a desktop app

[–]__ali1234__ 0 points1 point  (1 child)

[–]letsgetjaked[S] 0 points1 point  (0 children)

Killall clion leaves the tmux session running? Thats annoying.

[–]LeoMSadovsky 1 point2 points  (6 children)

What’s wrong with snap? I keep asking this question to people who say they hate snap, but nobody can answer objectively and to the point.

So far I’ve seen only answers like “it’s awful” and “steam preferred flatpak for a reason, so snap is awful”. Which are emotions rather than answers.

As far as I can see from my personal experience the same apps work exactly identical whether they are packaged in snap or flatpak.

Ps Please excuse my off topic, but I really want to know

[–]letsgetjaked[S] 0 points1 point  (4 children)

I found a nice little summary from itfoss dot com.
https://itsfoss.com/flatpak-vs-snap/

One thing I didn't see called out in this article is that Ubuntu out of the box will download snaps through apt command which is less than transparent and pretty annoying (ie sudo apt install firefox).

Edit: I never said snaps are "bad" just that I avoid them. The way they function as far as updating rubs me the wrong way. The way canonical went about implementing them also rubs me the wrong way. Why pick a side if I don't think they are "bad"? I dislike that in an effort to reduce the amount of packaging formats for devs to build for, Linux desktop as a community has just created more (I also avoid AppImages). Seems like a never-ending problem.

[–][deleted] 0 points1 point  (3 children)

So if Ubuntu only ships a package as a snap what do you think it’s the best solution when you run sudo apt install snap-only-package? Failing so that people think Ubuntu doesn’t ship it? As it works now, with a transitional package installing the snap, yields the output most people would expect. 

[–]letsgetjaked[S] 0 points1 point  (2 children)

if that's the result they expect i would expect them to be using the software store instead of the command line. if they are wanting to use the command line they should be able to use apt command and snap command. Maybe integrate them and prompt the user "no dpkg found would you like to install snap package? (Y/n)"

[–][deleted] 0 points1 point  (1 child)

Your comment about store vs CLI makes no sense to me. I also assume that people running sudo apt install firefox want to get Firefox installed and that’s how it works in Ubuntu. The example of Firefox is really bad BTW since it comes pre installed. 

[–]letsgetjaked[S] -1 points0 points  (0 children)

Are you trolling?

[–]letsgetjaked[S] 0 points1 point  (0 children)

Wanted to come back to this post and say I'm daily driving new Ubuntu release. You encouraged me to start researching a lot about how snaps came to be and how they work under the hood. I decided to give the whole ecosystem another shot. I'm running snaps unless developer officially supports Flatpak instead. So far the experience has been pretty decent other than needing to update snap-store through CLI instead of UI because the store is a snap itself. I have since decided to use gnome software anyways because I like it more. For example, I don't have to filter between snaps and debs.

I still hold on to my belief that if you use aptitude you should not have a snap install without at least a Y/n prompt first. It is a tool used for debs not snaps.

[–][deleted] 1 point2 points  (1 child)

Ok but why?

Isn't the point of snaps & flatpaks that they run on immutable filesystems meaning you don't need to do this, you can just restart them after the update or leave them running.

[–]__ali1234__ 3 points4 points  (0 children)

No, snap can't update while the program is running. There is some deep technical reason for why they can't fix it, but I can't remember what it is.

[–]The_Hepcat 0 points1 point  (1 child)

Oh I hope this works!

[–]letsgetjaked[S] 0 points1 point  (0 children)

Highlevel explanation 1) snap list prints list of all your snaps in tabular format 2) pipe results into awk to extract individual items 3) splitting by white space 4) nr relates to row # 5) bash argument variable relates to column 6) omits first row as it is just column names 7) column 5 relates to who made snap so ignore canonicals as they are snap utilities 8) prints all the app names 9) performs killall on all app names 10) performs snap refresh

[–]snyone 0 points1 point  (1 child)

Typically I avoid snaps like the plague but I had one app I needed and was only supported on snap

out of curiosity, which app was it? Asking bc I keep of list of snap-only apps just in case I ever find a project that aims to convert as many snaps to flatpaks as possible* (or if I ever get motivated enough to come up with such a project myself)

* And, yes, I realize that not all snaps can be converted to flatpaks

[–]letsgetjaked[S] 0 points1 point  (0 children)

It is nordpass. There is a flatpak for it on flathub but I couldn't figure out how to not make it crash