Description
It'd be useful to access the desktop environment of a workspace in Coder.
- Cross-platform browser testing
- Installing applications on Windows (it's hard to install packages on the Windows command line)
- Desktop application development
- Android and iOS development
- ... and I'm sure many more!
This would be implemented as a native access application, similar to the web terminal. A command would be added too, something like: coder desktop <workspace>
or coder open desktop <workspace>
.
Implementation
VNC clients will use noVNC through the browser. This should use noVNC APIs to hide the overlay user interface, making it feel like a native experience.
RDP clients don't currently have a web-based solution (💡 ideas are welcome here). An initial implementation could exclude Windows and still provide significant value, so this shouldn't be a hard blocker!
Although implementations with RDP and VNC are different, we should make this transparent to the user to deliver a consistent experience.
Linux and macOS
Specify a VNC server address in the coder_agent
resource (naming subject to change):
resource "coder_agent" "dev" {
vnc = "tcp://localhost:5900"
}
In the absence of a VNC server specified:
- On Linux, look for
x11vnc
on$PATH
and start it with the agent when VNC is requested. - On macOS, start the VNC server.
Expose the VNC connection through a new DataChannel protocol, and pipe it to a WebSocket endpoint.
Windows
Specify a RDP server address in the coder_agent
resource (naming subject to change):
resource "coder_agent" "dev" {
rdp = "tcp://localhost:3389"
}
In the absence of an RDP server specified, attempt to start it (I googled around a bit, but was unable to find much).
Expose the RDP connection through a new DataChannel protocol, and pipe it to a WebSocket endpoint.