How to install LibreOffice 5.3 from snap on Ubuntu 16.04 (and others)
blog.simos.info
blog.simos.info
Can anyone comment on using snap vs something like flatpak and docker for deploy your own applications to servers?
The BSDs, for example, keep all of the system stuff in /usr, /etc, /bin, etc, and any extra stuff you install from ports or packages ends up in /usr/local.
It looks like Snaps are a way of accomplishing much the same thing (and more) in the Linux world.
Which is awful, because it means stuff you install from ports ends up in the same place as hand-compiled programs and there's no way to tell them apart. A distinction between "system" and "ports" is maybe sort of useful I guess (though I'm not sure exactly what I'm supposed to be gaining from it), but the distinction between automatically-managed-at-all and not is far far more important.
BSD sidesteps this problem, but introduces the one you mention.
It sounds like snaps will potentially solve both problems.
Installing from the Ubuntu Archive with apt-get means you get the version that was released with that version of the OS, say Ubuntu 16.10, sometimes with minor updates. With Snaps you get the version that the software developer pushes to you which could be their latest stable software released just yesterday (there is a concept of Snap channels that open up things like beta/candidate/daily builds e.t.c. but that is another topic).
Snaps can also update themselves, allow dependency bundling, are confined in sandboxes e.t.c. but for a user, it means you get very fresh software on your device. You can read more about them at https://snapcraft.io/
That's a perfectly manageable issue.
But don't claim snap's are the only solution to the problem of getting up-to-date software. That's not at all true. We've been solving this problem for far longer than Ubuntu has been around, and their approach is hardly a panacea. For example, it can and will result in additional memory and on-disk bloat as a consequence of duplicated dependencies across packages until de-duplication is implemented.
If only there was some existing solution for packaging and deploying software where you could declare dependencies between shared resources...
Well, that and the sandbox features, so that they can't interfere with the rest of the system.
Huh?
If a snap includes version 1.0.0 of libxyz, and another does the same, you have two copies. If a third snap comes along and uses version 1.0.0 libxyz, you now have three.
Snaps do not automatically de-duplicate today.
That means two copies of the library living on disk and in memory at run-time.
So, they've reinvented dependencies (though, to their credit, they gave them a different name), one of the very things snaps were intended to alleviate?
Look, don't get me wrong, snaps have some interesting advantages (sandboxing being the one major selling point, IMO). But, again, they're no panacea.
Just like docker, snaps make sense even if there is some duplication of the libraries. Other benefits outweigh the extra size.
## Snapcraft
https://git.launchpad.net/~bjoern-michaelsen/df-libreoffice/...
## Debian
https://anonscm.debian.org/git/pkg-openoffice/libreoffice.gi...
Are there risks/potential issues with having snap-based apps and apt-based apts coexist on the same installation of Ubuntu? I know there's now "Ubuntu Core" which replaces apt with snap for everything, but if you're just using plain old Ubuntu on a workstation or server, how safe is it to dip a toe in with a few snaps while leaving everything else managed with apt?
(Apologies if these are dumb questions, I just haven't been able to find much messaging on snaps that speaks to end-user concerns instead of developer ones...)
[1] $ snap version
snap 2.21+16.10
snapd 2.21+16.10
series 16
ubuntu 16.10
$ /snap/bin/libreoffice
datahome: /home/jon/snap/libreoffice/17/.local-5.3.0.3/share
(soffice:13608): Gtk-WARNING **: Locale not supported by C library.
Using the fallback 'C' locale.
(soffice:13608): Gtk-WARNING **: Could not find the icon 'dialog-warning-symbolic-ltr'. The 'hicolor' theme
was not found either, perhaps you need to install it.
You can get a copy from:
http://icon-theme.freedesktop.org/releases
(soffice:13608): Gtk-WARNING **: Error loading theme icon 'image-missing' for stock: Icon 'image-missing' not present in theme ubuntu-mono-dark
(soffice:13608): Gtk-WARNING **: Error loading theme icon 'image-missing' for stock: Icon 'image-missing' not present in theme ubuntu-mono-dark
(soffice:13608): GLib-GObject-CRITICAL **: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
(soffice:13608): Gtk-WARNING **: Error loading theme icon 'image-missing' for stock: Icon 'image-missing' not present in theme ubuntu-mono-dark
(soffice:13608): Gtk-WARNING **: Error loading theme icon 'image-missing' for stock: Icon 'image-missing' not present in theme ubuntu-mono-dark
(soffice:13608): GLib-GObject-CRITICAL **: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
(soffice:13608): Gtk-WARNING **: Error loading theme icon 'image-missing' for stock: Icon 'image-missing' not present in theme ubuntu-mono-dark
(soffice:13608): Gtk-WARNING **: Error loading theme icon 'image-missing' for stock: Icon 'image-missing' not present in theme ubuntu-mono-dark
(soffice:13608): GLib-GObject-CRITICAL **: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
(soffice:13608): Gtk-WARNING **: Error loading theme icon 'image-missing' for stock: Icon 'image-missing' not present in theme ubuntu-mono-dark
(soffice:13608): Gtk-WARNING **: Error loading theme icon 'image-missing' for stock: Icon 'image-missing' not present in theme ubuntu-mono-dark
(soffice:13608): GLib-GObject-CRITICAL **: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
(soffice:13608): Gtk-WARNING **: Error loading theme icon 'image-missing' for stock: Icon 'image-missing' not present in theme ubuntu-mono-dark
(soffice:13608): Gtk-WARNING **: Error loading theme icon 'image-missing' for stock: Icon 'image-missing' not present in theme ubuntu-mono-dark
(soffice:13608): GLib-GObject-CRITICAL **: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
(soffice:13608): Gtk-WARNING **: Error loading theme icon 'image-missing' for stock: Icon 'image-missing' not present in theme ubuntu-mono-dark
(soffice:13608): Gtk-WARNING **: Error loading theme icon 'image-missing' for stock: Icon 'image-missing' not present in theme ubuntu-mono-dark
(soffice:13608): GLib-GObject-CRITICAL **: g_object_ref: assertion 'G_IS_OBJECT (object)' failed(By the way, shared libraries were invented to reduce memory usage. Not sure what will happen to that goal now.)
KSM should prevent duplicate libraries from taking up extra memory on your machine.