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

Typo in README.md - XAUTHORITY #158

Open
TomHutter opened this issue Feb 6, 2023 · 1 comment
Open

Typo in README.md - XAUTHORITY #158

TomHutter opened this issue Feb 6, 2023 · 1 comment
Assignees

Comments

@TomHutter
Copy link

In Section Manually running with docker run commands there seems to be a typo with the XAUTHORITY volume:

docker run -it \
  --rm \
  --hostname="$(hostname)" \
  --env="DISPLAY" \
  --volume="${XAUTHORITY:-${HOME}/.Xauthority}:/root/.Xauthority:ro" \
  --volume="/tmp/.X11-unix:/tmp/.X11-unix:ro" \
  scottyhardy/docker-wine /bin/bash

This works:

docker run -it \
  --rm \
  --hostname="$(hostname)" \
  --env="DISPLAY" \
  --volume="${XAUTHORITY}:/root/.Xauthority:ro" \
  --volume="/tmp/.X11-unix:/tmp/.X11-unix:ro" \
  scottyhardy/docker-wine /bin/bash
@scottyhardy scottyhardy self-assigned this Mar 7, 2025
@scottyhardy
Copy link
Owner

They should both work. This part basically says if there is no value defined for XAUTHORITY then use the default of ${HOME}/.Xauthority instead:

${XAUTHORITY:-${HOME}/.Xauthority}

You've just replaced this with ${XAUTHORITY} which still works in your case, but the version above is a more general solution that works on both Linux and macOS.

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

No branches or pull requests

2 participants