devpod icon indicating copy to clipboard operation
devpod copied to clipboard

Support X11 forwarding

Open fpoirotte opened this issue 2 years ago • 9 comments
trafficstars

Is your feature request related to a problem?
Hi, I would like to run a graphical application inside a devpod workspace, using X11 forwarding.

I found no information on how to enable the X11 forwarding protocol in the documentations.

Is this already supported? If not, is it a planned feature? What would be the best way to achieve X11 forwarding?

Which solution do you suggest?
If the feature is already available, add a quickstart how-to on the subject. If not, add support for X11 forwarding.

Which alternative solutions exist?
None that I am aware of.

Additional context
n/a

fpoirotte avatar Aug 28 '23 10:08 fpoirotte

Hi @fpoirotte, just saw this issue now. Supporting X11 is on our roadmap, albeit not with the highest priority. If you need it quickly, feel free to open a PR and kickstart the feature

pascalbreuninger avatar Oct 02 '23 05:10 pascalbreuninger

X11 forwarding would be a killer feature. DevPod isn't really cool without it.

decipher2k avatar Oct 14 '23 08:10 decipher2k

Is your feature request related to a problem? Hi, I would like to run a graphical application inside a devpod workspace, using X11 forwarding.

I found no information on how to enable the X11 forwarding protocol in the documentations.

Is this already supported? If not, is it a planned feature? What would be the best way to achieve X11 forwarding?

Which solution do you suggest? If the feature is already available, add a quickstart how-to on the subject. If not, add support for X11 forwarding.

Which alternative solutions exist? None that I am aware of.

Additional context n/a

You could setup your own prebuild workspace and use Xming: http://www.straightrunning.com/XmingNotes/ with a prebuild workspace: https://devpod.sh/docs/developing-in-workspaces/prebuild-a-workspace

XMing is an X11-Server for Windows.

For more convenience, you could use MobaXterm (it has got an X11 server built in, and can connect using a config file) clientside. MobaXterm does also support macros for running the IDE, so you can really start the whole pod with a single click.

afaik an SSH server has got to be setup in the container in both cases.

decipher2k avatar Oct 14 '23 08:10 decipher2k

https://github.com/novnc/noVNC

is an other option to run linux graphical apps inside Docker and expose a "web browser interface" to them. This should work as-is, as it iust needs a TCP port exposed.

See as well here: https://github.com/devcontainers/features/tree/main/src/desktop-lite

behrica avatar Oct 28 '23 09:10 behrica

Hi @fpoirotte, just saw this issue now. Supporting X11 is on our roadmap, albeit not with the highest priority. If you need it quickly, feel free to open a PR and kickstart the feature

Hi @pascalbreuninger, thanks for your awesome work on DevPod!

Is this roadmap public?

Would you say there's a good chance that X11 forwarding support will be available in 2024?

vquemener avatar Nov 03 '23 17:11 vquemener

@vquemener thanks 😄

Nope, it's in our internal tracker but we were discussing opening the DevPod Roadmap up to the open source community. No tangible outcome yet though

As for X11 support, it's certainly possible in 2024 but your contribution could even bring it in 2023 😉

pascalbreuninger avatar Nov 03 '23 18:11 pascalbreuninger

I've created draft pull requests to address this issue. I'm a novice when it comes to Go, so apologies if the code quality is subpar. I haven't had time to write tests yet (I'm not entirely sure how to test this anyway as e2e tests would require a working graphical server for this to work).

fpoirotte avatar Dec 04 '23 11:12 fpoirotte

@fpoirotte thanks a lot, we'll take a look!

pascalbreuninger avatar Dec 10 '23 10:12 pascalbreuninger

Is your feature request related to a problem? Hi, I would like to run a graphical application inside a devpod workspace, using X11 forwarding.

I found no information on how to enable the X11 forwarding protocol in the documentations.

Is this already supported? If not, is it a planned feature? What would be the best way to achieve X11 forwarding?

Which solution do you suggest? If the feature is already available, add a quickstart how-to on the subject. If not, add support for X11 forwarding.

Which alternative solutions exist? None that I am aware of.

Additional context n/a

I know this is an old topic, but here's my 5 cents.

X11 Forwarding is possible by adding the DISPLAY environment variable to devcontainer.json. However it only works without extra software if you're using Linux. StackOverflow provides more information: https://stackoverflow.com/questions/44429394/x11-forwarding-of-a-gui-app-running-in-docker.

If you're using Windows, I don't know how to get it to work, but I successfully got it to work on Mac using XQuartz and adding this to my devcontainer.json:

"containerEnv": {
  "DISPLAY": "host.containers.internal:0"
}

Please note that XQuartz must be running and you must execute the following command xhost + 127.0.0.1 before you start your container

haakobja avatar Jun 11 '24 08:06 haakobja