diff --git a/src/desktop-lite/devcontainer-feature.json b/src/desktop-lite/devcontainer-feature.json index d33529873..ae10c9977 100644 --- a/src/desktop-lite/devcontainer-feature.json +++ b/src/desktop-lite/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "desktop-lite", - "version": "1.2.7", + "version": "1.2.8", "name": "Light-weight Desktop", "documentationURL": "https://github.com/devcontainers/features/tree/main/src/desktop-lite", "description": "Adds a lightweight Fluxbox based desktop to the container that can be accessed using a VNC viewer or the web. GUI-based commands executed from the built-in VS code terminal will open on the desktop automatically.", diff --git a/src/desktop-lite/install.sh b/src/desktop-lite/install.sh index bb659e784..4575cc4f9 100755 --- a/src/desktop-lite/install.sh +++ b/src/desktop-lite/install.sh @@ -31,7 +31,6 @@ package_list=" fbautostart \ at-spi2-core \ xterm \ - eterm \ nautilus\ mousepad \ seahorse \ @@ -200,13 +199,13 @@ fi # Install X11, fluxbox and VS Code dependencies check_packages ${package_list} -# if Ubuntu-24.04, noble(numbat) found, then will install libasound2-dev instead of libasound2. +# if Ubuntu-24.04, noble(numbat) / Debian-13, trixie found, then will install libasound2-dev instead of libasound2. # this change is temporary, https://packages.ubuntu.com/noble/libasound2 will switch to libasound2 once it is available for Ubuntu-24.04, noble(numbat) . /etc/os-release -if [ "${ID}" = "ubuntu" ] && [ "${VERSION_CODENAME}" = "noble" ]; then - echo "Ubuntu 24.04, Noble(Numbat) detected. Installing libasound2-dev package..." +if { [ "${ID}" = "ubuntu" ] && [ "${VERSION_CODENAME}" = "noble" ]; } || { [ "${ID}" = "debian" ] && [ "${VERSION_CODENAME}" = "trixie" ]; }; then + echo "Detected Noble (Ubuntu 24.04) or Trixie (Debian). Installing libasound2-dev package..." check_packages "libasound2-dev" -else +else check_packages "libasound2" fi diff --git a/test/desktop-lite/scenarios.json b/test/desktop-lite/scenarios.json index 548fada6d..4ee429dd5 100644 --- a/test/desktop-lite/scenarios.json +++ b/test/desktop-lite/scenarios.json @@ -39,5 +39,11 @@ 5901, 6080 ] + }, + "test_xtigervnc_novnc_started_trixie": { + "image": "debian:trixie", + "features": { + "desktop-lite": {} + } } } \ No newline at end of file diff --git a/test/desktop-lite/test.sh b/test/desktop-lite/test.sh index 5d11dd424..32eab53c4 100755 --- a/test/desktop-lite/test.sh +++ b/test/desktop-lite/test.sh @@ -29,12 +29,8 @@ check "log-exists" bash -c "ls /tmp/container-init.log" check "fluxbox-exists" bash -c "ls -la ~/.fluxbox" . /etc/os-release -if [ "${ID}" = "ubuntu" ]; then - if [ "${VERSION_CODENAME}" = "noble" ]; then - checkOSPackage "if libasound2-dev exists !" "libasound2-dev" - else - checkOSPackage "if libasound2 exists !" "libasound2" - fi +if [ "${VERSION_CODENAME}" = "noble" ] || [ "${VERSION_CODENAME}" = "trixie" ]; then + checkOSPackage "if libasound2-dev exists !" "libasound2-dev" else checkOSPackage "if libasound2 exists !" "libasound2" fi diff --git a/test/desktop-lite/test_xtigervnc_novnc_started_trixie.sh b/test/desktop-lite/test_xtigervnc_novnc_started_trixie.sh new file mode 100644 index 000000000..671032229 --- /dev/null +++ b/test/desktop-lite/test_xtigervnc_novnc_started_trixie.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +set -e + +# Optional: Import test library +source dev-container-features-test-lib + +# Check if xtigervnc & noVnc processes are running after successful installation and initialization +check_process_running() { + port=$1 + # Get process id of process running on specific port + PID=$(lsof -i :$port | awk 'NR==2 {print $2}') + if [ -n "$PID" ]; then + CMD=$(ps -p $PID -o cmd --no-headers) + GREEN='\033[0;32m'; NC='\033[0m'; RED='\033[0;31m'; YELLOW='\033[0;33m'; + echo -e "${GREEN}Command running on port $port: ${YELLOW}$CMD${NC}" + else + echo -e "${RED}No process found listening on port $port.${NC}" + fi +} + +check "Whether xtigervnc is Running" check_process_running 5901 +sleep 1 +check "Whether no_vnc is Running" check_process_running 6080 + +check "desktop-init-exists" bash -c "ls /usr/local/share/desktop-init.sh" +check "log-exists" bash -c "ls /tmp/container-init.log" +check "log file contents" bash -c "cat /tmp/container-init.log" + +# Report result +reportResults \ No newline at end of file