Unverified Commit 0f52eaa7 authored by Hunter Hansen's avatar Hunter Hansen Committed by GitHub

Adds X11 setup checks (#516)

# Description
Added a check that the tmp.xauth file exists on the host when setting
up, or else replace it. This makes the x11 procedure robust to
accidental shutdowns/unintentional modifications to .container.yaml.
Shoutout @jtigue-bdai for uncovering this flaw!

## Type of change

<!-- As you go through the list, delete the ones that are not
applicable. -->

- Bug fix (non-breaking change which fixes an issue)

## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./orbit.sh --format`
- [ ] 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 run all the tests with `./orbit.sh --test` and they pass
- [ ] 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
parent 7cc56c3e
...@@ -179,7 +179,7 @@ configure_x11() { ...@@ -179,7 +179,7 @@ configure_x11() {
fi fi
load_statefile_variable __ORBIT_TMP_XAUTH load_statefile_variable __ORBIT_TMP_XAUTH
# Create temp .xauth file to be mounted in the container # Create temp .xauth file to be mounted in the container
if [ "$__ORBIT_TMP_XAUTH" = "null" ]; then if [ "$__ORBIT_TMP_XAUTH" = "null" ] || [ ! -f "$__ORBIT_TMP_XAUTH" ]; then
__ORBIT_TMP_XAUTH=$(mktemp --suffix=".xauth") __ORBIT_TMP_XAUTH=$(mktemp --suffix=".xauth")
set_statefile_variable __ORBIT_TMP_XAUTH $__ORBIT_TMP_XAUTH set_statefile_variable __ORBIT_TMP_XAUTH $__ORBIT_TMP_XAUTH
# Extract MIT-MAGIC-COOKIE for current display | Change the 'connection family' to FamilyWild (ffff) | merge into tmp .xauth file # Extract MIT-MAGIC-COOKIE for current display | Change the 'connection family' to FamilyWild (ffff) | merge into tmp .xauth file
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment