Wandering Thoughts archives

2020-04-29

The problem of Ubuntu 20.04, Snaps, and where your home directory is

I tweeted:

Due to Chromium becoming a Snap in Ubuntu 20.04 and our user home directories not being under /home, it looks like our users will have to live without Chromium. Thanks, Ubuntu.

This may sound a little bit hard to believe, so let me show you the stages of trying to use chromium-browser on 20.04 (installed by doing 'apt-get install chromium-browser'):

; chromium-browser
2020/04/30 00:44:29.065359 cmd_run.go:560: WARNING: XAUTHORITY environment value is not a clean path: "/h/281/cks/.Xauthority"
 cannot open path of the current working directory: Permission denied
; cp -a $HOME/.Xauthority /tmp/cks-xauth; export XAUTHORITY=/tmp/cks-xauth
; chromium-browser 
cannot open path of the current working directory: Permission denied
; cd /tmp; chromium-browser
Sorry, home directories outside of /home are not currently supported. 
See https://forum.snapcraft.io/t/11209 for details.

On Ubuntu 20.04, Canonical delivers 'chromium-browser' (the open source version of Chrome) as a Snap, which is the jargon name for a 'Snappy', well, thing. The installed and visible /usr/bin/chromium-browser is just a shell script that flails around and eventually runs /snap/bin/chromium, which is a symlink to /usr/bin/snap, which magically winds up running Chromium as a sandboxed and oddly set up program. Or trying, at any rate; it fails, as you can see, because our long standing system configuration is incompatible with how Canonical requires you to operate your Ubuntu systems now.

(It would be nice if the whole system told you the core problem right away and saved you the initial attempts to make things work.)

Although the messages do not say this, the Snap system ignores any $HOME environment variable that you might have set; what it cares about is where /etc/passwd says your home directory is (after any symlinks are resolved). The official documentation says 'a workaround is to bind mount the home directory outside /home into /home'. We currently have roughly 2600 user home directories that are not under /home; instead they are under an assortment of filesystems that are NFS mounted from our Linux ZFS fileservers. Bind mounting all of their filesystems into /home or changing all of them to be NFS mounted there is what we can politely call not feasible, and certainly massively disruptive even if it was feasible.

Given this, I have to say that Canonical's Snappy system does not appear to be designed for anything except small environments, such as desktops and laptops used by one or a few people. It's certainly not viable in our larger (but still small scale) multi-user Unix environment. At the moment, we can probably live without Chromium in 20.04, although some of our users are going to be upset. If Canonical packages more important things as Snaps instead of actual packages, we will probably be forced to do something much more drastic.

(One quite likely option is migrating from Ubuntu LTS to Debian, who will probably never be this narrowly focused on small desktops or so willing to throw away compatibility with different environments.)

Ubuntu2004SnapsHomeIssue written at 21:18:02; Add Comment


Page tools: See As Normal.
Search:
Login: Password:
Atom Syndication: Recent Pages, Recent Comments.

This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.