From 1f9338dccc11826b4a8f9cf461a85569f353e5aa Mon Sep 17 00:00:00 2001 From: mviereck Date: Sun, 16 Feb 2020 18:24:37 +0100 Subject: [PATCH] snap/snappy: more general detection #223 --- CHANGELOG.md | 3 +++ x11docker | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 33d1bf0d..9b2b0f65 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,9 @@ Project website: https://github.com/mviereck/x11docker [(#222)](https://github.com/mviereck/x11docker/issues/222) - `--wm`: Improved checks and fallback handling. Disabled context menu for host window manager `--wm=openbox`. +### Fixed + - snap/snappy: More general detection. + [(#223)](https://github.com/mviereck/x11docker/issues/223) ## [6.5.0](https://github.com/mviereck/x11docker/releases/tag/v6.5.0) - 2019-12-22 diff --git a/x11docker b/x11docker index 0b220f01..12b767ef 100755 --- a/x11docker +++ b/x11docker @@ -6058,7 +6058,7 @@ check_host() { # check host environment Hostsystem="$(grep '^ID=' /etc/os-release 2>/dev/null | cut -d= -f2 || echo 'unknown')" # Check if docker is installed with Ubuntu snap - [ "$(command -v docker | cut -c1-5)" = "/snap" ] && Runsinsnap="yes" | Runsinsnap="no" + grep -q snap < <(realpath $(command -v docker)) && Runsinsnap="yes" | Runsinsnap="no" # Check libc from host. If same as in container, it is possible to share timezone file Hostlibc="unknown"