Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

Set default browser

f-trycua7b286f77c6e1
diff --git a/libs/docker-xfce/Dockerfile b/libs/docker-xfce/Dockerfile
index 02d48eb285..f641191999 100644
--- a/libs/docker-xfce/Dockerfile
+++ b/libs/docker-xfce/Dockerfile
@@ -15,13 +15,10 @@ ENV API_PORT=8000
ENV VNC_RESOLUTION=1024x768
ENV VNC_COL_DEPTH=24
-# Create user
-RUN useradd -m -s /bin/bash -G sudo cua && \
- echo "cua:password" | chpasswd && \
- echo "cua ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
-
-# Install system dependencies
+# Install system dependencies first (including sudo)
RUN apt-get update && apt-get install -y \
+ # System utilities
+ sudo \
# Desktop environment
xfce4 \
xfce4-terminal \
@@ -65,6 +62,11 @@ RUN apt-get update && apt-get install -y \
# Remove power manager to avoid popup in container
RUN apt-get remove -y xfce4-power-manager xfce4-power-manager-data || true
+# Create user after sudo is installed
+RUN useradd -m -s /bin/bash -G sudo cua && \
+ echo "cua:password" | chpasswd && \
+ echo "cua ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
+
# Install Firefox from Mozilla PPA (snap-free) - inline to avoid script issues
RUN apt-get update && \
add-apt-repository -y ppa:mozillateam/ppa && \
@@ -102,10 +104,8 @@ RUN chmod +x /usr/local/bin/*.sh
USER cua
WORKDIR /home/cua
-# Create VNC password file
-RUN mkdir -p $HOME/.vnc && \
- echo "password" | vncpasswd -f > $HOME/.vnc/passwd && \
- chmod 600 $HOME/.vnc/passwd
+# Create VNC directory (no password needed with SecurityTypes None)
+RUN mkdir -p $HOME/.vnc
# Configure XFCE for first start
RUN mkdir -p $HOME/.config/xfce4/xfconf/xfce-perchannel-xml $HOME/.config/xfce4 $HOME/.config/autostart
diff --git a/libs/docker-xfce/README.md b/libs/docker-xfce/README.md
index 5d8512c85f..9ecdff001f 100644
--- a/libs/docker-xfce/README.md
+++ b/libs/docker-xfce/README.md
@@ -93,8 +93,8 @@ docker run --rm -it \
## Accessing the Container
-- **noVNC Web Interface**: Open `http://localhost:6901` in your browser
-- **VNC Client**: Connect to `localhost:5901` (password: `password`)
+- **noVNC Web Interface**: Open `http://localhost:6901` in your browser (no password required)
+- **VNC Client**: Connect to `localhost:5901` (no password required)
- **Computer Server API**: Available at `http://localhost:8000`
## Using with CUA Docker Provider
@@ -175,8 +175,9 @@ Both provide the same API and functionality - the provider automatically configu
## User Credentials
- **Username**: `cua`
-- **Password**: `password`
+- **Password**: `password` (for shell login only)
- **Sudo access**: Enabled without password
+- **VNC access**: No password required
## Creating Snapshots
diff --git a/libs/docker-xfce/src/scripts/start-vnc.sh b/libs/docker-xfce/src/scripts/start-vnc.sh
index f77afef084..934e6d3c68 100644
--- a/libs/docker-xfce/src/scripts/start-vnc.sh
+++ b/libs/docker-xfce/src/scripts/start-vnc.sh
@@ -4,13 +4,13 @@ set -e
# Clean up any existing VNC lock files
rm -rf /tmp/.X1-lock /tmp/.X11-unix/X1
-# Start VNC server
+# Start VNC server without password authentication
vncserver :1 \
-geometry ${VNC_RESOLUTION:-1920x1080} \
-depth ${VNC_COL_DEPTH:-24} \
-rfbport ${VNC_PORT:-5901} \
-localhost no \
- -SecurityTypes VncAuth \
+ -SecurityTypes None \
-AlwaysShared \
-AcceptPointerEvents \
-AcceptKeyEvents \
diff --git a/libs/docker-xfce/src/xfce-config/helpers.rc b/libs/docker-xfce/src/xfce-config/helpers.rc
index 8fd42f69a7..b2270633c4 100644
--- a/libs/docker-xfce/src/xfce-config/helpers.rc
+++ b/libs/docker-xfce/src/xfce-config/helpers.rc
@@ -1,2 +1,2 @@
-# XFCE preferred applications - disable browser to prevent error popups
-WebBrowser=
+# XFCE preferred applications - set Firefox as default browser
+WebBrowser=firefox