News for hackers. Stuff that matters.
Re:Ubuntu 20.04 LTS (Focal Fossa) by Jean-Philipe on Thursday April 23, 2020 @04:42AM (#22953970)
> The only 'con' is the pushing of Snap packages.

I don't get why they're doing that. Snaps have mostly created problems for me, like they don't scale when other apps do, or the styling is off, or they don't show up properly in the software manager. The snap daemon on one of my laptops always blocks the shutdown by 30 seconds. Generally a rather confusing experience.

Re:Ubuntu 20.04 LTS (Focal Fossa) by turbinerneiter on Thursday April 23, 2020 @05:01AM (#22954074)
I'm on Fedora where the equivalent is called Flathub/Flatpaks. There are definitely some rough edges still, but the possible upsides are amazing for me.

It makes it way easier for a developer to release for different Linux-flavors. The applications get sandboxed and there is much less risk to mess up your system. Stuff like permission, similar to Android/iOS becomes possible.

There for sure is problems to: it makes it way easier for a lazy developer to ship ancient libraries without security fixes, the "packages", now images, are much larger and the quality check of the packager gets sidestepped. And, as always when you try something new, it gets worse before it gets better.

But I think the idea is good and I hope for the best.

Re:Ubuntu 20.04 LTS (Focal Fossa) by twic on Thursday April 23, 2020 @05:36AM (#22954241)
The way i see it, software which is truly part of the distribution can and should still be packaged the traditional way. But snap/flatpak creates a standard way to install software which is not really part of the distribution. It replaces all the random tarballs and unpacking things in /opt that you occasionally had to do when installing third-party software. It makes sense for VS Code, IntelliJ, Slack, Chrome, etc, to be in snap/flatpak.

It doesn't make sense for open-source software built with traditional tools by the distribution maintainers themselves to be in snap/flatpak.

I note that on Ubuntu 18, snapd itself is distributed as a snap, which seems like a very poor idea to me.

Re:Ubuntu 20.04 LTS (Focal Fossa) by mceachen on Friday April 24, 2020 @01:09PM (#22970434)
> snapd itself is distributed as a snap, which seems like a very poor idea to me

I took this as a "vote of confidence" that snap could self-host snapd.

Hosting via snap means they can push updates and not have to wait for users to `apt update; apt upgrade`, as snaps auto-upgrade without user intervention.

I don't know of other benefits, though.

Re:Ubuntu 20.04 LTS (Focal Fossa) by tannhaeuser on Thursday April 23, 2020 @06:26AM (#22954470)
> I'm on Fedora where the equivalent is called Flathub/Flatpaks. There are definitely some rough edges still, but the possible upsides are amazing for me.

Except Ubuntu and Fedora each use their own container format. The entire reason we're in this place is that RedHat went with .rpm and Debian/Ubuntu with .deb. There's no-one winning in this format war, and no-one is winning by putting yet another layer of abstraction either. Like with Docker, the problem that container app images are trying to solve (that of incompatible 3rd party shared libs) cannot be solved by containers, because the reason for shared libs to exist in the first place is so that eg. security vulnerabilites in old shared lib versions can be transparently fixed by having the OS install newer libs; but (as you say yourself) with containerized apps this is impossible. You might as well ship statically linked apps instead.

Re:Ubuntu 20.04 LTS (Focal Fossa) by Izkata on Thursday April 23, 2020 @09:09AM (#22955484)
> The applications get sandboxed and there is much less risk to mess up your system.

Apparently snaps are also sandboxed between versions of the same application. My very first experience of snaps was Vuze getting updated overnight and all my configuration and torrents just vanising.

I ended up rolling back the version (to restore everything that disappeared) and, upon discovering snaps are designed to never be able to lock a version number, shot it in the head by killing the daemon and chmod'ing its executables to not be executable.

I assume Vuze's snap was misconfigured, but it really turned me off of them and I've since decided to stick to nix instead of snap whenever I can.

Re:Ubuntu 20.04 LTS (Focal Fossa) by FeepingCreature on Thursday April 23, 2020 @09:40AM (#22955848)
Google says that snap app configuration should be copied forward to new versions. Sounds like either a Vuze bug or a snap package bug.
Re:Ubuntu 20.04 LTS (Focal Fossa) by mcny on Thursday April 23, 2020 @05:32AM (#22954223)
My understanding is snap and flatpak are not equivalent at all because snap is more permissive whereas flatpak is sandboxed.

Specifically, it is not possible to do gpg signed commits from flatpak (e.g., jetbrains idea) without tweaks upstream.

I agree with the overarching idea though: it gets worse before it gets better. See wayland and how we still can’t capture display in obs.

I am a little torn on this. Should the onus to “fix” be on jetbrains and obs? I personally think no where possible. Replacements should be drop in without effort or at least with clear guidance and not too much effort on behalf of individual applications.

Re:Ubuntu 20.04 LTS (Focal Fossa) by stubish on Thursday April 23, 2020 @07:17AM (#22954749)
Snaps are sandboxed. They can be granted extra privileges, such as access to $HOME, camera, bluetooth etc. Some of these interfaces such as $HOME can be gained automatically by any snap. Others need to be granted by Canonical (to automatically grant access on install), or manually granted by the user post install. There is also a 'classic' mode where the app is unsandboxed, which again needs to be granted by Canonical and in addition requires explicit acceptance by the user when being installed.
Re:Ubuntu 20.04 LTS (Focal Fossa) by beagle3 on Thursday April 23, 2020 @03:17PM (#22959948)
"classic" snaps are not sandboxed, and you have to acknowledge that when installing them.

"modern" snaps are sandboxed, and you can change their permissions in the Settings/Control-Panel app. You might argue with the choice of permission granularity, but it IS there.

Re:Ubuntu 20.04 LTS (Focal Fossa) by zyga on Thursday April 23, 2020 @05:21AM (#22954155)
It's still work in progress but snaps genuinely make packaging easier. There are rough edges, especially on the desktop, but those are all being worked on, in collaboration with flatpak actually.

It will take a while but in the future it will not be any worse at runtime and it will be much, much easier to package and run apps across releases and OSes

Re:Ubuntu 20.04 LTS (Focal Fossa) by cies on Thursday April 23, 2020 @05:29AM (#22954211)
Ubuntu had the calculator as a snap! What's the idea with that? It suddenly took 2 secs to load and uses load of memory...

I dont care packaging got easier. I care for a smooth working system I can understand and instrument, and that does not hog resources.

Re:Ubuntu 20.04 LTS (Focal Fossa) by alpaca128 on Thursday April 23, 2020 @05:49AM (#22954302)
Snap and flatpak are great fallback methods. I first try installing software natively, but sometimes it's not available/compatible and you really need it to work, so flatpak is great to just get it running at all.

I'm not a fan of using it as the default though, and flatpak isn't immune to issues either, for example I use a flatpak package which regularly can't be updated for months because of some incorrect metadata if the error message can be believed.

I still think it's a good step forward for increasing compatibility especially across different Linux distributions.

Re:Ubuntu 20.04 LTS (Focal Fossa) by cies on Thursday April 23, 2020 @09:42AM (#22955861)
They may be fallback methods, but snap is for sure not "great" (not a finished product as other have pointed out). As you also understood, snap is sadly not promoted as a fallback method.

This stuff is pushed with corporate power. Not adopted because great great fallback method it provides.

The compatibility is also balkanized for the start with the flatpack/snap split. Pfff, what a mess.

Re:Ubuntu 20.04 LTS (Focal Fossa) by julianlam on Thursday April 23, 2020 @09:49AM (#22955928)
Oh! Is _that_ why the calculator is nigh unusable now? Sheesh, this just shot snap's credibility right out the window. It's faster for me to boot up the node executable and do my calculations there.
Re:Ubuntu 20.04 LTS (Focal Fossa) by slavik81 on Thursday April 23, 2020 @11:31PM (#22964352)
The minimal fix for the sluggish calculator on Ubuntu 18.04 to 19.10:

  sudo snap remove gnome-calculator
  sudo apt install gnome-calculator
The more complete solution is entirely removing snap. I did that long ago, but my process was a little painful. From my logs, it went something like this:

  snap list
  snap remove <copy-paste packages from above>
  sudo service snapd restart # core is tricky to get rid of
  sudo snap remove core
  snap list # check it's empty
  sudo apt install gnome-calculator gnome-characters gnome-logs gnome-system-monitor
  sudo apt purge snapd squashfs-tools gnome-software-plugin-snap
  rm -r ~/snap
See also: https://ubuntuforums.org/showthread.php?t=2409173&p=13826670...
Re:Ubuntu 20.04 LTS (Focal Fossa) by kingosticks on Thursday April 23, 2020 @03:34PM (#22960158)
Re:Ubuntu 20.04 LTS (Focal Fossa) by lozf on Thursday April 23, 2020 @03:05PM (#22959765)
`bc -l` is pretty awesome.
Re:Ubuntu 20.04 LTS (Focal Fossa) by readwind on Thursday April 23, 2020 @05:39AM (#22954254)
And some times, on some systems, the calculator got all transparent, and unusable, so, I left Ubuntu after that. Granted I was on LTS'es almost all of the time, so, this might be highly circumstantial and subjective. But I've been there as you apparently also have. I hope snap improves for the best of all, it seems amateurish to push snap-apps, at their then-current state, in LTS releases. I left basically after Ubuntu 14.04, and even that, 14.04, was a let-down from 12.04, and so on. In my experiences.
Re:Ubuntu 20.04 LTS (Focal Fossa) by GordonS on Thursday April 23, 2020 @01:42PM (#22958611)
Do you know why, technically, being packaged as a snap would increase start time and memory usage?
Re:Ubuntu 20.04 LTS (Focal Fossa) by shasheene on Thursday April 23, 2020 @06:44AM (#22954549)
Also not yet possible to install a snap using a chroot yet : https://bugs.launchpad.net/snappy/+bug/1609903 (the bug has been open for 3 years). Chroots are a key mechanism to building any customized Linux image.

I hope they smooth these rough edges further before they push more snaps onto the world.

Re:Ubuntu 20.04 LTS (Focal Fossa) by Taniwha on Thursday April 23, 2020 @06:18AM (#22954443)
Yeah, snaps are pretty much a disaster if you don't have a simple home directory, put some directories on different volumes with a symbolic link (because they are so large and you don't have room), or use /tmp as a temporary directory to save files into and chrome becomes useless (and fails quietly without explaining why) - I must admit if they haven't fixed this stuff I'm likely jumping ship
Re:Ubuntu 20.04 LTS (Focal Fossa) by viraptor on Thursday April 23, 2020 @06:18AM (#22954442)
> Snaps have mostly created problems for me

I think this is the wrong way to look at it. You still have access to the same packages as before without snap. If you're using snap, that means you either explicitly chose it, or the package is not available in the repo.

The choice here isn't between a package or a snap most of the time. It's between: not using the app, packaging it on your own, or using a snap which is not perfect.

Re:Ubuntu 20.04 LTS (Focal Fossa) by jamieweb on Thursday April 23, 2020 @06:26AM (#22954466)
But certain packages are migrating to Snap-only, e.g. Chromium.

I understand why they're doing this (primarily to save on build times), but the way they've gone about it (using a transitional Apt package that just installs the Snap) is messy and inconsistent.

If I type `apt install` then I want an Apt package. Under no circumstances should this install a Snap.

Re:Ubuntu 20.04 LTS (Focal Fossa) by viraptor on Thursday April 23, 2020 @07:06AM (#22954681)
> using a transitional Apt package that just installs the Snap

You need a migration path from an existing package. It's also nice not to invalidate every post on the web which describes the installation.

Chrome is special... it already doesn't really belong in the repository and was handled in a special way. It bundles tens of libraries in its binary without relying on the system/repo deps. It's actually more natural for it to live with all the other "include all deps" applications.

Re:Ubuntu 20.04 LTS (Focal Fossa) by rlpb on Thursday April 23, 2020 @07:58AM (#22955002)
That's because Chromium is hell to keep updated in a stable distribution release apt archive. Upstream adds new dependencies that aren't packaged in the distribution's stable releases, for example. It's not practical to do anything but a whole load of bundling (in debs) to solve the problem. This then isn't much different to a snap any more anyway, and packaging a snap takes a fraction of the effort.

Anyone is welcome to maintain chromium as an apt package for your distribution release of choice, and you're welcome to point apt to that repository instead. The reason it's not happening is that it's increasingly impractical to do while also maintaining Ubuntu's quality standard for debs.

Re:Ubuntu 20.04 LTS (Focal Fossa) by cies on Friday April 24, 2020 @08:31AM (#22967247)
> If I type `apt install` then I want an Apt package. Under no circumstances should this install a Snap.

Exactly!

I found a way to remove snap[1] and get Chromium from Debian[2]. But I'm close to leaving the buntus over this drama.

[1] https://github.com/cies/kubuntu-setup#remove-snap

[2] https://github.com/cies/kubuntu-setup/tree/master/chromium

Re:Ubuntu 20.04 LTS (Focal Fossa) by mixmastamyk on Thursday April 23, 2020 @02:08PM (#22958962)
Yep, and the chromium migration broke my webex meetings.

First I had to research and find out how to give it microphone permissions. That worked, but the mic works for about one minute then stops.

So frustrating, I had to move meetings to Firefox which is where I do most of my work. I like to have two browsers to split the work to that which is most appropriate.

Re:Ubuntu 20.04 LTS (Focal Fossa) by cies on Friday April 24, 2020 @08:32AM (#22967254)
I found a way to remove snap[1] and get Chromium from Debian[2]. Have a look (I have the same problem with audio in the snap version):

[1] https://github.com/cies/kubuntu-setup#remove-snap

[2] https://github.com/cies/kubuntu-setup/tree/master/chromium

Re:Ubuntu 20.04 LTS (Focal Fossa) by readwind on Thursday April 23, 2020 @06:29AM (#22954485)
That's f'd up. Some people say the default settings for sandboxing [in respects of basic snap defaults or setups] etc are basically disabled some places. Hope that works. Bet the skin looks great. Most snaps I used long ago looked like a un-made-up pig to be frankly. I don't hate on snap, I obviously love it, or either I'd not wasted the time. Let's hope it improves. All improvements are great, obviously.
Re:Ubuntu 20.04 LTS (Focal Fossa) by readwind on Thursday April 23, 2020 @06:26AM (#22954469)
The problem is, from a user perspective, when simple things as the included calculator is a snap package. I am biased and it's been a long time since I used Ubuntu or snap, but, you shouldn't need to be a hostage to sloppy snap-early-experiments, for the _calculator_, on an LTS release. This is long ago, and, let's hope these things have improved. And will improve. All progress is progress, let's hope for the best. Freedom is good, long live Ubuntu and snap. Right.
Re:Ubuntu 20.04 LTS (Focal Fossa) by SCdF on Thursday April 23, 2020 @06:47AM (#22954561)
> The snap daemon on one of my laptops always blocks the shutdown by 30 seconds

Oh THAT'S why that happens sometimes. I never bothered debugging it.

Re:Ubuntu 20.04 LTS (Focal Fossa) by Sir_Substance on Thursday April 23, 2020 @08:12AM (#22955079)
Same, I'd taken to just holding down the power button, mystery solved I guess.
Re:Ubuntu 20.04 LTS (Focal Fossa) by VMG on Thursday April 23, 2020 @07:07AM (#22954687)
These "statically linked" packages can solve certain problems very well. Packaging or installing Steam for non-Ubuntu platforms can be very tricky. I'm using the Steam flatpack version on Arch and it saved me a ton of hassle.
Re:Ubuntu 20.04 LTS (Focal Fossa) by paines on Thursday April 23, 2020 @07:03AM (#22954659)
>The snap daemon on one of my laptops always blocks the shutdown by 30 seconds.

I used Spotify, VS Code and some PS2 emulator from Snap and haven't seen this behaviour. Which snap package does that for you ?

Re:Ubuntu 20.04 LTS (Focal Fossa) by Jean-Philipe on Friday April 24, 2020 @07:23PM (#22974020)
I don't think it's from a specific package. It's just the Daemon. I didn't really dig into why or what, don't have the time, and don't have the energy. I just get the message on the console when shutting down my laptop. Maybe it's updating something? Who knows.