I hope that someone already knows the answer to this, because I fear that trying to unravel the startkde shell script, and the subtleties of ssh -f is going to be ugly.I am opening a remote desktop  on a centos 7.2 server running KDE 4.14.8, from a cygwin shell with Cygwin ssh version OpenSSH_7.1p1, OpenSSL 1.0.2d 9 Jul 2015.I start my local XWin server, then run ssh -fXY myself@centhost /bin/startkde > /tmp/kde_out.txt 2> /tmp/kde_err.txtThis works, but ssh never returns. I log out from kde, and the XWin display goes black, but then it seems to hang. When I look in my /tmp/kde_err.txt file, I see the lines...startkde: Shutting down...klauncher: Exiting on signal 15klauncher: Exiting on signal 1startkde: Running shutdown scripts...QThread: Destroyed while thread is still runningstartkde: Done.but ssh is never exiting. Also, my XWin server does not close automatically, and when I close it manually, it complains that there are still 6 clients connected. BTW, I get the same hang without stdout and stderr redirection of ssh.The startkde script is version 4.11.19, and it is sh, not bash. The last line of the script is echo 'startkde: Done.'  1>&2 but there is one trap 'echo GOT SIGHUP' HUP command early in the script. Here is a link to the whole script.Is this hang more likely due to the startkde script, the side-effects of the kde executables, or some known ssh client-server behavior?Thanks!
ssh -f, running remote startkde, does not exit. Why?
shell;ssh;kde