From 6c3b8b1a85f3ce9fa780b41bf76bb56aef047739 Mon Sep 17 00:00:00 2001 From: adadrag Date: Thu, 12 Mar 2026 16:33:59 +0000 Subject: [PATCH] Suppress harmless LXC warnings during install - Configure locales (en_US.UTF-8) before installing packages - Filter out udev "Permission denied" and pulseaudio reload warnings - These are normal in unprivileged containers but look alarming Co-Authored-By: Claude Opus 4.6 --- setup-openclaw-lxc.sh | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/setup-openclaw-lxc.sh b/setup-openclaw-lxc.sh index 37ab872..c300504 100644 --- a/setup-openclaw-lxc.sh +++ b/setup-openclaw-lxc.sh @@ -162,26 +162,37 @@ ok "Container IP: ${CT_IP:-unknown}" info "Updating packages and installing prerequisites..." ct_exec " export DEBIAN_FRONTEND=noninteractive - apt-get update && apt-get upgrade -y - apt-get install -y curl ca-certificates gnupg git + + # Fix locale warnings + apt-get update && apt-get install -y locales 2>&1 | grep -v 'Failed to write' + sed -i 's/^# *en_US.UTF-8/en_US.UTF-8/' /etc/locale.gen + locale-gen en_US.UTF-8 >/dev/null 2>&1 + update-locale LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 + export LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 + + apt-get upgrade -y 2>&1 | grep -v 'Failed to write' + apt-get install -y curl ca-certificates gnupg git 2>&1 | grep -v 'Failed to write' " ok "Prerequisites installed." info "Installing Node.js 22..." ct_exec " - curl -fsSL https://deb.nodesource.com/setup_22.x | bash - - apt-get install -y nodejs + export DEBIAN_FRONTEND=noninteractive + curl -fsSL https://deb.nodesource.com/setup_22.x | bash - 2>&1 | tail -3 + apt-get install -y nodejs 2>&1 | grep -v 'Failed to write' " ok "Node.js installed." info "Installing OpenClaw..." -ct_exec "npm install -g openclaw@latest" +ct_exec "npm install -g openclaw@latest 2>&1 | tail -5" ok "OpenClaw installed." -info "Installing XFCE4, TigerVNC, noVNC, Chromium, dbus-x11..." +info "Installing XFCE4, TigerVNC, noVNC, Chromium, dbus-x11 (this takes a few minutes)..." ct_exec " export DEBIAN_FRONTEND=noninteractive - apt-get install -y xfce4 xfce4-terminal tigervnc-standalone-server novnc websockify chromium dbus-x11 + export LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 + apt-get install -y xfce4 xfce4-terminal tigervnc-standalone-server novnc websockify chromium dbus-x11 2>&1 \ + | grep -v -E 'Failed to write|Failed to send reload|Permission denied|Cannot set LC_' " ok "Desktop environment installed."