SSH X11 forwarding not working in toolbox.
Describe the bug I have a Silverblue machine I want to access via SSH and start X11 applications on for local display.
X11 forwarding works fine in the main shell, but when I toolbox enter it doesn't work.
Steps how to reproduce the behaviour
- Log in via SSH to a Sliverblue machine with X11 forwarding enabled.
- Run
firefox. Observe that the Firefox window appears on the local machine. - Do
toolbox enter -
sudo dnf install firefox(to get it installed in the toolbox) - Run
firefox. - Get
PuTTY X11 proxy: Unsupported authorisation protocolError: cannot open display: localhost:10.0
Expected behaviour
firefox and other X11 applications should work inside the toolbox in the same way that the work outside.
Actual behaviour
PuTTY X11 proxy: Unsupported authorisation protocol
Error: cannot open display: localhost:10.0
Output of toolbox --version (v0.0.90+)
toolbox version 0.0.99.4
Toolbox package info (rpm -q toolbox)
toolbox-0.0.99.4-1.fc38.x86_64
Output of podman version
e.g.,
Client: Podman Engine
Version: 4.5.1
API Version: 4.5.1
Go Version: go1.20.4
Built: Fri May 26 18:58:48 2023
OS/Arch: linux/amd64
Podman package info (rpm -q podman)
podman-4.5.1-1.fc38.x86_64
Info about your OS Fedora Silverblue 38
Additional context Might be related to https://github.com/containers/toolbox/issues/1290
Finally figured it out. The problem is that the hostname changes in the toolbox, so it can't find the right xauth magic cookie.
Two workarounds:
- Use
xauth listto get the current cookies, and then create a clone entry for a machine calledtoolbox. -
sudo hostname <actual host>inside the toolbox.
I'm experiencing the same issue, would be nice to have it resolved or at least have some permanent workaround/script to patch it.