Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

If I start a tmux session locally and leave it open, then ssh in remotely and start a new tmux session (not attaching to the old one, a brand spanking new session) X11 forwarding seems to break. I've tried this workaround for a similar issue with screen but to no avail...

The error message when I try to launch a GUI app (like xeyes) is something to the effect of can't open display: wrong authentication. I actually don't know what it is for sure because it seems like it's outputting a carriage return and overwriting part of the error message with a new one...

For now I just go through and manually close all the tmux sessions that I had started locally before starting my new remote session. Is there any way to get X11 forwarding working with mixed local/remote tmux sessions?

share|improve this question

1 Answer 1

Not 100% sure it'll work for you, but that link didn't work for me either and I just copied the DISPLAY variable from the initial terminal and wrote export DISPLAY=${copied from outside tmux} which worked fine - i.e.

log in ...
echo $DISPLAY # remember this
tmux a
export DISPLAY=${variable from memory}

the function from that link gave me a completely different DISPLAY which didn't work

share|improve this answer
Still failed due to "Wrong Authentication" –  mgalgs Jul 15 '13 at 19:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.