Skip to content

Commit 8affef0

Browse files
authored
[desktop lite] Support for Trixie (#1479)
* Trixie Support * Bump desktop lite version * add trixie support to desktop lite test script * Added test scenario for trixie * Fix typo
1 parent 7c6ef0b commit 8affef0

File tree

5 files changed

+44
-12
lines changed

5 files changed

+44
-12
lines changed

src/desktop-lite/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "desktop-lite",
3-
"version": "1.2.7",
3+
"version": "1.2.8",
44
"name": "Light-weight Desktop",
55
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/desktop-lite",
66
"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.",

src/desktop-lite/install.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ package_list="
3131
fbautostart \
3232
at-spi2-core \
3333
xterm \
34-
eterm \
3534
nautilus\
3635
mousepad \
3736
seahorse \
@@ -200,13 +199,13 @@ fi
200199
# Install X11, fluxbox and VS Code dependencies
201200
check_packages ${package_list}
202201

203-
# if Ubuntu-24.04, noble(numbat) found, then will install libasound2-dev instead of libasound2.
202+
# if Ubuntu-24.04, noble(numbat) / Debian-13, trixie found, then will install libasound2-dev instead of libasound2.
204203
# this change is temporary, https://packages.ubuntu.com/noble/libasound2 will switch to libasound2 once it is available for Ubuntu-24.04, noble(numbat)
205204
. /etc/os-release
206-
if [ "${ID}" = "ubuntu" ] && [ "${VERSION_CODENAME}" = "noble" ]; then
207-
echo "Ubuntu 24.04, Noble(Numbat) detected. Installing libasound2-dev package..."
205+
if { [ "${ID}" = "ubuntu" ] && [ "${VERSION_CODENAME}" = "noble" ]; } || { [ "${ID}" = "debian" ] && [ "${VERSION_CODENAME}" = "trixie" ]; }; then
206+
echo "Detected Noble (Ubuntu 24.04) or Trixie (Debian). Installing libasound2-dev package..."
208207
check_packages "libasound2-dev"
209-
else
208+
else
210209
check_packages "libasound2"
211210
fi
212211

test/desktop-lite/scenarios.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,11 @@
3939
5901,
4040
6080
4141
]
42+
},
43+
"test_xtigervnc_novnc_started_trixie": {
44+
"image": "debian:trixie",
45+
"features": {
46+
"desktop-lite": {}
47+
}
4248
}
4349
}

test/desktop-lite/test.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,8 @@ check "log-exists" bash -c "ls /tmp/container-init.log"
2929
check "fluxbox-exists" bash -c "ls -la ~/.fluxbox"
3030

3131
. /etc/os-release
32-
if [ "${ID}" = "ubuntu" ]; then
33-
if [ "${VERSION_CODENAME}" = "noble" ]; then
34-
checkOSPackage "if libasound2-dev exists !" "libasound2-dev"
35-
else
36-
checkOSPackage "if libasound2 exists !" "libasound2"
37-
fi
32+
if [ "${VERSION_CODENAME}" = "noble" ] || [ "${VERSION_CODENAME}" = "trixie" ]; then
33+
checkOSPackage "if libasound2-dev exists !" "libasound2-dev"
3834
else
3935
checkOSPackage "if libasound2 exists !" "libasound2"
4036
fi
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
# Optional: Import test library
6+
source dev-container-features-test-lib
7+
8+
# Check if xtigervnc & noVnc processes are running after successful installation and initialization
9+
check_process_running() {
10+
port=$1
11+
# Get process id of process running on specific port
12+
PID=$(lsof -i :$port | awk 'NR==2 {print $2}')
13+
if [ -n "$PID" ]; then
14+
CMD=$(ps -p $PID -o cmd --no-headers)
15+
GREEN='\033[0;32m'; NC='\033[0m'; RED='\033[0;31m'; YELLOW='\033[0;33m';
16+
echo -e "${GREEN}Command running on port $port: ${YELLOW}$CMD${NC}"
17+
else
18+
echo -e "${RED}No process found listening on port $port.${NC}"
19+
fi
20+
}
21+
22+
check "Whether xtigervnc is Running" check_process_running 5901
23+
sleep 1
24+
check "Whether no_vnc is Running" check_process_running 6080
25+
26+
check "desktop-init-exists" bash -c "ls /usr/local/share/desktop-init.sh"
27+
check "log-exists" bash -c "ls /tmp/container-init.log"
28+
check "log file contents" bash -c "cat /tmp/container-init.log"
29+
30+
# Report result
31+
reportResults

0 commit comments

Comments
 (0)