Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: timeout problem in ssh sessions - I found the culprit: mouse.zsh



On Thu, Feb 14, 2008 at 02:24:17PM +0100, Andy Spiegl wrote:
[...]
> This is a _very_ nice addon by Stephane Chazelas
>  http://stchaz.free.fr/mouse.zsh
> to be able to use the mouse together with the "Super" key.
> It makes heavy use of the X selection so probably that's what is
> making the problems, maybe in combination with a bug ssh or X.
[...]

I hadn't followed that discussion even though I'm subscribed to
zsh-users. I had a look at your initial message on the ML
archive.

That probably explains then.

xclip or xsel fork a background process in order to own the
CLIPBOARD selection. Having something else owning the selection
(by having another app copying some text) should terminate that
xclip/xsel and release your ssh session.

Even if you redirect their stdin/out/err to /dev/null,
that xclip/xsel command will have a connection with sshd's X
server wrapper open and will hold your ssh session.

I don't think there's much you can do except killing those
xsel/xclip.

ssh man page:

The session terminates when the command or shell on the remote
machine exits and all X11 and TCP connections have been closed.

What you could do is run xclipboard on the X server. That tool
polls the CLIPBOARD selection to always be its owner, so that
the xclip/xsel never hang around for very long.

Cheers,
Stephane



Messages sorted by: Reverse Date, Date, Thread, Author