Skip to content

Access the desktop environment of a workspace #2106

Closed

Description

@kylecarbs

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.

Activity

  1. added
    siteArea: frontend dashboard
    apiArea: HTTP API
    on Jun 6, 2022
  2. f0ssel commented on Jun 6, 2022

    @f0ssel
    Member

    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

  3. bpmct commented on Jun 6, 2022

    @bpmct
    Member

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

  4. pinned this issue on Jun 6, 2022
  5. kylecarbs commented on Jun 7, 2022

    @kylecarbs
    MemberAuthor

    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.

  6. nikhil96widhani commented on Jun 19, 2022

    @nikhil96widhani

    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

  7. unpinned this issue on Jun 21, 2022
  8. pinned this issue on Jun 21, 2022
  9. sreya commented on Jun 21, 2022

    @sreya
    Collaborator

    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.

  10. tjcran commented on Jun 22, 2022

    @tjcran

    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

  11. added
    enterpriseEnterprise-license / premium functionality
    on Jun 30, 2022
  12. ntimo commented on Jul 2, 2022

    @ntimo
    Contributor

    I am using https://kasmweb.com/ for desktop apps and it’s truly amazing. Just to drop that there might be useful :)

  13. unpinned this issue on Jul 20, 2022
  14. 13 remaining items

  15. github-actions commented on Mar 23, 2023

    @github-actions
    Contributor

    This issue is becoming stale. In order to keep the tracker readable and actionable, I'm going close to this issue in 7 days if there isn't more activity.

  16. phorcys420 commented on Mar 23, 2023

    @phorcys420
    Member

    I have a template that uses noVNC+Websockify+TigerVNC to allow for remote desktop: basic-env, you can take a look at it if you want to implement VNC in your Linux template.

    As I mentioned in #6448, The Windows implementation doesn't have to use RDP at first, there are VNC servers for windows, which might be a first step towards cross-platform desktop access.

    As for Guacamole, there is a "noauth" option, which could make the UX snappier without having to enter a password.
    Since Guacamole is multi-protocol, I think it should be the prioritized way to bring a unified UX.

    I am using https://kasmweb.com/ for desktop apps and it’s truly amazing. Just to drop that there might be useful :)

    The Coder Team is conducting tests on using KasmVNC in templates, and it works atleast as good as my NoVNC template.
    I am a bit far away from the servers though, so latency isn't really comparable with my homeserver.
    I don't like Kasm's UI much, but that's fine.

  17. removed
    staleThis issue is like stale bread.
    on Mar 23, 2023
  18. mattlqx commented on Apr 3, 2023

    @mattlqx

    I have RDP setup via Guacamole and an external URL linked to a button. But I was also looking at what it would take to launch the native Remote Desktop app via button. Looks like the rdp:// or remotedesktop:// schemes are dead (and won't have worked on anything but Windows anyway). It seems like it might be possible to do with some javascript to generate an .rdp file with the right connection options.

    Or would using the Coder VSCode extension to proxy open an .rdp file that way be possible?

  19. matifali commented on May 24, 2023

    @matifali
    Contributor

    We now have a community template that supports Windows RDP in browser OOB. See https://coder.com/docs/v2/latest/ides/remote-desktops#rdp-desktop
    related: #6448

  20. matifali commented on May 24, 2023

    @matifali
    Contributor

    I suppose it would be possible to support RDP OOB for Windows workspaces using the approach in #6448

  21. bpmct commented on Jun 14, 2023

    @bpmct
    Member

    We haven't found an awesome web-based Windows RDP client that works well inside a workspace (Myrtille works OK, but hasn't been updated in 2 years). For Linux environments, KasmVNC works quite well. We have community example templates for both.

    I think a coder desktop <workspace> would be still be significantly helpful over port forwarding and aid the user in the dashboard.

    As a workaround, you can add an external coder_app which links to a wiki with some instructions to connect via your desktop RDP:

    Screenshot 2023-06-14 at 11 49 12 AM

    resource "coder_app" "rdp" {
      agent_id     = coder_agent.main.id
      slug         = "rdp"
      display_name = "RDP instructions"
      external     = true
      url          = "https://coder.com/docs/v2/latest/ides/remote-desktops#rdp-desktop"
      icon         = "https://cdn-icons-png.flaticon.com/512/2933/2933245.png"
    }
  22. bartonip commented on Dec 15, 2023

    @bartonip
    Contributor

    Perhaps instead of websockets you could put the VNC stream over WebRTC then everything can just be supported in-browser with no additional client libraries needed?

  23. sreya commented on Apr 4, 2024

    @sreya
    Collaborator

    Since there's a workaround for this, closing for now

  24. julianpoy commented on Jun 3, 2024

    @julianpoy

    @sreya This page is still linked from https://coder.com/docs/ides/remote-desktops

    Perhaps that link should be removed?

  25. ehfd commented on Jul 9, 2024

    @ehfd
    Contributor

    Hey, I would like to introduce you to https://github.com/selkies-project/selkies-gstreamer. We are very keen on this to be integrated into Coder with a community template. We recently observed latency levels equal to Moonlight (< 16 ms) when using a hardware encoder, and < 40 ms when using x264. Our CPU consumption over x264 is around 150%, much lower than KasmVNC for 60 fps. We want to know how to get assistance.

    selkies-project/selkies#64

  26. ehfd commented on Jul 9, 2024

    @ehfd
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiArea: HTTP APIenterpriseEnterprise-license / premium functionalitynetworkingArea: networkingsiteArea: frontend dashboard

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions