Closes #79 ## Description This PR add new module, install minimal desktop environment (xfce), virtual display, ,rustdesk package from deb file, init new screen, export DISPLAY environment variable with last created virtual screen, start new xfce session & execute the rustdesk cli, generate new password, change the default password, then log the ID & password to be used within rustdesk client to connect to the host ## Type of Change - [x] New module - [ ] Bug fix - [ ] Feature/enhancement - [ ] Documentation - [ ] Other ## Module Information Overview/test video: live demo that launch rustdesk with GUI in a docker container https://youtu.be/_rR-l7nARN4 Screenshots: <img width="1920" height="1080" alt="image" src="https://github.com/user-attachments/assets/ba67a864-4295-471e-8b6a-976c23cb8f55" /> <img width="1920" height="1080" alt="image" src="https://github.com/user-attachments/assets/24686339-aba7-47fe-92b4-5700ef5b154a" /> <img width="1920" height="1080" alt="image" src="https://github.com/user-attachments/assets/21884c31-9eed-45ef-b3de-c12c99f2aa96" /> <img width="1920" height="1080" alt="image" src="https://github.com/user-attachments/assets/ec0c65fe-61be-404c-ba36-8cc2882e85a2" /> **Path:** `registry/BenraouaneSoufiane/modules/rustdesk` **New version:** `v1.0.0` **Breaking change:** [ ] Yes [x] No ## Testing & Validation - [x] Tests pass (`bun test`) - [x] Code formatted (`bun run fmt`) - [x] Changes tested locally ## Related Issues /claim #79 (remain asset 150$) --------- Co-authored-by: root <root@DESKTOP-6QN3GRE.localdomain> Co-authored-by: DevCats <christofer@coder.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
| display_name | description | icon | verified | tags | |||
|---|---|---|---|---|---|---|---|
| RustDesk | Run RustDesk in your workspace with virtual display | ../../../../.icons/rustdesk.svg | false |
|
RustDesk
Launches RustDesk within your workspace with a virtual display to provide remote desktop access. The module outputs the RustDesk ID and password needed to connect from external RustDesk clients.
module "rustdesk" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/BenraouaneSoufiane/rustdesk/coder"
version = "1.0.0"
agent_id = coder_agent.example.id
}
Features
- Automatically sets up virtual display (Xvfb)
- Downloads and configures RustDesk
- Outputs RustDesk ID and password for easy connection
- Provides external app link to RustDesk web client for browser-based access
- Starts virtual display (Xvfb) with customizable resolution
- Customizable screen resolution and RustDesk version
Requirements
- Coder v2.5 or higher
- Linux workspace with
apt,dnf, oryumpackage manager
Examples
Custom configuration with specific version
module "rustdesk" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/BenraouaneSoufiane/rustdesk/coder"
version = "1.0.0"
agent_id = coder_agent.example.id
rustdesk_password = "mycustompass"
xvfb_resolution = "1920x1080x24"
rustdesk_version = "1.4.1"
}
Docker container configuration
It requires coder' server to be run as root, when using with Docker, add the following to your docker_container resource:
resource "docker_container" "workspace" {
# ... other configuration ...
user = "root"
privileged = true
network_mode = "host"
ports {
internal = 21115
external = 21115
}
ports {
internal = 21116
external = 21116
}
ports {
internal = 21118
external = 21118
}
ports {
internal = 21119
external = 21119
}
}