From ab7cdb8145868304d2bbe9277c548382c161cebe Mon Sep 17 00:00:00 2001 From: Johnson Sun <20457146+j3soon@users.noreply.github.com> Date: Fri, 26 Jul 2024 15:22:25 +0800 Subject: [PATCH] Improves docker X11 forwarding documentation (#685) # Description Clarify X11 forwarding configs in docs and warning messages. ## Type of change - Bug fix (non-breaking change which fixes an issue) ## Checklist - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have updated the changelog and the corresponding version in the extension's `config/extension.toml` file - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there --- CONTRIBUTORS.md | 1 + docker/container.sh | 4 ++-- docs/source/deployment/docker.rst | 11 +++++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 166bfaf43b..1f3c40e47a 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -54,6 +54,7 @@ Guidelines for modifications: * Vladimir Fokow * Zhengyu Zhang * Ziqi Fan +* Johnson Sun ## Acknowledgements diff --git a/docker/container.sh b/docker/container.sh index c8789bb36f..7593d722ef 100755 --- a/docker/container.sh +++ b/docker/container.sh @@ -224,9 +224,9 @@ x11_check() { else echo "[INFO] X11 Forwarding is configured as $__ISAACLAB_X11_FORWARDING_ENABLED in .container.yaml" if [ "$__ISAACLAB_X11_FORWARDING_ENABLED" = "1" ]; then - echo "[INFO] To disable X11 forwarding, set __ISAACLAB_X11_FORWARDING_ENABLED=0 in .container.yaml" + echo "[INFO] To disable X11 forwarding, set \`__ISAACLAB_X11_FORWARDING_ENABLED: 0\` in .container.yaml" else - echo "[INFO] To enable X11 forwarding, set __ISAACLAB_X11_FORWARDING_ENABLED=1 in .container.yaml" + echo "[INFO] To enable X11 forwarding, set \`__ISAACLAB_X11_FORWARDING_ENABLED: 1\` in .container.yaml" fi fi diff --git a/docs/source/deployment/docker.rst b/docs/source/deployment/docker.rst index 8bda6ab920..ae1c10c5ea 100644 --- a/docs/source/deployment/docker.rst +++ b/docs/source/deployment/docker.rst @@ -137,6 +137,17 @@ directories to the ``docker/artifacts`` directory. This is useful for copying th ./docker/container.sh stop +X11 forwarding +~~~~~~~~~~~~~~ + +The container supports X11 forwarding, which allows the user to run GUI applications from the container and display them +on the host machine. + +The first time a container is started with ``./docker/container.sh start``, the script prompts +the user whether to activate X11 forwarding. This will create a file ``docker/.container.yaml`` to store the user's choice. +Subsequently, X11 forwarding can be toggled by changing ``__ISAACLAB_X11_FORWARDING_ENABLED`` to 0 or 1 in ``docker/.container.yaml``. + + Python Interpreter ~~~~~~~~~~~~~~~~~~