gnome-terminal blocks X forwarding when run from SSH
Submitted by zha..@..ve.com
Link to original bug (#753120)
Description
I routinely attach my Fedora 22 laptop (call it P) to my home network, and remote to it from my CentOS 6.6 workstation (W). I wrote a script which uses SSH to run GNOME Terminal on P, with remote display on W using X11 forwarding (example: "ssh -Y P -f bash -l -c gnome-terminal"). This script worked well using Fedora 19 (or thereabouts): a remote terminal popped up on W, hitting Ctrl-Shft-N (for example) would pop up a new P gnome-terminal window on W, and X applications run in these shells would display on W.
When I upgraded P to Fedora 22, though, the X11 forwarding started failing in an odd way. The forward is created and DISPLAY set accordingly, but any attempt to start an X application fails because it cannot connect to the display. If I run "ssh -Y P" in a terminal on W, however, everything works as expected. The script works fine from W to another CentOS 6 machine, and even works to P if "xterm" is substituted for "gnome-terminal".
Here's where it gets really strange: if I run the script on W to pop up remote terminals on P (which cannot connect to W's display), and then run "ssh -Y P" on W, the script-launched shells can suddenly connect to W's display! If I kill the non-script SSH session, the script-launched shells start failing again. Somehow, running the interactive shell allows the scripted shells to connect to the remote display.
Version: 3.16.x
Resolution: RESOLVED NOTABUG