Skip to content
Merged
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
2 changes: 1 addition & 1 deletion registry/coder/modules/kasmvnc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Automatically install [KasmVNC](https://kasmweb.com/kasmvnc) in a workspace, and
module "kasmvnc" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/kasmvnc/coder"
version = "1.2.4"
version = "1.2.5"
agent_id = coder_agent.example.id
desktop_environment = "xfce"
subdomain = true
Expand Down
2 changes: 1 addition & 1 deletion registry/coder/modules/kasmvnc/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ variable "port" {
variable "kasm_version" {
type = string
description = "Version of KasmVNC to install."
default = "1.3.2"
default = "1.4.0"
}

variable "desktop_environment" {
Expand Down
14 changes: 7 additions & 7 deletions registry/coder/modules/kasmvnc/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ error() {
exit 1
}

# Function to check if vncserver is already installed
# Function to check if KasmVNC is already installed
check_installed() {
if command -v vncserver &> /dev/null; then
echo "vncserver is already installed."
if command -v kasmvncserver &> /dev/null; then
echo "KasmVNC is already installed."
return 0 # Don't exit, just indicate it's installed
else
return 1 # Indicates not installed
Expand Down Expand Up @@ -158,7 +158,7 @@ case "$arch" in
;;
esac

# Check if vncserver is installed, and install if not
# Check if KasmVNC is installed, and install if not
if ! check_installed; then
# Check for NOPASSWD sudo (required)
if ! command -v sudo &> /dev/null || ! sudo -n true 2> /dev/null; then
Expand Down Expand Up @@ -188,7 +188,7 @@ if ! check_installed; then
;;
esac
else
echo "vncserver already installed. Skipping installation."
echo "KasmVNC already installed. Skipping installation."
fi

if command -v sudo &> /dev/null && sudo -n true 2> /dev/null; then
Expand Down Expand Up @@ -227,7 +227,7 @@ EOF
# This password is not used since we start the server without auth.
# The server is protected via the Coder session token / tunnel
# and does not listen publicly
echo -e "password\npassword\n" | vncpasswd -wo -u "$USER"
echo -e "password\npassword\n" | kasmvncpasswd -wo -u "$USER"

get_http_dir() {
# determine the served file path
Expand Down Expand Up @@ -290,7 +290,7 @@ VNC_LOG="/tmp/kasmvncserver.log"
printf "🚀 Starting KasmVNC server...\n"

set +e
vncserver -select-de "${DESKTOP_ENVIRONMENT}" -disableBasicAuth > "$VNC_LOG" 2>&1
kasmvncserver -select-de "${DESKTOP_ENVIRONMENT}" -disableBasicAuth > "$VNC_LOG" 2>&1
RETVAL=$?
set -e

Expand Down