From owner-freebsd-current@FreeBSD.ORG Fri Oct 8 19:50:08 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A726216A4CE; Fri, 8 Oct 2004 19:50:08 +0000 (GMT) Received: from happygiraffe.net (happygiraffe.net [81.6.215.59]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5E28E43D39; Fri, 8 Oct 2004 19:50:08 +0000 (GMT) (envelope-from dom@happygiraffe.net) Received: from localhost (localhost.happygiraffe.net [127.0.0.1]) by happygiraffe.net (Postfix) with ESMTP id 671CBB9C1; Fri, 8 Oct 2004 20:50:05 +0100 (BST) Received: from happygiraffe.net ([127.0.0.1]) by localhost (ppe.happygiraffe.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 24888-05; Fri, 8 Oct 2004 20:50:05 +0100 (BST) Received: by happygiraffe.net (Postfix, from userid 1001) id 0065EB9C0; Fri, 8 Oct 2004 20:50:04 +0100 (BST) Date: Fri, 8 Oct 2004 20:50:04 +0100 To: Alexey Dokuchaev Message-ID: <20041008195004.GA22979@ppe.happygiraffe.net> References: <136a340a041007045538093bfd@mail.gmail.com> <200410071644.i97Giq5a058914@gw.catspoiler.org> <20041007171009.GA36712@regency.nsu.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041007171009.GA36712@regency.nsu.ru> User-Agent: Mutt/1.5.6i From: dom@happygiraffe.net (Dominic Mitchell) X-Virus-Scanned: by amavisd-new at happygiraffe.net cc: nkalev@gmail.com cc: rbgarga@gmail.com cc: Don Lewis cc: freebsd-current@freebsd.org Subject: Re: csh is root's shell? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Oct 2004 19:50:08 -0000 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