Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access the desktop environment of a workspace #2106

Open
kylecarbs opened this issue Jun 6, 2022 · 8 comments
Open

Access the desktop environment of a workspace #2106

kylecarbs opened this issue Jun 6, 2022 · 8 comments
Labels
backend feature frontend

Comments

@kylecarbs
Copy link
Contributor

@kylecarbs kylecarbs commented Jun 6, 2022

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>.

image

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.

@kylecarbs kylecarbs added frontend backend labels Jun 6, 2022
@f0ssel
Copy link
Contributor

@f0ssel f0ssel commented Jun 6, 2022

I did a quick search for a native go vnc server and didn't find much, which is a bummer because that would fit in really nicely here.

I did find this, but I can't really read it. It has tags for vnc and rdp and is half go half js, so could be something - https://github.com/dushixiang/next-terminal

@bpmct
Copy link
Collaborator

@bpmct bpmct commented Jun 6, 2022

I've heard great things about apache guacamole: https://guacamole.apache.org/

@bpmct bpmct pinned this issue Jun 6, 2022
@kylecarbs kylecarbs added the feature label Jun 7, 2022
@kylecarbs
Copy link
Contributor Author

@kylecarbs kylecarbs commented Jun 7, 2022

Even if there was a native Go VNC server, we'd still need an X11 server so it wouldn't save us much @f0ssel.

We could totally do something with the Apache Guacamole approach. That would solve our Windows woes.

@ketang
Copy link
Contributor

@ketang ketang commented Jun 7, 2022

This history gives me confidence
Screen Shot 2022-06-07 at 09 25 49

@tjcran
Copy link

@tjcran tjcran commented Jun 7, 2022

I've heard great things about apache guacamole: https://guacamole.apache.org/

Came here to recommend Guacamole as well. Multiple customers have brought up Guac on calls talking about desktop experience on Coder workspaces.

@nikhil96widhani
Copy link

@nikhil96widhani nikhil96widhani commented Jun 19, 2022

I am not a fan of novnc because there is no shared clipboard and many more things. I absolutely love this image from linuxserver's team https://docs.linuxserver.io/images/docker-webtop

If we can adopt the technology used behind this or simply use this inside a workspace

@AbhineetJain AbhineetJain unpinned this issue Jun 21, 2022
@Emyrk Emyrk pinned this issue Jun 21, 2022
@sreya
Copy link
Contributor

@sreya sreya commented Jun 21, 2022

Kyle and I talked offline about this but this seems better defined as an app than a coder-provided function. Everything that we offer right now works out of the box. For VNC to work correctly the user needs to have already installed x11.

@tjcran
Copy link

@tjcran tjcran commented Jun 22, 2022

Kyle and I talked offline about this but this seems better defined as an app than a coder-provided function. Everything that we offer right now works out of the box. For VNC to work correctly the user needs to have already installed x11.

This makes sense and I think it aligns well with our proposed templates strategy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend feature frontend
Projects
None yet
Development

No branches or pull requests

7 participants