csh is root's shell?

Dominic Mitchell dom at happygiraffe.net
Fri Oct 8 12:50:08 PDT 2004


On Fri, Oct 08, 2004 at 12:10:09AM +0700, Alexey Dokuchaev wrote:
> I use pretty much the same code for setting xterm's titlebar.  However,
> there is one known problem with it: when you leave (^D) your shell,
> being ssh'ed to another machine, titlebar still has that remote host
> name.  If there was a way to retrieve current title string, sigh.
> Unless, of course, I'm missing something here.

You can get the title back from an xterm, but it's not as simple as
putting it there...  And it only works when you're directly inside the
xterm, not ssh'd into another machine (assuming you sometimes ssh
several levels deep).

Anyway, I've had this snippet floating around my bin directory for a
while:

    xprop -id $WINDOWID | sed -n '/^WM_NAME(STRING)/{s/.*= "//;s/"$//;p;}'

I'm not in a position to test it right now, but it looks like it should
work.  :-)

-Dom


More information about the freebsd-current mailing list