Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .