Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
132 changes: 66 additions & 66 deletions src/desktop-lite/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,71 +1,71 @@
{
"id": "desktop-lite",
"version": "1.3.0",
"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.",
"options": {
"version": {
"type": "string",
"proposals": [
"latest"
],
"default": "latest",
"description": "Currently Unused!"
},
"noVncVersion": {
"type": "string",
"proposals": [
"1.6.0"
],
"default": "1.6.0",
"description": "The noVNC version to use"
},
"password": {
"type": "string",
"proposals": [
"vscode",
"codespaces",
"password",
"noPassword"
],
"default": "vscode",
"description": "Enter a password for desktop connections. If \"noPassword\", connections from the local host can be established without entering a password"
},
"webPort": {
"type": "string",
"proposals": [
"6080"
],
"default": "6080",
"description": "Enter a port for the VNC web client (noVNC)"
},
"vncPort": {
"type": "string",
"proposals": [
"5901"
],
"default": "5901",
"description": "Enter a port for the desktop VNC server (TigerVNC)"
}
"id": "desktop-lite",
"version": "1.3.1",
"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.",
"options": {
"version": {
"type": "string",
"proposals": [
"latest"
],
"default": "latest",
"description": "Currently Unused!"
},
"init": true,
"entrypoint": "/usr/local/share/desktop-init.sh",
"containerEnv": {
"DISPLAY": ":1"
"noVncVersion": {
"type": "string",
"proposals": [
"1.6.0"
],
"default": "1.6.0",
"description": "The noVNC version to use"
},
"customizations": {
"vscode": {
"settings": {
"github.copilot.chat.codeGeneration.instructions": [
{
"text": "This dev container includes a lightweight Fluxbox based desktop 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."
}
]
}
}
"password": {
"type": "string",
"proposals": [
"vscode",
"codespaces",
"password",
"noPassword"
],
"default": "vscode",
"description": "Enter a password for desktop connections. If \"noPassword\", connections from the local host can be established without entering a password"
},
"installsAfter": [
"ghcr.io/devcontainers/features/common-utils"
]
"webPort": {
"type": "string",
"proposals": [
"6080"
],
"default": "6080",
"description": "Enter a port for the VNC web client (noVNC)"
},
"vncPort": {
"type": "string",
"proposals": [
"5901"
],
"default": "5901",
"description": "Enter a port for the desktop VNC server (TigerVNC)"
}
},
"init": true,
"entrypoint": "/usr/local/share/desktop-init.sh",
"containerEnv": {
"DISPLAY": ":1"
},
"customizations": {
"vscode": {
"settings": {
"github.copilot.chat.codeGeneration.instructions": [
{
"text": "This dev container includes a lightweight Fluxbox based desktop 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."
}
]
}
}
},
"installsAfter": [
"ghcr.io/devcontainers/features/common-utils"
]
}
15 changes: 12 additions & 3 deletions src/desktop-lite/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,10 @@ fi

# Install the Cascadia Code fonts - https://github.com/microsoft/cascadia-code
if [ ! -d "/usr/share/fonts/truetype/cascadia" ]; then
curl -sSL https://github.com/microsoft/cascadia-code/releases/download/v2008.25/CascadiaCode-2008.25.zip -o /tmp/cascadia-fonts.zip
if ! curl -fsSL https://github.com/microsoft/cascadia-code/releases/download/v2008.25/CascadiaCode-2008.25.zip -o /tmp/cascadia-fonts.zip; then
echo "Failed to download Cascadia fonts"
exit 1
fi
unzip /tmp/cascadia-fonts.zip -d /tmp/cascadia-fonts
mkdir -p /usr/share/fonts/truetype/cascadia
mv /tmp/cascadia-fonts/ttf/* /usr/share/fonts/truetype/cascadia/
Expand All @@ -228,10 +231,16 @@ fi
# Install noVNC
if [ "${INSTALL_NOVNC}" = "true" ] && [ ! -d "/usr/local/novnc" ]; then
mkdir -p /usr/local/novnc
curl -sSL https://github.com/novnc/noVNC/archive/v${NOVNC_VERSION}.zip -o /tmp/novnc-install.zip
if ! curl -fsSL https://github.com/novnc/noVNC/archive/v${NOVNC_VERSION}.zip -o /tmp/novnc-install.zip; then
echo "Failed to download noVNC"
exit 1
fi
unzip /tmp/novnc-install.zip -d /usr/local/novnc
cp /usr/local/novnc/noVNC-${NOVNC_VERSION}/vnc.html /usr/local/novnc/noVNC-${NOVNC_VERSION}/index.html
curl -sSL https://github.com/novnc/websockify/archive/v${WEBSOCKETIFY_VERSION}.zip -o /tmp/websockify-install.zip
if ! curl -fsSL https://github.com/novnc/websockify/archive/v${WEBSOCKETIFY_VERSION}.zip -o /tmp/websockify-install.zip; then
echo "Failed to download websockify"
exit 1
fi
unzip /tmp/websockify-install.zip -d /usr/local/novnc
ln -s /usr/local/novnc/websockify-${WEBSOCKETIFY_VERSION} /usr/local/novnc/noVNC-${NOVNC_VERSION}/utils/websockify
rm -f /tmp/websockify-install.zip /tmp/novnc-install.zip
Expand Down